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 2025/11/06 23:19:31 UTC
[PR] Fixes find-usages and call-hierarchy on enum constructors. [netbeans]
mbien opened a new pull request, #8991:
URL: https://github.com/apache/netbeans/pull/8991
Use the fallback codepath if the end position is negative.
unfortunately all tests for the find usage functionality are disabled atm which makes changes in this area a bit risky.
```java
public enum Letters {
A {
@Override
public String toString() {
return "C";
}
}, B;
Letters() {}
// ^^ run find usages or call hierarchy
}
```
to trigger the exception in NB 28, at least one enum field must have a class body `{}`.
fixes #8985
--
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
Re: [PR] Fixes find-usages and call-hierarchy on enum constructors. [netbeans]
Posted by "mbien (via GitHub)" <gi...@apache.org>.
mbien merged PR #8991:
URL: https://github.com/apache/netbeans/pull/8991
--
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
Re: [PR] Fixes find-usages and call-hierarchy on enum constructors. [netbeans]
Posted by "mbien (via GitHub)" <gi...@apache.org>.
mbien commented on PR #8991:
URL: https://github.com/apache/netbeans/pull/8991#issuecomment-3514758602
i can now view the bugzilla bugs again since my account got repaired, the comment mentions the hotfix for https://bz.apache.org/netbeans/show_bug.cgi?id=213723 which is the exact same bug.
reproducer was:
```java
public enum Tester {
ENUM1 {
{
System.out.println("");
}
},
ENUM2 {
@Override
public String toString() {
return super.toString();
}
};
private Tester() {
}
}
```
what I believe happened is that `getStartPosition()` used to return -1 there, but for some reason it returns now a positive number, while `getStartPosition()` still returns -1. This made the same bug resurface again.
So this PR essentially activates the old hotfix again. cc @jlahoda
--
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
Re: [PR] Fixes find-usages and call-hierarchy on enum constructors. [netbeans]
Posted by "mbien (via GitHub)" <gi...@apache.org>.
mbien commented on PR #8991:
URL: https://github.com/apache/netbeans/pull/8991#issuecomment-3503773067
I tried to track the label problem down yesterday, I might give it another try in case it would only be a UI change. I suspect that it could be, because find-usages does seem to do a better job to find the name of the enum constants than call-hierarchy - while both use the same code path to compute the usages.
--
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
Re: [PR] Fixes find-usages and call-hierarchy on enum constructors. [netbeans]
Posted by "mbien (via GitHub)" <gi...@apache.org>.
mbien commented on PR #8991:
URL: https://github.com/apache/netbeans/pull/8991#issuecomment-3503786804
i also forgot to mention that i can't access the old bugzilla atm. I asked on slack and it seems like more can't log in. I would also be good to read through the bug IDs which were mentioned in the comments marked as hotfix. I might open a infra issue.
--
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