Skip to content

Cleanup: use Boolean.parseBoolean for string-to-boolean conversion#3217

Merged
hazendaz merged 5 commits intospotbugs:masterfrom
JuditKnoll:cleanup_parse
Dec 5, 2024
Merged

Cleanup: use Boolean.parseBoolean for string-to-boolean conversion#3217
hazendaz merged 5 commits intospotbugs:masterfrom
JuditKnoll:cleanup_parse

Conversation

@JuditKnoll
Copy link
Copy Markdown
Collaborator

Fixing "use Boolean.parseBoolean() for string-to-boolean conversion" issues.

# Conflicts:
#	CHANGELOG.md
#	spotbugs/src/main/java/edu/umd/cs/findbugs/PluginLoader.java
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why replace isEmpty? It seems like the better choice, O(1) instead of O(n).

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Oops, this got back when merging. Thanks for highlighting it!

String reports = detectorNode.valueOf("@reports");
String requireJRE = detectorNode.valueOf("@requirejre");
String hidden = detectorNode.valueOf("@hidden");
if (speed == null || speed.isEmpty()) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

What happened here?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

When I merged master there was some conflict with the changes from #3219 in this file, I didn't pay enough attention and this change creeped back, so I modified this once more to be in sync with master.

@hazendaz hazendaz merged commit 3a5d330 into spotbugs:master Dec 5, 2024
@JuditKnoll JuditKnoll deleted the cleanup_parse branch December 6, 2024 07:17
@hazendaz hazendaz added this to the SpotBugs 4.9.0 milestone Dec 22, 2024
@hazendaz hazendaz assigned hazendaz and JuditKnoll and unassigned hazendaz Dec 22, 2024
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