HBASE-19604 Fixed Checkstyle errors in hbase-protocol-shaded and enabled Checkstyle to fail on violations
This commit is contained in:
parent
1fa3637b4d
commit
777ad8caa2
|
@ -179,6 +179,22 @@
|
||||||
</execution>
|
</execution>
|
||||||
</executions>
|
</executions>
|
||||||
</plugin>
|
</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>
|
</plugins>
|
||||||
<pluginManagement>
|
<pluginManagement>
|
||||||
<plugins>
|
<plugins>
|
||||||
|
|
|
@ -93,7 +93,10 @@ public final class ForeignExceptionUtil {
|
||||||
GenericExceptionMessage payload = gemBuilder.build();
|
GenericExceptionMessage payload = gemBuilder.build();
|
||||||
ForeignExceptionMessage.Builder exception = ForeignExceptionMessage.newBuilder();
|
ForeignExceptionMessage.Builder exception = ForeignExceptionMessage.newBuilder();
|
||||||
exception.setGenericException(payload);
|
exception.setGenericException(payload);
|
||||||
if (source != null) exception.setSource(source);
|
if (source != null) {
|
||||||
|
exception.setSource(source);
|
||||||
|
}
|
||||||
|
|
||||||
return exception.build();
|
return exception.build();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -104,7 +107,10 @@ public final class ForeignExceptionUtil {
|
||||||
*/
|
*/
|
||||||
public static List<StackTraceElementMessage> toProtoStackTraceElement(StackTraceElement[] trace) {
|
public static List<StackTraceElementMessage> toProtoStackTraceElement(StackTraceElement[] trace) {
|
||||||
// if there is no stack trace, ignore it and just return the message
|
// 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
|
// build the stack trace for the message
|
||||||
List<StackTraceElementMessage> pbTrace = new ArrayList<>(trace.length);
|
List<StackTraceElementMessage> pbTrace = new ArrayList<>(trace.length);
|
||||||
for (StackTraceElement elem : trace) {
|
for (StackTraceElement elem : trace) {
|
||||||
|
|
Loading…
Reference in New Issue