commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1511868 - in /commons/proper/csv/trunk/src: main/java/org/apache/commons/csv/CSVParser.java test/java/org/apache/commons/csv/CSVParserTest.java
Date Thu, 08 Aug 2013 16:52:01 GMT
Author: ggregory
Date: Thu Aug  8 16:52:00 2013
New Revision: 1511868

URL: http://svn.apache.org/r1511868
Log:
Remove org.apache.commons.csv.CSVParser.parseString(String).

Modified:
    commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/CSVParser.java
    commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVParserTest.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=1511868&r1=1511867&r2=1511868&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 Thu Aug 
8 16:52:00 2013
@@ -161,19 +161,6 @@ public final class CSVParser implements 
     }
 
     /**
-     * Creates a parser for the given {@link String} using the default format {@link CSVFormat#DEFAULT}.
-     *
-     * @param string
-     *            a CSV string
-     * @return a new parser
-     * @throws IOException
-     *             If an I/O error occurs
-     */
-    public static CSVParser parseString(String string) throws IOException {
-        return parseString(string, CSVFormat.DEFAULT);
-    }
-
-    /**
      * Creates a parser for the given {@link String}.
      *
      * @param string

Modified: commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVParserTest.java
URL: http://svn.apache.org/viewvc/commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVParserTest.java?rev=1511868&r1=1511867&r2=1511868&view=diff
==============================================================================
--- commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVParserTest.java (original)
+++ commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVParserTest.java Thu Aug
 8 16:52:00 2013
@@ -175,7 +175,7 @@ public class CSVParserTest {
                 {"world", ""}
         };
         for (final String code : codes) {
-            final CSVParser parser = CSVParser.parseString(code);
+            final CSVParser parser = CSVParser.parseString(code, CSVFormat.DEFAULT);
             final List<CSVRecord> records = parser.getRecords();
             assertEquals(res.length, records.size());
             assertTrue(records.size() > 0);
@@ -269,7 +269,7 @@ public class CSVParserTest {
                 {"a\\", "b"},  // a backslash must be returnd
                 {"a\\\\,b"}    // backslash in quotes only escapes a delimiter (",")
         };
-        final CSVParser parser = CSVParser.parseString(code);
+        final CSVParser parser = CSVParser.parseString(code, CSVFormat.DEFAULT);
         final List<CSVRecord> records = parser.getRecords();
         assertEquals(res.length, records.size());
         assertTrue(records.size() > 0);
@@ -408,7 +408,7 @@ public class CSVParserTest {
     @Test
     public void testCarriageReturnEndings() throws IOException {
         final String code = "foo\rbaar,\rhello,world\r,kanu";
-        final CSVParser parser = CSVParser.parseString(code);
+        final CSVParser parser = CSVParser.parseString(code, CSVFormat.DEFAULT);
         final List<CSVRecord> records = parser.getRecords();
         assertEquals(4, records.size());
     }
@@ -416,7 +416,7 @@ public class CSVParserTest {
     @Test
     public void testLineFeedEndings() throws IOException {
         final String code = "foo\nbaar,\nhello,world\n,kanu";
-        final CSVParser parser = CSVParser.parseString(code);
+        final CSVParser parser = CSVParser.parseString(code, CSVFormat.DEFAULT);
         final List<CSVRecord> records = parser.getRecords();
         assertEquals(4, records.size());
     }
@@ -426,7 +426,7 @@ public class CSVParserTest {
         final String code = "\nfoo,baar\n\r\n,\n\n,world\r\n\n";
         //String code = "world\r\n\n";
         //String code = "foo;baar\r\n\r\nhello;\r\n\r\nworld;\r\n";
-        final CSVParser parser = CSVParser.parseString(code);
+        final CSVParser parser = CSVParser.parseString(code, CSVFormat.DEFAULT);
         final List<CSVRecord> records = parser.getRecords();
         assertEquals(3, records.size());
     }



Mime
View raw message