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
@ -5,15 +5,8 @@
|
||||
|
||||
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;
|
||||
|
||||
|
||||
/**
|
||||
* Java-specific class for dynamically loading SAX parsers.
|
||||
*
|
||||
@ -85,7 +78,8 @@ public class ParserFactory {
|
||||
NullPointerException,
|
||||
ClassCastException
|
||||
{
|
||||
String className = System.getProperty("org.xml.sax.parser");
|
||||
SecuritySupport ss = SecuritySupport.getInstance();
|
||||
String className = ss.getSystemProperty("org.xml.sax.parser");
|
||||
if (className == null) {
|
||||
throw new NullPointerException("No value for sax.parser property");
|
||||
} else {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user