langtools/src/share/classes/com/sun/tools/javadoc/ClassDocImpl.java
changeset 10203 cca843a7d258
parent 8631 664f84942e74
child 10950 e87b50888909
--- a/langtools/src/share/classes/com/sun/tools/javadoc/ClassDocImpl.java	Fri Aug 05 15:57:59 2011 -0700
+++ b/langtools/src/share/classes/com/sun/tools/javadoc/ClassDocImpl.java	Fri Aug 05 19:41:05 2011 -0700
@@ -744,17 +744,16 @@
         // search inner classes
         //### Add private entry point to avoid creating array?
         //### Replicate code in innerClasses here to avoid consing?
-        ClassDoc innerClasses[] = innerClasses();
-        for (int i = 0; i < innerClasses.length; i++) {
-            if (innerClasses[i].name().equals(className) ||
-                //### This is from original javadoc but it looks suspicious to me...
-                //### I believe it is attempting to compensate for the confused
-                //### convention of including the nested class qualifiers in the
-                //### 'name' of the inner class, rather than the true simple name.
-                innerClasses[i].name().endsWith(className)) {
-                return innerClasses[i];
+        for (ClassDoc icd : innerClasses()) {
+            if (icd.name().equals(className) ||
+                    //### This is from original javadoc but it looks suspicious to me...
+                    //### I believe it is attempting to compensate for the confused
+                    //### convention of including the nested class qualifiers in the
+                    //### 'name' of the inner class, rather than the true simple name.
+                    icd.name().endsWith("." + className)) {
+                return icd;
             } else {
-                ClassDoc innercd = ((ClassDocImpl) innerClasses[i]).searchClass(className);
+                ClassDoc innercd = ((ClassDocImpl) icd).searchClass(className);
                 if (innercd != null) {
                     return innercd;
                 }