diff --git a/hbase-protocol-shaded/pom.xml b/hbase-protocol-shaded/pom.xml
index ab04e98d167..03030b82cc9 100644
--- a/hbase-protocol-shaded/pom.xml
+++ b/hbase-protocol-shaded/pom.xml
@@ -179,6 +179,22 @@
+
+ org.apache.maven.plugins
+ maven-checkstyle-plugin
+
+
+ checkstyle
+ validate
+
+ check
+
+
+ true
+
+
+
+
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 0e4bb94973f..f8cef893d7d 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 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 pbTrace = new ArrayList<>(trace.length);
for (StackTraceElement elem : trace) {