@@ -39,50 +39,31 @@ public static void main(final String... args) throws Exception {
39
39
} else if (System .getProperty ("java.util.logging.manager" ) != null ) {
40
40
System .out .println ("java.util.logging.manager != null" );
41
41
42
- if (ClassLoader .getSystemResource (
43
- System .getProperty ("java.util.logging.manager" ).replaceAll ("\\ ." , "/" ) + ".class" )
44
- == null ) {
45
- assertTraceInstallationDelayed (
46
- "tracer install must be delayed when log manager system property is present." );
47
- customAssert (
48
- isJmxfetchStarted (false ),
49
- false ,
50
- "jmxfetch startup must be delayed when log manager system property is present." );
51
- if (isJFRSupported ()) {
52
- assertProfilingStartupDelayed (
53
- "profiling startup must be delayed when log manager system property is present." );
54
- }
55
- // Change back to a valid LogManager.
56
- System .setProperty ("java.util.logging.manager" , CUSTOM_LOG_MANAGER_CLASS_NAME );
57
- customAssert (
58
- LogManager .getLogManager ().getClass (),
59
- LogManagerSetter .class
60
- .getClassLoader ()
61
- .loadClass (System .getProperty ("java.util.logging.manager" )),
62
- "Javaagent should not prevent setting a custom log manager" );
63
- customAssert (
64
- isTracerInstalled (true ), true , "tracer should be installed after loading LogManager." );
65
- customAssert (
66
- isJmxfetchStarted (true ), true , "jmxfetch should start after loading LogManager." );
67
- if (isJFRSupported ()) {
68
- customAssert (
69
- isProfilingStarted (true ), true , "profiling should start after loading LogManager." );
70
- }
71
- } else {
72
- customAssert (
73
- isTracerInstalled (false ),
74
- true ,
75
- "tracer should be installed in premain when custom log manager found on classpath." );
42
+ assertTraceInstallationDelayed (
43
+ "tracer install must be delayed when log manager system property is present." );
44
+ customAssert (
45
+ isJmxfetchStarted (false ),
46
+ false ,
47
+ "jmxfetch startup must be delayed when log manager system property is present." );
48
+ if (isJFRSupported ()) {
49
+ assertProfilingStartupDelayed (
50
+ "profiling startup must be delayed when log manager system property is present." );
51
+ }
52
+ // Change back to a valid LogManager.
53
+ System .setProperty ("java.util.logging.manager" , CUSTOM_LOG_MANAGER_CLASS_NAME );
54
+ customAssert (
55
+ LogManager .getLogManager ().getClass (),
56
+ LogManagerSetter .class
57
+ .getClassLoader ()
58
+ .loadClass (System .getProperty ("java.util.logging.manager" )),
59
+ "Javaagent should not prevent setting a custom log manager" );
60
+ customAssert (
61
+ isTracerInstalled (true ), true , "tracer should be installed after loading LogManager." );
62
+ customAssert (
63
+ isJmxfetchStarted (true ), true , "jmxfetch should start after loading LogManager." );
64
+ if (isJFRSupported ()) {
76
65
customAssert (
77
- isJmxfetchStarted (false ),
78
- true ,
79
- "jmxfetch should start in premain when custom log manager found on classpath." );
80
- if (isJFRSupported ()) {
81
- customAssert (
82
- isProfilingStarted (false ),
83
- true ,
84
- "profiling should start in premain when custom log manager found on classpath." );
85
- }
66
+ isProfilingStarted (true ), true , "profiling should start after loading LogManager." );
86
67
}
87
68
} else if (System .getenv ("JBOSS_HOME" ) != null ) {
88
69
System .out .println ("JBOSS_HOME != null" );
0 commit comments