netty5/codec
Chris Vest 95e4d6f3fe Fix hash collision handling in DefaultHeaders iterator remove (#11028)
Motivation:
If two different headers end up in the same hash bucket, and you are iterating the header that is not the first in the bucket, and you use the iterator to remove the first element returned from the iterator, then you would get a NullPointerException.

Modification:
Change the DefaultHeaders iterator remove method, to re-iterate the hash bucket and unlink the entry once found, if we don't have any existing iteration starting point.

Also made DefaultHeaders.remove0 package private to avoid a synthetic method indirection.

Result:
Removing from iterators from DefaultHeaders is now robust towards hash collisions.
2021-02-19 13:31:55 +01:00
..
src Fix hash collision handling in DefaultHeaders iterator remove (#11028) 2021-02-19 13:31:55 +01:00
pom.xml Use http in xmlns URIs to make maven release plugin happy again (#10788) 2020-11-10 10:51:05 +01:00