From 69857af68854bce1ea0e9dd4d583fdbfc7ccdf8e Mon Sep 17 00:00:00 2001 From: Alexey Andreev Date: Fri, 20 Feb 2015 16:55:35 +0400 Subject: [PATCH] Fix https://github.com/konsoletyper/teavm/issues/66 --- .../src/main/java/org/teavm/classlib/java/lang/TObject.java | 2 +- .../teavm/platform/plugin/ResourceAccessorTransformer.java | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/teavm-classlib/src/main/java/org/teavm/classlib/java/lang/TObject.java b/teavm-classlib/src/main/java/org/teavm/classlib/java/lang/TObject.java index 51a2f403b..ebad4005b 100644 --- a/teavm-classlib/src/main/java/org/teavm/classlib/java/lang/TObject.java +++ b/teavm-classlib/src/main/java/org/teavm/classlib/java/lang/TObject.java @@ -72,7 +72,7 @@ public class TObject { o.monitor.owner = thread; o.monitor.count += count; callback.complete(null); - }; + } }); } else { o.monitor.count += count; diff --git a/teavm-platform/src/main/java/org/teavm/platform/plugin/ResourceAccessorTransformer.java b/teavm-platform/src/main/java/org/teavm/platform/plugin/ResourceAccessorTransformer.java index e95ef207d..894ce2cdc 100644 --- a/teavm-platform/src/main/java/org/teavm/platform/plugin/ResourceAccessorTransformer.java +++ b/teavm-platform/src/main/java/org/teavm/platform/plugin/ResourceAccessorTransformer.java @@ -35,7 +35,9 @@ class ResourceAccessorTransformer implements ClassHolderTransformer { if (cls.getName().equals(ResourceAccessor.class.getName())) { ResourceAccessorGenerator generator = new ResourceAccessorGenerator(); for (MethodHolder method : cls.getMethods()) { - vm.add(method.getReference(), generator); + if (!method.getName().equals("")) { + vm.add(method.getReference(), generator); + } } } }