mbien commented on code in PR #5931:
URL: https://github.com/apache/netbeans/pull/5931#discussion_r1192202440


##########
java/maven.indexer/src/org/netbeans/modules/maven/indexer/NexusRepositoryIndexerImpl.java:
##########
@@ -568,6 +568,16 @@ private void indexLoadedRepo(final RepositoryInfo repo, 
boolean updateLocal) thr
                         // IllegalArgumentException signals remote archive 
format problems
                         fetchFailed = true;
                         throw new IOException("Failed to load maven-index for: 
" + indexingContext.getRepositoryUrl(), ex);
+                    } catch (RuntimeException ex) {
+                        // thread pools, like the one used in maven-indexer's 
IndexDataReader, may suppress cancellation exceptions
+                        // lets try to find them again
+                        if (isCancellation(ex)) {
+                            Cancellation cancellation = new Cancellation();
+                            cancellation.addSuppressed(ex);
+                            throw cancellation;
+                        } else {
+                            throw ex;
+                        }

Review Comment:
   we can do this now since it was fixed upstream in 7.0.2: 
https://github.com/apache/maven-indexer/pull/314
   -> cancelling indexing in multi threaded mode works now



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