[ecj] Patch: FYI: fixlet for getAnnotations

Tom Tromey tromey@redhat.com
Thu Nov 30 19:57:00 GMT 2006


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))



More information about the Java-patches mailing list