hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zhang...@apache.org
Subject [02/35] hbase git commit: HBASE-19604 Fixed Checkstyle errors in hbase-protocol-shaded and enabled Checkstyle to fail on violations
Date Thu, 04 Jan 2018 01:23:36 GMT
HBASE-19604 Fixed Checkstyle errors in hbase-protocol-shaded and enabled Checkstyle to fail
on violations


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

Branch: refs/heads/HBASE-19397
Commit: 777ad8caa2cabf6c4276bf96a3016f60da15f8dc
Parents: 1fa3637
Author: Jan Hentschel <jan.hentschel@ultratendency.com>
Authored: Sat Dec 23 17:38:49 2017 +0100
Committer: Jan Hentschel <jan.hentschel@ultratendency.com>
Committed: Wed Jan 3 13:41:47 2018 +0300

----------------------------------------------------------------------
 hbase-protocol-shaded/pom.xml                       | 16 ++++++++++++++++
 .../hadoop/hbase/util/ForeignExceptionUtil.java     | 10 ++++++++--
 2 files changed, 24 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/777ad8ca/hbase-protocol-shaded/pom.xml
----------------------------------------------------------------------
diff --git a/hbase-protocol-shaded/pom.xml b/hbase-protocol-shaded/pom.xml
index ab04e98..03030b8 100644
--- a/hbase-protocol-shaded/pom.xml
+++ b/hbase-protocol-shaded/pom.xml
@@ -179,6 +179,22 @@
           </execution>
         </executions>
       </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-checkstyle-plugin</artifactId>
+        <executions>
+          <execution>
+            <id>checkstyle</id>
+            <phase>validate</phase>
+            <goals>
+              <goal>check</goal>
+            </goals>
+            <configuration>
+              <failOnViolation>true</failOnViolation>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
     </plugins>
     <pluginManagement>
       <plugins>

http://git-wip-us.apache.org/repos/asf/hbase/blob/777ad8ca/hbase-protocol-shaded/src/main/java/org/apache/hadoop/hbase/util/ForeignExceptionUtil.java
----------------------------------------------------------------------
diff --git a/hbase-protocol-shaded/src/main/java/org/apache/hadoop/hbase/util/ForeignExceptionUtil.java
b/hbase-protocol-shaded/src/main/java/org/apache/hadoop/hbase/util/ForeignExceptionUtil.java
index 0e4bb94..f8cef89 100644
--- a/hbase-protocol-shaded/src/main/java/org/apache/hadoop/hbase/util/ForeignExceptionUtil.java
+++ b/hbase-protocol-shaded/src/main/java/org/apache/hadoop/hbase/util/ForeignExceptionUtil.java
@@ -93,7 +93,10 @@ public final class ForeignExceptionUtil {
     GenericExceptionMessage payload = gemBuilder.build();
     ForeignExceptionMessage.Builder exception = ForeignExceptionMessage.newBuilder();
     exception.setGenericException(payload);
-    if (source != null) exception.setSource(source);
+    if (source != null) {
+      exception.setSource(source);
+    }
+
     return exception.build();
   }
 
@@ -104,7 +107,10 @@ public final class ForeignExceptionUtil {
    */
   public static List<StackTraceElementMessage> toProtoStackTraceElement(StackTraceElement[]
trace) {
     // if there is no stack trace, ignore it and just return the message
-    if (trace == null) return null;
+    if (trace == null) {
+      return null;
+    }
+
     // build the stack trace for the message
     List<StackTraceElementMessage> pbTrace = new ArrayList<>(trace.length);
     for (StackTraceElement elem : trace) {


Mime
View raw message