vikasprabhakar commented on a change in pull request #1131: [NETBEANS-1251] 
nb-javac 11 testcase failure : Compound var declaration
URL: 
https://github.com/apache/incubator-netbeans/pull/1131#discussion_r256702720
 
 

 ##########
 File path: 
java/java.hints/test/unit/src/org/netbeans/modules/java/hints/infrastructure/ErrorHintsTestBase.java
 ##########
 @@ -335,8 +335,8 @@ protected final int positionForErrors() throws 
IllegalStateException {
         Diagnostic<?> found = null;
         for (Diagnostic<?> d : info.getDiagnostics()) {
             if (d.getKind() == Diagnostic.Kind.ERROR && (supportedErrorKeys == 
null || supportedErrorKeys.contains(d.getCode()))) {
-                if (found == null) {
-                    found = d;
+                if (found == null || found.getCode().equals(d.getCode())) {
 
 Review comment:
   Second null check "if(found == null)" require to assign the first error and 
bypass the next error of with same error code.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org
For additional commands, e-mail: notifications-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to