iprithv commented on code in PR #15997:
URL: https://github.com/apache/lucene/pull/15997#discussion_r3169377682
##########
build-tools/build-infra/src/main/java/org/apache/lucene/gradle/plugins/java/CodeProfilingPlugin.java:
##########
@@ -204,13 +204,22 @@ public void apply(Project project) {
.getProviders()
.provider(
() -> {
- return task.getState().getFailure() ==
null;
+ return taskDidNotFail(task);
}));
});
});
}
}
+ private static boolean taskDidNotFail(Test task) {
+ try {
+ task.getState().rethrowFailure();
Review Comment:
Yes @mikemccand. Logically it was enough, but Error Prone flagged
`getFailure() == null` as `RedundantNullCheck` in
`build-infra-shadow:compileJava`. `rethrowFailure()` avoids that and keeps the
same intent. Thanks for checking it is idempotent!
--
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]