|
Werner Guttmann made changes - 11/Dec/08 07:20 AM
Werner Guttmann made changes - 12/Dec/08 03:16 PM
Ralf Joachim made changes - 22/Jan/09 10:58 AM
Ralf Joachim made changes - 24/Jan/09 11:12 AM
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Possible patch:
### Eclipse Workspace Patch 1.0 #P castorASE09 Index: xml/src/main/java/org/exolab/castor/mapping/loader/FieldHandlerImpl.java =================================================================== --- xml/src/main/java/org/exolab/castor/mapping/loader/FieldHandlerImpl.java (revision 7978) +++ xml/src/main/java/org/exolab/castor/mapping/loader/FieldHandlerImpl.java (working copy) @@ -504,22 +504,24 @@ } // If the field has no set method, ignore it. // If this is a problem, identity it someplace else. - } catch ( IllegalArgumentException except ) { + } catch (IllegalArgumentException except) { // Graceful way of dealing with unwrapping exception - if ( value == null ) - throw new IllegalArgumentException( Messages.format( "mapping.typeConversionNull", toString() ) ); - throw new IllegalArgumentException( Messages.format( "mapping.typeConversion", - toString(), value.getClass().getName() ) ); - } catch ( IllegalAccessException except ) { + if (value == null) { + String errorMessage = Messages.format("mapping.typeConversionNull", toString()); + throw new IllegalArgumentException(errorMessage); + } + String errorMessage = Messages.format("mapping.typeConversion", + toString(), value.getClass().getName()); + throw new IllegalArgumentException(errorMessage, except); + } catch (IllegalAccessException except) { // This should never happen - throw new CastorIllegalStateException( - Messages.format("mapping.schemaChangeNoAccess", toString()), - except); - } catch ( InvocationTargetException except ) { + String errorMessage = + Messages.format("mapping.schemaChangeNoAccess", toString()); + throw new CastorIllegalStateException(errorMessage, except); + } catch (InvocationTargetException except) { // This should never happen throw new MappingRuntimeException(except.getTargetException()); } - } else if ( value != null ) { Object collect; try {