From 3164eb6393f190457b0f01cd6cdc2296eca8fec5 Mon Sep 17 00:00:00 2001 From: Justin Chan Date: Fri, 13 Aug 2021 12:56:53 -0400 Subject: [PATCH] Release 0.11.1 - fix checkstyle (#101) --- build.gradle | 2 +- .../m3/tally/AbstractReporterBenchmark.java | 5 ++-- .../main/java/com/uber/m3/util/ListSet.java | 24 +++++++++++++++---- .../java/com/uber/m3/tally/m3/M3Reporter.java | 2 -- 4 files changed, 23 insertions(+), 10 deletions(-) diff --git a/build.gradle b/build.gradle index 742d8c5..a92047a 100644 --- a/build.gradle +++ b/build.gradle @@ -45,7 +45,7 @@ configurations.archives.artifacts.clear() allprojects { group = 'com.uber.m3' - version = '0.11.0' + version = '0.11.1' apply plugin: 'java' apply plugin: 'maven' diff --git a/core/src/jmh/java/com/uber/m3/tally/AbstractReporterBenchmark.java b/core/src/jmh/java/com/uber/m3/tally/AbstractReporterBenchmark.java index 4627bd6..7e612b3 100644 --- a/core/src/jmh/java/com/uber/m3/tally/AbstractReporterBenchmark.java +++ b/core/src/jmh/java/com/uber/m3/tally/AbstractReporterBenchmark.java @@ -53,9 +53,6 @@ @Fork(value = 2, jvmArgsAppend = {"-server", "-XX:+UseG1GC"}) @State(Scope.Benchmark) public abstract class AbstractReporterBenchmark { - - private Logger logger = LoggerFactory.getLogger(getClass()); - private static final ImmutableMap DEFAULT_TAGS = new ImmutableMap.Builder(5) .put("tag1", "test1") .put("tag2", "test2") @@ -80,6 +77,8 @@ public abstract class AbstractReporterBenchmark private static final int TARGET_PARALLELISM = 4; + private Logger logger = LoggerFactory.getLogger(getClass()); + private Reporter reporter; @Benchmark diff --git a/core/src/main/java/com/uber/m3/util/ListSet.java b/core/src/main/java/com/uber/m3/util/ListSet.java index 57bea18..c3d6367 100644 --- a/core/src/main/java/com/uber/m3/util/ListSet.java +++ b/core/src/main/java/com/uber/m3/util/ListSet.java @@ -1,12 +1,30 @@ -package com.uber.m3.util; +// Copyright (c) 2021 Uber Technologies, Inc. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. +package com.uber.m3.util; import java.util.ArrayList; import java.util.Collection; import java.util.Iterator; import java.util.Set; - /** * We're creating this surrogate structure to avoid incurring penalties * associated w/ {@code HashSet}s (like computing hash-codes for every inserted element), @@ -61,13 +79,11 @@ public boolean add(E e) { return super.add(e); } - @Override public boolean remove(Object o) { return super.remove(o); } - @Override public boolean containsAll(Collection c) { return super.containsAll(c); diff --git a/m3/src/main/java/com/uber/m3/tally/m3/M3Reporter.java b/m3/src/main/java/com/uber/m3/tally/m3/M3Reporter.java index ef2cf38..3c69266 100644 --- a/m3/src/main/java/com/uber/m3/tally/m3/M3Reporter.java +++ b/m3/src/main/java/com/uber/m3/tally/m3/M3Reporter.java @@ -60,8 +60,6 @@ import java.time.Instant; import java.time.temporal.ChronoUnit; import java.util.ArrayList; -import java.util.Collections; -import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Queue;