Skip to content
This repository has been archived by the owner on Feb 5, 2024. It is now read-only.

Commit

Permalink
Bug#18562445 : REFERENCES TO COM.SUN INTERNAL METHODS IN GLASSFISH JARS
Browse files Browse the repository at this point in the history
svn path=/trunk/; revision=107
  • Loading branch information
ren.zhijun.oracle committed Jul 21, 2016
1 parent 5d1762e commit 3271c3e
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 20 deletions.
2 changes: 1 addition & 1 deletion api/pom.xml
Expand Up @@ -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>

Expand Down
7 changes: 6 additions & 1 deletion impl/pom.xml
Expand Up @@ -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>

Expand Down Expand Up @@ -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>
Expand Up @@ -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
Expand Down
Expand Up @@ -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;
Expand Down Expand Up @@ -105,7 +105,8 @@ public class JSTLXPathImpl implements javax.xml.xpath.XPath {
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
Expand Down Expand Up @@ -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 );
}

/**
Expand Down Expand Up @@ -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 ) {
Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit 3271c3e

Please sign in to comment.