Author: ggregory
Date: Sat Oct 13 06:28:47 2012
New Revision: 1397784

URL: http://svn.apache.org/viewvc?rev=1397784&view=rev
Log:
Rename ivar to ignoreSurroundingSpaces to match CSVFormat.

Modified:
    commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/CSVLexer.java
    commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/Lexer.java
    
commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVLexer1306663.java
    
commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVLexer1306667.java
    commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVLexer3.java

Modified: 
commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/CSVLexer.java
URL: 
http://svn.apache.org/viewvc/commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/CSVLexer.java?rev=1397784&r1=1397783&r2=1397784&view=diff
==============================================================================
--- commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/CSVLexer.java 
(original)
+++ commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/CSVLexer.java 
Sat Oct 13 06:28:47 2012
@@ -90,7 +90,7 @@ class CSVLexer extends Lexer {
         // important: make sure a new char gets consumed in each iteration
         while (token.type == INVALID) {
             // ignore whitespaces at beginning of a token
-            if (surroundingSpacesIgnored) {
+            if (ignoreSurroundingSpaces) {
                 while (isWhitespace(c) && !eol) {
                     c = in.read();
                     eol = isEndOfLine(c);
@@ -163,7 +163,7 @@ class CSVLexer extends Lexer {
             }
         }
 
-        if (surroundingSpacesIgnored) {
+        if (ignoreSurroundingSpaces) {
             trimTrailingSpaces(tkn.content);
         }
 

Modified: 
commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/Lexer.java
URL: 
http://svn.apache.org/viewvc/commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/Lexer.java?rev=1397784&r1=1397783&r2=1397784&view=diff
==============================================================================
--- commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/Lexer.java 
(original)
+++ commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/Lexer.java 
Sat Oct 13 06:28:47 2012
@@ -37,7 +37,7 @@ abstract class Lexer {
     private final Character encapsulator;
     private final Character commmentStart;
 
-    final boolean surroundingSpacesIgnored;
+    final boolean ignoreSurroundingSpaces;
     final boolean emptyLinesIgnored;
 
     final CSVFormat format;
@@ -52,7 +52,7 @@ abstract class Lexer {
         this.escape = format.getEscape();
         this.encapsulator = format.getEncapsulator();
         this.commmentStart = format.getCommentStart();
-        this.surroundingSpacesIgnored = format.getIgnoreSurroundingSpaces();
+        this.ignoreSurroundingSpaces = format.getIgnoreSurroundingSpaces();
         this.emptyLinesIgnored = format.getIgnoreEmptyLines();
     }
 

Modified: 
commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVLexer1306663.java
URL: 
http://svn.apache.org/viewvc/commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVLexer1306663.java?rev=1397784&r1=1397783&r2=1397784&view=diff
==============================================================================
--- 
commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVLexer1306663.java
 (original)
+++ 
commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVLexer1306663.java
 Sat Oct 13 06:28:47 2012
@@ -90,7 +90,7 @@ class CSVLexer1306663 extends Lexer {
         //  important: make sure a new char gets consumed in each iteration
         while (tkn.type == INVALID) {
             // ignore whitespaces at beginning of a token
-            if (surroundingSpacesIgnored) {
+            if (ignoreSurroundingSpaces) {
                 while (isWhitespace(c) && !eol) {
                     c = in.read();
                     eol = isEndOfLine(c);
@@ -161,7 +161,7 @@ class CSVLexer1306663 extends Lexer {
             }
         }
 
-        if (surroundingSpacesIgnored) {
+        if (ignoreSurroundingSpaces) {
             trimTrailingSpaces(tkn.content);
         }
 

Modified: 
commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVLexer1306667.java
URL: 
http://svn.apache.org/viewvc/commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVLexer1306667.java?rev=1397784&r1=1397783&r2=1397784&view=diff
==============================================================================
--- 
commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVLexer1306667.java
 (original)
+++ 
commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVLexer1306667.java
 Sat Oct 13 06:28:47 2012
@@ -90,7 +90,7 @@ class CSVLexer1306667 extends Lexer {
         //  important: make sure a new char gets consumed in each iteration
         while (tkn.type == INVALID) {
             // ignore whitespaces at beginning of a token
-            if (surroundingSpacesIgnored) {
+            if (ignoreSurroundingSpaces) {
                 while (isWhitespace(c) && !eol) {
                     c = in.read();
                     eol = isEndOfLine(c);
@@ -161,7 +161,7 @@ class CSVLexer1306667 extends Lexer {
             }
         }
 
-        if (surroundingSpacesIgnored) {
+        if (ignoreSurroundingSpaces) {
             trimTrailingSpaces(tkn.content);
         }
 

Modified: 
commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVLexer3.java
URL: 
http://svn.apache.org/viewvc/commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVLexer3.java?rev=1397784&r1=1397783&r2=1397784&view=diff
==============================================================================
--- 
commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVLexer3.java 
(original)
+++ 
commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVLexer3.java 
Sat Oct 13 06:28:47 2012
@@ -133,7 +133,7 @@ class CSVLexer3 extends Lexer {
                             state = State.PLAIN;
                             break;
                         case WHITESPACE:
-                            if (!surroundingSpacesIgnored){
+                            if (!ignoreSurroundingSpaces){
                                 tkn.content.append((char) intch);
                                 state = State.PLAIN;
                             }
@@ -155,7 +155,7 @@ class CSVLexer3 extends Lexer {
                             state = State.ESCAPE_PLAIN;
                             break;
                         default:
-                            trimTrailingSpaces = surroundingSpacesIgnored; // 
we have a plain token
+                            trimTrailingSpaces = ignoreSurroundingSpaces; // 
we have a plain token
                             tkn.content.append((char) intch);
                             break;
                     }
@@ -191,7 +191,7 @@ class CSVLexer3 extends Lexer {
                             state = State.INQUOTE;
                             break;
                         case WHITESPACE: // trailing whitespace may be allowed
-                            if (!surroundingSpacesIgnored) {
+                            if (!ignoreSurroundingSpaces) {
                                 // error invalid char between token and next 
delimiter
                                 throw new IOException("(line " + 
getLineNumber() + ") invalid char between encapsulated token and delimiter");
                             }


Reply via email to