You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2016/01/18 23:02:05 UTC
svn commit: r1725358 - in /commons/proper/csv/trunk/src: changes/changes.xml
main/java/org/apache/commons/csv/CSVParser.java
Author: ggregory
Date: Mon Jan 18 22:02:05 2016
New Revision: 1725358
URL: http://svn.apache.org/viewvc?rev=1725358&view=rev
Log:
[CSV-169] The null string should be case-sensitive when reading records. Also simplify branch test.
Modified:
commons/proper/csv/trunk/src/changes/changes.xml
commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/CSVParser.java
Modified: commons/proper/csv/trunk/src/changes/changes.xml
URL: http://svn.apache.org/viewvc/commons/proper/csv/trunk/src/changes/changes.xml?rev=1725358&r1=1725357&r2=1725358&view=diff
==============================================================================
--- commons/proper/csv/trunk/src/changes/changes.xml (original)
+++ commons/proper/csv/trunk/src/changes/changes.xml Mon Jan 18 22:02:05 2016
@@ -41,6 +41,7 @@
<release version="1.3" date="2015-MM-DD" description="Feature and bug fix release">
<action issue="CSV-153" type="update" dev="britter" due-to="Wren">CSVPrinter doesn't skip creation of header record if skipHeaderRecord is set to true</action>
<action issue="CSV-159" type="add" dev="ggregory" due-to="Yamil Medina">Add IgnoreCase option for accessing header names</action>
+ <action issue="CSV-169" type="add" dev="ggregory" due-to="Gary Gregory">The null string should be case-sensitive when reading records</action>
</release>
<release version="1.2" date="2015-08-24" description="Feature and bug fix release">
<action issue="CSV-145" type="fix" dev="ggregory" due-to="Frank Ulbricht">CSVFormat.with* methods clear the header comments</action>
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=1725358&r1=1725357&r2=1725358&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 Mon Jan 18 22:02:05 2016
@@ -289,11 +289,7 @@ public final class CSVParser implements
private void addRecordValue() {
final String input = this.reusableToken.content.toString();
final String nullString = this.format.getNullString();
- if (nullString == null) {
- this.record.add(input);
- } else {
- this.record.add(input.equalsIgnoreCase(nullString) ? null : input);
- }
+ this.record.add(input.equals(nullString) ? null : input);
}
/**