Uploaded image for project: 'XalanJ2'
  1. XalanJ2
  2. XALANJ-1094

Uncaught SecurityException for System.getProperty() call

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Resolution: Fixed
    • 2.4Dx
    • None
    • Serialization
    • None
    • Operating System: Other
      Platform: Other
    • 10839

    Description

      The method org.apache.xalan.serialize.Encodings.loadEncodingInfo() calls
      System.getProperty() assuming that it has read access to it. This fails if a
      SecurityManager is running and the code does not have read access to the
      property. This case must be expected and handled. A simple try block around
      the getProperty() call, and catching a SecurityException can do the trick.

      Note that this is a critical bug because a basic transformation cannot be done
      without getting a SecurityException.

      Suggested code edit:

      String urlString = null;
      try

      { urlString = System.getProperty("org.apache.xalan.serialize.encodings"); }

      catch (SecurityException e) {}

      Attachments

        Activity

          People

            mkwan@ca.ibm.com Morris Kwan
            ruvinsky@yahoo.com Eddie Ruvinsky
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: