Collapse ART's AbstractMethod class into Executable
After the OpenJDK 8 pull there is now a common base class
for Method and Constructor that can be used instead.
Methods that are abstract on Executable but on Android
were implemented in AbstractMethod are now consistently
renamed to "{method}Internal", declared final and
given package-protected access.
For consistency with all other private, natively
implemented methods, the method getDeclaredAnnotations()
has been renamed getDeclaredAnnotationsNative().
Bug: 28666126
Bug: 31052885
Test: make test-art-host and cts run of CtsLibcoreTestCases
Change-Id: Ibfe6af6a47fe0cfffd0859ffbe58980aeb84e053
diff --git a/test/031-class-attributes/src/ClassAttrs.java b/test/031-class-attributes/src/ClassAttrs.java
index 346e13d..39e69a3 100644
--- a/test/031-class-attributes/src/ClassAttrs.java
+++ b/test/031-class-attributes/src/ClassAttrs.java
@@ -1,9 +1,9 @@
import otherpackage.OtherPackageClass;
import java.io.Serializable;
-import java.lang.reflect.AbstractMethod;
import java.lang.reflect.AccessibleObject;
import java.lang.reflect.Constructor;
+import java.lang.reflect.Executable;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
@@ -223,7 +223,7 @@
try {
Class<?> c = obj.getClass();
if (c == Method.class || c == Constructor.class) {
- c = AbstractMethod.class;
+ c = Executable.class;
}
method = c.getDeclaredMethod("getSignatureAttribute");
method.setAccessible(true);