Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4952082

Contradiction in description of method XPathExpression.evaluate(Object,QName)

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      1.3
    • CPU:
      generic
    • OS:
      generic

      Backports

        Description

        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.

        ======================================================================

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                jsuttorsunw Jeff Suttor (Inactive)
                Reporter:
                evgsunw Evg Evg (Inactive)
                Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: