diff --git a/hbase-client/pom.xml b/hbase-client/pom.xml index 9974fee0f72..19ecd684766 100644 --- a/hbase-client/pom.xml +++ b/hbase-client/pom.xml @@ -363,5 +363,63 @@ + + + errorProne + + false + + + + + + org.apache.maven.plugins + maven-compiler-plugin + ${maven.compiler.version} + + javac-with-errorprone + true + true + + -XepDisableWarningsInGeneratedCode + -Xep:FallThrough:OFF + + + + org.apache.hbase + hbase-error-prone + ${project.version} + + + + + + org.apache.hbase + hbase-error-prone + ${project.version} + + + org.codehaus.plexus + plexus-compiler-javac-errorprone + ${plexus.errorprone.javac.version} + + + + com.google.errorprone + error_prone_core + ${error-prone.version} + + + org.apache.hbase + hbase-error-prone + ${project.version} + + + + + + + diff --git a/hbase-common/pom.xml b/hbase-common/pom.xml index 7f31cc339af..6b3053619b5 100644 --- a/hbase-common/pom.xml +++ b/hbase-common/pom.xml @@ -424,5 +424,63 @@ + + + errorProne + + false + + + + + + org.apache.maven.plugins + maven-compiler-plugin + ${maven.compiler.version} + + javac-with-errorprone + true + true + + -XepDisableWarningsInGeneratedCode + -Xep:FallThrough:OFF + + + + org.apache.hbase + hbase-error-prone + ${project.version} + + + + + + org.apache.hbase + hbase-error-prone + ${project.version} + + + org.codehaus.plexus + plexus-compiler-javac-errorprone + ${plexus.errorprone.javac.version} + + + + com.google.errorprone + error_prone_core + ${error-prone.version} + + + org.apache.hbase + hbase-error-prone + ${project.version} + + + + + + + diff --git a/hbase-error-prone/pom.xml b/hbase-error-prone/pom.xml new file mode 100644 index 00000000000..48442644dfd --- /dev/null +++ b/hbase-error-prone/pom.xml @@ -0,0 +1,68 @@ + + + + 4.0.0 + + hbase + org.apache.hbase + 1.5.0-SNAPSHOT + .. + + hbase-error-prone + 1.5.0-SNAPSHOT + Apache HBase - Error Prone Rules + Module to hold error prone custom rules for HBase. + + + + com.google.errorprone + error_prone_annotation + ${error-prone.version} + provided + + + + com.google.auto.service + auto-service + 1.0-rc3 + true + + + com.google.errorprone + error_prone_check_api + ${error-prone.version} + provided + + + com.google.code.findbugs + jsr305 + + + + + com.google.errorprone + javac + 9-dev-r4023-3 + provided + + + diff --git a/hbase-error-prone/src/main/java/org/apache/hadoop/hbase/errorprone/AlwaysPasses.java b/hbase-error-prone/src/main/java/org/apache/hadoop/hbase/errorprone/AlwaysPasses.java new file mode 100644 index 00000000000..5778f2df8e3 --- /dev/null +++ b/hbase-error-prone/src/main/java/org/apache/hadoop/hbase/errorprone/AlwaysPasses.java @@ -0,0 +1,44 @@ +/** + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.hadoop.hbase.errorprone; + +import com.google.auto.service.AutoService; +import com.google.errorprone.BugPattern; +import com.google.errorprone.VisitorState; +import com.google.errorprone.bugpatterns.BugChecker; +import com.google.errorprone.fixes.Fix; +import com.google.errorprone.fixes.SuggestedFix; +import com.google.errorprone.matchers.Description; +import com.google.errorprone.matchers.Matcher; +import com.sun.source.tree.CompilationUnitTree; +import com.sun.source.tree.ImportTree; + +@AutoService(BugChecker.class) +@BugPattern(name = "AlwaysPasses", + category = BugPattern.Category.JDK, + summary = "A placeholder rule that never matches.", + severity = BugPattern.SeverityLevel.ERROR, + suppressibility = BugPattern.Suppressibility.UNSUPPRESSIBLE, + linkType = BugPattern.LinkType.NONE) +public class AlwaysPasses extends BugChecker implements BugChecker.CompilationUnitTreeMatcher { + @Override + public Description matchCompilationUnit(CompilationUnitTree tree, VisitorState state) { + return Description.NO_MATCH; + } +} \ No newline at end of file diff --git a/hbase-examples/pom.xml b/hbase-examples/pom.xml index c93c39edefb..138ea41c71c 100644 --- a/hbase-examples/pom.xml +++ b/hbase-examples/pom.xml @@ -316,5 +316,63 @@ if we can combine these profiles somehow --> + + + errorProne + + false + + + + + + org.apache.maven.plugins + maven-compiler-plugin + ${maven.compiler.version} + + javac-with-errorprone + true + true + + -XepDisableWarningsInGeneratedCode + -Xep:FallThrough:OFF + + + + org.apache.hbase + hbase-error-prone + ${project.version} + + + + + + org.apache.hbase + hbase-error-prone + ${project.version} + + + org.codehaus.plexus + plexus-compiler-javac-errorprone + ${plexus.errorprone.javac.version} + + + + com.google.errorprone + error_prone_core + ${error-prone.version} + + + org.apache.hbase + hbase-error-prone + ${project.version} + + + + + + + diff --git a/hbase-external-blockcache/pom.xml b/hbase-external-blockcache/pom.xml index b4f070fa102..165f2b79eb8 100644 --- a/hbase-external-blockcache/pom.xml +++ b/hbase-external-blockcache/pom.xml @@ -312,5 +312,63 @@ + + + errorProne + + false + + + + + + org.apache.maven.plugins + maven-compiler-plugin + ${maven.compiler.version} + + javac-with-errorprone + true + true + + -XepDisableWarningsInGeneratedCode + -Xep:FallThrough:OFF + + + + org.apache.hbase + hbase-error-prone + ${project.version} + + + + + + org.apache.hbase + hbase-error-prone + ${project.version} + + + org.codehaus.plexus + plexus-compiler-javac-errorprone + ${plexus.errorprone.javac.version} + + + + com.google.errorprone + error_prone_core + ${error-prone.version} + + + org.apache.hbase + hbase-error-prone + ${project.version} + + + + + + + diff --git a/hbase-hadoop-compat/pom.xml b/hbase-hadoop-compat/pom.xml index 049fc2889fd..6992ce61aa1 100644 --- a/hbase-hadoop-compat/pom.xml +++ b/hbase-hadoop-compat/pom.xml @@ -141,6 +141,64 @@ true + + + errorProne + + false + + + + + + org.apache.maven.plugins + maven-compiler-plugin + ${maven.compiler.version} + + javac-with-errorprone + true + true + + -XepDisableWarningsInGeneratedCode + -Xep:FallThrough:OFF + + + + org.apache.hbase + hbase-error-prone + ${project.version} + + + + + + org.apache.hbase + hbase-error-prone + ${project.version} + + + org.codehaus.plexus + plexus-compiler-javac-errorprone + ${plexus.errorprone.javac.version} + + + + com.google.errorprone + error_prone_core + ${error-prone.version} + + + org.apache.hbase + hbase-error-prone + ${project.version} + + + + + + + diff --git a/hbase-hadoop2-compat/pom.xml b/hbase-hadoop2-compat/pom.xml index 1c057c3d777..f209f21999b 100644 --- a/hbase-hadoop2-compat/pom.xml +++ b/hbase-hadoop2-compat/pom.xml @@ -216,5 +216,63 @@ limitations under the License. true + + + errorProne + + false + + + + + + org.apache.maven.plugins + maven-compiler-plugin + ${maven.compiler.version} + + javac-with-errorprone + true + true + + -XepDisableWarningsInGeneratedCode + -Xep:FallThrough:OFF + + + + org.apache.hbase + hbase-error-prone + ${project.version} + + + + + + org.apache.hbase + hbase-error-prone + ${project.version} + + + org.codehaus.plexus + plexus-compiler-javac-errorprone + ${plexus.errorprone.javac.version} + + + + com.google.errorprone + error_prone_core + ${error-prone.version} + + + org.apache.hbase + hbase-error-prone + ${project.version} + + + + + + + diff --git a/hbase-it/pom.xml b/hbase-it/pom.xml index 8839a9c8b6d..dc7cf447352 100644 --- a/hbase-it/pom.xml +++ b/hbase-it/pom.xml @@ -427,6 +427,64 @@ + + + errorProne + + false + + + + + + org.apache.maven.plugins + maven-compiler-plugin + ${maven.compiler.version} + + javac-with-errorprone + true + true + + -XepDisableWarningsInGeneratedCode + -Xep:FallThrough:OFF + + + + org.apache.hbase + hbase-error-prone + ${project.version} + + + + + + org.apache.hbase + hbase-error-prone + ${project.version} + + + org.codehaus.plexus + plexus-compiler-javac-errorprone + ${plexus.errorprone.javac.version} + + + + com.google.errorprone + error_prone_core + ${error-prone.version} + + + org.apache.hbase + hbase-error-prone + ${project.version} + + + + + + + diff --git a/hbase-metrics-api/pom.xml b/hbase-metrics-api/pom.xml index 4c090b18be3..86105539154 100644 --- a/hbase-metrics-api/pom.xml +++ b/hbase-metrics-api/pom.xml @@ -108,5 +108,63 @@ true + + + errorProne + + false + + + + + + org.apache.maven.plugins + maven-compiler-plugin + ${maven.compiler.version} + + javac-with-errorprone + true + true + + -XepDisableWarningsInGeneratedCode + -Xep:FallThrough:OFF + + + + org.apache.hbase + hbase-error-prone + ${project.version} + + + + + + org.apache.hbase + hbase-error-prone + ${project.version} + + + org.codehaus.plexus + plexus-compiler-javac-errorprone + ${plexus.errorprone.javac.version} + + + + com.google.errorprone + error_prone_core + ${error-prone.version} + + + org.apache.hbase + hbase-error-prone + ${project.version} + + + + + + + diff --git a/hbase-metrics/pom.xml b/hbase-metrics/pom.xml index 7edba02fdcf..8b1e2da762b 100644 --- a/hbase-metrics/pom.xml +++ b/hbase-metrics/pom.xml @@ -132,5 +132,63 @@ true + + + errorProne + + false + + + + + + org.apache.maven.plugins + maven-compiler-plugin + ${maven.compiler.version} + + javac-with-errorprone + true + true + + -XepDisableWarningsInGeneratedCode + -Xep:FallThrough:OFF + + + + org.apache.hbase + hbase-error-prone + ${project.version} + + + + + + org.apache.hbase + hbase-error-prone + ${project.version} + + + org.codehaus.plexus + plexus-compiler-javac-errorprone + ${plexus.errorprone.javac.version} + + + + com.google.errorprone + error_prone_core + ${error-prone.version} + + + org.apache.hbase + hbase-error-prone + ${project.version} + + + + + + + diff --git a/hbase-prefix-tree/pom.xml b/hbase-prefix-tree/pom.xml index 5839079c684..9d1b4723f01 100644 --- a/hbase-prefix-tree/pom.xml +++ b/hbase-prefix-tree/pom.xml @@ -186,5 +186,63 @@ + + + errorProne + + false + + + + + + org.apache.maven.plugins + maven-compiler-plugin + ${maven.compiler.version} + + javac-with-errorprone + true + true + + -XepDisableWarningsInGeneratedCode + -Xep:FallThrough:OFF + + + + org.apache.hbase + hbase-error-prone + ${project.version} + + + + + + org.apache.hbase + hbase-error-prone + ${project.version} + + + org.codehaus.plexus + plexus-compiler-javac-errorprone + ${plexus.errorprone.javac.version} + + + + com.google.errorprone + error_prone_core + ${error-prone.version} + + + org.apache.hbase + hbase-error-prone + ${project.version} + + + + + + + diff --git a/hbase-procedure/pom.xml b/hbase-procedure/pom.xml index 0375010c8d7..e68c0c55a9b 100644 --- a/hbase-procedure/pom.xml +++ b/hbase-procedure/pom.xml @@ -145,5 +145,63 @@ + + + errorProne + + false + + + + + + org.apache.maven.plugins + maven-compiler-plugin + ${maven.compiler.version} + + javac-with-errorprone + true + true + + -XepDisableWarningsInGeneratedCode + -Xep:FallThrough:OFF + + + + org.apache.hbase + hbase-error-prone + ${project.version} + + + + + + org.apache.hbase + hbase-error-prone + ${project.version} + + + org.codehaus.plexus + plexus-compiler-javac-errorprone + ${plexus.errorprone.javac.version} + + + + com.google.errorprone + error_prone_core + ${error-prone.version} + + + org.apache.hbase + hbase-error-prone + ${project.version} + + + + + + + diff --git a/hbase-protocol/pom.xml b/hbase-protocol/pom.xml index a3b9be1bf23..0c5faed5a78 100644 --- a/hbase-protocol/pom.xml +++ b/hbase-protocol/pom.xml @@ -215,5 +215,63 @@ + + + errorProne + + false + + + + + + org.apache.maven.plugins + maven-compiler-plugin + ${maven.compiler.version} + + javac-with-errorprone + true + true + + -XepDisableWarningsInGeneratedCode + -Xep:FallThrough:OFF + + + + org.apache.hbase + hbase-error-prone + ${project.version} + + + + + + org.apache.hbase + hbase-error-prone + ${project.version} + + + org.codehaus.plexus + plexus-compiler-javac-errorprone + ${plexus.errorprone.javac.version} + + + + com.google.errorprone + error_prone_core + ${error-prone.version} + + + org.apache.hbase + hbase-error-prone + ${project.version} + + + + + + + diff --git a/hbase-rest/pom.xml b/hbase-rest/pom.xml index 83d059941cc..f227d46332e 100644 --- a/hbase-rest/pom.xml +++ b/hbase-rest/pom.xml @@ -440,5 +440,63 @@ + + + errorProne + + false + + + + + + org.apache.maven.plugins + maven-compiler-plugin + ${maven.compiler.version} + + javac-with-errorprone + true + true + + -XepDisableWarningsInGeneratedCode + -Xep:FallThrough:OFF + + + + org.apache.hbase + hbase-error-prone + ${project.version} + + + + + + org.apache.hbase + hbase-error-prone + ${project.version} + + + org.codehaus.plexus + plexus-compiler-javac-errorprone + ${plexus.errorprone.javac.version} + + + + com.google.errorprone + error_prone_core + ${error-prone.version} + + + org.apache.hbase + hbase-error-prone + ${project.version} + + + + + + + diff --git a/hbase-rsgroup/pom.xml b/hbase-rsgroup/pom.xml index 5e199af42ef..2bb695800fd 100644 --- a/hbase-rsgroup/pom.xml +++ b/hbase-rsgroup/pom.xml @@ -274,5 +274,63 @@ + + + errorProne + + false + + + + + + org.apache.maven.plugins + maven-compiler-plugin + ${maven.compiler.version} + + javac-with-errorprone + true + true + + -XepDisableWarningsInGeneratedCode + -Xep:FallThrough:OFF + + + + org.apache.hbase + hbase-error-prone + ${project.version} + + + + + + org.apache.hbase + hbase-error-prone + ${project.version} + + + org.codehaus.plexus + plexus-compiler-javac-errorprone + ${plexus.errorprone.javac.version} + + + + com.google.errorprone + error_prone_core + ${error-prone.version} + + + org.apache.hbase + hbase-error-prone + ${project.version} + + + + + + + diff --git a/hbase-server/pom.xml b/hbase-server/pom.xml index 9e32783e9df..e1b08d662fb 100644 --- a/hbase-server/pom.xml +++ b/hbase-server/pom.xml @@ -868,5 +868,63 @@ + + + errorProne + + false + + + + + + org.apache.maven.plugins + maven-compiler-plugin + ${maven.compiler.version} + + javac-with-errorprone + true + true + + -XepDisableWarningsInGeneratedCode + -Xep:FallThrough:OFF + + + + org.apache.hbase + hbase-error-prone + ${project.version} + + + + + + org.apache.hbase + hbase-error-prone + ${project.version} + + + org.codehaus.plexus + plexus-compiler-javac-errorprone + ${plexus.errorprone.javac.version} + + + + com.google.errorprone + error_prone_core + ${error-prone.version} + + + org.apache.hbase + hbase-error-prone + ${project.version} + + + + + + + diff --git a/hbase-thrift/pom.xml b/hbase-thrift/pom.xml index c930a35dbcf..4ad9ccd9dc3 100644 --- a/hbase-thrift/pom.xml +++ b/hbase-thrift/pom.xml @@ -600,5 +600,63 @@ + + + errorProne + + false + + + + + + org.apache.maven.plugins + maven-compiler-plugin + ${maven.compiler.version} + + javac-with-errorprone + true + true + + -XepDisableWarningsInGeneratedCode + -Xep:FallThrough:OFF + + + + org.apache.hbase + hbase-error-prone + ${project.version} + + + + + + org.apache.hbase + hbase-error-prone + ${project.version} + + + org.codehaus.plexus + plexus-compiler-javac-errorprone + ${plexus.errorprone.javac.version} + + + + com.google.errorprone + error_prone_core + ${error-prone.version} + + + org.apache.hbase + hbase-error-prone + ${project.version} + + + + + + + diff --git a/pom.xml b/pom.xml index 83a0ae58144..1f331d8dd30 100644 --- a/pom.xml +++ b/pom.xml @@ -485,7 +485,7 @@ org.apache.maven.plugins maven-compiler-plugin - 2.5.1 + ${maven.compiler.version} ${compileSource} ${compileSource} @@ -1288,13 +1288,16 @@ 1.46 1.0.0-RC2 + 2.1.1 2.4 1.6 + 3.6.1 2.4.1 1.3.9-1 6.18 2.10.3 1.5.3 + 2.8.2 3.1.0-RC1 3.0.1 3.0.0-M1 @@ -2510,8 +2513,8 @@ - + @@ -2698,6 +2701,17 @@ + + + errorProne + + false + + + hbase-error-prone + + +