ws-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hudson (JIRA)" <>
Subject [jira] [Commented] (NEETHI-9) Errors in XML object model conversions are not handled properly
Date Fri, 08 Jul 2011 20:27:16 GMT


Hudson commented on NEETHI-9:

Integrated in neethi-trunk #124 (See [])
    NEETHI-9: Make sure that Converter implementations throw an exception instead of returning

veithen : 
Files : 
* /webservices/commons/trunk/modules/neethi/src/main/java/org/apache/neethi/builders/converters/
* /webservices/commons/trunk/modules/neethi/src/main/java/org/apache/neethi/builders/converters/
* /webservices/commons/trunk/modules/neethi/src/main/java/org/apache/neethi/builders/converters/
* /webservices/commons/trunk/modules/neethi/src/main/java/org/apache/neethi/builders/converters/

> Errors in XML object model conversions are not handled properly
> ---------------------------------------------------------------
>                 Key: NEETHI-9
>                 URL:
>             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:


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message