[JMS_SPEC-3] Fix JavaDocs to reflect missing NumberFormatException from API methods Created: 11/Apr/11 Updated: 20/Mar/13
|Remaining Estimate:||Not Specified|
|Time Spent:||Not Specified|
|Original Estimate:||Not Specified|
For javax.jms.MapMessage and javax.jms.StreamMessage the JavaDoc's need to be updated for the string to numeric conversions. The String to numeric conversions must throw a
Tests for (NumberFormatException) which is not listed in JavaDoc for the getXXX() methods. Test in question is: MapMessageConversionQTestsInvFormatString. The
The JavaDoc's for the following methods below of class javax.jms.MapMessage and class javax.jms.StreamMessage need to be modified to add the NumberFormatException.
getBoolean, getByte, getShort, getInt, getLong, getFloat, getDouble, etc
|Comment by Nigel Deakin [ 11/Apr/11 ]|
A big thank you to Alan for logging our first issue!
|Comment by Nigel Deakin [ 28/Feb/12 ]|
The JMS 1.1 spec, section 3.11.3 "Conversions provided by StreamMessage and MapMessage" states:
This means that the methods this return a numeric: getShort, getLong, getDouble, getInt must throw a java.lang.NumberFormatException in the case described. This seems clear.
However I'm not sure about the methods which don't return a numeric, such as getBoolean. getByte and getBytes. Where does it say that these must throw a java.lang.NumberFormatException?
Tagging for review for the Public Draft.
|Comment by Nigel Deakin [ 20/Mar/13 ]|
This didn't make it into JMS 2.0 and so is carried forward to JMS 2.1.