mbien commented on code in PR #9112:
URL: https://github.com/apache/netbeans/pull/9112#discussion_r2677399131
##########
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:
I think that cleanup of for-removal API is probably fine in this case. TD
shouldn't occur anymore since most `Thread.stop()` calls should be removed by
now given that the method was removed in JDK 26 (I hope nothing in our gradle
logic is still relies on it). On JDK 21+, calling `stop()` would throw
`UnsupportedOperationException`.
However, if this is a concern here, we could keep it in for one release
more, since NB 30 will move the lower bound from 17 to JDK 21 at which point it
truly can't be encountered anymore within NB.
--
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