From 36041b410720808ce0a58ecc776443439dac1483 Mon Sep 17 00:00:00 2001 From: Alexey Andreev Date: Wed, 13 Mar 2019 19:19:05 +0300 Subject: [PATCH] Fix issues with call graph serialization --- core/src/main/java/org/teavm/dependency/DefaultCallSite.java | 2 +- .../main/java/org/teavm/dependency/SerializableCallGraph.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/main/java/org/teavm/dependency/DefaultCallSite.java b/core/src/main/java/org/teavm/dependency/DefaultCallSite.java index e82381ccc..3e7fdbcd9 100644 --- a/core/src/main/java/org/teavm/dependency/DefaultCallSite.java +++ b/core/src/main/java/org/teavm/dependency/DefaultCallSite.java @@ -80,7 +80,7 @@ public class DefaultCallSite implements CallSite, Serializable { @Override public Collection getCalledMethods() { - if (singleCalledMethod == null) { + if (singleCalledMethod != null) { return Collections.singletonList(singleCalledMethod); } if (readonlyCalledMethods == null) { diff --git a/core/src/main/java/org/teavm/dependency/SerializableCallGraph.java b/core/src/main/java/org/teavm/dependency/SerializableCallGraph.java index 558105af8..8e50575b1 100644 --- a/core/src/main/java/org/teavm/dependency/SerializableCallGraph.java +++ b/core/src/main/java/org/teavm/dependency/SerializableCallGraph.java @@ -49,7 +49,7 @@ class SerializableCallGraph implements Serializable { FieldReference field; } - static class Location { + static class Location implements Serializable { TextLocation value; int caller; }