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

Need mechanism to get default provider via the API

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Won't Fix
    • Icon: P2 P2
    • None
    • None
    • xml

      javax.xml.validation.SchemaFactory
      javax.xml.transform.sax.SAXTransformerFactory
      javax.xml.stream.XMLEventFactory
      javax.xml.stream.XMLInputFactory
      javax.xml.stream.XMLOutputFactory
      javax.xml.xpath.XPathFactory
      javax.xml.parsers.DocumentBuilderFactory
      javax.xml.parsers.SAXParserFactory
      all have a getInstance() method that returns the internal implementation but only if the associated System property or META-INF/services does not exist.
      The only way to guarantee that the internal implementation is used is to explicitly name the class of the internal implementation.
      With JDK9, those are all internal JDK classes that require an export to access. There should be an alternative way to specify the internal class.
      For example, there could be some token string like "default" to gets this class explicitly.

            Unassigned Unassigned
            sfelts Stephen Felts (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: