You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by eb...@apache.org on 2011/11/11 22:34:36 UTC
svn commit: r1201060 -
/commons/sandbox/csv/trunk/src/main/java/org/apache/commons/csv/CSVFormat.java
Author: ebourg
Date: Fri Nov 11 21:34:36 2011
New Revision: 1201060
URL: http://svn.apache.org/viewvc?rev=1201060&view=rev
Log:
Changed the return type of CSVFormat.clone()
Modified:
commons/sandbox/csv/trunk/src/main/java/org/apache/commons/csv/CSVFormat.java
Modified: commons/sandbox/csv/trunk/src/main/java/org/apache/commons/csv/CSVFormat.java
URL: http://svn.apache.org/viewvc/commons/sandbox/csv/trunk/src/main/java/org/apache/commons/csv/CSVFormat.java?rev=1201060&r1=1201059&r2=1201060&view=diff
==============================================================================
--- commons/sandbox/csv/trunk/src/main/java/org/apache/commons/csv/CSVFormat.java (original)
+++ commons/sandbox/csv/trunk/src/main/java/org/apache/commons/csv/CSVFormat.java Fri Nov 11 21:34:36 2011
@@ -101,7 +101,7 @@ public class CSVFormat implements Clonea
}
public CSVFormat withDelimiter(char delimiter) {
- CSVFormat format = (CSVFormat) clone();
+ CSVFormat format = clone();
format.delimiter = delimiter;
return format;
}
@@ -111,7 +111,7 @@ public class CSVFormat implements Clonea
}
public CSVFormat withEncapsulator(char encapsulator) {
- CSVFormat format = (CSVFormat) clone();
+ CSVFormat format = clone();
format.encapsulator = encapsulator;
return format;
}
@@ -125,7 +125,7 @@ public class CSVFormat implements Clonea
}
public CSVFormat withCommentStart(char commentStart) {
- CSVFormat format = (CSVFormat) clone();
+ CSVFormat format = clone();
format.commentStart = commentStart;
return format;
}
@@ -139,7 +139,7 @@ public class CSVFormat implements Clonea
}
public CSVFormat withEscape(char escape) {
- CSVFormat format = (CSVFormat) clone();
+ CSVFormat format = clone();
format.escape = escape;
return format;
}
@@ -153,7 +153,7 @@ public class CSVFormat implements Clonea
}
public CSVFormat withLeadingSpacesIgnored(boolean leadingSpacesIgnored) {
- CSVFormat format = (CSVFormat) clone();
+ CSVFormat format = clone();
format.leadingSpacesIgnored = leadingSpacesIgnored;
return format;
}
@@ -163,7 +163,7 @@ public class CSVFormat implements Clonea
}
public CSVFormat withTrailingSpacesIgnored(boolean trailingSpacesIgnored) {
- CSVFormat format = (CSVFormat) clone();
+ CSVFormat format = clone();
format.trailingSpacesIgnored = trailingSpacesIgnored;
return format;
}
@@ -173,7 +173,7 @@ public class CSVFormat implements Clonea
}
public CSVFormat withUnicodeEscapesInterpreted(boolean unicodeEscapesInterpreted) {
- CSVFormat format = (CSVFormat) clone();
+ CSVFormat format = clone();
format.unicodeEscapesInterpreted = unicodeEscapesInterpreted;
return format;
}
@@ -183,7 +183,7 @@ public class CSVFormat implements Clonea
}
public CSVFormat withEmptyLinesIgnored(boolean emptyLinesIgnored) {
- CSVFormat format = (CSVFormat) clone();
+ CSVFormat format = clone();
format.emptyLinesIgnored = emptyLinesIgnored;
return format;
}
@@ -193,14 +193,14 @@ public class CSVFormat implements Clonea
}
public CSVFormat withLineSeparator(String lineSeparator) {
- CSVFormat format = (CSVFormat) clone();
+ CSVFormat format = clone();
format.lineSeparator = lineSeparator;
return format;
}
- protected Object clone() {
+ protected CSVFormat clone() {
try {
- return super.clone();
+ return (CSVFormat) super.clone();
} catch (CloneNotSupportedException e) {
throw (Error) new InternalError().initCause(e);
}