Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 0041D160C15 for ; Wed, 3 Jan 2018 11:51:57 +0100 (CET) Received: (qmail 95653 invoked by uid 500); 3 Jan 2018 10:51:57 -0000 Mailing-List: contact commits-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hbase.apache.org Delivered-To: mailing list commits@hbase.apache.org Received: (qmail 95644 invoked by uid 99); 3 Jan 2018 10:51:57 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 03 Jan 2018 10:51:57 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id E4D80DFCFA; Wed, 3 Jan 2018 10:51:56 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: janh@apache.org To: commits@hbase.apache.org Message-Id: <7b4863adb0624c30b46c02b009633a2c@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: hbase git commit: HBASE-19604 Fixed Checkstyle errors in hbase-protocol-shaded and enabled Checkstyle to fail on violations Date: Wed, 3 Jan 2018 10:51:56 +0000 (UTC) archived-at: Wed, 03 Jan 2018 10:51:58 -0000 Repository: hbase Updated Branches: refs/heads/branch-2 4bf601a92 -> 9f610e593 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/9f610e59 Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/9f610e59 Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/9f610e59 Branch: refs/heads/branch-2 Commit: 9f610e5930a268c66a9349451d763841fdb7bc19 Parents: 4bf601a Author: Jan Hentschel Authored: Sat Dec 23 17:38:49 2017 +0100 Committer: Jan Hentschel Committed: Wed Jan 3 13:47:39 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/9f610e59/hbase-protocol-shaded/pom.xml ---------------------------------------------------------------------- diff --git a/hbase-protocol-shaded/pom.xml b/hbase-protocol-shaded/pom.xml index a9258db..1ed4374 100644 --- a/hbase-protocol-shaded/pom.xml +++ b/hbase-protocol-shaded/pom.xml @@ -170,6 +170,22 @@ + + org.apache.maven.plugins + maven-checkstyle-plugin + + + checkstyle + validate + + check + + + true + + + + http://git-wip-us.apache.org/repos/asf/hbase/blob/9f610e59/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 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) {