corda/classpath
Joel Dice 866c057f0d fix Class.getDeclaredMethods
getDeclaredMethods was returning methods which were inherited from
interfaces but not (re)declared in the class itself, due to the VM's
internal use of VMClass.methodTable differing from its role in
reflection.  For reflection, we must only include the declared
methods, not the inherited but un-redeclared ones.

Previously, we saved the original method table in
ClassAddendum.methodTable before creating a new one which contains
both declared and inherited methods.  That wasted space, so this patch
replaces ClassAddendum.methodTable with
ClassAddendum.declaredMethodCount, which specifies how many of the
methods in VMClass.methodTable were declared in that class.

Alternatively, we could ensure that undeclared methods always have
their VMMethod.class_ field set to the declaring class instead of the
inheriting class.  I tried this, but it led to subtle crashes in
interface method lookup.  The rest of the VM relies not only on
VMClass.methodTable containing all inherited interface methods but
also that those methods point to the inheriting class, not the
declaring class.  Changing those assumptions would be a much bigger
(and more dangerous in terms of regression potential) effort than I
care to take on right now.  The solution I chose is a bit ugly, but
it's safe.
2014-03-10 08:51:00 -06:00
..
avian fix Class.getDeclaredMethods 2014-03-10 08:51:00 -06:00
java Merge pull request #189 from jentfoo/interface_improvements 2014-03-07 20:48:40 -07:00
sun move Unsafe.get{Object|Int}Volatile from classpath-openjdk.cpp to builtin.cpp 2014-03-03 14:55:49 -07:00
java-io.cpp Use 0777/0666 permissions when creating dirs/files. 2013-12-06 22:22:16 -07:00
java-lang.cpp stop using Gestalt on OS X 2014-01-16 17:00:52 -07:00
java-net.cpp fix header include order build regression 2013-12-18 11:40:23 -07:00
java-nio.cpp update copyright years 2013-07-02 20:52:38 -06:00
java-util-zip.cpp update copyright years 2013-07-02 20:52:38 -06:00
java-util.cpp update copyright years 2013-07-02 20:52:38 -06:00
jni-util.h update copyright years 2013-07-02 20:52:38 -06:00
sockets.cpp Implement socket API 2013-11-08 09:55:43 -07:00
sockets.h define ENOTCONN if necessary on Windows 2014-01-08 16:08:32 -07:00