You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by cu...@apache.org on 2001/08/08 15:28:06 UTC
cvs commit: xml-xalan/test/java/src/org/apache/qetest/xsl XSLTestAntTask.java XSLTestAntTask.class
curcuru 01/08/08 06:28:06
Modified: test/java/src/org/apache/qetest/xsl XSLTestAntTask.java
XSLTestAntTask.class
Log:
Update writePassThruProps to properly have altPrefix override the default one
Revision Changes Path
1.3 +16 -6 xml-xalan/test/java/src/org/apache/qetest/xsl/XSLTestAntTask.java
Index: XSLTestAntTask.java
===================================================================
RCS file: /home/cvs/xml-xalan/test/java/src/org/apache/qetest/xsl/XSLTestAntTask.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- XSLTestAntTask.java 2001/07/25 18:28:13 1.2
+++ XSLTestAntTask.java 2001/08/08 13:28:06 1.3
@@ -113,7 +113,7 @@
* @author <a href="mailto:shane_curcuru@lotus.com">Shane Curcuru</a>
* @author Stefano Mazzocchi <a href="mailto:stefano@apache.org">stefano@apache.org</a>
* @author <a href="mailto:stefan.bodewig@epost.de">Stefan Bodewig</a>
- * @version $Id: XSLTestAntTask.java,v 1.2 2001/07/25 18:28:13 curcuru Exp $
+ * @version $Id: XSLTestAntTask.java,v 1.3 2001/08/08 13:28:06 curcuru Exp $
*/
public class XSLTestAntTask extends Task
{
@@ -339,13 +339,15 @@
* access to local dir; support dir-switching attribute
* when forking from Ant task; etc.
* @param altPrefix alternate prefix of Ant properties to also
- * pass thru in addition to ANT_PASSTHRU_PREFIX
+ * pass thru in addition to ANT_PASSTHRU_PREFIX; these will
+ * override any of the default prefix ones
*/
protected void writePassThruProps(String altPrefix)
{
Hashtable antProps = this.getProject().getProperties();
Properties passThru = new Properties();
+ // Passthru any of the default prefixed properties..
for (Enumeration enum = antProps.keys();
enum.hasMoreElements();
/* no increment portion */ )
@@ -357,7 +359,15 @@
// rip off the prefix first
passThru.put(key.substring(ANT_PASSTHRU_PREFIX.length()), antProps.get(key));
}
- else if (key.startsWith(altPrefix))
+ }
+ //.. Then also passthru any alternate prefix properties
+ // this ensures alternate prefixes will overwrite default ones
+ for (Enumeration enum = antProps.keys();
+ enum.hasMoreElements();
+ /* no increment portion */ )
+ {
+ String key = enum.nextElement().toString();
+ if (key.startsWith(altPrefix))
{
// Also move alternate prefixed properties too
passThru.put(key.substring(altPrefix.length()), antProps.get(key));
@@ -365,10 +375,10 @@
}
try
{
- log("Attempting to write out properties to " + passThruProps, Project.MSG_VERBOSE);
+ log("writePassThruProps attempting to write to " + passThruProps, Project.MSG_VERBOSE);
// If we can write the props out to disk...
passThru.save(new FileOutputStream(passThruProps),
- "XSLTestAntTask.writePassThruProps() for use by test " + testClass);
+ "XSLTestAntTask.writePassThruProps() generated for use by test " + testClass);
// ... then also force -load of this file into test's command line
commandLineJava.createArgument().setLine("-load " + passThruProps);
@@ -399,7 +409,7 @@
{
// Log out our version info: useful for debugging, since
// the wrong version of this class can easily get loaded
- log("XSLTestAntTask: $Id: XSLTestAntTask.java,v 1.2 2001/07/25 18:28:13 curcuru Exp $", Project.MSG_VERBOSE);
+ log("XSLTestAntTask: $Id: XSLTestAntTask.java,v 1.3 2001/08/08 13:28:06 curcuru Exp $", Project.MSG_VERBOSE);
// Call worker method to create and write prop file
// This passes thru both default 'qetest.' properties as
1.3 +95 -94 xml-xalan/test/java/src/org/apache/qetest/xsl/XSLTestAntTask.class
<<Binary file>>
---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-cvs-help@xml.apache.org