From 97f3435c3be5ffab7e6e956cd19bcceb3b494ae7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 13 Nov 2023 07:11:04 +0000 Subject: [PATCH 1/2] Bump com.github.spotbugs:spotbugs-maven-plugin from 4.7.3.6 to 4.8.1.0 Bumps [com.github.spotbugs:spotbugs-maven-plugin](https://github.com/spotbugs/spotbugs-maven-plugin) from 4.7.3.6 to 4.8.1.0. - [Release notes](https://github.com/spotbugs/spotbugs-maven-plugin/releases) - [Commits](https://github.com/spotbugs/spotbugs-maven-plugin/compare/spotbugs-maven-plugin-4.7.3.6...spotbugs-maven-plugin-4.8.1.0) --- updated-dependencies: - dependency-name: com.github.spotbugs:spotbugs-maven-plugin dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 7336317..1493378 100644 --- a/pom.xml +++ b/pom.xml @@ -40,7 +40,7 @@ 3.1.0 1.6.13 3.3.1 - 4.7.3.6 + 4.8.1.0 UTF-8 From bf8ad5114ae126a935ebf19550738d950f76e27a Mon Sep 17 00:00:00 2001 From: Rishi Baldawa Date: Wed, 22 Nov 2023 18:44:20 -0800 Subject: [PATCH 2/2] Marking final as recommended in https://wiki.sei.cmu.edu/confluence/display/java/OBJ11-J.+Be+wary+of+letting+constructors+throw+exceptions --- src/main/software/amazon/event/ruler/Event.java | 2 +- src/main/software/amazon/event/ruler/IntIntMap.java | 2 +- src/main/software/amazon/event/ruler/Range.java | 2 +- src/main/software/amazon/event/ruler/input/MultiByte.java | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/software/amazon/event/ruler/Event.java b/src/main/software/amazon/event/ruler/Event.java index 3fe8af9..5893593 100644 --- a/src/main/software/amazon/event/ruler/Event.java +++ b/src/main/software/amazon/event/ruler/Event.java @@ -46,7 +46,7 @@ // TODO: Improve unit-test coverage, there are surprising gaps @Immutable @ThreadSafe -class Event { +final class Event { private static final ObjectMapper OBJECT_MAPPER = new ObjectMapper(); private static final JsonFactory JSON_FACTORY = new JsonFactory(); diff --git a/src/main/software/amazon/event/ruler/IntIntMap.java b/src/main/software/amazon/event/ruler/IntIntMap.java index 46b054a..8803d5c 100644 --- a/src/main/software/amazon/event/ruler/IntIntMap.java +++ b/src/main/software/amazon/event/ruler/IntIntMap.java @@ -7,7 +7,7 @@ /** * A fast primitive int-int map implementation. Keys and values may only be positive. */ -class IntIntMap implements Cloneable { +final class IntIntMap implements Cloneable { // taken from FastUtil private static final int INT_PHI = 0x9E3779B9; diff --git a/src/main/software/amazon/event/ruler/Range.java b/src/main/software/amazon/event/ruler/Range.java index 9a79a86..39454a0 100644 --- a/src/main/software/amazon/event/ruler/Range.java +++ b/src/main/software/amazon/event/ruler/Range.java @@ -8,7 +8,7 @@ * "Numeric" means that the character repertoire is "digits"; initially, either 0-9 or 0-9a-f. In the current * implementation, the number of digits in the top and bottom of the range is the same. */ -public class Range extends Patterns { +public final class Range extends Patterns { /** * Bottom and top of the range. openBottom true means we're looking for > bottom, false means >= * Similarly, openTop true means we're looking for < top, false means <= top. diff --git a/src/main/software/amazon/event/ruler/input/MultiByte.java b/src/main/software/amazon/event/ruler/input/MultiByte.java index 7b3c32e..c7ea117 100644 --- a/src/main/software/amazon/event/ruler/input/MultiByte.java +++ b/src/main/software/amazon/event/ruler/input/MultiByte.java @@ -9,7 +9,7 @@ * A grouping of multiple bytes. This can be used to represent a character that has a UTF-8 representation requiring * multiple bytes. */ -public class MultiByte { +public final class MultiByte { public static final byte MIN_FIRST_BYTE_FOR_ONE_BYTE_CHAR = (byte) 0x00; public static final byte MAX_FIRST_BYTE_FOR_ONE_BYTE_CHAR = (byte) 0x7F;