langtools/src/share/classes/com/sun/tools/javadoc/ClassDocImpl.java
changeset 10203 cca843a7d258
parent 8631 664f84942e74
child 10950 e87b50888909
equal deleted inserted replaced
10202:f32c7f2c2219 10203:cca843a7d258
   742         }
   742         }
   743 
   743 
   744         // search inner classes
   744         // search inner classes
   745         //### Add private entry point to avoid creating array?
   745         //### Add private entry point to avoid creating array?
   746         //### Replicate code in innerClasses here to avoid consing?
   746         //### Replicate code in innerClasses here to avoid consing?
   747         ClassDoc innerClasses[] = innerClasses();
   747         for (ClassDoc icd : innerClasses()) {
   748         for (int i = 0; i < innerClasses.length; i++) {
   748             if (icd.name().equals(className) ||
   749             if (innerClasses[i].name().equals(className) ||
   749                     //### This is from original javadoc but it looks suspicious to me...
   750                 //### This is from original javadoc but it looks suspicious to me...
   750                     //### I believe it is attempting to compensate for the confused
   751                 //### I believe it is attempting to compensate for the confused
   751                     //### convention of including the nested class qualifiers in the
   752                 //### convention of including the nested class qualifiers in the
   752                     //### 'name' of the inner class, rather than the true simple name.
   753                 //### 'name' of the inner class, rather than the true simple name.
   753                     icd.name().endsWith("." + className)) {
   754                 innerClasses[i].name().endsWith(className)) {
   754                 return icd;
   755                 return innerClasses[i];
       
   756             } else {
   755             } else {
   757                 ClassDoc innercd = ((ClassDocImpl) innerClasses[i]).searchClass(className);
   756                 ClassDoc innercd = ((ClassDocImpl) icd).searchClass(className);
   758                 if (innercd != null) {
   757                 if (innercd != null) {
   759                     return innercd;
   758                     return innercd;
   760                 }
   759                 }
   761             }
   760             }
   762         }
   761         }