Skip to content

Conversation

gbadner
Copy link
Contributor

@gbadner gbadner commented Nov 25, 2019

}
Map<Integer, List<Object>> map = new HashMap<>();
for ( Object o : searchedBag ) {
map.computeIfAbsent( nullableHashCode( o, elementType ), k -> new ArrayList<>() ).add( o );
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

using LinkedList seems not a bad idea, btw. It would simulate the hashmap bucket implementation as much as possible and avoid ArrayList sizing dilemma.

@gbadner gbadner merged commit 3e1663a into hibernate:5.3 Jan 7, 2020
@gbadner gbadner deleted the HHH-13675_HHH-13651_5.3 branch January 7, 2020 21:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants