1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
|
Description: Fixes the compatibility with Java 11
Origin: backport, https://github.com/qos-ch/logback/commit/e59b6d6b#diff-0108e2118a460318f4aaa75ac3ca7efe
--- a/logback-classic/src/main/java/ch/qos/logback/classic/spi/PackagingDataCalculator.java
+++ b/logback-classic/src/main/java/ch/qos/logback/classic/spi/PackagingDataCalculator.java
@@ -17,7 +17,7 @@
import java.security.CodeSource;
import java.util.HashMap;
-import sun.reflect.Reflection;
+//import sun.reflect.Reflection;
// import java.security.AccessControlException; import java.security.AccessController;import java.security.PrivilegedAction;
/**
@@ -42,8 +42,8 @@
// sun.reflect.Reflection class. However, this class will *not compile*
// on JDKs lacking sun.reflect.Reflection.
try {
- Reflection.getCallerClass(2);
- GET_CALLER_CLASS_METHOD_AVAILABLE = true;
+ //Reflection.getCallerClass(2);
+ //GET_CALLER_CLASS_METHOD_AVAILABLE = true;
} catch (NoClassDefFoundError e) {
} catch (NoSuchMethodError e) {
} catch (UnsupportedOperationException e) {
@@ -82,7 +82,7 @@
for (int i = 0; i < commonFrames; i++) {
Class callerClass = null;
if (GET_CALLER_CLASS_METHOD_AVAILABLE) {
- callerClass = Reflection.getCallerClass(localFirstCommon + i - missfireCount + 1);
+ //callerClass = Reflection.getCallerClass(localFirstCommon + i - missfireCount + 1);
}
StackTraceElementProxy step = stepArray[stepFirstCommon + i];
String stepClassname = step.ste.getClassName();
|