From fecdd6613ad5e9c5b05d342138a13d060bfc5e73 Mon Sep 17 00:00:00 2001 From: Alexey Andreev Date: Fri, 14 Feb 2020 10:39:50 +0300 Subject: [PATCH] Use tab character to indent stack traces --- .../main/java/org/teavm/classlib/java/lang/TThrowable.java | 4 ++-- core/src/main/java/org/teavm/backend/c/util/Deobfuscator.java | 2 +- core/src/main/java/org/teavm/runtime/ExceptionHandling.java | 4 ++-- .../src/main/java/org/teavm/idea/jps/TeaVMBuild.java | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/classlib/src/main/java/org/teavm/classlib/java/lang/TThrowable.java b/classlib/src/main/java/org/teavm/classlib/java/lang/TThrowable.java index 428d2a588..d0cd0562d 100644 --- a/classlib/src/main/java/org/teavm/classlib/java/lang/TThrowable.java +++ b/classlib/src/main/java/org/teavm/classlib/java/lang/TThrowable.java @@ -160,7 +160,7 @@ public class TThrowable extends RuntimeException { stream.println(); if (stackTrace != null) { for (TStackTraceElement element : stackTrace) { - stream.print(" at "); + stream.print("\tat "); stream.println(element); } } @@ -179,7 +179,7 @@ public class TThrowable extends RuntimeException { stream.println(); if (stackTrace != null) { for (TStackTraceElement element : stackTrace) { - stream.print(" at "); + stream.print("\tat "); stream.println(element); } } diff --git a/core/src/main/java/org/teavm/backend/c/util/Deobfuscator.java b/core/src/main/java/org/teavm/backend/c/util/Deobfuscator.java index 26e55401f..8b2d3c474 100644 --- a/core/src/main/java/org/teavm/backend/c/util/Deobfuscator.java +++ b/core/src/main/java/org/teavm/backend/c/util/Deobfuscator.java @@ -59,7 +59,7 @@ public class Deobfuscator { public String deobfuscate(Reader text) throws IOException { StringBuilder result = new StringBuilder(); - String expectedPrefix = " at Obfuscated.obfuscated(Obfuscated.java:"; + String expectedPrefix = "\tat Obfuscated.obfuscated(Obfuscated.java:"; int expectedPrefixPos = 0; boolean isInNumber = false; boolean expectingLineEnd = false; diff --git a/core/src/main/java/org/teavm/runtime/ExceptionHandling.java b/core/src/main/java/org/teavm/runtime/ExceptionHandling.java index 6b1bbec31..3db031fa5 100644 --- a/core/src/main/java/org/teavm/runtime/ExceptionHandling.java +++ b/core/src/main/java/org/teavm/runtime/ExceptionHandling.java @@ -46,7 +46,7 @@ public final class ExceptionHandling { while (stackFrame != null) { int callSiteId = ShadowStack.getCallSiteId(stackFrame); if (isObfuscated()) { - Console.printString(" at Obfuscated.obfuscated(Obfuscated.java:"); + Console.printString("\tat Obfuscated.obfuscated(Obfuscated.java:"); Console.printInt(callSiteId); Console.printString(")\n"); } else { @@ -56,7 +56,7 @@ public final class ExceptionHandling { MethodLocation methodLocation = location.method; if (methodLocation != null) { - Console.printString(" at "); + Console.printString("\tat "); if (methodLocation.className == null || methodLocation.methodName == null) { Console.printString("(Unknown method)"); } else { diff --git a/tools/idea/jps-plugin/src/main/java/org/teavm/idea/jps/TeaVMBuild.java b/tools/idea/jps-plugin/src/main/java/org/teavm/idea/jps/TeaVMBuild.java index 642bb11bf..3222886f2 100644 --- a/tools/idea/jps-plugin/src/main/java/org/teavm/idea/jps/TeaVMBuild.java +++ b/tools/idea/jps-plugin/src/main/java/org/teavm/idea/jps/TeaVMBuild.java @@ -221,7 +221,7 @@ class TeaVMBuild { } } - private class ProblemToReport { + static class ProblemToReport { int line; int startOffset; int endOffset; @@ -229,7 +229,7 @@ class TeaVMBuild { CallLocationList locations; } - private class CallLocationList { + static class CallLocationList { final CallLocation value; final CallLocationList next;