Skip to content

Commit 628a914

Browse files
Bump com.arpnetworking.build:arpnetworking-parent-pom from 3.3.6 to 3.3.8 (#529)
* Bump com.arpnetworking.build:arpnetworking-parent-pom Bumps [com.arpnetworking.build:arpnetworking-parent-pom](https://github.com/arpnetworking/arpnetworking-parent-pom) from 3.3.6 to 3.3.8. - [Release notes](https://github.com/arpnetworking/arpnetworking-parent-pom/releases) - [Commits](ArpNetworking/arpnetworking-parent-pom@arpnetworking-parent-pom-3.3.6...arpnetworking-parent-pom-3.3.8) --- updated-dependencies: - dependency-name: com.arpnetworking.build:arpnetworking-parent-pom dependency-version: 3.3.8 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> * add exclusions from updated build resources * cleanup errors * checkstyle * fix more findbugs * last spotbugs issue --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Brandon Arp <[email protected]>
1 parent cdb7e1e commit 628a914

File tree

17 files changed

+128
-28
lines changed

17 files changed

+128
-28
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
<parent>
1919
<groupId>com.arpnetworking.build</groupId>
2020
<artifactId>arpnetworking-parent-pom</artifactId>
21-
<version>3.3.6</version>
21+
<version>3.3.8</version>
2222
<relativePath />
2323
</parent>
2424

spotbugs.exclude.xml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,33 @@
2929
</Or>
3030
</Match>
3131

32+
<!-- Match THROWS_METHOD_THROWS_RUNTIMEEXCEPTION violations. We commonly
33+
use runtime exceptions with lambdas, streams, and promises to indicate
34+
failure
35+
-->
36+
<Match>
37+
<Bug pattern="THROWS_METHOD_THROWS_RUNTIMEEXCEPTION" />
38+
</Match>
39+
40+
<!-- We often throw Exception in tests to indicate an error. The exception itself is the point, not how to handle it
41+
-->
42+
<Match>
43+
<Or>
44+
<Bug pattern="THROWS_METHOD_THROWS_CLAUSE_BASIC_EXCEPTION" />
45+
<Bug pattern="DE_MIGHT_IGNORE" />
46+
</Or>
47+
<Or>
48+
<Class name="~.*\.[^\.]+Test" />
49+
<Class name="~.*\.[^\.]+Test\$.*" />
50+
<Class name="~.*\.[^\.]+TestPerf" />
51+
<Class name="~.*\.[^\.]+TestPerf\$.*" />
52+
<Class name="~.*\.[^\.]+IT" />
53+
<Class name="~.*\.[^\.]+IT\$.*" />
54+
<Class name="~.*\.[^\.]+ITPerf" />
55+
<Class name="~.*\.[^\.]+ITPerf\$.*" />
56+
</Or>
57+
</Match>
58+
3259
<!-- Match all RV_RETURN_VALUE_IGNORED_BAD_PRACTICE violations on all unit
3360
test files since Mockito usage can cause this violation when stating
3461
expectations.

src/main/java/com/arpnetworking/configuration/Listener.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
*/
1616
package com.arpnetworking.configuration;
1717

18+
import com.arpnetworking.utility.ConfigurationException;
19+
1820
/**
1921
* Interface for consumers registered for configuration events.
2022
*
@@ -30,11 +32,10 @@ public interface Listener {
3032
* error. Once any listener rejects the {@link Configuration} other
3133
* listeners may not be offered that instance.
3234
*
35+
* @throws ConfigurationException if the {@link Configuration} is rejected.
3336
* @param configuration The new {@link Configuration} to be validated.
34-
* @throws Exception Thrown if the {@link Configuration} should be
35-
* rejected.
3637
*/
37-
void offerConfiguration(Configuration configuration) throws Exception;
38+
void offerConfiguration(Configuration configuration) throws ConfigurationException;
3839

3940
/**
4041
* Invoked to apply the most recently offered configuration. Any

src/main/java/com/arpnetworking/metrics/common/parsers/exceptions/ParsingException.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
package com.arpnetworking.metrics.common.parsers.exceptions;
1717

1818
import com.arpnetworking.logback.annotations.Loggable;
19-
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
2019

2120
import java.io.Serial;
2221

@@ -25,7 +24,6 @@
2524
*
2625
* @author Brandon Arp (brandon dot arp at inscopemetrics dot io)
2726
*/
28-
@SuppressFBWarnings(value = {"EI_EXPOSE_REP", "EI_EXPOSE_REP2"})
2927
@Loggable
3028
public class ParsingException extends Exception {
3129
/**

src/main/java/com/arpnetworking/metrics/mad/Aggregator.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@
4040
import com.google.common.collect.ImmutableSet;
4141
import com.google.common.collect.Lists;
4242
import com.google.common.collect.Maps;
43-
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
4443
import net.sf.oval.constraint.NotNull;
4544
import org.apache.pekko.actor.AbstractActor;
4645
import org.apache.pekko.actor.ActorRef;
@@ -135,7 +134,6 @@ public synchronized void shutdown() {
135134
private static final Random R = new Random();
136135

137136
@Override
138-
@SuppressFBWarnings("IS2_INCONSISTENT_SYNC")
139137
public void notify(final Observable observable, final Object event) {
140138
if (!(event instanceof Record)) {
141139
LOGGER.error()

src/main/java/com/arpnetworking/metrics/mad/Bucket.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,7 @@ private Collection<Calculator<?>> getOrCreateCalculators(
364364
_dependentStatisticsCache = builder._dependentStatistics;
365365
}
366366

367-
private boolean _isOpen = true;
367+
private volatile boolean _isOpen = true;
368368
private Optional<ZonedDateTime> _minRequestTime = Optional.empty();
369369

370370
private final Map<String, Collection<Calculator<?>>> _counterMetricCalculators = Maps.newHashMap();

src/main/java/com/arpnetworking/metrics/mad/PeriodWorker.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ public void postStop() throws Exception {
124124
}
125125

126126
@Override
127-
public void preRestart(final Throwable reason, final Optional<Object> message) throws Exception {
127+
public void preRestart(final Throwable reason, final Optional<Object> message) {
128128
_periodicMetrics.recordCounter("actors/period_worker/restarted", 1);
129129
LOGGER.error()
130130
.setMessage("Restarting")

src/main/java/com/arpnetworking/metrics/mad/parsers/GraphitePlaintextToRecordParser.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
import com.google.common.collect.ImmutableList;
2929
import com.google.common.collect.ImmutableMap;
3030
import com.google.common.collect.Maps;
31-
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
3231
import net.sf.oval.constraint.NotNull;
3332

3433
import java.nio.ByteBuffer;
@@ -141,7 +140,6 @@ public List<Record> parse(final ByteBuffer record) throws ParsingException {
141140
return recordListBuilder.build();
142141
}
143142

144-
@SuppressFBWarnings("NP_PARAMETER_MUST_BE_NONNULL_BUT_MARKED_AS_NULLABLE")
145143
// See: https://github.com/findbugsproject/findbugs/issues/79
146144
private String parseName(final ByteBuffer datagram, @Nullable final String name) throws ParsingException {
147145
if (Strings.isNullOrEmpty(name)) {

src/main/java/com/arpnetworking/metrics/mad/parsers/StatsdToRecordParser.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
import com.google.common.collect.ImmutableMap;
3131
import com.google.common.collect.ImmutableSet;
3232
import com.google.common.collect.Maps;
33-
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
3433

3534
import java.nio.ByteBuffer;
3635
import java.nio.charset.StandardCharsets;
@@ -135,7 +134,6 @@ private StatsdType parseStatsdType(
135134
return type;
136135
}
137136

138-
@SuppressFBWarnings("NP_PARAMETER_MUST_BE_NONNULL_BUT_MARKED_AS_NULLABLE")
139137
// See: https://github.com/findbugsproject/findbugs/issues/79
140138
private String parseName(final ByteBuffer datagram, @Nullable final String name) throws ParsingException {
141139
if (Strings.isNullOrEmpty(name)) {
@@ -161,7 +159,6 @@ private Number parseValue(
161159
}
162160
}
163161

164-
@SuppressFBWarnings("NP_PARAMETER_MUST_BE_NONNULL_BUT_MARKED_AS_NULLABLE")
165162
// See: https://github.com/findbugsproject/findbugs/issues/79
166163
private ImmutableMap<String, String> parseTags(@Nullable final String tagsAsString) {
167164
if (null != tagsAsString) {
@@ -170,7 +167,6 @@ private ImmutableMap<String, String> parseTags(@Nullable final String tagsAsStri
170167
return ImmutableMap.of();
171168
}
172169

173-
@SuppressFBWarnings("NP_PARAMETER_MUST_BE_NONNULL_BUT_MARKED_AS_NULLABLE")
174170
// See: https://github.com/findbugsproject/findbugs/issues/79
175171
private ImmutableMap<String, String> parseInfluxStyleTags(@Nullable final String tagsAsString) {
176172
if (null != tagsAsString) {

src/main/java/com/arpnetworking/metrics/proxy/actors/Telemetry.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@
3838
import com.google.common.collect.Maps;
3939
import com.google.common.collect.Sets;
4040
import com.google.inject.Inject;
41-
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
4241
import org.apache.pekko.actor.AbstractActor;
4342
import org.apache.pekko.actor.ActorRef;
4443
import org.apache.pekko.actor.Cancellable;
@@ -66,8 +65,6 @@ public class Telemetry extends AbstractActor {
6665
* @param metricsFactory Instance of {@link MetricsFactory}.
6766
*/
6867
@Inject
69-
@SuppressFBWarnings(value = "MC_OVERRIDABLE_METHOD_CALL_IN_CONSTRUCTOR",
70-
justification = "getSelf() and getContext() are safe to call in the constructor.")
7168
public Telemetry(final MetricsFactory metricsFactory) {
7269
_metricsFactory = metricsFactory;
7370
_metrics = metricsFactory.create();

0 commit comments

Comments
 (0)