mbien commented on issue #4054:
URL: https://github.com/apache/netbeans/issues/4054#issuecomment-1263155197

   @jlahoda could you take a look at this? A reproducer is in the comment above 
this one. 
   
   Should all return statements which leave the task, also increment the 
`currentPointer` counter?
   
   something this would break the infinite loop:
   ```diff
   diff --git 
a/java/spi.java.hints/src/org/netbeans/modules/java/hints/spiimpl/batch/BatchSearch.java
 
b/java/spi.java.hints/src/org/netbeans/modules/java/hints/spiimpl/batch/BatchSearch.java
   index f01480d..d2ce275 100644
   --- 
a/java/spi.java.hints/src/org/netbeans/modules/java/hints/spiimpl/batch/BatchSearch.java
   +++ 
b/java/spi.java.hints/src/org/netbeans/modules/java/hints/spiimpl/batch/BatchSearch.java
   @@ -246,8 +246,10 @@
                                    boolean cont = true;
    
                                    try {
   -                                    if 
(parameter.toPhase(Phase.RESOLVED).compareTo(Phase.RESOLVED) < 0)
   +                                    if 
(parameter.toPhase(Phase.RESOLVED).compareTo(Phase.RESOLVED) < 0) {
   +                                        currentPointer.incrementAndGet();
                                            return ;
   +                                    }
    
                                        progress.setMessage("processing: " + 
FileUtil.getFileDisplayName(parameter.getFileObject()));
                                        Resource r = 
file2Resource.get(parameter.getFileObject());
   ```
   
   


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

Reply via email to