[logback-dev] svn commit: r1836 - logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/spi
noreply.ceki at qos.ch
noreply.ceki at qos.ch
Wed Oct 15 19:06:48 CEST 2008
Author: ceki
Date: Wed Oct 15 19:06:48 2008
New Revision: 1836
Modified:
logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/spi/PackagingDataCalculator.java
Log:
Under certain special circumstances (reproducible under Continuum on Linux)
the bestEffortLoadClass returns null.
Modified: logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/spi/PackagingDataCalculator.java
==============================================================================
--- logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/spi/PackagingDataCalculator.java (original)
+++ logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/spi/PackagingDataCalculator.java Wed Oct 15 19:06:48 2008
@@ -164,6 +164,7 @@
return cpd;
}
Class type = bestEffortLoadClass(lastExactClassLoader, className);
+ System.out.println("********** type is null for class "+className);
String version = getImplementationVersion(type);
String codeLocation = getCodeLocation(type);
cpd = new ClassPackagingData(codeLocation, version, false);
@@ -172,6 +173,9 @@
}
String getImplementationVersion(Class type) {
+ if(type == null) {
+ return "na";
+ }
Package aPackage = type.getPackage();
if (aPackage != null) {
String v = aPackage.getImplementationVersion();
@@ -238,8 +242,8 @@
/**
*
- * @param lastGuaranteedClassLoader
- * may be null
+ * @param lastGuaranteedClassLoader may be null
+ *
* @param className
* @return
*/
More information about the logback-dev
mailing list