[java] Enable SpotBugs for java_export #14882
Merged
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
Description
As described in this comment, SpotBugs analysis was not enabled in all production classes.
The following PRs were created to fix the found problems:
v*Network.java
conditions #14585ChromiumDriver
andPortProber
#14589NM_SAME_SIMPLE_NAME_AS_SUPERCLASS
#14590NM_CLASS_NAMING_CONVENTION
#14596DMI_HARDCODED_ABSOLUTE_FILENAME
#14597NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE
from thefirefox.AddHasExtensions$1
#14766IS2_INCONSISTENT_SYNC
form theSeleniumManager
#14768This PR is the final one, enables a full analysis of SpotBugs.
Motivation and Context
Types of changes
Checklist
PR Type
enhancement
Description
java_export
function to usejava_library
from@contrib_rules_jvm//java:defs.bzl
.Changes walkthrough 📝
export.bzl
Enable SpotBugs by modifying java_library usage
java/private/export.bzl
java_library
from@contrib_rules_jvm//java:defs.bzl
.native.java_library
withjava_library
injava_export
function.