Author: britter
Date: Tue Jul 15 17:42:06 2014
New Revision: 1610769

URL: http://svn.apache.org/r1610769
Log:
Remove needless method

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=1610769&r1=1610768&r2=1610769&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 
Tue Jul 15 17:42:06 2014
@@ -324,26 +324,8 @@ public final class CSVParser implements 
      *             on parse error or input read-failure
      */
     public List<CSVRecord> getRecords() throws IOException {
-        return getRecords(new ArrayList<CSVRecord>());
-    }
-
-    /**
-     * Parses the CSV input according to the given format and adds the content 
to the collection of {@link CSVRecord
-     * CSVRecords}.
-     *
-     * <p>
-     * The returned content starts at the current parse-position in the stream.
-     * </p>
-     *
-     * @param records
-     *            The collection to add to.
-     * @param <T> the type of collection used.
-     * @return a collection of {@link CSVRecord CSVRecords}, may be empty
-     * @throws IOException
-     *             on parse error or input read-failure
-     */
-    public <T extends Collection<CSVRecord>> T getRecords(final T records) 
throws IOException {
         CSVRecord rec;
+        List<CSVRecord> records = new ArrayList<>();
         while ((rec = this.nextRecord()) != null) {
             records.add(rec);
         }

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=1610769&r1=1610768&r2=1610769&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
 Tue Jul 15 17:42:06 2014
@@ -531,14 +531,6 @@ public class CSVParserTest {
         parser.close();
     }
 
-    @Test
-    public void testGetOneLineCustomCollection() throws IOException {
-        final CSVParser parser = CSVParser.parse(CSV_INPUT_1, 
CSVFormat.DEFAULT);
-        final CSVRecord record = parser.getRecords(new 
LinkedList<CSVRecord>()).getFirst();
-        assertArrayEquals(RESULT[0], record.values());
-        parser.close();
-    }
-
     /**
      * Tests reusing a parser to process new string records one at a time as 
they are being discovered. See [CSV-110].
      *


Reply via email to