DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=29367>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=29367

StackOverflowError on XPath expression





------- Additional Comments From [EMAIL PROTECTED]  2004-09-06 10:53 -------
ok - i've found some more:

The problem is in:

  public boolean equals(XMLString obj2)
  {

    // (*) insert proposed code here (see below)

    if (!obj2.hasString())
      return obj2.equals(this);
    else
      return str().equals(obj2.toString());
  }

In our case, hasString() just returns true, and so only the second branch of the
if is interesting. With a little code inspection we found out, that in certain
cases, toString() and str() modify contents of an internal cache buffer, so in
our case the value is not yet correctly calculated.

When we insert 

        this.toString();
        obj2.toString();

at the place marked (*) in the above code, the cache gets initialized and the
equals() method runs perfectly. Perhaps someone should check this out and
provide a better solution that our workaround.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to