This is an automated email from the ASF dual-hosted git repository. dlmarion pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/accumulo-access.git
The following commit(s) were added to refs/heads/main by this push: new a8b2b8c Bumped SpotBugs and ErrorProne plugins, marked classes final (#35) a8b2b8c is described below commit a8b2b8c482fc23982a879cb94c0c01963ec01741 Author: Dave Marion <dlmar...@apache.org> AuthorDate: Fri Jan 26 07:38:14 2024 -0500 Bumped SpotBugs and ErrorProne plugins, marked classes final (#35) Bumping SpotBugs flagged a couple of classes with CT_CONSTRUCTOR_THROW. Decided to mark all classes final, it's one of the remedies listed at https://spotbugs.readthedocs.io/en/stable/bugDescriptions.html#ct-be- wary-of-letting-constructors-throw-exceptions-ct-constructor-throw. I also removed the sec-bugs profile and moved that plugin into the normal spotbugs run. --- .github/workflows/maven.yaml | 2 +- pom.xml | 32 ++++++---------------- .../accumulo/access/AccessEvaluatorImpl.java | 2 +- .../accumulo/access/AccessExpressionImpl.java | 3 +- .../org/apache/accumulo/access/Authorizations.java | 2 +- .../org/apache/accumulo/access/BytesWrapper.java | 2 +- 6 files changed, 14 insertions(+), 29 deletions(-) diff --git a/.github/workflows/maven.yaml b/.github/workflows/maven.yaml index f0c9f1e..2cee585 100644 --- a/.github/workflows/maven.yaml +++ b/.github/workflows/maven.yaml @@ -71,7 +71,7 @@ jobs: matrix: profile: - {name: 'unit-tests', distribution: adopt, javaver: 17, args: 'verify -PskipQA'} - - {name: 'qa-checks', distribution: adopt, javaver: 17, args: 'verify javadoc:jar -Psec-bugs,errorprone'} + - {name: 'qa-checks', distribution: adopt, javaver: 17, args: 'verify javadoc:jar -Perrorprone'} - {name: 'jdk21', distribution: oracle, javaver: 21, args: 'verify'} fail-fast: false runs-on: ubuntu-latest diff --git a/pom.xml b/pom.xml index fc02e38..d9aab1d 100644 --- a/pom.xml +++ b/pom.xml @@ -91,14 +91,14 @@ <maven.test.redirectTestOutputToFile>true</maven.test.redirectTestOutputToFile> <minimalJavaBuildVersion>17</minimalJavaBuildVersion> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> - <version.errorprone>2.20.0</version.errorprone> + <version.errorprone>2.24.1</version.errorprone> <version.jmh>1.36</version.jmh> </properties> <dependencies> <dependency> <groupId>com.github.spotbugs</groupId> <artifactId>spotbugs-annotations</artifactId> - <version>4.7.3</version> + <version>4.8.3</version> <scope>test</scope> </dependency> <dependency> @@ -250,7 +250,7 @@ <plugin> <groupId>com.github.spotbugs</groupId> <artifactId>spotbugs-maven-plugin</artifactId> - <version>4.7.3.6</version> + <version>4.8.3.0</version> <configuration> <excludeFilterFile>src/build/ci/spotbugs-exclude.xml</excludeFilterFile> <xmlOutput>true</xmlOutput> @@ -260,6 +260,11 @@ <maxRank>20</maxRank> <jvmArgs>-Dcom.overstock.findbugs.ignore=com.google.common.util.concurrent.RateLimiter,com.google.common.hash.Hasher,com.google.common.hash.HashCode,com.google.common.hash.HashFunction,com.google.common.hash.Hashing,com.google.common.cache.Cache,com.google.common.io.CountingOutputStream,com.google.common.io.ByteStreams,com.google.common.cache.LoadingCache,com.google.common.base.Stopwatch,com.google.common.cache.RemovalNotification,com.google.common.util.concurrent.Uninterruptib [...] <plugins combine.children="append"> + <plugin> + <groupId>com.h3xstream.findsecbugs</groupId> + <artifactId>findsecbugs-plugin</artifactId> + <version>1.12.0</version> + </plugin> <plugin> <groupId>com.overstock.findbugs</groupId> <artifactId>library-detectors</artifactId> @@ -639,27 +644,6 @@ </plugins> </build> </profile> - <profile> - <id>sec-bugs</id> - <build> - <plugins> - <plugin> - <groupId>com.github.spotbugs</groupId> - <artifactId>spotbugs-maven-plugin</artifactId> - <version>4.7.3.6</version> - <configuration> - <plugins> - <plugin> - <groupId>com.h3xstream.findsecbugs</groupId> - <artifactId>findsecbugs-plugin</artifactId> - <version>1.12.0</version> - </plugin> - </plugins> - </configuration> - </plugin> - </plugins> - </build> - </profile> <profile> <!-- This profile uses the Google ErrorProne tool to perform static code analysis at compile time. Auto-generated code is not checked. diff --git a/src/main/java/org/apache/accumulo/access/AccessEvaluatorImpl.java b/src/main/java/org/apache/accumulo/access/AccessEvaluatorImpl.java index ef6b0ba..0885395 100644 --- a/src/main/java/org/apache/accumulo/access/AccessEvaluatorImpl.java +++ b/src/main/java/org/apache/accumulo/access/AccessEvaluatorImpl.java @@ -33,7 +33,7 @@ import java.util.Set; import java.util.function.Predicate; //this class is intentionally package private and should never be made public -class AccessEvaluatorImpl implements AccessEvaluator { +final class AccessEvaluatorImpl implements AccessEvaluator { private final Collection<Predicate<BytesWrapper>> authorizedPredicates; private static final byte[] EMPTY = new byte[0]; diff --git a/src/main/java/org/apache/accumulo/access/AccessExpressionImpl.java b/src/main/java/org/apache/accumulo/access/AccessExpressionImpl.java index 9791643..9585cb9 100644 --- a/src/main/java/org/apache/accumulo/access/AccessExpressionImpl.java +++ b/src/main/java/org/apache/accumulo/access/AccessExpressionImpl.java @@ -23,7 +23,7 @@ import static java.nio.charset.StandardCharsets.UTF_8; import java.util.HashSet; import java.util.function.Predicate; -class AccessExpressionImpl implements AccessExpression { +final class AccessExpressionImpl implements AccessExpression { public static final AccessExpression EMPTY = new AccessExpressionImpl("", false); @@ -140,4 +140,5 @@ class AccessExpressionImpl implements AccessExpression { Tokenizer tokenizer = new Tokenizer(expression); return Normalizer.normalize(tokenizer); } + } diff --git a/src/main/java/org/apache/accumulo/access/Authorizations.java b/src/main/java/org/apache/accumulo/access/Authorizations.java index a0dc1ef..8b60cd8 100644 --- a/src/main/java/org/apache/accumulo/access/Authorizations.java +++ b/src/main/java/org/apache/accumulo/access/Authorizations.java @@ -28,7 +28,7 @@ import java.util.Set; * * @since 1.0.0 */ -public class Authorizations { +public final class Authorizations { private final Set<String> authorizations; private Authorizations(Set<String> authorizations) { diff --git a/src/main/java/org/apache/accumulo/access/BytesWrapper.java b/src/main/java/org/apache/accumulo/access/BytesWrapper.java index 4f93581..ebf4396 100644 --- a/src/main/java/org/apache/accumulo/access/BytesWrapper.java +++ b/src/main/java/org/apache/accumulo/access/BytesWrapper.java @@ -22,7 +22,7 @@ import static java.nio.charset.StandardCharsets.UTF_8; import java.util.Arrays; -class BytesWrapper implements Comparable<BytesWrapper> { +final class BytesWrapper implements Comparable<BytesWrapper> { protected byte[] data; protected int offset;