xzel23 commented on PR #237: URL: https://github.com/apache/pdfbox/pull/237#issuecomment-3240375551
You pass the size as one argument to the HashMap constructor. This does not exactly do what you expect it to do, I.e., avoid rehashing. The default load factor of 0.75 is used. What you would really want to use is HashMap.newHashMap(int size), but that was only introduced in java 19. The proper workaround for older java versions would be to use new HashMap(n * 4 / 3). -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
