[java] Fix falsy Spotbugs warning about not closed resource #16318
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.
User description
🔗 Related Issues
Fixes #16314
Build failure: https://github.com/SeleniumHQ/selenium/actions/runs/17641086530/job/50128139484
💥 What does this PR do?
Fixes Spotbugs warning
🔧 Implementation Notes
I had to inline method
findBinaryInClasspath()
to make Spotbugs happy. I could not find any other way to suppress this falsy warning. :(🔄 Types of changes
PR Type
Bug fix
Description
Inline
findBinaryInClasspath()
method to fix Spotbugs warningRemove unused method to resolve build failure
Maintain same functionality with direct resource stream access
Diagram Walkthrough
File Walkthrough
SeleniumManager.java
Inline binary classpath lookup method
java/src/org/openqa/selenium/manager/SeleniumManager.java
findBinaryInClasspath()
method completelygetBinary()
methodrequireNonNull()
wrapper