eirikbakke commented on code in PR #7451:
URL: https://github.com/apache/netbeans/pull/7451#discussion_r1636594204


##########
platform/openide.awt/src/org/openide/awt/ContextAction.java:
##########
@@ -284,28 +286,22 @@ public boolean equals(Object obj) {
         if (obj == this) {
             return true;
         }
-        
+
         if (obj instanceof ContextAction) {
             ContextAction c = (ContextAction)obj;
-            
+
             return type.equals(c.type) &&
                 selectMode.equals(c.selectMode) &&
                 performer.equals(c.performer) &&
                 Objects.equals(enableMonitor, c.enableMonitor);
         }
         return false;
     }
-    
-    private static final Reference<Object> NONE = new WeakReference<>(null);

Review Comment:
   If NONE had been used consistently instead of null, then it would have been 
a useful way to avoid a lot of null checks. (Since you need a null check for 
the inner reference always but could avoid the outer one.) But it seems it was 
not really used this way.



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