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: dev-unsubscr...@pdfbox.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org For additional commands, e-mail: dev-h...@pdfbox.apache.org