File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
log4j-api/src/main/java/org/apache/logging/log4j/util Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -72,12 +72,19 @@ public final class StackLocator {
72
72
} else {
73
73
o = getCallerClassMethod .invoke (null , 1 );
74
74
if (o == sunReflectionClass ) {
75
- System .err .println ("WARNING: Unexpected result from sun.reflect.Reflection.getCallerClass(int), adjusting offset for future calls." );
75
+ LowLevelLogUtil .log (
76
+ "WARNING: Unexpected result from sun.reflect.Reflection.getCallerClass(int), adjusting offset for future calls." );
76
77
java7u25CompensationOffset = 1 ;
77
78
}
78
79
}
79
80
} catch (final Exception | LinkageError e ) {
80
- System .err .println ("WARNING: sun.reflect.Reflection.getCallerClass is not supported. This will impact performance." );
81
+ if (Constants .JAVA_MAJOR_VERSION > 8 ) {
82
+ LowLevelLogUtil .log (
83
+ "WARNING: Runtime environment does not support multi-release JARs. This will impact location-based features." );
84
+ } else {
85
+ LowLevelLogUtil .log (
86
+ "WARNING: sun.reflect.Reflection.getCallerClass is not supported. This will impact location-based features." );
87
+ }
81
88
getCallerClassMethod = null ;
82
89
java7u25CompensationOffset = -1 ;
83
90
}
You can’t perform that action at this time.
0 commit comments