am 96a282dc: am 6e58f68a: Merge "Add a regression test for a Field.isAnnotationPresent crash."

* commit '96a282dc6100e6911f827e03770878f8db0417e7':
  Add a regression test for a Field.isAnnotationPresent crash.
diff --git a/luni/src/test/java/libcore/java/lang/reflect/ProxyTest.java b/luni/src/test/java/libcore/java/lang/reflect/ProxyTest.java
index b6ae8b3..30d47fb 100644
--- a/luni/src/test/java/libcore/java/lang/reflect/ProxyTest.java
+++ b/luni/src/test/java/libcore/java/lang/reflect/ProxyTest.java
@@ -16,6 +16,7 @@
 
 package libcore.java.lang.reflect;
 
+import java.lang.reflect.Field;
 import java.lang.reflect.InvocationHandler;
 import java.lang.reflect.Method;
 import java.lang.reflect.Proxy;
@@ -63,4 +64,19 @@
             return args[0];
         }
     }
+
+    // https://code.google.com/p/android/issues/detail?id=24846
+    public void test24846() throws Exception {
+      ClassLoader cl = getClass().getClassLoader();
+      Class[] interfaces = { java.beans.PropertyChangeListener.class };
+      Object proxy = Proxy.newProxyInstance(cl, interfaces, new InvocationHandler() {
+        public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
+          return null;
+        }
+      });
+      for (Field field : proxy.getClass().getDeclaredFields()) {
+        field.setAccessible(true);
+        assertFalse(field.isAnnotationPresent(Deprecated.class));
+      }
+    }
 }