Minor code style improvements

This commit is contained in:
Alexey Andreev 2017-11-12 23:07:12 +03:00
parent 1b0bacd90c
commit 0f39dbbdd4
2 changed files with 1 additions and 4 deletions

View File

@ -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) {

View File

@ -109,7 +109,7 @@ public interface ClassReaderSource {
default Stream<MethodReader> overriddenMethods(MethodReference method) {
return getAncestorClasses(method.getClassName())
.map(cls -> cls.getMethod(method.getDescriptor()))
.filter(candidate -> candidate != null);
.filter(Objects::nonNull);
}
default Optional<Boolean> isSuperType(String superType, String subType) {