classpath
[Top][All Lists]
Advanced

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

Re: Question on java.lang.Thread and "final static int" constants


From: Tom Tromey
Subject: Re: Question on java.lang.Thread and "final static int" constants
Date: 10 May 2004 10:46:59 -0600
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

>>>>> "Steven" == Steven Augart <address@hidden> writes:

Steven> So, for the purposes of GNU Classpath's AWT code
Steven> (--portable-native-sync), is it reasonable to assume that they are,
Steven> indeed, 1, 5, and 10, or should the implementation check the values at
Steven> run time and cache the results?  Since the Java language spec
Steven> expicitly allows the java source-to-byte-code compiler to inline the
Steven> values of static final constants, presumably the values can never
Steven> change in the future

Yeah, in theory the values can't change.  In practice, Sun has broken
this once or twice in the past, though honestly I doubt they would
bother changing these particular values.

I'd say in a case like this you can do whatever you like, provided the
result is documented.

Tom




reply via email to

[Prev in Thread] Current Thread [Next in Thread]