sabi0 commented on code in PR #13087: URL: https://github.com/apache/lucene/pull/13087#discussion_r1506669079
########## lucene/core/src/java/org/apache/lucene/util/VirtualMethod.java: ########## @@ -74,14 +73,13 @@ */ public final class VirtualMethod<C> { - private static final Set<Method> singletonSet = - Collections.synchronizedSet(new HashSet<Method>()); + private static final Set<Method> singletonSet = ConcurrentHashMap.newKeySet(); private final Class<C> baseClass; private final String method; private final Class<?>[] parameters; private final ClassValue<Integer> distanceOfClass = - new ClassValue<Integer>() { + new ClassValue<>() { Review Comment: Reverted ########## lucene/CHANGES.txt: ########## @@ -260,6 +260,8 @@ Improvements * GITHUB#13092: `static final Map` constants have been made immutable (Dmitry Cherniachenko) +* GITHUB#13087: Some `static final Set` constants were mutable - rectified. (Dmitry Cherniachenko) Review Comment: Done -- 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