edwardcapriolo commented on code in PR #506:
URL: https://github.com/apache/incubator-livy/pull/506#discussion_r2710333660
##########
rsc/src/main/java/org/apache/livy/rsc/ContextLauncher.java:
##########
@@ -436,36 +422,34 @@ public void detach() {
try {
monitor.join(conf.getTimeAsMs(CLIENT_SHUTDOWN_TIMEOUT));
} catch (InterruptedException ie) {
- LOG.debug("Interrupted before driver thread was finished.");
+ LOG.debug("Interrupted before driver thread was finished.", ie);
}
}
private Thread monitor(final Runnable task, int childId) {
- Runnable wrappedTask = new Runnable() {
- @Override
- public void run() {
- try {
- task.run();
- } finally {
- confFile.delete();
- }
+ Runnable wrappedTask = () -> {
+ try {
+ task.run();
+ } finally {
+ boolean ignored = confFile.delete();
Review Comment:
I think its good practice. Ignore return values is usually a findbugs
warning. Like "mkdir() returns 1 when it fails to make the directory."
https://softdevbuilttolast.wordpress.com/2010/03/23/findbugs-help-create-robust-code-with-the-checkreturnvalue-annotation/
The yellow in my IDE is what called my attention to the initial real null
pointer issue in the loop that processes the classpath
--
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]