--- a/jaxp/src/com/sun/org/apache/xalan/internal/lib/ExsltStrings.java Mon Aug 26 21:08:58 2013 -0700
+++ b/jaxp/src/com/sun/org/apache/xalan/internal/lib/ExsltStrings.java Tue Oct 22 13:15:50 2013 -0700
@@ -52,6 +52,8 @@
*/
public class ExsltStrings extends ExsltBase
{
+ static final String JDK_DEFAULT_DOM = "com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl";
+
/**
* The str:align function aligns a string within another string.
* <p>
@@ -343,7 +345,11 @@
static {
try
{
- m_doc =DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument();
+ if (System.getSecurityManager() == null) {
+ m_doc = DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument();
+ } else {
+ m_doc = DocumentBuilderFactory.newInstance(JDK_DEFAULT_DOM, null).newDocumentBuilder().newDocument();
+ }
}
catch(ParserConfigurationException pce)
--- a/jaxp/src/com/sun/org/apache/xalan/internal/lib/Extensions.java Mon Aug 26 21:08:58 2013 -0700
+++ b/jaxp/src/com/sun/org/apache/xalan/internal/lib/Extensions.java Tue Oct 22 13:15:50 2013 -0700
@@ -56,6 +56,7 @@
*/
public class Extensions
{
+ static final String JDK_DEFAULT_DOM = "com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl";
/**
* Constructor Extensions
*
@@ -407,7 +408,11 @@
{
try
{
- m_doc = DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument();
+ if (System.getSecurityManager() == null) {
+ m_doc = DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument();
+ } else {
+ m_doc = DocumentBuilderFactory.newInstance(JDK_DEFAULT_DOM, null).newDocumentBuilder().newDocument();
+ }
}
catch(ParserConfigurationException pce)