-
-
Notifications
You must be signed in to change notification settings - Fork 8.9k
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
Issue Jenkins-36718 - Fix DM_DEFAULT_ENCODING scanned by spotbugs #9784
base: master
Are you sure you want to change the base?
Issue Jenkins-36718 - Fix DM_DEFAULT_ENCODING scanned by spotbugs #9784
Conversation
@oleg-nenashev , I saw this issue on Jira and mentioned you in the article. JENKINS-36718 |
@programbeginnerTW thank for the pull request. I'm yet to return to the Jenkins core maintenance after a long sabbatical. I will try to take a look when I have a bit of a time, but there are also many other core maintainers around so you shouldn't depend on my response Generally, I need to refresh my memory what will the agreements on default encoding. Using anything except system default is a potential breaking change. Maybe this it is safer to just use default |
1 similar comment
@programbeginnerTW thank for the pull request. I'm yet to return to the Jenkins core maintenance after a long sabbatical. I will try to take a look when I have a bit of a time, but there are also many other core maintainers around so you shouldn't depend on my response Generally, I need to refresh my memory what will the agreements on default encoding. Using anything except system default is a potential breaking change. Maybe this it is safer to just use default |
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.
@programbeginnerTW, could you resolve warning for this PR, please?
@@ -194,7 +194,7 @@ public void encodeTo(OutputStream out) throws IOException { | |||
* encoding is ASCII compatible. | |||
*/ | |||
public void encodeTo(Writer out) throws IOException { | |||
out.write(encodeToBytes().toString()); | |||
out.write(new String(encodeToBytes().toByteArray(), StandardCharsets.UTF_8)); |
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.
@programbeginnerTW Could you please check this warning message, please?
Check warning on line 197 in core/src/main/java/hudson/console/ConsoleNote.java
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.
@A1exKH Thanks for the reply,
Seems the coverage shrunk in this modification, the previous scan was 2, and now 1 has missed.
Should I simply add a new test for it? Or should I revise and review if there's anything I can do?
See JENKINS-36718.
Testing done
Proposed changelog entries
Proposed upgrade guidelines
N/A
Submitter checklist
Before the changes are marked as
ready-for-merge
:Maintainer checklist