This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Allow array method invocations to be resolved in Object


Andrew Haley writes:
 > Recent Java compilers generate invocations of nonexistent (and, in
 > fact, impossible to declare) methods like boolean[].clone().  This
 > works because Object is a superclass of every class, so such methods
 > are resolved in Object.

To be pedantic, this isn't strictly true.  boolean[].clone() is
different from Object.clone() in that it throws no checked exceptions.
However, the libgcj runtime code for Object.clone() treats arrays as a
special case, so it does the Right Thing.

Andrew.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]