Repository: hbase
Updated Branches:
  refs/heads/master 37d91cdfb -> 641e870e1


HBASE-19987 error-prone 2.2.0


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/641e870e
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/641e870e
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/641e870e

Branch: refs/heads/master
Commit: 641e870e1159fc67d7416ce3cab344869c304c1a
Parents: 37d91cd
Author: Mike Drob <md...@apache.org>
Authored: Mon Feb 12 17:13:32 2018 -0600
Committer: Mike Drob <md...@apache.org>
Committed: Wed Mar 7 13:30:51 2018 -0600

----------------------------------------------------------------------
 hbase-build-support/hbase-error-prone/pom.xml                  | 6 ++++++
 .../java/org/apache/hadoop/hbase/errorprone/AlwaysPasses.java  | 2 +-
 .../src/main/java/org/apache/hadoop/hbase/ServerLoad.java      | 2 +-
 .../src/main/java/org/apache/hadoop/hbase/client/Mutation.java | 2 +-
 .../org/apache/hadoop/hbase/filter/BigDecimalComparator.java   | 1 +
 .../java/org/apache/hadoop/hbase/filter/BinaryComparator.java  | 1 +
 .../org/apache/hadoop/hbase/filter/BinaryPrefixComparator.java | 1 +
 .../java/org/apache/hadoop/hbase/filter/BitComparator.java     | 1 +
 .../java/org/apache/hadoop/hbase/filter/LongComparator.java    | 1 +
 .../java/org/apache/hadoop/hbase/filter/NullComparator.java    | 1 +
 .../org/apache/hadoop/hbase/filter/RegexStringComparator.java  | 1 +
 .../org/apache/hadoop/hbase/filter/SubstringComparator.java    | 1 +
 .../org/apache/hadoop/hbase/filter/ByteArrayComparable.java    | 1 +
 pom.xml                                                        | 2 +-
 14 files changed, 19 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/641e870e/hbase-build-support/hbase-error-prone/pom.xml
----------------------------------------------------------------------
diff --git a/hbase-build-support/hbase-error-prone/pom.xml 
b/hbase-build-support/hbase-error-prone/pom.xml
index 343bb3e..161ed24 100644
--- a/hbase-build-support/hbase-error-prone/pom.xml
+++ b/hbase-build-support/hbase-error-prone/pom.xml
@@ -37,6 +37,12 @@
       <artifactId>error_prone_annotation</artifactId>
       <version>${error-prone.version}</version>
       <scope>provided</scope>
+      <exclusions>
+        <exclusion>
+          <groupId>com.google.guava</groupId>
+          <artifactId>guava</artifactId>
+        </exclusion>
+      </exclusions>
     </dependency>
     <dependency>
       <!--mvn dependency:analyze says this is not used but compile fails

http://git-wip-us.apache.org/repos/asf/hbase/blob/641e870e/hbase-build-support/hbase-error-prone/src/main/java/org/apache/hadoop/hbase/errorprone/AlwaysPasses.java
----------------------------------------------------------------------
diff --git 
a/hbase-build-support/hbase-error-prone/src/main/java/org/apache/hadoop/hbase/errorprone/AlwaysPasses.java
 
b/hbase-build-support/hbase-error-prone/src/main/java/org/apache/hadoop/hbase/errorprone/AlwaysPasses.java
index 926fa54..9962835 100644
--- 
a/hbase-build-support/hbase-error-prone/src/main/java/org/apache/hadoop/hbase/errorprone/AlwaysPasses.java
+++ 
b/hbase-build-support/hbase-error-prone/src/main/java/org/apache/hadoop/hbase/errorprone/AlwaysPasses.java
@@ -30,7 +30,7 @@ import com.sun.source.tree.CompilationUnitTree;
     category = BugPattern.Category.JDK,
     summary = "A placeholder rule that never matches.",
     severity = BugPattern.SeverityLevel.ERROR,
-    suppressibility = BugPattern.Suppressibility.UNSUPPRESSIBLE,
+    suppressionAnnotations = {},
     linkType = BugPattern.LinkType.NONE)
 public class AlwaysPasses extends BugChecker implements 
BugChecker.CompilationUnitTreeMatcher {
   @Override

http://git-wip-us.apache.org/repos/asf/hbase/blob/641e870e/hbase-client/src/main/java/org/apache/hadoop/hbase/ServerLoad.java
----------------------------------------------------------------------
diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/ServerLoad.java 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/ServerLoad.java
index f1665ae..7a1019a 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/ServerLoad.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/ServerLoad.java
@@ -448,7 +448,7 @@ public class ServerLoad implements ServerMetrics {
         .collect(Collectors.toMap(Map.Entry::getKey, e -> new 
RegionLoad(e.getValue()),
           (v1, v2) -> {
             throw new RuntimeException("key collisions?");
-          }, () -> new TreeMap(Bytes.BYTES_COMPARATOR)));
+          }, () -> new TreeMap<>(Bytes.BYTES_COMPARATOR)));
   }
 
   /**

http://git-wip-us.apache.org/repos/asf/hbase/blob/641e870e/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Mutation.java
----------------------------------------------------------------------
diff --git 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Mutation.java 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Mutation.java
index 1338fff..fbc707e 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Mutation.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Mutation.java
@@ -118,7 +118,7 @@ public abstract class Mutation extends 
OperationWithAttributes implements Row, C
       .collect(Collectors.toMap(e -> e.getKey(), e -> new 
ArrayList<>(e.getValue()),
         (k, v) -> {
           throw new RuntimeException("collisions!!!");
-        }, () -> new TreeMap(Bytes.BYTES_COMPARATOR)));
+        }, () -> new TreeMap<>(Bytes.BYTES_COMPARATOR)));
   }
 
   /**

http://git-wip-us.apache.org/repos/asf/hbase/blob/641e870e/hbase-client/src/main/java/org/apache/hadoop/hbase/filter/BigDecimalComparator.java
----------------------------------------------------------------------
diff --git 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/filter/BigDecimalComparator.java
 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/filter/BigDecimalComparator.java
index 53d1685..a33da47 100644
--- 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/filter/BigDecimalComparator.java
+++ 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/filter/BigDecimalComparator.java
@@ -36,6 +36,7 @@ import org.apache.yetus.audience.InterfaceAudience;
  * A BigDecimal comparator which numerical compares against the specified byte 
array
  */
 @InterfaceAudience.Public
+@SuppressWarnings("ComparableType") // Should this move to Comparator usage?
 public class BigDecimalComparator extends ByteArrayComparable {
   private BigDecimal bigDecimal;
 

http://git-wip-us.apache.org/repos/asf/hbase/blob/641e870e/hbase-client/src/main/java/org/apache/hadoop/hbase/filter/BinaryComparator.java
----------------------------------------------------------------------
diff --git 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/filter/BinaryComparator.java
 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/filter/BinaryComparator.java
index f24be8c..10be12a 100644
--- 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/filter/BinaryComparator.java
+++ 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/filter/BinaryComparator.java
@@ -36,6 +36,7 @@ import 
org.apache.hbase.thirdparty.com.google.protobuf.InvalidProtocolBufferExce
  * @since 2.0.0
  */
 @InterfaceAudience.Public
+@SuppressWarnings("ComparableType") // Should this move to Comparator usage?
 public class BinaryComparator extends 
org.apache.hadoop.hbase.filter.ByteArrayComparable {
   /**
    * Constructor

http://git-wip-us.apache.org/repos/asf/hbase/blob/641e870e/hbase-client/src/main/java/org/apache/hadoop/hbase/filter/BinaryPrefixComparator.java
----------------------------------------------------------------------
diff --git 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/filter/BinaryPrefixComparator.java
 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/filter/BinaryPrefixComparator.java
index 431b2ab..0c06b49 100644
--- 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/filter/BinaryPrefixComparator.java
+++ 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/filter/BinaryPrefixComparator.java
@@ -36,6 +36,7 @@ import 
org.apache.hbase.thirdparty.com.google.protobuf.InvalidProtocolBufferExce
  * {@link BinaryComparator}.
  */
 @InterfaceAudience.Public
+@SuppressWarnings("ComparableType") // Should this move to Comparator usage?
 public class BinaryPrefixComparator extends ByteArrayComparable {
 
   /**

http://git-wip-us.apache.org/repos/asf/hbase/blob/641e870e/hbase-client/src/main/java/org/apache/hadoop/hbase/filter/BitComparator.java
----------------------------------------------------------------------
diff --git 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/filter/BitComparator.java 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/filter/BitComparator.java
index d283461..bb31e9d 100644
--- 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/filter/BitComparator.java
+++ 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/filter/BitComparator.java
@@ -33,6 +33,7 @@ import 
org.apache.hbase.thirdparty.com.google.protobuf.InvalidProtocolBufferExce
  * with the specified byte array. Then returns whether the result is non-zero.
  */
 @InterfaceAudience.Public
+@SuppressWarnings("ComparableType") // Should this move to Comparator usage?
 public class BitComparator extends ByteArrayComparable {
 
   /** Bit operators. */

http://git-wip-us.apache.org/repos/asf/hbase/blob/641e870e/hbase-client/src/main/java/org/apache/hadoop/hbase/filter/LongComparator.java
----------------------------------------------------------------------
diff --git 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/filter/LongComparator.java 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/filter/LongComparator.java
index fdcc5b9..5319873 100644
--- 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/filter/LongComparator.java
+++ 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/filter/LongComparator.java
@@ -34,6 +34,7 @@ import org.apache.hadoop.hbase.util.Bytes;
  * A long comparator which numerical compares against the specified byte array
  */
 @InterfaceAudience.Public
+@SuppressWarnings("ComparableType") // Should this move to Comparator usage?
 public class LongComparator extends ByteArrayComparable {
   private long longValue;
 

http://git-wip-us.apache.org/repos/asf/hbase/blob/641e870e/hbase-client/src/main/java/org/apache/hadoop/hbase/filter/NullComparator.java
----------------------------------------------------------------------
diff --git 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/filter/NullComparator.java 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/filter/NullComparator.java
index b9beac2..de3edb9 100644
--- 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/filter/NullComparator.java
+++ 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/filter/NullComparator.java
@@ -32,6 +32,7 @@ import 
org.apache.hbase.thirdparty.com.google.protobuf.InvalidProtocolBufferExce
  * byte array using {@link 
org.apache.hadoop.hbase.util.Bytes#compareTo(byte[], byte[])}.
  */
 @InterfaceAudience.Public
+@SuppressWarnings("ComparableType") // Should this move to Comparator usage?
 public class NullComparator extends ByteArrayComparable {
 
   public NullComparator() {

http://git-wip-us.apache.org/repos/asf/hbase/blob/641e870e/hbase-client/src/main/java/org/apache/hadoop/hbase/filter/RegexStringComparator.java
----------------------------------------------------------------------
diff --git 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/filter/RegexStringComparator.java
 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/filter/RegexStringComparator.java
index fd109f7..d278e7a 100644
--- 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/filter/RegexStringComparator.java
+++ 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/filter/RegexStringComparator.java
@@ -69,6 +69,7 @@ import 
org.apache.hbase.thirdparty.com.google.protobuf.InvalidProtocolBufferExce
  * @see java.util.regex.Pattern
  */
 @InterfaceAudience.Public
+@SuppressWarnings("ComparableType") // Should this move to Comparator usage?
 public class RegexStringComparator extends ByteArrayComparable {
 
   private static final Logger LOG = 
LoggerFactory.getLogger(RegexStringComparator.class);

http://git-wip-us.apache.org/repos/asf/hbase/blob/641e870e/hbase-client/src/main/java/org/apache/hadoop/hbase/filter/SubstringComparator.java
----------------------------------------------------------------------
diff --git 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/filter/SubstringComparator.java
 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/filter/SubstringComparator.java
index 202a5e3..1bfc722 100644
--- 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/filter/SubstringComparator.java
+++ 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/filter/SubstringComparator.java
@@ -43,6 +43,7 @@ import 
org.apache.hbase.thirdparty.com.google.protobuf.InvalidProtocolBufferExce
  * </pre>
  */
 @InterfaceAudience.Public
+@SuppressWarnings("ComparableType") // Should this move to Comparator usage?
 public class SubstringComparator extends ByteArrayComparable {
 
   private String substr;

http://git-wip-us.apache.org/repos/asf/hbase/blob/641e870e/hbase-common/src/main/java/org/apache/hadoop/hbase/filter/ByteArrayComparable.java
----------------------------------------------------------------------
diff --git 
a/hbase-common/src/main/java/org/apache/hadoop/hbase/filter/ByteArrayComparable.java
 
b/hbase-common/src/main/java/org/apache/hadoop/hbase/filter/ByteArrayComparable.java
index f0258f5..06fec7e 100644
--- 
a/hbase-common/src/main/java/org/apache/hadoop/hbase/filter/ByteArrayComparable.java
+++ 
b/hbase-common/src/main/java/org/apache/hadoop/hbase/filter/ByteArrayComparable.java
@@ -32,6 +32,7 @@ import org.apache.yetus.audience.InterfaceAudience;
 // adding special compareTo methods. We have to clean it. Deprecate this class 
and replace it
 // with a more generic one which says it compares bytes (not necessary a byte 
array only)
 // BytesComparable implements Comparable<Byte> will work?
+@SuppressWarnings("ComparableType") // Should this move to Comparator usage?
 public abstract class ByteArrayComparable implements Comparable<byte[]> {
 
   byte[] value;

http://git-wip-us.apache.org/repos/asf/hbase/blob/641e870e/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index b8b0225..8057fc2 100755
--- a/pom.xml
+++ b/pom.xml
@@ -1464,7 +1464,7 @@
     <buildnumber.maven.version>1.4</buildnumber.maven.version>
     <checkstyle.version>6.18</checkstyle.version>
     <exec.maven.version>1.6.0</exec.maven.version>
-    <error-prone.version>2.1.1</error-prone.version>
+    <error-prone.version>2.2.0</error-prone.version>
     <findbugs-annotations>1.3.9-1</findbugs-annotations>
     <findbugs.maven.version>3.0.4</findbugs.maven.version>
     <jamon.plugin.version>2.4.2</jamon.plugin.version>

Reply via email to