-
Notifications
You must be signed in to change notification settings - Fork 75
Remove dep on commons-lang3-api
#659
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
Conversation
src/main/java/com/cloudbees/jenkins/support/configfiles/SecretHandler.java
Outdated
Show resolved
Hide resolved
.filter(StringUtils::isNotBlank) | ||
.filter(s -> s != null && !s.trim().isEmpty()) |
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.
Note that this sort of mechanical search-and-replace leaves behind a lot of spots like this one where the original use of isNotBlank
does not seem to make much sense. Why would an entry in
support-core-plugin/src/main/java/com/cloudbees/jenkins/support/filter/NameProvider.java
Line 59 in 0d10c0a
* @return a stream of names to anonymize |
""
, or start or end with whitespace? At least the first two seem actually impossible.
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.
actually tests are failing when not filtering the blank ones
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.
Strange, perhaps an artifact of a bad test?
src/main/java/com/cloudbees/jenkins/support/impl/DirectoryComponent.java
Outdated
Show resolved
Hide resolved
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.
#659 (comment) possible regression
@mawinter69 please avoid force-pushing into a PR branch unless you accidentally committed a secret or something, as it breaks the GitHub feature of allowing maintainers to incrementally review changes. |
commons-lang3-api
ArrayList<String> var5 = new ArrayList<>(Arrays.asList(dirScanner.getIncludedFiles())); | ||
var5.addAll(Stream.of(dirScanner.getNotFollowedSymlinks()) | ||
.map(s -> dir.toPath().relativize(Paths.get(s)).toString()) | ||
.toList()); |
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 Stream.concat
could also be used.
test failure seems unrelated. Worked fine locally on windows |
To be able to remove commons-lang from core all direct and indirect usages must be replaced with commons-lang3 or native Java
use XS_DATETIME_FORMATTER2 instead of deprecated XS_DATETIME_FORMATTER from core
use commons-lang3 api plugin instead of commons-lang provided by core
Testing done
Submitter checklist