jakarta-regexp-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chavdar Botev <cbo...@yahoo.com>
Subject Re: misleading prototype of CharacterIterator.substring (int, int)
Date Fri, 18 May 2001 06:32:06 GMT
Hi!

Michael McCallum wrote:

>There was dicussion of this a while ago. Cant remember what the result was.
>
Yeah, I found it. It was agreed it was a mistype.

>
>
>Will get all of the recent patches together this week.
>
>Have a little bit more time on my hands now.
>
>I think if the javadoc and the code do not match the best approach is to patch the javadoc.
>
I would agree. The code can be left this way as long as it works but the 
JavaDoc should state this "peculiarity". A problem may arise when using 
an IDE with code completion. It will show "substring(int offset, int 
length)" and I (and probably most of those who don't use RegExp every 
day) will think the "length" parameter is really a length. Therefore, I 
think it is better to patch the code.

Anyway, this doesn't exclude the need for more informative JavaDoc.

>
>
>If you think the javadoc shows a better solution/ ore correct implementation start a discussion

>with your reasons.
>
Right now, the JavaDoc

/** @return a substring */

does not show anything useful, does it? ;-)

Cheers,
Chavdar




_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


Mime
View raw message