stephenh 2002/07/30 07:58:07
Modified: src/java/org/apache/torque/task TorqueDataModelTask.java
Log:
For the org/apache/torque/default.properties to allow a user's build.properties to
only define the non-default settings, the control context has to be initialized based
on the environment as that's where the default.properties is loaded to via a <property
resource=... in build-torque.xml.
Revision Changes Path
1.18 +3 -3
jakarta-turbine-torque/src/java/org/apache/torque/task/TorqueDataModelTask.java
Index: TorqueDataModelTask.java
===================================================================
RCS file:
/home/cvs/jakarta-turbine-torque/src/java/org/apache/torque/task/TorqueDataModelTask.java,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- TorqueDataModelTask.java 25 Jul 2002 06:12:30 -0000 1.17
+++ TorqueDataModelTask.java 30 Jul 2002 14:58:06 -0000 1.18
@@ -354,7 +354,7 @@
}
// Create a new Velocity context.
- context = new VelocityContext();
+ context = new VelocityContext(this.getProject().getProperties());
// Place our set of data models into the context along
// with the names of the databases as a convenience for now.
@@ -379,7 +379,7 @@
// Save the keys during iteration to avoid a ConcurrentModificationException
List keys = new ArrayList();
- for (Iterator i = contextProperties.getKeys(); i.hasNext(); )
+ for (Iterator i = contextProperties.keySet().iterator(); i.hasNext(); )
{
String key = (String) i.next();
if (key.startsWith("torque."))
@@ -391,7 +391,7 @@
for (Iterator i = keys.iterator(); i.hasNext(); )
{
String key = (String) i.next();
- contextProperties.setProperty(
+ contextProperties.put(
key.substring("torque.".length()),
contextProperties.get(key));
}
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>