mbien commented on code in PR #7554:
URL: https://github.com/apache/netbeans/pull/7554#discussion_r1668508457


##########
enterprise/micronaut/src/org/netbeans/modules/micronaut/symbol/MicronautSymbolFinder.java:
##########
@@ -111,6 +112,11 @@ public final class MicronautSymbolFinder extends 
EmbeddingIndexer implements Pro
 
     private final Map<FileObject, Boolean> map = new WeakHashMap<>();
     private final Map<ClasspathInfo, List<ClassSymbolLocation>> cache = new 
WeakHashMap<>();
+    private final ChangeListener listener = (evt) -> {
+        if (cache.keySet().contains(evt.getSource())) {
+            cache.clear();
+        }
+    };

Review Comment:
   nitpick: better name would be `cacheCleaner` or something similar. Or it 
could be inlined so that it doesn't need a name.



-- 
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]

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to