Author: sebb Date: Wed Mar 21 18:13:54 2012 New Revision: 1303483 URL: http://svn.apache.org/viewvc?rev=1303483&view=rev Log: CSV-79 - CSVFormat.isCommentingDisabled() is confusing/confused renamed method to isCommentingEnabled and fixed code
Modified: commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/CSVFormat.java commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/CSVPrinter.java Modified: commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/CSVFormat.java URL: http://svn.apache.org/viewvc/commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/CSVFormat.java?rev=1303483&r1=1303482&r2=1303483&view=diff ============================================================================== --- commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/CSVFormat.java (original) +++ commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/CSVFormat.java Wed Mar 21 18:13:54 2012 @@ -232,8 +232,8 @@ public class CSVFormat implements Serial * * @return <tt>true</tt> is comments are supported, <tt>false</tt> otherwise */ - public boolean isCommentingDisabled() { - return this.commentStart == DISABLED; + public boolean isCommentingEnabled() { + return this.commentStart != DISABLED; } /** Modified: commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/CSVPrinter.java URL: http://svn.apache.org/viewvc/commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/CSVPrinter.java?rev=1303483&r1=1303482&r2=1303483&view=diff ============================================================================== --- commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/CSVPrinter.java (original) +++ commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/CSVPrinter.java Wed Mar 21 18:13:54 2012 @@ -98,7 +98,7 @@ public class CSVPrinter { * @param comment the comment to output */ public void printComment(String comment) throws IOException { - if (format.isCommentingDisabled()) { + if (!format.isCommentingEnabled()) { return; } if (!newLine) {