File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed
main/java/io/servicetalk/http/api
test/java/io/servicetalk/http/api Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change 1818import java .util .Arrays ;
1919import java .util .ConcurrentModificationException ;
2020import java .util .HashSet ;
21+ import java .util .LinkedHashSet ;
2122import java .util .Iterator ;
2223import java .util .Map ;
2324import java .util .Map .Entry ;
@@ -144,7 +145,7 @@ final Set<? extends K> getKeys() {
144145 return emptySet ();
145146 }
146147 // Overall iteration order does not need to be preserved.
147- final Set <K > names = new HashSet <>((int ) (size () / .75 ), .75f );
148+ final Set <K > names = new LinkedHashSet <>((int ) (size () / .75 ), .75f );
148149 BucketHead <K , V > bucketHead = lastBucketHead ;
149150 while (bucketHead != null ) {
150151 MultiMapEntry <K , V > e = bucketHead .entry ;
Original file line number Diff line number Diff line change @@ -434,6 +434,9 @@ void headersWithSameNamesAndValuesShouldBeEquivalent() {
434434 assertEquals (headers2 , headers1 );
435435 assertEquals (headers1 , headers1 );
436436 assertEquals (headers2 , headers2 );
437+ assertEquals (headers1 .hashCode (), headers2 .hashCode ());
438+ assertEquals (headers1 .hashCode (), headers1 .hashCode ());
439+ assertEquals (headers2 .hashCode (), headers2 .hashCode ());
437440 }
438441
439442 @ Test
You can’t perform that action at this time.
0 commit comments