This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
[ecj] Patch: FYI: fixlet for getAnnotations
- From: Tom Tromey <tromey at redhat dot com>
- To: Java Patch List <java-patches at gcc dot gnu dot org>
- Date: 30 Nov 2006 12:49:19 -0700
- Subject: [ecj] Patch: FYI: fixlet for getAnnotations
- Reply-to: tromey at redhat dot com
I'm checking this in on the gcj-eclipse merge branch.
This changes getAnnotations so that it doesn't recurse.
I've already put this in Classpath.
Tom
Index: ChangeLog
from Tom Tromey <tromey@redhat.com>
* java/lang/Class.java (getAnnotations): Don't recurse.
Index: java/lang/Class.java
===================================================================
--- java/lang/Class.java (revision 119335)
+++ java/lang/Class.java (working copy)
@@ -1278,7 +1278,7 @@
s != null;
s = s.getSuperclass())
{
- for (Annotation a : s.getAnnotations())
+ for (Annotation a : s.getDeclaredAnnotations())
{
Class k = (Class) a.annotationType();
if (! map.containsKey(k) && k.isAnnotationPresent(Inherited.class))