src/java.xml/share/classes/org/xml/sax/helpers/ParserAdapter.java
changeset 47312 d4f959806fe9
parent 47216 71c04702a3d5
child 47359 e1a6c0168741
equal deleted inserted replaced
47311:ff631a3cadbc 47312:d4f959806fe9
    32 package org.xml.sax.helpers;
    32 package org.xml.sax.helpers;
    33 
    33 
    34 import java.io.IOException;
    34 import java.io.IOException;
    35 import java.util.Enumeration;
    35 import java.util.Enumeration;
    36 import java.util.Vector;
    36 import java.util.Vector;
    37 
    37 import jdk.xml.internal.SecuritySupport;
    38 import org.xml.sax.Parser;      // deprecated
    38 import org.xml.sax.AttributeList; // deprecated
       
    39 import org.xml.sax.Attributes;
       
    40 import org.xml.sax.ContentHandler;
       
    41 import org.xml.sax.DTDHandler;
       
    42 import org.xml.sax.DocumentHandler; // deprecated
       
    43 import org.xml.sax.EntityResolver;
       
    44 import org.xml.sax.ErrorHandler;
    39 import org.xml.sax.InputSource;
    45 import org.xml.sax.InputSource;
    40 import org.xml.sax.Locator;
    46 import org.xml.sax.Locator;
    41 import org.xml.sax.AttributeList; // deprecated
    47 import org.xml.sax.Parser;      // deprecated
    42 import org.xml.sax.EntityResolver;
       
    43 import org.xml.sax.DTDHandler;
       
    44 import org.xml.sax.DocumentHandler; // deprecated
       
    45 import org.xml.sax.ErrorHandler;
       
    46 import org.xml.sax.SAXException;
    48 import org.xml.sax.SAXException;
    47 import org.xml.sax.SAXParseException;
       
    48 
       
    49 import org.xml.sax.XMLReader;
       
    50 import org.xml.sax.Attributes;
       
    51 import org.xml.sax.ContentHandler;
       
    52 import org.xml.sax.SAXNotRecognizedException;
    49 import org.xml.sax.SAXNotRecognizedException;
    53 import org.xml.sax.SAXNotSupportedException;
    50 import org.xml.sax.SAXNotSupportedException;
       
    51 import org.xml.sax.SAXParseException;
       
    52 import org.xml.sax.XMLReader;
    54 
    53 
    55 
    54 
    56 /**
    55 /**
    57  * Adapt a SAX1 Parser as a SAX2 XMLReader.
    56  * Adapt a SAX1 Parser as a SAX2 XMLReader.
    58  *
    57  *
    80  * @see org.xml.sax.Parser
    79  * @see org.xml.sax.Parser
    81  */
    80  */
    82 @SuppressWarnings("deprecation")
    81 @SuppressWarnings("deprecation")
    83 public class ParserAdapter implements XMLReader, DocumentHandler
    82 public class ParserAdapter implements XMLReader, DocumentHandler
    84 {
    83 {
    85     private static SecuritySupport ss = new SecuritySupport();
       
    86 
    84 
    87     ////////////////////////////////////////////////////////////////////
    85     ////////////////////////////////////////////////////////////////////
    88     // Constructors.
    86     // Constructors.
    89     ////////////////////////////////////////////////////////////////////
    87     ////////////////////////////////////////////////////////////////////
    90 
    88 
   102     public ParserAdapter ()
   100     public ParserAdapter ()
   103       throws SAXException
   101       throws SAXException
   104     {
   102     {
   105         super();
   103         super();
   106 
   104 
   107         String driver = ss.getSystemProperty("org.xml.sax.parser");
   105         String driver = SecuritySupport.getSystemProperty("org.xml.sax.parser");
   108 
   106 
   109         try {
   107         try {
   110             setup(ParserFactory.makeParser());
   108             setup(ParserFactory.makeParser());
   111         } catch (ClassNotFoundException e1) {
   109         } catch (ClassNotFoundException e1) {
   112             throw new
   110             throw new