Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2076511 | 5.0 | Jeff Suttor | P3 | Closed | Fixed | b30 |
Name: eaR10174 Date: 10/29/2003
There is a contradiction in the description of the method
javax.xml.xpath.XPath.evaluate(String,Object,QName):
public Object evaluate(String expression,
Object item,
QName returnType)
throws XPathException
...
If item is null, the expression is evaluated in the absence of a context item. Simple
expressions, such as "1+1", can be evaluated this way, but any expression that refers
to the context will throw an exception.
...
If expression, item or returnType is null, a NullPointerException is thrown.
According to the first sentence null is a valid value for the item parameter. But the
last sentence states that the method throws NullPointerException in case when the item
parameter is null.
The bug is found in the javadoc of jdk1.5.0beta-b25.
======================================================================
There is a contradiction in the description of the method
javax.xml.xpath.XPath.evaluate(String,Object,QName):
public Object evaluate(String expression,
Object item,
QName returnType)
throws XPathException
...
If item is null, the expression is evaluated in the absence of a context item. Simple
expressions, such as "1+1", can be evaluated this way, but any expression that refers
to the context will throw an exception.
...
If expression, item or returnType is null, a NullPointerException is thrown.
According to the first sentence null is a valid value for the item parameter. But the
last sentence states that the method throws NullPointerException in case when the item
parameter is null.
The bug is found in the javadoc of jdk1.5.0beta-b25.
======================================================================
- backported by
-
JDK-2076511 Contradiction in description of method XPath.evaluate(String,Object,QName)
- Closed
- relates to
-
JDK-4952082 Contradiction in description of method XPathExpression.evaluate(Object,QName)
- Resolved