Skip to content

Commit a982d3d

Browse files
committed
cleanup errors
1 parent 5ed457d commit a982d3d

File tree

8 files changed

+1
-13
lines changed

8 files changed

+1
-13
lines changed

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/parsers/GraphitePlaintextToRecordParser.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,6 @@ public List<Record> parse(final ByteBuffer record) throws ParsingException {
141141
return recordListBuilder.build();
142142
}
143143

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

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,6 @@ private StatsdType parseStatsdType(
135135
return type;
136136
}
137137

138-
@SuppressFBWarnings("NP_PARAMETER_MUST_BE_NONNULL_BUT_MARKED_AS_NULLABLE")
139138
// See: https://github.com/findbugsproject/findbugs/issues/79
140139
private String parseName(final ByteBuffer datagram, @Nullable final String name) throws ParsingException {
141140
if (Strings.isNullOrEmpty(name)) {
@@ -161,7 +160,6 @@ private Number parseValue(
161160
}
162161
}
163162

164-
@SuppressFBWarnings("NP_PARAMETER_MUST_BE_NONNULL_BUT_MARKED_AS_NULLABLE")
165163
// See: https://github.com/findbugsproject/findbugs/issues/79
166164
private ImmutableMap<String, String> parseTags(@Nullable final String tagsAsString) {
167165
if (null != tagsAsString) {
@@ -170,7 +168,6 @@ private ImmutableMap<String, String> parseTags(@Nullable final String tagsAsStri
170168
return ImmutableMap.of();
171169
}
172170

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

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,6 @@ public class Telemetry extends AbstractActor {
6666
* @param metricsFactory Instance of {@link MetricsFactory}.
6767
*/
6868
@Inject
69-
@SuppressFBWarnings(value = "MC_OVERRIDABLE_METHOD_CALL_IN_CONSTRUCTOR",
70-
justification = "getSelf() and getContext() are safe to call in the constructor.")
7169
public Telemetry(final MetricsFactory metricsFactory) {
7270
_metricsFactory = metricsFactory;
7371
_metrics = metricsFactory.create();

src/main/java/com/arpnetworking/metrics/proxy/models/messages/LogLine.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ public final class LogLine {
4343
* @param line The raw log line.
4444
*/
4545
// TODO(vkoskela): Investigate the use of immutable rotating buffers [MAI-489]
46-
@SuppressFBWarnings({"EI_EXPOSE_REP", "EI_EXPOSE_REP2"})
4746
public LogLine(
4847
final Path file,
4948
final byte[] line) {

src/test/java/com/arpnetworking/metrics/mad/model/statistics/HistogramStatisticTest.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,6 @@ public void histogramEnds() {
172172
}
173173

174174
@Test
175-
@SuppressFBWarnings(value = "FL_FLOATS_AS_LOOP_COUNTERS", justification = "Tests the floating point values")
176175
public void packAndUnpack() {
177176
final int precision = 7;
178177
final HistogramStatistic.Histogram histogram = new HistogramStatistic.Histogram(precision);

0 commit comments

Comments
 (0)