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

Replace JSR-305 annotations with spotbugs annotations #967

Merged
merged 2 commits into from
May 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading