[
https://issues.apache.org/jira/browse/CSV-302?focusedWorklogId=818609&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-818609
]
ASF GitHub Bot logged work on CSV-302:
--------------------------------------
Author: ASF GitHub Bot
Created on: 19/Oct/22 21:26
Start Date: 19/Oct/22 21:26
Worklog Time Spent: 10m
Work Description: sman-81 commented on code in PR #276:
URL: https://github.com/apache/commons-csv/pull/276#discussion_r999947561
##########
src/test/java/org/apache/commons/csv/CSVFormatSerializationTest.java:
##########
@@ -0,0 +1,54 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.commons.csv;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertInstanceOf;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.ObjectInputStream;
+
+import org.junit.jupiter.params.ParameterizedTest;
+import org.junit.jupiter.params.provider.CsvSource;
+
+/**
+ * Test deserialization of class {@link CSVFormat}.
+ */
+class CSVFormatSerializationTest {
Review Comment:
JUnit does not require that... I'll revert to `public`
Issue Time Tracking
-------------------
Worklog Id: (was: 818609)
Time Spent: 1h 40m (was: 1.5h)
> CSVFormat.duplicateHeaderMode requires default for backward compatibility
> -------------------------------------------------------------------------
>
> Key: CSV-302
> URL: https://issues.apache.org/jira/browse/CSV-302
> Project: Commons CSV
> Issue Type: Bug
> Components: Parser
> Affects Versions: 1.10.0
> Reporter: Markus Spann
> Priority: Minor
> Time Spent: 1h 40m
> Remaining Estimate: 0h
>
> The member in class {{CSVFormat}}
> {code:java}
> boolean allowDuplicateHeaderNames{code}
> was recently replaced by
> {code:java}
> DuplicateHeaderMode duplicateHeaderMode{code}
> The boolean defaults to {{{}false{}}}, while the member of type
> {{DuplicateHeaderMode}} defaults to {{{}null{}}}.
> {{duplicateHeaderMode}} must be initialized with {{DISALLOW}} for backward
> compatibility.
> The change is also problematic with regards to serialization. The class is
> serializable and {{serialVersionUID}} is unchanged between versions. The
> boolean setting {{allowDuplicateHeaderNames}} in an object serialized in
> version 1.9.0 or earlier would always be de-serialized to
> {{duplicateHeaderMode = null}} in the current head.
> To handle the code changes correctly, customized de-serialization would need
> to be implemented.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)