You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by di...@apache.org on 2004/09/09 14:05:59 UTC
cvs commit: jakarta-commons/jelly/jelly-tags/ant/src/java/org/apache/commons/jelly/task AntJellyContext.java
dion 2004/09/09 05:05:59
Modified: jelly/jelly-tags/ant/src/java/org/apache/commons/jelly/task
AntJellyContext.java
Log:
Fix license file whitespace
Revision Changes Path
1.7 +22 -22 jakarta-commons/jelly/jelly-tags/ant/src/java/org/apache/commons/jelly/task/AntJellyContext.java
Index: AntJellyContext.java
===================================================================
RCS file: /home/cvs/jakarta-commons/jelly/jelly-tags/ant/src/java/org/apache/commons/jelly/task/AntJellyContext.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- AntJellyContext.java 25 Feb 2004 01:24:48 -0000 1.6
+++ AntJellyContext.java 9 Sep 2004 12:05:59 -0000 1.7
@@ -1,12 +1,12 @@
/*
* Copyright 2002,2004 The Apache Software Foundation.
- *
+ *
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -43,7 +43,7 @@
super( parentJellyContext );
this.project = project;
}
-
+
/** @return the value of the given variable name */
public Object getVariable(String name) {
// look in parent first
@@ -51,61 +51,61 @@
if (answer == null) {
answer = project.getProperty(name);
}
-
+
if ( log.isDebugEnabled() ) {
log.debug( "Looking up variable: " + name + " answer: " + answer );
}
-
+
return answer;
}
-
+
/** Sets the value of the given variable name */
public void setVariable(String name, Object value) {
if ( log.isDebugEnabled() ) {
log.debug( "Setting variable: " + name + " to: " + value );
}
-
+
super.setVariable( name, value );
-
+
// only export string values back to Ant?
if ( value instanceof String ) {
project.setProperty(name, (String) value);
}
}
-
+
/** Removes the given variable */
public void removeVariable(String name) {
super.removeVariable( name );
- project.setProperty(name, null);
+ project.setProperty(name, null);
}
-
- /**
+
+ /**
* @return an Iterator over the current variable names in this
- * context
+ * context
*/
public Iterator getVariableNames() {
return getVariables().keySet().iterator();
}
-
+
/**
* @return the Map of variables in this scope
*/
public Map getVariables() {
// we should add all the Project's properties
Map map = new HashMap( project.getProperties() );
-
+
// override any local properties
map.putAll( super.getVariables() );
return map;
}
-
+
/**
* Sets the Map of variables to use
*/
-
+
public void setVariables(Map variables) {
super.setVariables(variables);
-
+
// export any Ant properties
for ( Iterator iter = variables.entrySet().iterator(); iter.hasNext(); ) {
Map.Entry entry = (Map.Entry) iter.next();
@@ -116,11 +116,11 @@
}
}
}
-
+
// Implementation methods
- //-------------------------------------------------------------------------
-
+ //-------------------------------------------------------------------------
+
/**
* Factory method to create a new child of this context
*/
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org