JaroslavTulach commented on a change in pull request #2386:
URL: https://github.com/apache/netbeans/pull/2386#discussion_r491975900



##########
File path: 
platform/settings/src/org/netbeans/modules/settings/RecognizeInstanceObjects.java
##########
@@ -93,24 +94,49 @@ protected Lookup lookupFor(Object obj) {
         return null;
     }
     
-    private static final class OverObjects extends ProxyLookup 
-    implements PropertyChangeListener, FileChangeListener {
-        private final String path;
-        
-        public OverObjects(String path) {
-            super(delegates(null, path));
-            this.path = path;
+    private static final class MSL implements PropertyChangeListener {
+        private final PropertyChangeSupport pcs = new 
PropertyChangeSupport(this);
+        public static final MSL DEFAULT = new MSL();
+        static {
             try {
                 ModuleSystem ms = Main.getModuleSystem(false);
                 if (ms != null) {
                     ModuleManager man = ms.getManager();
-                    
man.addPropertyChangeListener(WeakListeners.propertyChange(this, man));
+                    
man.addPropertyChangeListener(WeakListeners.propertyChange(DEFAULT, man));
                 } else {
                     LOG.log(Level.WARNING, "Not listening on module system");

Review comment:
       This message was printed out  everytime new instance of `OverObjects` 
was created in a unit test. Quite annoying. Enough to emit the warning once per 
test.




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

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