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
This commit is contained in:
Sebastian Bazley 2012-03-21 18:13:54 +00:00
parent d0035e6c7a
commit 9fb2b4f2b1
2 changed files with 3 additions and 3 deletions

View File

@ -232,8 +232,8 @@ public class CSVFormat implements Serializable {
* *
* @return <tt>true</tt> is comments are supported, <tt>false</tt> otherwise * @return <tt>true</tt> is comments are supported, <tt>false</tt> otherwise
*/ */
public boolean isCommentingDisabled() { public boolean isCommentingEnabled() {
return this.commentStart == DISABLED; return this.commentStart != DISABLED;
} }
/** /**

View File

@ -98,7 +98,7 @@ public class CSVPrinter {
* @param comment the comment to output * @param comment the comment to output
*/ */
public void printComment(String comment) throws IOException { public void printComment(String comment) throws IOException {
if (format.isCommentingDisabled()) { if (!format.isCommentingEnabled()) {
return; return;
} }
if (!newLine) { if (!newLine) {