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

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

    Details

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

      Backports

        Description

        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.

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

          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: