You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by ja...@apache.org on 2018/01/03 10:47:22 UTC
hbase git commit: HBASE-19604 Fixed Checkstyle errors in
hbase-protocol-shaded and enabled Checkstyle to fail on violations
Repository: hbase
Updated Branches:
refs/heads/master 1fa3637b4 -> 777ad8caa
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/master
Commit: 777ad8caa2cabf6c4276bf96a3016f60da15f8dc
Parents: 1fa3637
Author: Jan Hentschel <ja...@ultratendency.com>
Authored: Sat Dec 23 17:38:49 2017 +0100
Committer: Jan Hentschel <ja...@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) {