You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by po...@apache.org on 2004/03/26 23:40:12 UTC
cvs commit: jakarta-commons/jelly/src/java/org/apache/commons/jelly JellyContext.java
polx 2004/03/26 14:40:12
Modified: jelly/src/java/org/apache/commons/jelly JellyContext.java
Log:
It looks like this could be the end of the evil ant and define taglibs
test-failures... the system-properties were not being read by
all variable-reading methods. Hence such properties as basdir were
deeply failing.
paul
Revision Changes Path
1.52 +11 -1 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.51
retrieving revision 1.52
diff -u -r1.51 -r1.52
--- JellyContext.java 24 Feb 2004 14:15:40 -0000 1.51
+++ JellyContext.java 26 Mar 2004 22:40:12 -0000 1.52
@@ -183,11 +183,21 @@
/** @return the value of the given variable name */
public Object getVariable(String name) {
Object value = variables.get(name);
-
+
if ( value == null && isInherit() ) {
JellyContext parent = getParent();
if (parent != null) {
value = parent.getVariable( name );
+ }
+ }
+
+ // ### this is a hack - remove this when we have support for pluggable Scopes
+ if ( value == null ) {
+ try {
+ value = System.getProperty(name);
+ }
+ catch (SecurityException e) {
+ // ignore security exceptions
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org