File tree 2 files changed +24
-0
lines changed
jOOL/src/test/java/org/jooq/lambda
jOOL-java-8/src/test/java/org/jooq/lambda
2 files changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -100,18 +100,30 @@ public void andThen () {
100
100
101
101
@ Test public void modulesHackJUL () {
102
102
Object jul = getActualLogger ("java.util.logging.Logger" , ExtraMagicTest .class );
103
+ if (jul == null ) {
104
+ System .out .println ("No JUL in classpath ???!!!" );
105
+ return ;
106
+ }
103
107
assertEquals ("class java.util.logging.Logger" , jul .getClass ().toString ());
104
108
assertTrue (jul .toString ().startsWith ("java.util.logging.Logger@" ));
105
109
}
106
110
107
111
@ Test public void modulesHackSlf4j () {
108
112
Object slf4j = getActualLogger ("org.slf4j.LoggerFactory" , ExtraMagicTest .class );
113
+ if (slf4j == null ) {
114
+ System .out .println ("No Slf4j in classpath" );
115
+ return ;
116
+ }
109
117
assertEquals ("class org.slf4j.simple.SimpleLogger" , slf4j .getClass ().toString ());// class org.slf4j.helpers.NOPLogger
110
118
assertTrue (slf4j .toString ().startsWith ("org.slf4j.simple.SimpleLogger@" ));// org.slf4j.helpers.NOPLogger(NOP)
111
119
}
112
120
113
121
@ Test public void modulesHackLog4j () {
114
122
Object log4j = getActualLogger ("org.apache.logging.log4j.LogManager" , ExtraMagicTest .class );
123
+ if (log4j == null ) {
124
+ System .out .println ("No Log4j in classpath" );
125
+ return ;
126
+ }
115
127
assertEquals ("class org.apache.logging.log4j.core.Logger" , log4j .getClass ().toString ());
116
128
assertTrue (log4j .toString ().startsWith ("org.jooq.lambda.ExtraMagicTest:ERROR in " ));
117
129
}
Original file line number Diff line number Diff line change @@ -100,18 +100,30 @@ public void andThen () {
100
100
101
101
@ Test public void modulesHackJUL () {
102
102
Object jul = getActualLogger ("java.util.logging.Logger" , ExtraMagicTest .class );
103
+ if (jul == null ) {
104
+ System .out .println ("No JUL in classpath ???!!!" );
105
+ return ;
106
+ }
103
107
assertEquals ("class java.util.logging.Logger" , jul .getClass ().toString ());
104
108
assertTrue (jul .toString ().startsWith ("java.util.logging.Logger@" ));
105
109
}
106
110
107
111
@ Test public void modulesHackSlf4j () {
108
112
Object slf4j = getActualLogger ("org.slf4j.LoggerFactory" , ExtraMagicTest .class );
113
+ if (slf4j == null ) {
114
+ System .out .println ("No Slf4j in classpath" );
115
+ return ;
116
+ }
109
117
assertEquals ("class org.slf4j.simple.SimpleLogger" , slf4j .getClass ().toString ());// class org.slf4j.helpers.NOPLogger
110
118
assertTrue (slf4j .toString ().startsWith ("org.slf4j.simple.SimpleLogger@" ));// org.slf4j.helpers.NOPLogger(NOP)
111
119
}
112
120
113
121
@ Test public void modulesHackLog4j () {
114
122
Object log4j = getActualLogger ("org.apache.logging.log4j.LogManager" , ExtraMagicTest .class );
123
+ if (log4j == null ) {
124
+ System .out .println ("No Log4j in classpath" );
125
+ return ;
126
+ }
115
127
assertEquals ("class org.apache.logging.log4j.core.Logger" , log4j .getClass ().toString ());
116
128
assertTrue (log4j .toString ().startsWith ("org.jooq.lambda.ExtraMagicTest:ERROR in " ));
117
129
}
You can’t perform that action at this time.
0 commit comments