JDK-4030374 - Java Issue Tracker
Feb 5, 1997 ... ... code for inner class constructors in the wrong order. Therefore ... For example, the following program would fail at runtime: <pre> ...
Feb 5, 1997 ... ... code for inner class constructors in the wrong order. Therefore ... For example, the following program would fail at runtime: <pre> ...
It's an error in java.lang.String source code which is the same for all JDK distributions.I have created a more simple example class which demonstrates this behaviour very clearly. STEPS TO FOLLOW TO REPRODUCE THE PROBLEM : See bug ID 4637640.
When run with Java 1.6_21 the code works fine regardless of the access specifier of arr. EXPECTED VERSUS ACTUAL BEHAVIOR : EXPECTED - The console should read
The code-snippet referenced in the third suggestion is, as speculated, a result of auto-generated code. The value of $LG_BYTES_PER_VALUE$ for byte is 0. I have verified that the javac compiler optimizes this shift out of the generated byte code.
Lister.java defines a class that lists files in the current directory. For each file, it spits out the (a) 'toString()' version of the file, (b) the char array of the name as hex, and (c) the 'getBytes' byte array of the name.