From 93817ae99401397d2e46a415d948f4a8a4cfaeba Mon Sep 17 00:00:00 2001 From: Tony Trinh Date: Sat, 15 Sep 2018 06:01:37 -0500 Subject: [PATCH] Test caller line data only when available (2) --- .../test/java/ch/qos/logback/classic/pattern/ConverterTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/logback-android/src/test/java/ch/qos/logback/classic/pattern/ConverterTest.java b/logback-android/src/test/java/ch/qos/logback/classic/pattern/ConverterTest.java index 5155d8f7fc..317c198feb 100644 --- a/logback-android/src/test/java/ch/qos/logback/classic/pattern/ConverterTest.java +++ b/logback-android/src/test/java/ch/qos/logback/classic/pattern/ConverterTest.java @@ -405,7 +405,7 @@ public void contextProperty() { } private void assumeStackTraceDetailsAvailable() { - StackTraceElement[] stackTraceElements = Thread.currentThread().getStackTrace(); + StackTraceElement[] stackTraceElements = new Throwable().getStackTrace(); assumeThat(stackTraceElements[0].getLineNumber(), is(greaterThan(-1))); } }