[logback-dev] svn commit: r755 - logback/trunk/logback-core/src/main/java/ch/qos/logback/core/joran/action

noreply.ceki at qos.ch noreply.ceki at qos.ch
Tue Oct 24 15:18:02 CEST 2006


Author: ceki
Date: Tue Oct 24 15:18:02 2006
New Revision: 755

Modified:
   logback/trunk/logback-core/src/main/java/ch/qos/logback/core/joran/action/NestedComponentIA.java

Log:
- fixed bug where the pattern "a/b/*" incorrectly matched "a/other".
- also fixed bug whereby if there was no object at the top of the stack, NestedComponentIA
  and NestedSimplePropertyIA would barf with an EmptryStackException

Modified: logback/trunk/logback-core/src/main/java/ch/qos/logback/core/joran/action/NestedComponentIA.java
==============================================================================
--- logback/trunk/logback-core/src/main/java/ch/qos/logback/core/joran/action/NestedComponentIA.java	(original)
+++ logback/trunk/logback-core/src/main/java/ch/qos/logback/core/joran/action/NestedComponentIA.java	Tue Oct 24 15:18:02 2006
@@ -48,6 +48,11 @@
     //LogLog.debug("in NestComponentIA.isApplicable <" + pattern + ">");
     String nestedElementTagName = pattern.peekLast();
 
+    // calling ec.peekObject with an empty stack will throw an exception
+    if(ec.isEmpty()) {
+      return false;
+    }
+    
     Object o = ec.peekObject();
     PropertySetter parentBean = new PropertySetter(o);
 



More information about the logback-dev mailing list