Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4405919

Improper behaviour of FactoryConfigurationError.getMessage() method

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 1.1
    • 1.1
    • xml
    • 1.1fcs
    • sparc
    • solaris_2.6
    • Verified

      It precedes the message with Exception name also.
      The following piece of code:
          public static void main(String str[]) {
              Exception e = new Exception();
              System.out.println("Message:<" + e.getMessage() + ">");
              FactoryConfigurationError fce = new FactoryConfigurationError(e);
              System.out.println("Message:<" + fce.getMessage() + ">");

              e = new Exception("My Message");
              System.out.println("Message:<" + e.getMessage() + ">");
              fce = new FactoryConfigurationError(e);
              System.out.println("Message:<" + fce.getMessage() + ">");
          }
      throws the following output:

      Message:<null>
      Message:<java.lang.Exception>
      Message:<My Message>
      Message:<java.lang.Exception: My Message>

            rmordani Rajiv Mordani (Inactive)
            duke J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: