Return-Path: X-Original-To: apmail-gora-dev-archive@www.apache.org Delivered-To: apmail-gora-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 99BC717521 for ; Mon, 31 Aug 2015 06:50:47 +0000 (UTC) Received: (qmail 45930 invoked by uid 500); 31 Aug 2015 06:50:47 -0000 Delivered-To: apmail-gora-dev-archive@gora.apache.org Received: (qmail 45893 invoked by uid 500); 31 Aug 2015 06:50:47 -0000 Mailing-List: contact dev-help@gora.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@gora.apache.org Delivered-To: mailing list dev@gora.apache.org Received: (qmail 45882 invoked by uid 99); 31 Aug 2015 06:50:47 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 31 Aug 2015 06:50:47 +0000 Date: Mon, 31 Aug 2015 06:50:47 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: dev@gora.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (GORA-429) Implement Maven forbidden-apis plugin in Gora MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/GORA-429?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14723048#comment-14723048 ] ASF GitHub Bot commented on GORA-429: ------------------------------------- Github user lewismc commented on a diff in the pull request: https://github.com/apache/gora/pull/32#discussion_r38287924 --- Diff: gora-accumulo/src/main/java/org/apache/gora/accumulo/store/AccumuloStore.java --- @@ -248,7 +247,6 @@ public K fromBytes(Class clazz, byte[] val) { avroEncoder.flush(); return baos.toByteArray(); } catch (IOException e) { - e.printStackTrace(); --- End diff -- Hi @renato2099 actually, I think the answer is no. We should not be printing an exception here. I _think_ the logic may be flawed. We make a check in the code for the object being null (in which case we call firstNullSchemaTypeIndex and then process with the avro encoder) or the alternative which is that the object is not null (in which case we call firstNotNullSchemaTypeIndex and then process with the avro encoder). This method is recursive. If you look at the very last else statement ``` } else { return toBytes(o); } ``` this throws no logging error or stack trace exception right? I think that this logic is OK. It was wrong in the first place. * to throw an exception would mean that the recursive code could never be called. * to log an error would be useless and what other state can the object be in other than either 'null' or 'not null', in which case it has already been processed by the preceding statements! wdyt. Thank you for review. > Implement Maven forbidden-apis plugin in Gora > --------------------------------------------- > > Key: GORA-429 > URL: https://issues.apache.org/jira/browse/GORA-429 > Project: Apache Gora > Issue Type: Improvement > Components: build process > Reporter: Lewis John McGibbney > Assignee: Lewis John McGibbney > Fix For: 0.6.1 > > > The [forbidden-apis Maven plugin|https://github.com/policeman-tools/forbidden-apis] allow us to parse Java byte code to find invocations of method/class/field signatures and fail build -- This message was sent by Atlassian JIRA (v6.3.4#6332)