GNU classpath contribution question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Dies ist ein digital signierter Nachrichtenteil
Url : http://developer.classpath.org/pipermail/classpath/attachments/20060202/8ff76279/attachment.pgp

[Index of Archives]     [Linux Kernel]     [Linux Cryptography]     [Fedora]     [Fedora Directory]     [Red Hat Development]

  Powered by Linux