commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benedikt Ritter <benerit...@googlemail.com>
Subject Re: svn commit: r1300661 - /commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/CSVParser.java
Date Wed, 14 Mar 2012 19:33:35 GMT
Am 14. März 2012 18:43 schrieb  <sebb@apache.org>:
> Author: sebb
> Date: Wed Mar 14 17:43:35 2012
> New Revision: 1300661
>
> URL: http://svn.apache.org/viewvc?rev=1300661&view=rev
> Log:
> CSV-60 CSVParser.iterator().remove() should throw throw new UnsupportedOperationException()
>

is it reasonable to add a unit test, that makes sure an
UnsupportedOperationException is thrown?

> Modified:
>    commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/CSVParser.java
>
> Modified: commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/CSVParser.java
> URL: http://svn.apache.org/viewvc/commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/CSVParser.java?rev=1300661&r1=1300660&r2=1300661&view=diff
> ==============================================================================
> --- commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/CSVParser.java (original)
> +++ commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/CSVParser.java Wed
Mar 14 17:43:35 2012
> @@ -212,7 +212,9 @@ public class CSVParser implements Iterab
>                 }
>             }
>
> -            public void remove() { }
> +            public void remove() {
> +                throw new UnsupportedOperationException();
> +            }
>         };
>     }
>
>
>

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


Mime
View raw message