HBASE-19987 error-prone 2.2.0
This commit is contained in:
parent
37d91cdfbb
commit
641e870e11
@ -37,6 +37,12 @@
|
|||||||
<artifactId>error_prone_annotation</artifactId>
|
<artifactId>error_prone_annotation</artifactId>
|
||||||
<version>${error-prone.version}</version>
|
<version>${error-prone.version}</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
|
<exclusions>
|
||||||
|
<exclusion>
|
||||||
|
<groupId>com.google.guava</groupId>
|
||||||
|
<artifactId>guava</artifactId>
|
||||||
|
</exclusion>
|
||||||
|
</exclusions>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<!--mvn dependency:analyze says this is not used but compile fails
|
<!--mvn dependency:analyze says this is not used but compile fails
|
||||||
|
@ -30,7 +30,7 @@ import com.sun.source.tree.CompilationUnitTree;
|
|||||||
category = BugPattern.Category.JDK,
|
category = BugPattern.Category.JDK,
|
||||||
summary = "A placeholder rule that never matches.",
|
summary = "A placeholder rule that never matches.",
|
||||||
severity = BugPattern.SeverityLevel.ERROR,
|
severity = BugPattern.SeverityLevel.ERROR,
|
||||||
suppressibility = BugPattern.Suppressibility.UNSUPPRESSIBLE,
|
suppressionAnnotations = {},
|
||||||
linkType = BugPattern.LinkType.NONE)
|
linkType = BugPattern.LinkType.NONE)
|
||||||
public class AlwaysPasses extends BugChecker implements BugChecker.CompilationUnitTreeMatcher {
|
public class AlwaysPasses extends BugChecker implements BugChecker.CompilationUnitTreeMatcher {
|
||||||
@Override
|
@Override
|
||||||
|
@ -448,7 +448,7 @@ public class ServerLoad implements ServerMetrics {
|
|||||||
.collect(Collectors.toMap(Map.Entry::getKey, e -> new RegionLoad(e.getValue()),
|
.collect(Collectors.toMap(Map.Entry::getKey, e -> new RegionLoad(e.getValue()),
|
||||||
(v1, v2) -> {
|
(v1, v2) -> {
|
||||||
throw new RuntimeException("key collisions?");
|
throw new RuntimeException("key collisions?");
|
||||||
}, () -> new TreeMap(Bytes.BYTES_COMPARATOR)));
|
}, () -> new TreeMap<>(Bytes.BYTES_COMPARATOR)));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -118,7 +118,7 @@ public abstract class Mutation extends OperationWithAttributes implements Row, C
|
|||||||
.collect(Collectors.toMap(e -> e.getKey(), e -> new ArrayList<>(e.getValue()),
|
.collect(Collectors.toMap(e -> e.getKey(), e -> new ArrayList<>(e.getValue()),
|
||||||
(k, v) -> {
|
(k, v) -> {
|
||||||
throw new RuntimeException("collisions!!!");
|
throw new RuntimeException("collisions!!!");
|
||||||
}, () -> new TreeMap(Bytes.BYTES_COMPARATOR)));
|
}, () -> new TreeMap<>(Bytes.BYTES_COMPARATOR)));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -36,6 +36,7 @@ import org.apache.yetus.audience.InterfaceAudience;
|
|||||||
* A BigDecimal comparator which numerical compares against the specified byte array
|
* A BigDecimal comparator which numerical compares against the specified byte array
|
||||||
*/
|
*/
|
||||||
@InterfaceAudience.Public
|
@InterfaceAudience.Public
|
||||||
|
@SuppressWarnings("ComparableType") // Should this move to Comparator usage?
|
||||||
public class BigDecimalComparator extends ByteArrayComparable {
|
public class BigDecimalComparator extends ByteArrayComparable {
|
||||||
private BigDecimal bigDecimal;
|
private BigDecimal bigDecimal;
|
||||||
|
|
||||||
|
@ -36,6 +36,7 @@ import org.apache.hbase.thirdparty.com.google.protobuf.InvalidProtocolBufferExce
|
|||||||
* @since 2.0.0
|
* @since 2.0.0
|
||||||
*/
|
*/
|
||||||
@InterfaceAudience.Public
|
@InterfaceAudience.Public
|
||||||
|
@SuppressWarnings("ComparableType") // Should this move to Comparator usage?
|
||||||
public class BinaryComparator extends org.apache.hadoop.hbase.filter.ByteArrayComparable {
|
public class BinaryComparator extends org.apache.hadoop.hbase.filter.ByteArrayComparable {
|
||||||
/**
|
/**
|
||||||
* Constructor
|
* Constructor
|
||||||
|
@ -36,6 +36,7 @@ import org.apache.hbase.thirdparty.com.google.protobuf.InvalidProtocolBufferExce
|
|||||||
* {@link BinaryComparator}.
|
* {@link BinaryComparator}.
|
||||||
*/
|
*/
|
||||||
@InterfaceAudience.Public
|
@InterfaceAudience.Public
|
||||||
|
@SuppressWarnings("ComparableType") // Should this move to Comparator usage?
|
||||||
public class BinaryPrefixComparator extends ByteArrayComparable {
|
public class BinaryPrefixComparator extends ByteArrayComparable {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -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.
|
* with the specified byte array. Then returns whether the result is non-zero.
|
||||||
*/
|
*/
|
||||||
@InterfaceAudience.Public
|
@InterfaceAudience.Public
|
||||||
|
@SuppressWarnings("ComparableType") // Should this move to Comparator usage?
|
||||||
public class BitComparator extends ByteArrayComparable {
|
public class BitComparator extends ByteArrayComparable {
|
||||||
|
|
||||||
/** Bit operators. */
|
/** Bit operators. */
|
||||||
|
@ -34,6 +34,7 @@ import org.apache.hadoop.hbase.util.Bytes;
|
|||||||
* A long comparator which numerical compares against the specified byte array
|
* A long comparator which numerical compares against the specified byte array
|
||||||
*/
|
*/
|
||||||
@InterfaceAudience.Public
|
@InterfaceAudience.Public
|
||||||
|
@SuppressWarnings("ComparableType") // Should this move to Comparator usage?
|
||||||
public class LongComparator extends ByteArrayComparable {
|
public class LongComparator extends ByteArrayComparable {
|
||||||
private long longValue;
|
private long longValue;
|
||||||
|
|
||||||
|
@ -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[])}.
|
* byte array using {@link org.apache.hadoop.hbase.util.Bytes#compareTo(byte[], byte[])}.
|
||||||
*/
|
*/
|
||||||
@InterfaceAudience.Public
|
@InterfaceAudience.Public
|
||||||
|
@SuppressWarnings("ComparableType") // Should this move to Comparator usage?
|
||||||
public class NullComparator extends ByteArrayComparable {
|
public class NullComparator extends ByteArrayComparable {
|
||||||
|
|
||||||
public NullComparator() {
|
public NullComparator() {
|
||||||
|
@ -69,6 +69,7 @@ import org.apache.hbase.thirdparty.com.google.protobuf.InvalidProtocolBufferExce
|
|||||||
* @see java.util.regex.Pattern
|
* @see java.util.regex.Pattern
|
||||||
*/
|
*/
|
||||||
@InterfaceAudience.Public
|
@InterfaceAudience.Public
|
||||||
|
@SuppressWarnings("ComparableType") // Should this move to Comparator usage?
|
||||||
public class RegexStringComparator extends ByteArrayComparable {
|
public class RegexStringComparator extends ByteArrayComparable {
|
||||||
|
|
||||||
private static final Logger LOG = LoggerFactory.getLogger(RegexStringComparator.class);
|
private static final Logger LOG = LoggerFactory.getLogger(RegexStringComparator.class);
|
||||||
|
@ -43,6 +43,7 @@ import org.apache.hbase.thirdparty.com.google.protobuf.InvalidProtocolBufferExce
|
|||||||
* </pre>
|
* </pre>
|
||||||
*/
|
*/
|
||||||
@InterfaceAudience.Public
|
@InterfaceAudience.Public
|
||||||
|
@SuppressWarnings("ComparableType") // Should this move to Comparator usage?
|
||||||
public class SubstringComparator extends ByteArrayComparable {
|
public class SubstringComparator extends ByteArrayComparable {
|
||||||
|
|
||||||
private String substr;
|
private String substr;
|
||||||
|
@ -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
|
// 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)
|
// with a more generic one which says it compares bytes (not necessary a byte array only)
|
||||||
// BytesComparable implements Comparable<Byte> will work?
|
// BytesComparable implements Comparable<Byte> will work?
|
||||||
|
@SuppressWarnings("ComparableType") // Should this move to Comparator usage?
|
||||||
public abstract class ByteArrayComparable implements Comparable<byte[]> {
|
public abstract class ByteArrayComparable implements Comparable<byte[]> {
|
||||||
|
|
||||||
byte[] value;
|
byte[] value;
|
||||||
|
2
pom.xml
2
pom.xml
@ -1464,7 +1464,7 @@
|
|||||||
<buildnumber.maven.version>1.4</buildnumber.maven.version>
|
<buildnumber.maven.version>1.4</buildnumber.maven.version>
|
||||||
<checkstyle.version>6.18</checkstyle.version>
|
<checkstyle.version>6.18</checkstyle.version>
|
||||||
<exec.maven.version>1.6.0</exec.maven.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-annotations>1.3.9-1</findbugs-annotations>
|
||||||
<findbugs.maven.version>3.0.4</findbugs.maven.version>
|
<findbugs.maven.version>3.0.4</findbugs.maven.version>
|
||||||
<jamon.plugin.version>2.4.2</jamon.plugin.version>
|
<jamon.plugin.version>2.4.2</jamon.plugin.version>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user