From 0f39dbbdd42b1ce847c71733b9e28b098f2d2903 Mon Sep 17 00:00:00 2001 From: Alexey Andreev Date: Sun, 12 Nov 2017 23:07:12 +0300 Subject: [PATCH] Minor code style improvements --- .../teavm/backend/wasm/generate/WasmDependencyListener.java | 3 --- core/src/main/java/org/teavm/model/ClassReaderSource.java | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) 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) {