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


##########
platform/openide.util.ui/src/org/openide/util/ImageUtilities.java:
##########
@@ -1127,23 +1068,7 @@ public String toString() {
     /**
      * Key used for ToolTippedImage
      */
-    private static class ToolTipImageKey {
-        Image image;
-        String str;
-
-        ToolTipImageKey(Image image, String str) {
-            this.image = image;
-            this.str = str;
-        }
-
-        @Override
-        public boolean equals(Object other) {
-            if (!(other instanceof ToolTipImageKey)) {
-                return false;
-            }
-            ToolTipImageKey k = (ToolTipImageKey) other;
-            return (str.equals(k.str)) && (image == k.image);
-        }
+    private record ToolTipImageKey(Image image, String str) {

Review Comment:
   reverted the removed equals - it should make sense again.
   
   Records are just classes with exclusively final fields which are all mapped 
to constructor parameters. Its fine to override equals/hashcode/tostring. Sorry 
for adding confusion by removing the equals.



-- 
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: notifications-unsubscr...@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org
For additional commands, e-mail: notifications-h...@netbeans.apache.org

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

Reply via email to