Berin Loritsch wrote:
> Leif Mortenson wrote:
>
>>I was able to fix the problem in TableIdGeneratorMultithreadedJdbcTestCase by making
>>the following change to LatchedThreadGroup. The problem seems to be that javac
>>incorrectly compiles the reference to the getLogger() method from the inner class.
>>Not sure what the specific problem is?? Maybe because it is final? Anyway. The
>fixed
>>version is checked in, but if anyone has any idea as to why this happened, I would be
>>interrested in hearing it.
>>
>
>
> Is the inner class static?
>
> That can make a world of difference....
BTW, The JUnit guys recently discovered a bug in the Jikes compiler:
on unary operations, the primitive is promoted to an int. For example:
class Bogus
{
byte classByte = Byte.MAX_VALUE;
short classShort = Short.MAX_VALUE;
int classInt = Integer.MAX_VALUE;
public static void main( String[] args )
{
classByte++;
classShort++;
classInt++;
System.out.print(classByte + " is less than " + Byte.MAX_VALUE);
System.out.println( (classByte < Byte.MAX_VALUE) ?
" = true" : " = false" );
System.out.print(classShort + " is less than " +
Short.MAX_VALUE);
System.out.println( (classByte < Short.MAX_VALUE) ?
" = true" : " = false" );
System.out.print(classInt + " is less than " +
Integer.MAX_VALUE);
System.out.println( (classInt < Integer.MAX_VALUE) ?
" = true" : " = false" );
}
}
The correct output would be:
-128 is less than 127 = true
-32768 is less than 32767 = true
-2147483648 is less than 2147483647 = true
When comiled with javac, the output is correct. When compiled with
Jikes, the results are:
128 is less than 127 = false
32768 is less than 32767 = false
-2147483648 is less than 2147483647 = true
--
"They that give up essential liberty to obtain a little temporary safety
deserve neither liberty nor safety."
- Benjamin Franklin
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>