Skip to content

Commit

Permalink
Fix warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
charphi committed Mar 11, 2024
1 parent 1340fe1 commit f336741
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/main/java/nbbrd/picocsv/Csv.java
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
* <li> supports comment character
* </ul>
*
* ⚠️ <i></i>Note that the <code>Format#acceptMissingField</code> option must be set to <code>false</code> to closely follow the RFC4180 specification.
* ⚠️ <i>Note that the <code>Format#acceptMissingField</code> option must be set to <code>false</code> to closely follow the RFC4180 specification.
* The default value is currently <code>true</code> but will be reversed in the next major release.</i>
*
* @author Philippe Charles
Expand Down Expand Up @@ -431,6 +431,7 @@ public int hashCode() {
return hash;
}

@SuppressWarnings("RedundantIfStatement")
@Override
public boolean equals(Object obj) {
if (this == obj) return true;
Expand Down Expand Up @@ -1047,12 +1048,14 @@ public static final class WriterOptions {
private WriterOptions() {
}

@SuppressWarnings("UnnecessaryLocalVariable")
@Override
public int hashCode() {
int hash = 7;
return hash;
}

@SuppressWarnings("unused")
@Override
public boolean equals(Object obj) {
if (this == obj) return true;
Expand Down
4 changes: 4 additions & 0 deletions src/test/java/_test/Row.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package _test;

import lombok.EqualsAndHashCode;
import nbbrd.picocsv.Csv;
import org.apache.commons.text.StringEscapeUtils;

Expand All @@ -16,6 +17,7 @@ public abstract class Row {
private Row() {
}

@EqualsAndHashCode(callSuper = false)
@lombok.Value
public static class Empty extends Row {

Expand All @@ -25,6 +27,7 @@ public String toString() {
}
}

@EqualsAndHashCode(callSuper = false)
@lombok.Value
public static class Comment extends Row {

Expand All @@ -37,6 +40,7 @@ public String toString() {
}
}

@EqualsAndHashCode(callSuper = false)
@lombok.Value
public static class Fields extends Row {

Expand Down

0 comments on commit f336741

Please sign in to comment.