Skip to content

Commit b73040f

Browse files
committed
make CSVStrategy cloneable and serializable: SANDBOX-181
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/sandbox/csv/trunk@477490 13f79535-47bb-0310-9956-ffa450edef68
1 parent ebd9f0e commit b73040f

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

src/java/org/apache/commons/csv/CSVStrategy.java

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,14 @@
1616
*/
1717
package org.apache.commons.csv;
1818

19+
import java.io.Serializable;
20+
1921
/**
2022
* CSVStrategy
2123
*
2224
* Represents the strategy for a CSV.
2325
*/
24-
public class CSVStrategy {
26+
public class CSVStrategy implements Cloneable, Serializable {
2527

2628
private char delimiter;
2729
private char encapsulator;
@@ -88,4 +90,11 @@ public CSVStrategy(
8890
public void setIgnoreEmptyLines(boolean ignoreEmptyLines) { this.ignoreEmptyLines = ignoreEmptyLines; }
8991
public boolean getIgnoreEmptyLines() { return this.ignoreEmptyLines; }
9092

93+
public Object clone() {
94+
try {
95+
return super.clone();
96+
} catch (CloneNotSupportedException e) {
97+
throw new RuntimeException(e); // impossible
98+
}
99+
}
91100
}

0 commit comments

Comments
 (0)