JDK-4030374 - Java Issue Tracker
Feb 5, 1997 ... ... code generation error in JDK 1.1.7B compiler. It appears that non ... return Method Outer. Middle.Inner(Outer.Middle) // constructor ...
Feb 5, 1997 ... ... code generation error in JDK 1.1.7B compiler. It appears that non ... return Method Outer. Middle.Inner(Outer.Middle) // constructor ...
It's an error in java.lang.String source code which is the same for all JDK distributions. If the performance optimizations should still be used in furture documentation must be added to String class so users of substring will be warned at least.
are returned by its iterator, this method must return the elements in - * the same order. + * the same order. The returned array's {@linkplain Class#getComponentType + * runtime component type} is {@code Object}. * * &
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 readOverride public String toString() {. return Arrays.toString(arr)
Collection.toArray() is specified to return an object of type Object[], but since arrays are covariant, that requirement is met by any array of a subtype of Object, for example, String[]. It's subtle, but it's clearly, if not explicitly, a bug to return an array of a subtype. See JDK-6260652.