-
-
Notifications
You must be signed in to change notification settings - Fork 272
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[JENKINS-35494] - FindBugs - fix minor File Management issues in hudson.remoting.Launcher #88
Conversation
…on.remoting.Launcher - [x] Tcp port temporary file is not being closed properly when running in the runAsTcpServer() mode - [x] tcpPortFile deletion issues are not being logged - [x] Resource input stream is not being closed correctly
🐝 👍 |
🐝 |
@reviewbybees done |
Changes summary: Fixed issues: * [JENKINS-22722](https://issues.jenkins-ci.org/browse/JENKINS-22722) - Make the channel reader tolerant against Socket timeouts. (jenkinsci/remoting#80) * [JENKINS-32326](https://issues.jenkins-ci.org/browse/JENKINS-32326) - Support no_proxy environment variable. (jenkinsci/remoting#84) * [JENKINS-35190](https://issues.jenkins-ci.org/browse/JENKINS-35190) - Do not invoke PingFailureAnalyzer for agent=>master ping failures. (jenkinsci/remoting#85) * [JENKINS-31256](https://issues.jenkins-ci.org/browse/JENKINS-31256) - <code>hudson.Remoting.Engine#waitForServerToBack</code> now uses credentials for connection. (jenkinsci/remoting#87) * [JENKINS-35494](https://issues.jenkins-ci.org/browse/JENKINS-35494) - Fix issues in file management in <code>hudson.remoting.Launcher</code> (main executable class). (jenkinsci/remoting#88) Enhancements: * Ensure a message is logged if remoting fails to override the default <code>ClassFilter</code>. (jenkinsci/remoting#80)
Changes summary: Fixed issues: * [JENKINS-22722](https://issues.jenkins-ci.org/browse/JENKINS-22722) - Make the channel reader tolerant against Socket timeouts. (jenkinsci/remoting#80) * [JENKINS-32326](https://issues.jenkins-ci.org/browse/JENKINS-32326) - Support no_proxy environment variable. (jenkinsci/remoting#84) * [JENKINS-35190](https://issues.jenkins-ci.org/browse/JENKINS-35190) - Do not invoke PingFailureAnalyzer for agent=>master ping failures. (jenkinsci/remoting#85) * [JENKINS-31256](https://issues.jenkins-ci.org/browse/JENKINS-31256) - <code>hudson.Remoting.Engine#waitForServerToBack</code> now uses credentials for connection. (jenkinsci/remoting#87) * [JENKINS-35494](https://issues.jenkins-ci.org/browse/JENKINS-35494) - Fix issues in file management in <code>hudson.remoting.Launcher</code> (main executable class). (jenkinsci/remoting#88) Enhancements: * Ensure a message is logged if remoting fails to override the default <code>ClassFilter</code>. (jenkinsci/remoting#80)
// accept just one connection and that's it. | ||
// when we are done, remove the port file to avoid stale port file | ||
Socket s; | ||
try { | ||
s = ss.accept(); | ||
ss.close(); | ||
} finally { | ||
tcpPortFile.delete(); | ||
boolean deleted = tcpPortFile.delete(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BTW - java 7 NIO is much better as it will tell you why it could not delete the file...
@jtnord Yep, such Java7 improvements make sense. BTW it rather requires a bulk refactoring. I'm not ready to perform it now. Better to fix blocker issues first |
Changes summary: Fixed issues: * [JENKINS-22722](https://issues.jenkins-ci.org/browse/JENKINS-22722) - Make the channel reader tolerant against Socket timeouts. (jenkinsci/remoting#80) * [JENKINS-32326](https://issues.jenkins-ci.org/browse/JENKINS-32326) - Support no_proxy environment variable. (jenkinsci/remoting#84) * [JENKINS-35190](https://issues.jenkins-ci.org/browse/JENKINS-35190) - Do not invoke PingFailureAnalyzer for agent=>master ping failures. (jenkinsci/remoting#85) * [JENKINS-31256](https://issues.jenkins-ci.org/browse/JENKINS-31256) - <code>hudson.Remoting.Engine#waitForServerToBack</code> now uses credentials for connection. (jenkinsci/remoting#87) * [JENKINS-35494](https://issues.jenkins-ci.org/browse/JENKINS-35494) - Fix issues in file management in <code>hudson.remoting.Launcher</code> (main executable class). (jenkinsci/remoting#88) Enhancements: * Ensure a message is logged if remoting fails to override the default <code>ClassFilter</code>. (jenkinsci/remoting#80) (cherry picked from commit c718516)
Changes summary: Fixed issues: * [JENKINS-22722](https://issues.jenkins-ci.org/browse/JENKINS-22722) - Make the channel reader tolerant against Socket timeouts. (jenkinsci/remoting#80) * [JENKINS-32326](https://issues.jenkins-ci.org/browse/JENKINS-32326) - Support no_proxy environment variable. (jenkinsci/remoting#84) * [JENKINS-35190](https://issues.jenkins-ci.org/browse/JENKINS-35190) - Do not invoke PingFailureAnalyzer for agent=>master ping failures. (jenkinsci/remoting#85) * [JENKINS-31256](https://issues.jenkins-ci.org/browse/JENKINS-31256) - <code>hudson.Remoting.Engine#waitForServerToBack</code> now uses credentials for connection. (jenkinsci/remoting#87) * [JENKINS-35494](https://issues.jenkins-ci.org/browse/JENKINS-35494) - Fix issues in file management in <code>hudson.remoting.Launcher</code> (main executable class). (jenkinsci/remoting#88) Enhancements: * Ensure a message is logged if remoting fails to override the default <code>ClassFilter</code>. (jenkinsci/remoting#80)
Changes summary: Fixed issues: * [JENKINS-22722](https://issues.jenkins-ci.org/browse/JENKINS-22722) - Make the channel reader tolerant against Socket timeouts. (jenkinsci/remoting#80) * [JENKINS-32326](https://issues.jenkins-ci.org/browse/JENKINS-32326) - Support no_proxy environment variable. (jenkinsci/remoting#84) * [JENKINS-35190](https://issues.jenkins-ci.org/browse/JENKINS-35190) - Do not invoke PingFailureAnalyzer for agent=>master ping failures. (jenkinsci/remoting#85) * [JENKINS-31256](https://issues.jenkins-ci.org/browse/JENKINS-31256) - <code>hudson.Remoting.Engine#waitForServerToBack</code> now uses credentials for connection. (jenkinsci/remoting#87) * [JENKINS-35494](https://issues.jenkins-ci.org/browse/JENKINS-35494) - Fix issues in file management in <code>hudson.remoting.Launcher</code> (main executable class). (jenkinsci/remoting#88) Enhancements: * Ensure a message is logged if remoting fails to override the default <code>ClassFilter</code>. (jenkinsci/remoting#80)
@reviewbybees