Skip to content

Commit

Permalink
Merge pull request #967 from MarkEWaite/fix-jsr-305
Browse files Browse the repository at this point in the history
Replace JSR-305 annotations with spotbugs annotations
  • Loading branch information
res0nance committed May 20, 2024
2 parents 5975ee4 + e002ea5 commit b556694
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 7 deletions.
4 changes: 0 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -232,10 +232,6 @@ THE SOFTWARE.
<compatibleSinceVersion>1.45</compatibleSinceVersion>
</configuration>
</plugin>
<plugin>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
29 changes: 29 additions & 0 deletions src/spotbugs/excludesFilter.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?>
<FindBugsFilter>
<!--
Exclusions in this section have been triaged and determined to be
false positives.
-->
<Match>
<!-- These primitive attributes need to be public to preserve the API -->
<Bug pattern="PA_PUBLIC_PRIMITIVE_ATTRIBUTE" />
<Or>
<Class name="hudson.plugins.ec2.EC2AbstractSlave" />
<Class name="hudson.plugins.ec2.SlaveTemplate" />
</Or>
</Match>

<!--
Here lies technical debt. Exclusions in this section have not yet
been triaged. When working on this section, pick an exclusion to
triage, then:
- Add a @SuppressFBWarnings(value = "[...]", justification = "[...]")
annotation if it is a false positive. Indicate the reason why
it is a false positive, then remove the exclusion from this
section.
- If it is not a false positive, fix the bug, then remove the
exclusion from this section.
-->
</FindBugsFilter>
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import com.amazonaws.AmazonClientException;
import com.amazonaws.services.ec2.model.InstanceType;
import edu.umd.cs.findbugs.annotations.NonNull;
import hudson.model.Executor;
import hudson.model.Node;
import hudson.model.Label;
Expand Down Expand Up @@ -30,7 +31,6 @@
import org.testcontainers.shaded.org.bouncycastle.jce.provider.BouncyCastleProvider;
import org.jvnet.hudson.test.LoggerRule;

import javax.annotation.Nonnull;
import java.security.Security;
import java.time.Clock;
import java.time.Duration;
Expand Down Expand Up @@ -141,10 +141,10 @@ public String getShortDescription() {
}
} : null;
return new AccessControlledTask() {
@Nonnull
@NonNull
public ACL getACL() {
return new ACL() {
public boolean hasPermission(@Nonnull Authentication a, @Nonnull Permission permission) {
public boolean hasPermission(@NonNull Authentication a, @NonNull Permission permission) {
return true;
}
};
Expand Down

0 comments on commit b556694

Please sign in to comment.