On 01/07/06, Andrew Zhang <[EMAIL PROTECTED]> wrote:

Agree. But there are always exceptions. Some "toString" methods have to
contain some key information as spec required, for example, the size or
index.

Can you give examples of where the spec specifically mandates the
return values of either size or index?

BTW, are these toString information (RI) copyrighted?

I don't believe they can be copyrighted. However, the only way to tell
if the RI and Harmony return the same results would be to execute both
and compare them, and I believe that such reverse engineering would be
outside the remit of Harmony. I doubt that the TCK would test for such
features exactly, without specifying them. For example, the
AbstractCollection and AbstractMap does specify what it should return:

http://java.sun.com/j2se/1.5.0/docs/api/java/util/AbstractCollection.html#toString()
http://java.sun.com/j2se/1.5.0/docs/api/java/util/AbstractMap.html#toString()

I think you'd find it difficult to explain why (in all cases)
toString() returned exactly the same value as the RI without such
detailed comments as to their format :-)

Alex.

---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to