conor 00/12/06 04:12:49
Modified: src/main/org/apache/tools/ant ProjectHelper.java
. WHATSNEW
Log:
Throw a BuildException when an attempt is made to use a property which has
not been set. Any build files which rely on non-set properties being passed
through untranslated will now break.
Revision Changes Path
1.40 +6 -2
jakarta-ant/src/main/org/apache/tools/ant/ProjectHelper.java
Index: ProjectHelper.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/src/main/org/apache/tools/ant/ProjectHelper.java,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -r1.39 -r1.40
--- ProjectHelper.java 2000/12/01 07:40:44 1.39
+++ ProjectHelper.java 2000/12/06 12:12:40 1.40
@@ -634,8 +634,12 @@
value );
}
String n=value.substring( pos+2, endName );
- String v= (keys.containsKey(n)) ? (String) keys.get( n )
- : "${"+n+"}";
+ if (!keys.containsKey(n)) {
+ throw new BuildException("Property ${" + n + "} has not
been set");
+ }
+
+ String v = (String) keys.get(n);
+
//System.out.println("N: " + n + " " + " V:" + v);
sb.append( v );
prev=endName+1;
1.61 +4 -0 jakarta-ant/WHATSNEW
Index: WHATSNEW
===================================================================
RCS file: /home/cvs/jakarta-ant/WHATSNEW,v
retrieving revision 1.60
retrieving revision 1.61
diff -u -r1.60 -r1.61
--- WHATSNEW 2000/12/01 15:41:17 1.60
+++ WHATSNEW 2000/12/06 12:12:47 1.61
@@ -9,6 +9,10 @@
* <perforce> has been replaced by a number of new tasks.
+* Ant now throws a BuildException when an attempt is made to use a property
which has
+ not been set. Any build files which rely on non-set properties being passed
+ through untranslated will now break.
+
Other changes:
--------------