mirror of https://github.com/jwtk/jjwt.git
Merge pull request #41 from josebarrueta/Issue-34
Issue-34 getting rid of slf4j.
This commit is contained in:
commit
46a3c1376e
7
pom.xml
7
pom.xml
|
@ -61,7 +61,6 @@
|
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
<buildNumber>${user.name}-${maven.build.timestamp}</buildNumber>
|
<buildNumber>${user.name}-${maven.build.timestamp}</buildNumber>
|
||||||
|
|
||||||
<slf4j.version>1.7.6</slf4j.version>
|
|
||||||
<jackson.version>2.4.2</jackson.version>
|
<jackson.version>2.4.2</jackson.version>
|
||||||
|
|
||||||
<!-- Optional Runtime Dependencies: -->
|
<!-- Optional Runtime Dependencies: -->
|
||||||
|
@ -78,12 +77,6 @@
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.slf4j</groupId>
|
|
||||||
<artifactId>slf4j-api</artifactId>
|
|
||||||
<version>${slf4j.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.fasterxml.jackson.core</groupId>
|
<groupId>com.fasterxml.jackson.core</groupId>
|
||||||
<artifactId>jackson-databind</artifactId>
|
<artifactId>jackson-databind</artifactId>
|
||||||
|
|
|
@ -15,9 +15,6 @@
|
||||||
*/
|
*/
|
||||||
package io.jsonwebtoken.lang;
|
package io.jsonwebtoken.lang;
|
||||||
|
|
||||||
import org.slf4j.Logger;
|
|
||||||
import org.slf4j.LoggerFactory;
|
|
||||||
|
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.lang.reflect.Constructor;
|
import java.lang.reflect.Constructor;
|
||||||
|
|
||||||
|
@ -26,11 +23,6 @@ import java.lang.reflect.Constructor;
|
||||||
*/
|
*/
|
||||||
public class Classes {
|
public class Classes {
|
||||||
|
|
||||||
/**
|
|
||||||
* Private internal log instance.
|
|
||||||
*/
|
|
||||||
private static final Logger log = LoggerFactory.getLogger(Classes.class);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @since 0.1
|
* @since 0.1
|
||||||
*/
|
*/
|
||||||
|
@ -78,18 +70,10 @@ public class Classes {
|
||||||
Class clazz = THREAD_CL_ACCESSOR.loadClass(fqcn);
|
Class clazz = THREAD_CL_ACCESSOR.loadClass(fqcn);
|
||||||
|
|
||||||
if (clazz == null) {
|
if (clazz == null) {
|
||||||
if (log.isTraceEnabled()) {
|
|
||||||
log.trace("Unable to load class named [" + fqcn +
|
|
||||||
"] from the thread context ClassLoader. Trying the current ClassLoader...");
|
|
||||||
}
|
|
||||||
clazz = CLASS_CL_ACCESSOR.loadClass(fqcn);
|
clazz = CLASS_CL_ACCESSOR.loadClass(fqcn);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (clazz == null) {
|
if (clazz == null) {
|
||||||
if (log.isTraceEnabled()) {
|
|
||||||
log.trace("Unable to load class named [" + fqcn + "] from the current ClassLoader. " +
|
|
||||||
"Trying the system/application ClassLoader...");
|
|
||||||
}
|
|
||||||
clazz = SYSTEM_CL_ACCESSOR.loadClass(fqcn);
|
clazz = SYSTEM_CL_ACCESSOR.loadClass(fqcn);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -212,9 +196,7 @@ public class Classes {
|
||||||
try {
|
try {
|
||||||
clazz = cl.loadClass(fqcn);
|
clazz = cl.loadClass(fqcn);
|
||||||
} catch (ClassNotFoundException e) {
|
} catch (ClassNotFoundException e) {
|
||||||
if (log.isTraceEnabled()) {
|
//Class couldn't be found by loader
|
||||||
log.trace("Unable to load clazz named [" + fqcn + "] from class loader [" + cl + "]");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return clazz;
|
return clazz;
|
||||||
|
@ -233,9 +215,7 @@ public class Classes {
|
||||||
try {
|
try {
|
||||||
return doGetClassLoader();
|
return doGetClassLoader();
|
||||||
} catch (Throwable t) {
|
} catch (Throwable t) {
|
||||||
if (log.isDebugEnabled()) {
|
//Unable to get ClassLoader
|
||||||
log.debug("Unable to acquire ClassLoader.", t);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue