Cleanup redundant null checks and fix encoding inconsistencies in core#26023
Closed
shbhmexe wants to merge 3 commits intojenkinsci:masterfrom
Closed
Cleanup redundant null checks and fix encoding inconsistencies in core#26023shbhmexe wants to merge 3 commits intojenkinsci:masterfrom
shbhmexe wants to merge 3 commits intojenkinsci:masterfrom
Conversation
- Remove redundant null checks for URLConnection as URL.openConnection() never returns null. - Align TextFile.head() and TextFile.fastTail() to use UTF-8 consistently with the rest of the class. Signed-off-by: shbhmexe <shubhushukla586@gmail.com>
Signed-off-by: shbhmexe <shubhushukla586@gmail.com>
Member
|
What's with the pointless line break changes? This PR should not change hundreds of lines. |
Member
|
While this is technically correct, your reasoning is flawed.
The code removed calls |
Contributor
|
Closing this pull request because the submitter has not responded in two weeks to requests for changes. The code does not compile, it includes unnecessary changes, and seems to assume that the reviewers will perform lots of extra work on behalf of the submitter. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes (no issue, minor improvement)
Testing done
TextFileTestinjenkins-coreto ensurehead()andfastTail()correctly handle UTF-8 data and remain compatible with existing test cases.URL.openConnection()in Java is guaranteed to return aURLConnectionor throw anIOException, making the removednullchecks redundant as per JDK specification.TextFileutility.Screenshots (UI changes only)
N/A
Proposed changelog entries
TextFileand validation utilities.Proposed changelog category
/label internal
Proposed upgrade guidelines
N/A
Submitter checklist
@Restrictedor have@since TODOJavadocs, as appropriate.@Deprecated(since = "TODO")or@Deprecated(forRemoval = true, since = "TODO"), if applicable.evalto ease future introduction of Content Security Policy (CSP) directives (see documentation).Desired reviewers
@jenkinsci/core-pr-reviewers