|
From: <de...@us...> - 2012-10-25 21:59:59
|
Revision: 7811
http://fudaa.svn.sourceforge.net/fudaa/?rev=7811&view=rev
Author: deniger
Date: 2012-10-25 21:59:52 +0000 (Thu, 25 Oct 2012)
Log Message:
-----------
Modified Paths:
--------------
trunk/framework/ctulu-common/src/main/java/org/fudaa/ctulu/CtuluLogGroup.java
trunk/framework/ctulu-common/src/main/java/org/fudaa/ctulu/CtuluLogLevel.java
Modified: trunk/framework/ctulu-common/src/main/java/org/fudaa/ctulu/CtuluLogGroup.java
===================================================================
--- trunk/framework/ctulu-common/src/main/java/org/fudaa/ctulu/CtuluLogGroup.java 2012-10-25 21:59:15 UTC (rev 7810)
+++ trunk/framework/ctulu-common/src/main/java/org/fudaa/ctulu/CtuluLogGroup.java 2012-10-25 21:59:52 UTC (rev 7811)
@@ -30,16 +30,20 @@
public CtuluLogLevel getHigherLevel() {
CtuluLogLevel higher = null;
- for (CtuluLog ctuluLog : logs) {
- CtuluLogLevel thisLogHigherLevel = ctuluLog.getHigherLevel();
- if (higher == null || higher.isMoreVerboseThan(thisLogHigherLevel, true)) {
- higher = thisLogHigherLevel;
+ if (logs != null) {
+ for (CtuluLog ctuluLog : logs) {
+ CtuluLogLevel thisLogHigherLevel = ctuluLog.getHigherLevel();
+ if (higher == null || higher.isMoreVerboseThan(thisLogHigherLevel, true)) {
+ higher = thisLogHigherLevel;
+ }
}
}
- for (CtuluLogGroup ctuluLogGroup : groups) {
- CtuluLogLevel thisLogHigherLevel = ctuluLogGroup.getHigherLevel();
- if (higher == null || higher.isMoreVerboseThan(thisLogHigherLevel, true)) {
- higher = thisLogHigherLevel;
+ if (groups != null) {
+ for (CtuluLogGroup ctuluLogGroup : groups) {
+ CtuluLogLevel thisLogHigherLevel = ctuluLogGroup.getHigherLevel();
+ if (higher == null || higher.isMoreVerboseThan(thisLogHigherLevel, true)) {
+ higher = thisLogHigherLevel;
+ }
}
}
return higher;
Modified: trunk/framework/ctulu-common/src/main/java/org/fudaa/ctulu/CtuluLogLevel.java
===================================================================
--- trunk/framework/ctulu-common/src/main/java/org/fudaa/ctulu/CtuluLogLevel.java 2012-10-25 21:59:15 UTC (rev 7810)
+++ trunk/framework/ctulu-common/src/main/java/org/fudaa/ctulu/CtuluLogLevel.java 2012-10-25 21:59:52 UTC (rev 7811)
@@ -24,6 +24,9 @@
}
public boolean isMoreVerboseThan(CtuluLogLevel level, boolean strict) {
+ if (level == null) {
+ return false;
+ }
if (strict) {
return verbosity > level.verbosity;
}
@@ -31,6 +34,9 @@
}
public boolean isLessVerboseThan(CtuluLogLevel level, boolean strict) {
+ if (level == null) {
+ return false;
+ }
if (strict) {
return verbosity < level.verbosity;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|