Use SecuritySupport when looking up org.xml.sax.parser system property.
git-svn-id: https://svn.apache.org/repos/asf/xml/commons/trunk@226253 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
e37ca1b076
commit
fe0e541d42
@ -1,19 +1,12 @@
|
|||||||
// SAX parser factory.
|
//SAX parser factory.
|
||||||
// http://www.saxproject.org
|
//http://www.saxproject.org
|
||||||
// No warranty; no copyright -- use this as you will.
|
//No warranty; no copyright -- use this as you will.
|
||||||
// $Id$
|
//$Id$
|
||||||
|
|
||||||
package org.xml.sax.helpers;
|
package org.xml.sax.helpers;
|
||||||
|
|
||||||
import java.lang.ClassNotFoundException;
|
|
||||||
import java.lang.IllegalAccessException;
|
|
||||||
import java.lang.InstantiationException;
|
|
||||||
import java.lang.SecurityException;
|
|
||||||
import java.lang.ClassCastException;
|
|
||||||
|
|
||||||
import org.xml.sax.Parser;
|
import org.xml.sax.Parser;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Java-specific class for dynamically loading SAX parsers.
|
* Java-specific class for dynamically loading SAX parsers.
|
||||||
*
|
*
|
||||||
@ -85,7 +78,8 @@ public class ParserFactory {
|
|||||||
NullPointerException,
|
NullPointerException,
|
||||||
ClassCastException
|
ClassCastException
|
||||||
{
|
{
|
||||||
String className = System.getProperty("org.xml.sax.parser");
|
SecuritySupport ss = SecuritySupport.getInstance();
|
||||||
|
String className = ss.getSystemProperty("org.xml.sax.parser");
|
||||||
if (className == null) {
|
if (className == null) {
|
||||||
throw new NullPointerException("No value for sax.parser property");
|
throw new NullPointerException("No value for sax.parser property");
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user