(fmt) UnknownFormatConversionException constructor does not throw NullPointerException

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P4
    • 6
    • Affects Version/s: 5.0
    • Component/s: core-libs
    • None
    • b39
    • generic
    • generic

      The spec for java.util.UnknownFormatConversionException declares: "Unless otherwise specified, passing a null argument to any method or constructor in this class will cause a NullPointerException to be thrown."

      But the constructor
          public UnknownFormatConversionException(String s)
      does not throw an exception if it is called with null argument.

      For example, the following code:

          try {
              new java.util.UnknownFormatConversionException(null);
              System.out.println("FAILURE");
          } catch (NullPointerException npe) {
              System.out.println("OKAY");
          }

      Produces the following printout:

          FAILURE

      ###@###.### 2005-05-05 15:42:49 GMT

            Assignee:
            Iris Clark
            Reporter:
            Arkadiy Sutchilin (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: