From f69e3310a3e634efd988e0534e8cee7e1a47cfcf Mon Sep 17 00:00:00 2001 From: konsoletyper Date: Sat, 14 Feb 2015 15:50:22 +0400 Subject: [PATCH] When finding overriden methods, exclude constructors, final and static methods --- .../main/java/org/teavm/model/util/AsyncMethodFinder.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/teavm-core/src/main/java/org/teavm/model/util/AsyncMethodFinder.java b/teavm-core/src/main/java/org/teavm/model/util/AsyncMethodFinder.java index 76718099f..2fc095329 100644 --- a/teavm-core/src/main/java/org/teavm/model/util/AsyncMethodFinder.java +++ b/teavm-core/src/main/java/org/teavm/model/util/AsyncMethodFinder.java @@ -176,13 +176,18 @@ public class AsyncMethodFinder { if (!visited.add(methodRef)) { return; } + if (methodRef.getName().equals("") || methodRef.getName().equals("")) { + return; + } ClassReader cls = classSource.get(methodRef.getClassName()); if (cls == null) { return; } MethodReader method = cls.getMethod(methodRef.getDescriptor()); if (method != null) { - result.add(methodRef); + if (!method.hasModifier(ElementModifier.STATIC) && !method.hasModifier(ElementModifier.FINAL)) { + result.add(methodRef); + } } else { if (cls.getParent() != null && !cls.getParent().equals(cls.getName())) { findOverridenMethods(new MethodReference(cls.getParent(), methodRef.getDescriptor()), result, visited);