-
Bug
-
Resolution: Fixed
-
P3
-
5.0
-
1.3
-
generic
-
generic
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2076994 | 5.0 | Jeff Suttor | P3 | Closed | Fixed | beta |
Name: eaR10174 Date: 11/11/2003
There is a contradiction in the description of the method
javax.xml.xpath.XPathExpression.evaluate(Object,QName):
public Object evaluate(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 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.
There is the similar contradiction in the XPath interface (for details see the bug
4945438)
The bug is found in the javadoc of jdk1.5.0beta-b26.
======================================================================
There is a contradiction in the description of the method
javax.xml.xpath.XPathExpression.evaluate(Object,QName):
public Object evaluate(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 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.
There is the similar contradiction in the XPath interface (for details see the bug
4945438)
The bug is found in the javadoc of jdk1.5.0beta-b26.
======================================================================
- backported by
-
JDK-2076994 Contradiction in description of method XPathExpression.evaluate(Object,QName)
- Closed
- relates to
-
JDK-4945438 Contradiction in description of method XPath.evaluate(String,Object,QName)
- Resolved