Skip to content

Commit da8bad9

Browse files
committed
Bump CSVFormat#serialVersionUID from 1 to 2
Javadoc Serialization in CSVFormat is not supported from one version to the next.
1 parent 37946b2 commit da8bad9

3 files changed

Lines changed: 22 additions & 4 deletions

File tree

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@
180180
<commons.pmd-impl.version>6.50.0</commons.pmd-impl.version>
181181
<commons.jacoco.version>0.8.8</commons.jacoco.version>
182182
<commons.spotbugs.version>4.7.2.1</commons.spotbugs.version>
183-
<commons.spotbugs.impl.version>4.7.2</commons.spotbugs.impl.version>
183+
<commons.spotbugs.impl.version>4.7.3</commons.spotbugs.impl.version>
184184
<commons.japicmp.version>0.16.0</commons.japicmp.version>
185185
<commons.javadoc.version>3.4.1</commons.javadoc.version>
186186
<commons.biz.aQute.bndlib.version>6.3.1</commons.biz.aQute.bndlib.version>

src/changes/changes.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,9 @@
5050
<action issue="CSV-274" type="fix" dev="ggregory" due-to="Peter Hull, Bruno P. Kinoshita, Gary Gregory">Add comments to iterator() and stream() #270.</action>
5151
<action issue="CSV-290" type="fix" dev="ggregory" due-to="angusdev, Gary Gregory">Fix wrong assumptions in PostgreSQL formats #265.</action>
5252
<action type="fix" dev="ggregory" due-to="Mykola Faryma">Validate input to setDelimiter(String) for empty string #266.</action>
53+
<action type="fix" dev="ggregory" due-to="Dependabot">Bump CSVFormat#serialVersionUID from 1 to 2.</action>
54+
<!-- REMOVE -->
55+
<action type="remove" dev="ggregory">Serialization in CSVFormat is not supported from one version to the next.</action>
5356
<!-- ADD -->
5457
<action issue="CSV-291" type="add" dev="ggregory" due-to="Gary Gregory">Make CSVRecord#values() public.</action>
5558
<action issue="CSV-264" type="add" dev="ggregory" due-to="Sagar Tiwari, Seth Falco, Alex Herbert, Gary Gregory">Add DuplicateHeaderMode for flexibility with header strictness. #114.</action>

src/main/java/org/apache/commons/csv/CSVFormat.java

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -154,8 +154,23 @@
154154
* This makes your code impervious to changes in column order in the CSV file.
155155
* </p>
156156
*
157-
* <h2>Notes</h2>
157+
* <h2>Serialization</h2>
158+
* <p>
159+
* This class implements the {@link Serializable} interface with the following caveats:
160+
* </p>
161+
* <ul>
162+
* <li>This class will no longer implement Serializable in 2.0.</li>
163+
* <li>Serialization is not supported from one version to the next.</li>
164+
* </ul>
165+
* <p>
166+
* The {@code serialVersionUID} values are:
167+
* </p>
168+
* <ul>
169+
* <li>Version 1.10.0: {@code 2L}</li>
170+
* <li>Version 1.9.0 through 1.0: {@code 1L}</li>
171+
* </ul>
158172
*
173+
* <h2>Notes</h2>
159174
* <p>
160175
* This class is immutable.
161176
* </p>
@@ -1137,7 +1152,7 @@ public CSVFormat getFormat() {
11371152
*/
11381153
public static final CSVFormat RFC4180 = DEFAULT.builder().setIgnoreEmptyLines(false).build();
11391154

1140-
private static final long serialVersionUID = 1L;
1155+
private static final long serialVersionUID = 2L;
11411156

11421157
/**
11431158
* Tab-delimited format.
@@ -1222,7 +1237,7 @@ private static boolean isTrimChar(final char ch) {
12221237
return ch <= SP;
12231238
}
12241239

1225-
private static boolean isTrimChar(final CharSequence charSequence, int pos) {
1240+
private static boolean isTrimChar(final CharSequence charSequence, final int pos) {
12261241
return isTrimChar(charSequence.charAt(pos));
12271242
}
12281243

0 commit comments

Comments
 (0)