Skip to content

Commit 9fb2b4f

Browse files
committed
CSV-79 - CSVFormat.isCommentingDisabled() is confusing/confused
renamed method to isCommentingEnabled and fixed code git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1303483 13f79535-47bb-0310-9956-ffa450edef68
1 parent d0035e6 commit 9fb2b4f

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -232,8 +232,8 @@ public CSVFormat withCommentStart(char commentStart) {
232232
*
233233
* @return <tt>true</tt> is comments are supported, <tt>false</tt> otherwise
234234
*/
235-
public boolean isCommentingDisabled() {
236-
return this.commentStart == DISABLED;
235+
public boolean isCommentingEnabled() {
236+
return this.commentStart != DISABLED;
237237
}
238238

239239
/**

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ public void println(String... values) throws IOException {
9898
* @param comment the comment to output
9999
*/
100100
public void printComment(String comment) throws IOException {
101-
if (format.isCommentingDisabled()) {
101+
if (!format.isCommentingEnabled()) {
102102
return;
103103
}
104104
if (!newLine) {

0 commit comments

Comments
 (0)