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

Xalan: XSLTC ErrorMsg is sometimes constructed incorrectly, leading to java.util.MissingResourceException

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • 8
    • xml
    • None

      There are two places where this can happen:

      Parser.java: method parse(InputSource input) - line 492:

              catch (SAXException e) {
                  reportError(ERROR, new ErrorMsg(e.getMessage()));
              }

      ErrorMsg(String) expects a localization bundle key - a _code - but is passed an exception message.

      TransformerFactoryImpl.java: method newTemplates(Source source) - lines 789-792:

                  catch (Exception e) {
                      ErrorMsg err = new ErrorMsg(
                                           new ErrorMsg(ErrorMsg.RUNTIME_ERROR_KEY)
                                           + e.getMessage());
                      throw new TransformerConfigurationException(err.toString());
                  }

      Here again the first ErrorMsg(String) expects a localization bundle key - a _code - but is passed an exception message.

      This affects version 8 - but the fix can probably be backported to version 7...

            joehw Joe Wang
            dfuchs Daniel Fuchs
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: