Skip to content
This repository has been archived by the owner on May 14, 2022. It is now read-only.

[JENKINS-43930 & Others] - FindBugs fixes towards 1.9 #14

Merged
merged 7 commits into from May 3, 2017

Conversation

oleg-nenashev
Copy link
Member

  • Update Parent POM and increase the FindBugs effort
  • Fix file descriptor leak, which may require agent JVM restart to retry the installation. JENKINS-43930
  • Refactor Restarter thread and improve logging. Makes FindBucs happy about non-static inner classes
  • Update changelog

@reviewbybees

@ghost
Copy link

ghost commented Apr 28, 2017

This pull request originates from a CloudBees employee. At CloudBees, we require that all pull requests be reviewed by other CloudBees employees before we seek to have the change accepted. If you want to learn more about our process please see this explanation.

task.getLogger().println(r == 0 ? "Successfully started" : "Start service failed. Exit code=" + r);
} catch (IOException | InterruptedException ex) {
// Level is severe, because the process won't be recovered in the service mode
LOGGER.log(Level.SEVERE, "Failed to start the service with id=" + serviceId, ex);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The only change is logging here

<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<configuration>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The default threshold in plugin-pom is Medium, hence it misses the File leak on exceptional path in this case. Ideally should be fixed in Parent POM, of course

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

File leaks are treated as low severity by FindBugs? Maybe that is what should be fixed.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • File leaks on the common path are the Medium/High Severity depending on the detector
  • File leaks on Exceptional paths are low

The latter bullet does not make me happy as well

@@ -26,7 +27,9 @@ public SlaveInstaller createIfApplicable(Channel c) throws IOException, Interrup
return null;
}

@SuppressFBWarnings(value = "SE_NO_SERIALVERSIONID", justification = "Remoting does not need it")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Easier to just add it, no?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe it is safe in this case, not sure

@oleg-nenashev
Copy link
Member Author

@reviewbybees done

@oleg-nenashev oleg-nenashev merged commit 0b49e5a into jenkinsci:master May 3, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
3 participants