Bugs item #857589, was opened at 2003-12-10 14:19
Message generated for change (Comment added) made by ejort
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=376685&aid=857589&group_id=22866

Category: JBossMQ
Group: v3.2
>Status: Closed
>Resolution: Invalid
Priority: 5
Submitted By: Eric Jain (ejain)
>Assigned to: Adrian Brock (ejort)
Summary: NumberFormatException accessing inexistant message property

Initial Comment:
If message.getLongProperty("x") is called on a message 
that never had a property "x" set, a 
NumberFormatException is thrown. Not sure what the 
specification says, but I imagine that the required 
behavior would be to either return null or throw a 
JMSException.

java.lang.NumberFormatException: Message 
property 'duration' not set.
        at org.jboss.mq.SpyMessage.getLongProperty
(SpyMessage.java:305)


----------------------------------------------------------------------

>Comment By: Adrian Brock (ejort)
Date: 2003-12-10 16:35

Message:
Logged In: YES 
user_id=9459

The javadoc says:

java.jms.Message
"Attempting to read a null value as a primitive type must be
treated as calling the primitive's corresponding
valueOf(String) conversion method with a null value."

and java.jms.MessageFormatException
"Note that the special case of a failure caused by an
attempt to read improperly formatted String data as numeric
values must throw the java.lang.NumberFormatException."

and
long blah = null; // is impossible

Regards,
Adrian

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=376685&aid=857589&group_id=22866


-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
_______________________________________________
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to