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

 ##########
 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:
   Position of multiple error will be the same or different.
   If position is same then no need to get the position of the last error, one 
can simply break from the loop
    

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