netty5/codec
Chris Vest 28d4154fff
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:29:47 +01:00
..
src Fix hash collision handling in DefaultHeaders iterator remove (#11028) 2021-02-19 13:29:47 +01:00
pom.xml [maven-release-plugin] prepare for next development iteration 2021-02-08 10:48:37 +00:00