Skip to content
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

Merge stable-2.x into master #107

Merged
merged 8 commits into from
Sep 26, 2016
Merged

Conversation

oleg-nenashev
Copy link
Member

Integrates pending changes from the stable branch

kohsuke and others added 7 commits August 15, 2016 07:50
….x to master

Conflicts:
	pom.xml
	src/main/java/hudson/remoting/Engine.java
	src/main/java/hudson/remoting/Util.java
	src/main/java/org/jenkinsci/remoting/engine/EngineUtil.java
	src/main/java/org/jenkinsci/remoting/engine/JnlpServer3Handshake.java
int read = fis.read(cert);
FileInputStream fis = new FileInputStream(file);
final int read;
try {
Copy link
Member Author

Choose a reason for hiding this comment

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

Can be reworked later since we're on Java 7 now

Copy link
Member

Choose a reason for hiding this comment

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

Reworked using try with reseources?

@oleg-nenashev
Copy link
Member Author

@reviewbybees @stephenc

@ghost
Copy link

ghost commented Sep 26, 2016

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.

* @param closeableName Name of the closeable item
* @param closeableOwner String representation of the closeable holder
*/
static void closeAndLogFailures(@CheckForNull Closeable toClose, @Nonnull Logger logger,
Copy link
Member

Choose a reason for hiding this comment

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

is this used?

Copy link
Member Author

Choose a reason for hiding this comment

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

Seems "no", the merge process removed the usage. But it will be definitely used when I start cleaning up FindBugs

Copy link
Member Author

@oleg-nenashev oleg-nenashev Sep 26, 2016

Choose a reason for hiding this comment

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

So I want to keep it if there is no strong -1s

Copy link
Member

Choose a reason for hiding this comment

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

🐜; this code idiom was never a good idea in Java 6- IMO (better to just let any hypothetical exception from close be thrown up the stack), and is completely unnecessary in Java 7+, since try-with-resources calls addSuppressed when necessary. So delete this unused method, and when fixing FB warnings, just use the modern try style and you are fine.

Copy link
Member

@jglick jglick left a comment

Choose a reason for hiding this comment

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

🐝

* @param closeableName Name of the closeable item
* @param closeableOwner String representation of the closeable holder
*/
static void closeAndLogFailures(@CheckForNull Closeable toClose, @Nonnull Logger logger,
Copy link
Member

Choose a reason for hiding this comment

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

🐜; this code idiom was never a good idea in Java 6- IMO (better to just let any hypothetical exception from close be thrown up the stack), and is completely unnecessary in Java 7+, since try-with-resources calls addSuppressed when necessary. So delete this unused method, and when fixing FB warnings, just use the modern try style and you are fine.

@oleg-nenashev
Copy link
Member Author

The method is still useful for particular cases, but I'll remove it in order to unblock the PR and further changes

@oleg-nenashev
Copy link
Member Author

Merging as per previous feedback

@oleg-nenashev oleg-nenashev merged commit 190653b into jenkinsci:master Sep 26, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants