Skip to content

Commit 3d587a5

Browse files
Use final modifiers for package-private classes
1 parent 31ae61b commit 3d587a5

3 files changed

Lines changed: 3 additions & 5 deletions

File tree

problem4j-spring-web/src/main/java/io/github/problem4j/spring/web/IdentityProblemFormat.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@
1818

1919
import org.jspecify.annotations.Nullable;
2020

21-
/** No-op {@link ProblemFormat} that returns input data unchanged. */
22-
class IdentityProblemFormat implements ProblemFormat {
21+
final class IdentityProblemFormat implements ProblemFormat {
2322

2423
static final IdentityProblemFormat INSTANCE = new IdentityProblemFormat();
2524

problem4j-spring-web/src/main/java/io/github/problem4j/spring/web/IdentityProblemPostProcessor.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@
2020
import io.github.problem4j.core.ProblemContext;
2121
import org.jspecify.annotations.Nullable;
2222

23-
/** No-op {@link ProblemPostProcessor} that returns the {@link Problem} unchanged. */
24-
class IdentityProblemPostProcessor implements ProblemPostProcessor {
23+
final class IdentityProblemPostProcessor implements ProblemPostProcessor {
2524

2625
static final IdentityProblemPostProcessor INSTANCE = new IdentityProblemPostProcessor();
2726

problem4j-spring-web/src/test/java/io/github/problem4j/spring/web/parameter/ViolationTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ void givenNullFields_whenHashCode_thenDoesNotThrow() {
8787
void givenViolation_whenToString_thenContainsFieldAndError() {
8888
Violation violation = new Violation("age", "must be positive");
8989

90-
assertThat(violation.toString()).contains("age").contains("must be positive");
90+
assertThat(violation.toString()).isEqualTo("Violation[field=age, error=must be positive]");
9191
}
9292

9393
@Test

0 commit comments

Comments
 (0)