-
Bug
-
Resolution: Won't Fix
-
P3
-
None
-
6u23
-
x86
-
solaris_nevada
The javadoc for org.w3c.dom.DOMImplementation.getFeature(String,String) says the following about the feature parameter:
feature - The name of the feature requested. Note that any plus sign "+" prepended to the name of the feature will be ignored since it is not significant in the context of this method.
But in the following code it looks like the plus sign is significant:
Document doc = DocumentBuilderFactory.newInstance().
newDocumentBuilder().newDocument();
DOMImplementation impl = doc.getImplementation();
System.out.println(impl.getFeature("XPath", "3.0"));
System.out.println(impl.getFeature("+XPath", "3.0"));
The first call to getFeature() returns null. The second call, in which "+" has been prepended to the name of the feature, returns an instance of com.sun.org.apache.xpath.internal.domapi.XPathEvaluatorImpl.
feature - The name of the feature requested. Note that any plus sign "+" prepended to the name of the feature will be ignored since it is not significant in the context of this method.
But in the following code it looks like the plus sign is significant:
Document doc = DocumentBuilderFactory.newInstance().
newDocumentBuilder().newDocument();
DOMImplementation impl = doc.getImplementation();
System.out.println(impl.getFeature("XPath", "3.0"));
System.out.println(impl.getFeature("+XPath", "3.0"));
The first call to getFeature() returns null. The second call, in which "+" has been prepended to the name of the feature, returns an instance of com.sun.org.apache.xpath.internal.domapi.XPathEvaluatorImpl.