Hi Ken,

> Let's say for example standard Java defines some constant like 
> FileFormat.BINARY.  The Javadoc does not specify the value of this 
> constant.  I want to write a replacement for FileFormat, so I write a 
> program
> 
> System.out.println(FileFormat.BINARY) and run it against Sun's 
> implementation.  I find out that the value is 1, and I put that in my 
> implementation.
> 
> Is this legit for the purposes of contribuing to classpath?

First of all, if a constant is not in the JavaDoc, it is most likely
initialized with a value that may differ in different environments in
the static initializer of a class and the value you get from
System.out.println(FileFormat.BINARY) may be right, but others are also
possible. This might be the case for platform dependend constants,
language specific constants etc.

To really answer your questions, I would think that this is ok. At least
this is what we do in lots of Mauve test cases (Mauve is our testsuite
for compatibility testing).

/Roman

Attachment: signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil

Reply via email to