org.jboss.mq.SpyMessage is throwing NPE for null properties:
public boolean getBooleanProperty( String name )
throws JMSException {
Object value = prop.get( name );
if ( value == null ) {
throw new NullPointerException();
}
if ( value instanceof Boolean ) {
return ( ( Boolean )value ).booleanValue();
} else if ( value instanceof String ) {
return Boolean.getBoolean( ( String )value );
} else {
throw new MessageFormatException( "Invalid conversion" );
}
}
Not only is this a pain in the ass, it also is not compliant with my reading
of the 1.0.2 spec:
<jms-spec-1.0.2>
3.5.4 Property Value Conversion
Properties support the following conversion table. The marked cases must be
supported. The unmarked cases must throw the JMS MessageFormatException.
The String to numeric conversions must throw the
java.lang.NumberFormatException if the numeric's valueOf() method does not
accept the String value as a valid representation. Attempting to read a null
value as a Java primitive type must be treated as calling the primitive's
corresponding valueOf(String) conversion method with a null value.
3.5.8 Non-existent Properties
Getting a property value for a name which has not been set is handled as if
the
the property exists with a null value.
</jms-spec-1.0.2>
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development