From b40935500039d34cd89b49424e4333f2dc23d2f9 Mon Sep 17 00:00:00 2001 From: Alexey Andreev Date: Sat, 22 Apr 2017 00:32:28 +0300 Subject: [PATCH] Fix Class.newInstance in minified mode --- .../main/java/org/teavm/platform/plugin/PlatformGenerator.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform/src/main/java/org/teavm/platform/plugin/PlatformGenerator.java b/platform/src/main/java/org/teavm/platform/plugin/PlatformGenerator.java index a90a2e222..cd84bcde8 100644 --- a/platform/src/main/java/org/teavm/platform/plugin/PlatformGenerator.java +++ b/platform/src/main/java/org/teavm/platform/plugin/PlatformGenerator.java @@ -126,7 +126,7 @@ public class PlatformGenerator implements Generator, Injector, DependencyPlugin writer.append("var $r = $rt_nativeThread().pop();").softNewLine(); writer.append(cls + ".$$constructor$$($r);").softNewLine(); writer.append("if").ws().append("($rt_suspending())").ws().append("{").indent().softNewLine(); - writer.append("return").ws().append("$rt_nativeThread().push($r);").softNewLine(); + writer.append("return $rt_nativeThread().push($r);").softNewLine(); writer.outdent().append("}").softNewLine(); writer.append("return $r;").softNewLine(); writer.outdent().append("}").softNewLine();