This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

Bug#18562445 : REFERENCES TO COM.SUN INTERNAL METHODS IN GLASSFISH JARS

svn path=/trunk/; revision=107
  • Loading branch information...
ren.zhijun.oracle
ren.zhijun.oracle committed Jul 21, 2016
1 parent 5d1762e commit 3271c3e093dc9225c627cf7e62f52e210c127a87
@@ -52,7 +52,7 @@
<groupId>javax.servlet.jsp.jstl</groupId>
<artifactId>javax.servlet.jsp.jstl-api</artifactId>
<packaging>jar</packaging>
<version>1.2.2-SNAPSHOT</version>
<version>1.2.2</version>
<name>JavaServer Pages(TM) Standard Tag Library API</name>
<url>http://jcp.org/en/jsr/detail?id=52</url>

@@ -51,7 +51,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.glassfish.web</groupId>
<artifactId>javax.servlet.jsp.jstl</artifactId>
<version>1.2.5-SNAPSHOT</version>
<version>1.2.5</version>
<packaging>jar</packaging>
<name>JavaServer Pages (TM) TagLib Implementation</name>

@@ -326,5 +326,10 @@
<artifactId>jstl-api</artifactId>
<version>1.2</version>
</dependency>
<dependency>
<groupId>xalan</groupId>
<artifactId>xalan</artifactId>
<version>2.7.1</version>
</dependency>
</dependencies>
</project>
@@ -58,7 +58,7 @@

package org.apache.taglibs.standard.tag.common.xml;

import com.sun.org.apache.xpath.internal.jaxp.XPathFactoryImpl;
import org.apache.xpath.jaxp.XPathFactoryImpl;

/**
* This factory class is added to provide access to our own implementation
@@ -67,11 +67,11 @@
import javax.xml.xpath.XPathVariableResolver;
import javax.xml.xpath.XPathExpression;

import com.sun.org.apache.xml.internal.dtm.DTM;
import com.sun.org.apache.xpath.internal.*;
import com.sun.org.apache.xpath.internal.objects.XObject;
import com.sun.org.apache.xpath.internal.res.XPATHErrorResources;
import com.sun.org.apache.xalan.internal.res.XSLMessages;
import org.apache.xml.dtm.DTM;
import org.apache.xpath.*;
import org.apache.xpath.objects.XObject;
import org.apache.xpath.res.XPATHErrorResources;
import org.apache.xalan.res.XSLMessages;

import org.w3c.dom.Node;
import org.w3c.dom.DOMImplementation;
@@ -105,7 +105,8 @@
private XPathVariableResolver origVariableResolver;
private XPathFunctionResolver origFunctionResolver;
private NamespaceContext namespaceContext=null;
private com.sun.org.apache.xpath.internal.jaxp.JAXPPrefixResolver prefixResolver;
private org.apache.xpath.jaxp.JAXPPrefixResolver prefixResolver;

// By default Extension Functions are allowed in XPath Expressions. If
// Secure Processing Feature is set on XPathFactory then the invocation of
// extensions function need to throw XPathFunctionException
@@ -184,7 +185,7 @@ public void setNamespaceContext(NamespaceContext nsContext) {
throw new NullPointerException( fmsg );
}
this.namespaceContext = nsContext;
this.prefixResolver = new com.sun.org.apache.xpath.internal.jaxp.JAXPPrefixResolver ( nsContext );
this.prefixResolver = new org.apache.xpath.jaxp.JAXPPrefixResolver ( nsContext );
}

/**
@@ -235,21 +236,20 @@ private static Document getDummyDocument( ) {

private XObject eval(String expression, Object contextItem)
throws javax.xml.transform.TransformerException {
com.sun.org.apache.xpath.internal.XPath xpath = new com.sun.org.apache.xpath.internal.XPath( expression,
null, prefixResolver, com.sun.org.apache.xpath.internal.XPath.SELECT );
com.sun.org.apache.xpath.internal.XPathContext xpathSupport = null;
org.apache.xpath.XPath xpath = new org.apache.xpath.XPath( expression,
null, prefixResolver, org.apache.xpath.XPath.SELECT );
org.apache.xpath.XPathContext xpathSupport = null;
if ( functionResolver != null ) {
com.sun.org.apache.xpath.internal.jaxp.JAXPExtensionsProvider jep =
new com.sun.org.apache.xpath.internal.jaxp.JAXPExtensionsProvider(
functionResolver, featureSecureProcessing );
xpathSupport = new com.sun.org.apache.xpath.internal.XPathContext( jep );
org.apache.xpath.jaxp.JAXPExtensionsProvider jep = null;
new org.apache.xpath.jaxp.JAXPExtensionsProvider(functionResolver, featureSecureProcessing );
xpathSupport = new org.apache.xpath.XPathContext( jep );
} else {
xpathSupport = new com.sun.org.apache.xpath.internal.XPathContext();
xpathSupport = new org.apache.xpath.XPathContext();
}

XObject xobj = null;

xpathSupport.setVarStack(new com.sun.org.apache.xpath.internal.jaxp.JAXPVariableStack(variableResolver));
xpathSupport.setVarStack(new org.apache.xpath.jaxp.JAXPVariableStack(variableResolver));

// If item is null, then we will create a a Dummy contextNode
if ( contextItem instanceof Node ) {
@@ -377,7 +377,7 @@ private Object getResultAsType( XObject resultObject, QName returnType )
}
// JSTLXPathConstants.OBJECT
if ( returnType.equals( JSTLXPathConstants.OBJECT ) ) {
if (resultObject instanceof com.sun.org.apache.xpath.internal.objects.XNodeSet)
if (resultObject instanceof org.apache.xpath.objects.XNodeSet)
return resultObject.nodelist();
else
return resultObject.object();

0 comments on commit 3271c3e

Please sign in to comment.