Skip to content

Commit

Permalink
Suppress questionable-name warning where generic names are actually b…
Browse files Browse the repository at this point in the history
…est.
  • Loading branch information
kingjon3377 committed Mar 30, 2024
1 parent 2236157 commit 07f30f3
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public class NumberComparator implements Comparator<Number>, Serializable {
* built-in comparison function; if not, convert both to doubles and
* return the result of comparing those.
*/
@SuppressWarnings("ChainOfInstanceofChecks")
@SuppressWarnings({"ChainOfInstanceofChecks", "QuestionableName"})
public static int compareNumbers(final Number one, final Number two) {
if ((one instanceof Integer || one instanceof Long) &&
(two instanceof Integer || two instanceof Long)) {
Expand All @@ -40,6 +40,7 @@ public static int compareNumbers(final Number one, final Number two) {
* built-in comparison function; if not, convert both to doubles and
* return the result of comparing those.
*/
@SuppressWarnings("QuestionableName")
@Override
public final int compare(final Number one, final Number two) {
return compareNumbers(one, two);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

@FunctionalInterface
public interface ThrowingBiConsumer<One, Two, Except extends Exception> {
@SuppressWarnings("QuestionableName")
void accept(One one, Two two) throws Except;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

@FunctionalInterface
public interface ThrowingTriConsumer<One, Two, Three, Except extends Exception> {
@SuppressWarnings("QuestionableName")
void accept(One one, Two two, Three three) throws Except;
}

Expand Down
1 change: 1 addition & 0 deletions lovelace-util/src/main/java/lovelace/util/TriConsumer.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@

@FunctionalInterface
public interface TriConsumer<One, Two, Three> {
@SuppressWarnings("QuestionableName")
void accept(One one, Two two, Three three);
}

0 comments on commit 07f30f3

Please sign in to comment.