You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by GitBox <gi...@apache.org> on 2021/11/30 19:53:10 UTC

[GitHub] [netbeans] matthiasblaesing commented on a change in pull request #3228: fixed class modifier auto completion for sealed classes.

matthiasblaesing commented on a change in pull request #3228:
URL: https://github.com/apache/netbeans/pull/3228#discussion_r759605602



##########
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:
       How performance critical is this? I read somewhere, that exception handling is not the fast path in the JVM, so if this is a problem we'd need to buffer that.

##########
File path: harness/nbjunit/src/org/netbeans/junit/NbTestCase.java
##########
@@ -739,7 +739,7 @@ static public void assertFile(String message, File test, File pass, File diff, D
         } else {
             try {
                 if (diffImpl.diff(test, pass, diffFile)) {
-                    throw new AssertionFileFailedError(message, null == diffFile ? "" : diffFile.getAbsolutePath());
+                    throw new AssertionFileFailedError(message+"\n diff: "+diffFile, null == diffFile ? "" : diffFile.getAbsolutePath());

Review comment:
       How large are the files? I think the `diffFile` should lenght limited.




-- 
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