mbien commented on a change in pull request #3228:
URL: https://github.com/apache/netbeans/pull/3228#discussion_r759620529
##########
File path:
java/java.completion/src/org/netbeans/modules/java/completion/JavaCompletionTask.java
##########
@@ -4880,6 +4886,14 @@ private void addClassModifiers(Env env, Set<Modifier>
modifiers) {
}
}
+ private static boolean contains(Set<Modifier> modifiers, String modifier) {
+ try {
+ return modifiers.contains(Modifier.valueOf(modifier));
+ } catch (IllegalArgumentException ex) {
Review comment:
it shouldn't be a problem there since its called only a handful of times
per completion. But i do agree in principle, exceptions should be avoided if
possible.
Additionally: it won't throw with recent javacs, be it auto-javac or JDK's.
If java 17 javac is standard we can remove all the workarounds and use the enum
directly.
--
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