lkishalmi commented on code in PR #9112:
URL: https://github.com/apache/netbeans/pull/9112#discussion_r2680054763


##########
extide/gradle/src/org/netbeans/modules/gradle/loaders/LegacyProjectLoader.java:
##########
@@ -293,22 +286,20 @@ private static GradleProject 
loadGradleProject(ReloadContext ctx, CancellationTo
                     for (String s : info.getProblems()) {
                         reps.add(GradleProject.createGradleReport(f == null ? 
null : f.toPath(), s));
                     }
-                    return ctx.previous.invalidate(reps.toArray(new 
GradleReport[0]));
+                    return 
ctx.previous.invalidate(reps.toArray(GradleReport[]::new));
                 }
             }
         } catch (GradleConnectionException | IllegalStateException ex) {
             LOG.log(FINE, "Failed to retrieve project information for: " + 
base.getProjectDir(), ex);
             List<GradleReport> problems = 
exceptionsToProblems(ctx.project.getGradleFiles().getBuildScript(), ex);
             errors.openNotification(TIT_LOAD_FAILED(base.getProjectDir()), 
ex.getMessage(), GradleProjectErrorNotifications.bulletedList(problems));
-            return ctx.previous.invalidate(problems.toArray(new 
GradleReport[0]));
-        } catch (ThreadDeath td) {

Review Comment:
   There should be no reason keeping `ThreadDeath` around. 



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