dion 2004/08/29 19:16:38 Modified: jelly/src/java/org/apache/commons/jelly JellyContext.java Log: Apply fix for Jelly-78 Revision Changes Path 1.54 +7 -0 jakarta-commons/jelly/src/java/org/apache/commons/jelly/JellyContext.java Index: JellyContext.java =================================================================== RCS file: /home/cvs/jakarta-commons/jelly/src/java/org/apache/commons/jelly/JellyContext.java,v retrieving revision 1.53 retrieving revision 1.54 diff -u -r1.53 -r1.54 --- JellyContext.java 12 Aug 2004 05:34:34 -0000 1.53 +++ JellyContext.java 30 Aug 2004 02:16:37 -0000 1.54 @@ -161,6 +161,10 @@ */ public Object findVariable(String name) { Object answer = variables.get(name); + boolean definedHere = answer != null || variables.containsKey(name); + + if (definedHere) return answer; + if ( answer == null && parent != null ) { answer = parent.findVariable(name); } @@ -184,7 +188,10 @@ /** @return the value of the given variable name */ public Object getVariable(String name) { Object value = variables.get(name); + boolean definedHere = value != null || variables.containsKey(name); + if (definedHere) return value; + if ( value == null && isInherit() ) { JellyContext parent = getParent(); if (parent != null) {
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]