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

[JENKINS-54128] Deprecated calls to Run.getLogFile #42

Merged
merged 1 commit into from
Mar 3, 2020

Conversation

basil
Copy link
Member

@basil basil commented Mar 3, 2020

See JENKINS-54128. Removes this plugin's usage of the deprecated Run#getLogFile method, which has been deprecated as of JEP-210, in favor of the non-deprecated Run#getLogReader method. The latter internally handles character set issues, so there is also no need to deal with the character set when calling the method. As a bonus, I also switched to the Java 7 try-with-resources syntax.

@slide slide merged commit 4ecf7f6 into jenkinsci:master Mar 3, 2020
@basil basil deleted the JENKINS-54128 branch March 3, 2020 20:33
}

public String readLogFile(File file) throws IOException {
private String readLogFile(Run<?, ?> run) throws IOException {
Copy link

Choose a reason for hiding this comment

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

Isn't changing the visibility a bit risky?

Copy link

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

It's a bit risky, yes. I am fine with it though

Copy link

Choose a reason for hiding this comment

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

Fine then, thanks!

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.

3 participants