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

Remove some usages of StringUtils #35

Merged
merged 1 commit into from
Apr 26, 2024
Merged

Conversation

basil
Copy link
Member

@basil basil commented Apr 26, 2024

Start to remove some low-hanging fruit.

Testing done

mvn clean verify

@basil basil added the internal label Apr 26, 2024
@basil basil requested a review from BobDu April 26, 2024 01:23
@BobDu
Copy link
Member

BobDu commented Apr 26, 2024

Some additional thoughts.

run in jenkins-usage-in-plugins search the use of the json-lib class.

cat addclass.txt 

net.sf.json.*
net.sf.ezmorph.*

mvn clean compile exec:java -Dexec.args="--includeCore -i -C addclass.txt"

Result report:
usage-by-api.json

The XML Serializer related parts seem to be unused.
Can we safe simply removing the XML to reduce the amount of code that requires maintenance? This would also further decrease the API surface area.

@BobDu BobDu mentioned this pull request Apr 26, 2024
@basil
Copy link
Member Author

basil commented Apr 26, 2024

Probably? Need to run usage-in-plugins transitively with -p, and against CloudBees plugins. In any case I don't see how that is related to this PR. It can be done separately if desired.

Copy link
Member

@BobDu BobDu left a comment

Choose a reason for hiding this comment

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

Simply because, if we have the option to remove XMLSerializer, then the modifications to the
XMLSerializer.java file in this PR would be unnecessary.

Of course, regardless, for this PR, LGTM.

@basil basil merged commit 518da7a into jenkinsci:master Apr 26, 2024
13 checks passed
@basil basil deleted the stringutils branch April 26, 2024 05:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants