Uploaded image for project: 'Commons Digester'
  1. Commons Digester
  2. DIGESTER-5

ParserFeatureSetterFactory makes invalid assumption about SAX parser

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • None
    • None
    • None
    • Operating System: Solaris
      Platform: Sun

    • 39388

    Description

      The Commons Digester class
      org.apache.commons.digester.ParserFeatureSetterFactory presumes that if
      org.apache.xerces.impl.Version is on the classpath, then the sax parser factory
      used will be a xerces sax parser factory.

      That is not always a correct assumption! The sax parser factory actually used
      is determined by other factors documented at
      http://java.sun.com/j2se/1.4.2/docs/api/javax/xml/parsers/SAXParserFactory.html#newInstance()

      In a situation where the assumption is wrong, it can then proceed to invoke
      setFeature methods on the non-xerces sax parser factory, which can throw
      exceptions because the feature names are specific to xerces and are not
      supported by other parsers.

      Please correct the implementation so as to make the commons digester not make
      wrong assumptions.

      Attachments

        Activity

          People

            Unassigned Unassigned
            david@pastornet.net.au David Campbell
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: