You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by "mbien (via GitHub)" <gi...@apache.org> on 2024/04/26 11:51:38 UTC
Re: [I] override method for record should suggest all Object methods, not just clone() [netbeans]
mbien commented on issue #7167:
URL: https://github.com/apache/netbeans/issues/7167#issuecomment-2079235917
javac api returns those methods as final, which is why NB isn't offering overrides for them:
```
getClass()java.lang.Class -> [public, final, native]
clone()java.lang.Object -> [protected, native]
notify()void -> [public, final, native]
notifyAll()void -> [public, final, native]
wait()void -> [public, final]
wait(long)void -> [public, final, native]
wait(long,int)void -> [public, final]
finalize()void -> [protected]
toString()java.lang.String -> [public, final]
hashCode()int -> [public, final]
equals(java.lang.Object)boolean -> [public, final]
```
the "getters" of the record components are seen as already overridden, so those aren't offered either.
https://github.com/apache/netbeans/blob/97fd224c7aefd548207753c6f7fedadfd3440e1c/java/java.source.base/src/org/netbeans/api/java/source/ElementUtilities.java#L703
--
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-unsubscribe@netbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists