ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mben...@apache.org
Subject svn commit: r537023 - in /ant/core/trunk/src: main/org/apache/tools/ant/filters/StripLineComments.java tests/antunit/filters/striplinecomments-test.xml
Date Thu, 10 May 2007 22:35:29 GMT
Author: mbenson
Date: Thu May 10 15:35:27 2007
New Revision: 537023

URL: http://svn.apache.org/viewvc?view=rev&rev=537023
Log:
exclusivity

Modified:
    ant/core/trunk/src/main/org/apache/tools/ant/filters/StripLineComments.java
    ant/core/trunk/src/tests/antunit/filters/striplinecomments-test.xml

Modified: ant/core/trunk/src/main/org/apache/tools/ant/filters/StripLineComments.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/filters/StripLineComments.java?view=diff&rev=537023&r1=537022&r2=537023
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/filters/StripLineComments.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/filters/StripLineComments.java Thu May 10
15:35:27 2007
@@ -208,6 +208,9 @@
          * Must not be <code>null</code>.
          */
         public final void setValue(String comment) {
+            if (value != null) {
+                throw new IllegalStateException("Comment value already set.");
+            }
             value = comment;
         }
 

Modified: ant/core/trunk/src/tests/antunit/filters/striplinecomments-test.xml
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/tests/antunit/filters/striplinecomments-test.xml?view=diff&rev=537023&r1=537022&r2=537023
==============================================================================
--- ant/core/trunk/src/tests/antunit/filters/striplinecomments-test.xml (original)
+++ ant/core/trunk/src/tests/antunit/filters/striplinecomments-test.xml Thu May 10 15:35:27
2007
@@ -55,4 +55,14 @@
     </test>
   </target>
 
+  <target name="testExclusivity">
+    <au:expectfailure>
+      <filterchain>
+        <striplinecomments>
+          <comment value="#">#"</comment>
+        </striplinecomments>
+      </filterchain>
+    </au:expectfailure>
+  </target>
+
 </project>



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message