thecoop commented on code in PR #11847: URL: https://github.com/apache/lucene/pull/11847#discussion_r1012767732
########## lucene/core/src/java/org/apache/lucene/store/DataInput.java: ########## @@ -280,6 +281,18 @@ public String readString() throws IOException { return new String(bytes, 0, length, StandardCharsets.UTF_8); } + private final Map<String, String> canonicalStrings = new HashMap<>(); Review Comment: Added code to handle cloning. Seeing as the variable is no longer final, I've also made it lazily initialised. -- 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: issues-unsubscr...@lucene.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org