peterreilly 2004/01/19 04:11:50 Modified: src/main/org/apache/tools/ant/taskdefs Tag: ANT_16_BRANCH MacroDef.java MacroInstance.java docs/manual/CoreTasks Tag: ANT_16_BRANCH macrodef.html src/etc/testcases/taskdefs Tag: ANT_16_BRANCH macrodef.xml src/testcases/org/apache/tools/ant/taskdefs Tag: ANT_16_BRANCH MacroDefTest.java Log: Sync with HEAD Revision Changes Path No revision No revision 1.7.2.11 +1 -1 ant/src/main/org/apache/tools/ant/taskdefs/MacroDef.java Index: MacroDef.java =================================================================== RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/MacroDef.java,v retrieving revision 1.7.2.10 retrieving revision 1.7.2.11 diff -u -r1.7.2.10 -r1.7.2.11 --- MacroDef.java 12 Jan 2004 08:17:28 -0000 1.7.2.10 +++ MacroDef.java 19 Jan 2004 12:11:49 -0000 1.7.2.11 @@ -395,7 +395,7 @@ throw new BuildException( "Illegal name [" + name + "] for attribute"); } - this.name = name; + this.name = name.toLowerCase(Locale.US); } /** 1.5.2.10 +2 -2 ant/src/main/org/apache/tools/ant/taskdefs/MacroInstance.java Index: MacroInstance.java =================================================================== RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/MacroInstance.java,v retrieving revision 1.5.2.9 retrieving revision 1.5.2.10 diff -u -r1.5.2.9 -r1.5.2.10 --- MacroInstance.java 22 Dec 2003 10:08:58 -0000 1.5.2.9 +++ MacroInstance.java 19 Jan 2004 12:11:49 -0000 1.5.2.10 @@ -1,7 +1,7 @@ /* * The Apache Software License, Version 1.1 * - * Copyright (c) 2003 The Apache Software Foundation. All rights + * Copyright (c) 2003-2004 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without @@ -277,7 +277,7 @@ while (e.hasMoreElements()) { RuntimeConfigurable r = (RuntimeConfigurable) e.nextElement(); UnknownElement unknownElement = (UnknownElement) r.getProxy(); - String tag = unknownElement.getTaskType(); + String tag = unknownElement.getTaskType().toLowerCase(Locale.US); MacroDef.TemplateElement templateElement = (MacroDef.TemplateElement) getNsElements().get(tag); if (templateElement == null) { No revision No revision 1.2.2.9 +3 -0 ant/docs/manual/CoreTasks/macrodef.html Index: macrodef.html =================================================================== RCS file: /home/cvs/ant/docs/manual/CoreTasks/macrodef.html,v retrieving revision 1.2.2.8 retrieving revision 1.2.2.9 diff -u -r1.2.2.8 -r1.2.2.9 --- macrodef.html 12 Jan 2004 08:17:28 -0000 1.2.2.8 +++ macrodef.html 19 Jan 2004 12:11:49 -0000 1.2.2.9 @@ -99,6 +99,9 @@ The contents of the nested elements of the task instance are placed in the templated task at the tag name. </p> + <p> + The case of the element name is ignored. + </p> <h3>Parameters</h3> <table border="1" cellpadding="2" cellspacing="0"> <tr> No revision No revision 1.2.2.5 +15 -0 ant/src/etc/testcases/taskdefs/macrodef.xml Index: macrodef.xml =================================================================== RCS file: /home/cvs/ant/src/etc/testcases/taskdefs/macrodef.xml,v retrieving revision 1.2.2.4 retrieving revision 1.2.2.5 diff -u -r1.2.2.4 -r1.2.2.5 --- macrodef.xml 22 Dec 2003 10:08:58 -0000 1.2.2.4 +++ macrodef.xml 19 Jan 2004 12:11:49 -0000 1.2.2.5 @@ -86,4 +86,19 @@ <ignore myattribute="a"/> <ignore Myattribute="b"/> </target> + + <target name="ignore-element-case"> + <macrodef name="ignore"> + <element name="MyElement"/> + <sequential> + <myElement/> + <MyElEmEnT/> + </sequential> + </macrodef> + <ignore> + <MYELEMENT> + <echo>nested element</echo> + </MYELEMENT> + </ignore> + </target> </project> No revision No revision 1.2.2.5 +7 -1 ant/src/testcases/org/apache/tools/ant/taskdefs/MacroDefTest.java Index: MacroDefTest.java =================================================================== RCS file: /home/cvs/ant/src/testcases/org/apache/tools/ant/taskdefs/MacroDefTest.java,v retrieving revision 1.2.2.4 retrieving revision 1.2.2.5 diff -u -r1.2.2.4 -r1.2.2.5 --- MacroDefTest.java 22 Dec 2003 10:08:58 -0000 1.2.2.4 +++ MacroDefTest.java 19 Jan 2004 12:11:50 -0000 1.2.2.5 @@ -1,7 +1,7 @@ /* * The Apache Software License, Version 1.1 * - * Copyright (c) 2003 The Apache Software Foundation. All rights + * Copyright (c) 2003-2004 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without @@ -108,6 +108,12 @@ expectLog( "ignorecase", "a is ab is b"); + } + + public void testIgnoreElementCase() { + expectLog( + "ignore-element-case", + "nested elementnested element"); } }
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]