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 causing confusion by removing the equals - yes it should be kept
symmetrical.
--
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