Author: sebb
Date: Wed Apr 17 10:31:57 2013
New Revision: 1468827

URL: http://svn.apache.org/r1468827
Log:
Standardise on record rather than line; fix incorrect Javadoc comments

Modified:
    
commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/CSVPrinter.java

Modified: 
commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/CSVPrinter.java
URL: 
http://svn.apache.org/viewvc/commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/CSVPrinter.java?rev=1468827&r1=1468826&r2=1468827&view=diff
==============================================================================
--- 
commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/CSVPrinter.java 
(original)
+++ 
commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/CSVPrinter.java 
Wed Apr 17 10:31:57 2013
@@ -40,8 +40,8 @@ public class CSVPrinter implements Flush
     private final Appendable out;
     private final CSVFormat format;
 
-    /** True if we just began a new line. */
-    private boolean newLine = true;
+    /** True if we just began a new record. */
+    private boolean newRecord = true;
 
     /**
      * Creates a printer that will print values to the given stream following 
the CSVFormat.
@@ -66,14 +66,14 @@ public class CSVPrinter implements Flush
     // ======================================================
 
     /**
-     * Outputs the line separator.
+     * Outputs the record separator.
      *
      * @throws IOException
      *             If an I/O error occurs
      */
     public void println() throws IOException {
         out.append(format.getRecordSeparator());
-        newLine = true;
+        newRecord = true;
     }
 
     /**
@@ -136,7 +136,7 @@ public class CSVPrinter implements Flush
         if (!format.isCommentingEnabled()) {
             return;
         }
-        if (!newLine) {
+        if (!newRecord) {
             println();
         }
         out.append(format.getCommentStart().charValue());
@@ -175,8 +175,8 @@ public class CSVPrinter implements Flush
     }
 
     void printDelimiter() throws IOException {
-        if (newLine) {
-            newLine = false;
+        if (newRecord) {
+            newRecord = false;
         } else {
             out.append(format.getDelimiter());
         }
@@ -228,7 +228,7 @@ public class CSVPrinter implements Flush
      */
     void printAndQuote(final Object object, final CharSequence value,
             final int offset, final int len) throws IOException {
-        final boolean first = newLine; // is this the first value on this line?
+        final boolean first = newRecord; // is this the first value on this 
line?
         boolean quote = false;
         int start = offset;
         int pos = offset;


Reply via email to