jms-spec
  1. jms-spec
  2. JMS_SPEC-3

Fix JavaDocs to reflect missing NumberFormatException from API methods

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 1.1
    • Fix Version/s: None
    • Labels:
      None
    • Environment:

      N/A

      Description

      ---------------------------
      NumberFormatException tests
      ---------------------------

      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
      java.lang.NumberFormatException if the numerics valueOf() method does not accept the the String value as a valid representation.

      Tests for (NumberFormatException) which is not listed in JavaDoc for the getXXX() methods. Test in question is: MapMessageConversionQTestsInvFormatString. The
      (NumberFormatException) is mentioned in spec but missing in JavaDoc.

      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

        Activity

        Hide
        Nigel Deakin added a comment - - edited

        A big thank you to Alan for logging our first issue!

        Show
        Nigel Deakin added a comment - - edited A big thank you to Alan for logging our first issue!
        Hide
        Nigel Deakin added a comment -

        The JMS 1.1 spec, section 3.11.3 "Conversions provided by StreamMessage and MapMessage" states:

        Both StreamMessage and MapMessage support the following conversion table. The marked cases must be supported. The unmarked cases must throw a JMS MessageFormatException. The String to numeric conversions must throw a java.lang.NumberFormatException if the numeric’s valueOf() method does not accept the String value as a valid representation.

        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.

        Show
        Nigel Deakin added a comment - The JMS 1.1 spec, section 3.11.3 "Conversions provided by StreamMessage and MapMessage" states: Both StreamMessage and MapMessage support the following conversion table. The marked cases must be supported. The unmarked cases must throw a JMS MessageFormatException . The String to numeric conversions must throw a java.lang.NumberFormatException if the numeric’s valueOf() method does not accept the String value as a valid representation. 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.
        Hide
        Nigel Deakin added a comment -

        This didn't make it into JMS 2.0 and so is carried forward to JMS 2.1.

        Show
        Nigel Deakin added a comment - This didn't make it into JMS 2.0 and so is carried forward to JMS 2.1.

          People

          • Assignee:
            Nigel Deakin
            Reporter:
            alanf760
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated: