Skip to content

Commit

Permalink
minor: make private class final with default constructor (#2740)
Browse files Browse the repository at this point in the history
  • Loading branch information
Kevin222004 authored and pivovarit committed Aug 19, 2024
1 parent a75090d commit cc091d9
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion vavr/src/test/java/io/vavr/collection/BitSetTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -569,7 +569,7 @@ public void shouldReturnTailOfNonEmptyHavingReversedOrder() {

// -- classes

private static class Mapper<T> implements Serializable {
private static final class Mapper<T> implements Serializable {

private static final long serialVersionUID = 1L;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ public int compareTo(WeakInteger other) {
}
}

private class Comparator<K, V> {
private final class Comparator<K, V> {
private final java.util.Map<K, V> classic = new java.util.HashMap<>();
private Map<K, V> hamt = HashMap.empty();

Expand Down
4 changes: 2 additions & 2 deletions vavr/src/test/java/io/vavr/collection/euler/Euler17Test.java
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ default int letterCount(Seq<Integer> range) {
/**
* Solution using Vavr Pattern Matching.
*/
private static class SolutionA implements SolutionProblem17 {
private static final class SolutionA implements SolutionProblem17 {
@Override
public int letterCount(int num) {
return Match(num).of( /*@formatter:off*/
Expand All @@ -143,7 +143,7 @@ private static int length(int number) {
/**
* A more general solution using functionality of the Vavr Collections.
*/
private static class SolutionB implements SolutionProblem17 {
private static final class SolutionB implements SolutionProblem17 {
@Override
public int letterCount(int number) {
return asText(number).length();
Expand Down

0 comments on commit cc091d9

Please sign in to comment.