JDK-4030374 - Java Issue Tracker
Feb 5, 1997 ... The problem occurs when an inner class implements an abstract method ... return Method Outer. Middle.Inner(Outer.Middle) // constructor for ...
Feb 5, 1997 ... The problem occurs when an inner class implements an abstract method ... return Method Outer. Middle.Inner(Outer.Middle) // constructor for ...
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.
The method toMethodDescriptorString is more suitable if unambiguous spellings are required. ... return simpleName.substring(simpleName.lastIndexOf('.')+1); ...
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM : 1. Compile to sample program 2. Run java KeyReader 3. Press Control+x. EXPECTED VERSUS ACTUAL BEHAVIOR : The method should return a string that can be passed to KeyStroke.getKeyStroke.
A DESCRIPTION OF THE PROBLEM : public String[] split(String regex). The above method does not work at all if the regex passed to it is "."And that's because the fourOctets is an zero (0) length array returned by the split(".") method.
The Collection.toArray() method returns Object[] but it doesn't make clear that the runtime type of the returned array must be Object[]. (Oddly, that is specified in toArray(T[]) which is in the wrong place.)