From Jaxen's BaseXPath
class:
Are these methods too simple to fail?
/** Return the original expression text.
*
* @return the normalized XPath expression string
*/
public String toString()
{
return this.exprText;
}
/** Returns the string version of this xpath.
*
* @return the normalized XPath expression string
*
* @see #toString
*/
public String debug()
{
return this.xpath.toString();
}
The second one wasn't tested. Testing revealed that it didn't return what the JavaDoc said it did. In this case, the JavaDoc was incorrect and needed to be repaired.
/** Returns a string representation of the parse tree.
*
* @return a string representation of the parse tree.
*/
public String debug()
{
return this.xpath.toString();
}
Further testing revealed a problem in
the toString()
method in DefaultNameStep
that was implicitly invoked by this method.