fix for bug=55353
This commit is contained in:
sdv%sparc.spb.su 2000-10-06 15:04:05 +00:00
Родитель 483823f246
Коммит c05af8868f
2 изменённых файлов: 10 добавлений и 11 удалений

Просмотреть файл

@ -37,3 +37,4 @@ JAVAC_PROG=$(JDKHOME)\bin\javac
JAVAC_FLAGS=-classpath "$(CLASSPATH);$(JAVA_DESTPATH)" -d "$(JAVA_DESTPATH)"
include <$(DEPTH)\config\rules.mak>
include <$(DEPTH)\config\javarules.mak>

Просмотреть файл

@ -71,24 +71,22 @@ public class InterfaceRegistry {
String[] methodNames = Utilities.getInterfaceMethodNames((String)iidStr);
if (methodNames != null) {
Method[] rmethods = new Method[methodNames.length];
int i = methodNames.length - 1;
Class[] ifaces = new Class[]{cl};
// recursively get all parent interface methods
Hashtable mhash = new Hashtable(methodNames.length);
// recursively get all parent interface methods
do {
Method[] methods = ifaces[0].getDeclaredMethods();
int j = methods.length - 1;
while (i >= 0 && j >=0) {
if (methodNames[i].equals(methods[j].getName())) {
rmethods[i--] = methods[j--];
} else {
// put null for notxpcom & noscript methods
rmethods[i--] = null;
}
}
for (int i = 0; i < methods.length; i++) {
mhash.put(methods[i].getName(), methods[i]);
}
ifaces = ifaces[0].getInterfaces();
// check for single inheritance (xpcom)
} while (ifaces.length == 1);
for (int j = methodNames.length - 1; j >= 0; j--) {
rmethods[j] = (Method)mhash.get(methodNames[j]);
}
interfaces.put(iid, cl);
iMethods.put(iid, new MethodArray(rmethods));