Author: ggregory Date: Tue Sep 11 19:30:21 2012 New Revision: 1383569 URL: http://svn.apache.org/viewvc?rev=1383569&view=rev Log: Replace empty throws that "should not happen" with an IllegalStateException.
Modified: commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/CSVFormat.java Modified: commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/CSVFormat.java URL: http://svn.apache.org/viewvc/commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/CSVFormat.java?rev=1383569&r1=1383568&r2=1383569&view=diff ============================================================================== --- commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/CSVFormat.java (original) +++ commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/CSVFormat.java Tue Sep 11 19:30:21 2012 @@ -431,11 +431,11 @@ public class CSVFormat implements Serial StringWriter out = new StringWriter(); try { new CSVPrinter(out, this).println(values); + return out.toString().trim(); } catch (IOException e) { // should not happen - } - - return out.toString().trim(); + throw new IllegalStateException(e); + } } @Override