DO NOT REPLY [Bug 14488] - toString() on Perl5Util throws null pointer exception

[email protected]
Newsgroups gmane.comp.jakarta.oro.devel
Message-ID <[email protected]>
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14488>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14488

toString() on Perl5Util throws null pointer exception

[email protected] changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED



------- Additional Comments From [email protected]  2002-11-14 00:38 -------
The problem report is unclear.  It refers to "the practice ... in ORO classes",
but only Perl5Util throws a NullPointerException if toString() is called
when there is no match.  Perl5Util has to honor the MatchResult interface.
Returning Object.toString() violate the MatchResult contract.  However, it is
undesirable to throw an exception when MatchResult requires group() to return
null when there is no matched group and toString() returns group(0).  Therefore,
Perl5Util.toString() has been changed to return null if there is no match,
which is the original intended behavior.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.