Return-Path: X-Original-To: apmail-ws-dev-archive@www.apache.org Delivered-To: apmail-ws-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 443096393 for ; Fri, 8 Jul 2011 20:27:44 +0000 (UTC) Received: (qmail 76759 invoked by uid 500); 8 Jul 2011 20:27:43 -0000 Delivered-To: apmail-ws-dev-archive@ws.apache.org Received: (qmail 76297 invoked by uid 500); 8 Jul 2011 20:27:42 -0000 Mailing-List: contact dev-help@ws.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ws.apache.org Delivered-To: mailing list dev@ws.apache.org Received: (qmail 76290 invoked by uid 99); 8 Jul 2011 20:27:41 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 08 Jul 2011 20:27:41 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 08 Jul 2011 20:27:37 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id A11364E79A for ; Fri, 8 Jul 2011 20:27:16 +0000 (UTC) Date: Fri, 8 Jul 2011 20:27:16 +0000 (UTC) From: "Hudson (JIRA)" To: dev@ws.apache.org Message-ID: <870774791.12304.1310156836656.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <986669483.62549.1302984305884.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (NEETHI-9) Errors in XML object model conversions are not handled properly 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/NEETHI-9?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13062157#comment-13062157 ] Hudson commented on NEETHI-9: ----------------------------- Integrated in neethi-trunk #124 (See [https://builds.apache.org/job/neethi-trunk/124/]) NEETHI-9: Make sure that Converter implementations throw an exception instead of returning null. veithen : Files : * /webservices/commons/trunk/modules/neethi/src/main/java/org/apache/neethi/builders/converters/StaxToDOMConverter.java * /webservices/commons/trunk/modules/neethi/src/main/java/org/apache/neethi/builders/converters/ConverterException.java * /webservices/commons/trunk/modules/neethi/src/main/java/org/apache/neethi/builders/converters/DOMToStaxConverter.java * /webservices/commons/trunk/modules/neethi/src/main/java/org/apache/neethi/builders/converters/Converter.java > Errors in XML object model conversions are not handled properly > --------------------------------------------------------------- > > Key: NEETHI-9 > URL: https://issues.apache.org/jira/browse/NEETHI-9 > Project: Neethi > Issue Type: Bug > Affects Versions: 3.0 > Reporter: Andreas Veithen > Priority: Minor > > Implementations of Converter#convert return null when an error occurs during conversion. On the other hand, AssertionBuilderFactoryImpl#invokeBuilder doesn't check for a null return value. This means that when an error occurs, a null value is passed to AssertionBuilder#build, which leads to unexpected results. > Also, the fact that the implementations of Converter#convert swallow most exceptions makes it hard to debug issues caused by problems during object model conversion. > We have two options: > 1. Let Converter#convert throw an exception if there is a problem. > 2. Add a null check in AssertionBuilderFactoryImpl#invokeBuilder (to solve the first problem) and make sure that exceptions thrown in Converter#convert are logged (to solve the second problem). In this case, we need to agree on the logging API to be used (commons logging or SLF4J). > Personally, I prefer option 1. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@ws.apache.org For additional commands, e-mail: dev-help@ws.apache.org