diff --git a/core/src/main/java/org/teavm/backend/wasm/generate/WasmDependencyListener.java b/core/src/main/java/org/teavm/backend/wasm/generate/WasmDependencyListener.java index 522660888..84b770b4f 100644 --- a/core/src/main/java/org/teavm/backend/wasm/generate/WasmDependencyListener.java +++ b/core/src/main/java/org/teavm/backend/wasm/generate/WasmDependencyListener.java @@ -32,11 +32,8 @@ import org.teavm.model.MethodHolder; import org.teavm.model.MethodReader; public class WasmDependencyListener extends AbstractDependencyListener implements ClassHolderTransformer { - @Override public void classReached(DependencyAgent agent, String className, CallLocation location) { - super.classReached(agent, className, location); - for (MethodReader reader : agent.getClassSource().get(className).getMethods()) { AnnotationReader annotation = reader.getAnnotations().get(Export.class.getName()); if (annotation != null) { diff --git a/core/src/main/java/org/teavm/model/ClassReaderSource.java b/core/src/main/java/org/teavm/model/ClassReaderSource.java index 0617b05a7..a3ba62010 100644 --- a/core/src/main/java/org/teavm/model/ClassReaderSource.java +++ b/core/src/main/java/org/teavm/model/ClassReaderSource.java @@ -109,7 +109,7 @@ public interface ClassReaderSource { default Stream overriddenMethods(MethodReference method) { return getAncestorClasses(method.getClassName()) .map(cls -> cls.getMethod(method.getDescriptor())) - .filter(candidate -> candidate != null); + .filter(Objects::nonNull); } default Optional isSuperType(String superType, String subType) {