Skip to content

Commit a0f7906

Browse files
committed
changing ValidationListener so that all of its declared methods have a default no-op implementation
1 parent 252e2d5 commit a0f7906

File tree

1 file changed

+21
-39
lines changed

1 file changed

+21
-39
lines changed

core/src/main/java/org/everit/json/schema/listener/ValidationListener.java

Lines changed: 21 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -6,55 +6,37 @@
66
public interface ValidationListener {
77

88
ValidationListener NOOP = new ValidationListener() {
9-
@Override public void mismatch(MismatchEvent event) {
10-
}
11-
12-
@Override public void combinedSchemaMatch(CombinedSchemaMatchEvent event) {
13-
}
14-
15-
@Override public void combinedSchemaMismatch(CombinedSchemaMismatchEvent event) {
16-
}
17-
18-
@Override public void schemaReferenced(SchemaReferencedEvent event) {
19-
}
20-
21-
@Override public void ifSchemaMatch(ConditionalSchemaMatchEvent event) {
22-
}
23-
24-
@Override public void ifSchemaMismatch(ConditionalSchemaMismatchEvent event) {
25-
}
26-
27-
@Override public void thenSchemaMatch(ConditionalSchemaMatchEvent event) {
28-
}
29-
30-
@Override public void thenSchemaMismatch(ConditionalSchemaMismatchEvent event) {
31-
}
32-
33-
@Override public void elseSchemaMatch(ConditionalSchemaMatchEvent event) {
34-
}
35-
36-
@Override public void elseSchemaMismatch(ConditionalSchemaMismatchEvent event) {
37-
}
389
};
3910

40-
void mismatch(MismatchEvent event);
11+
default void mismatch(MismatchEvent event) {
12+
}
13+
14+
default void combinedSchemaMatch(CombinedSchemaMatchEvent event) {
15+
}
4116

42-
void combinedSchemaMatch(CombinedSchemaMatchEvent event);
17+
default void combinedSchemaMismatch(CombinedSchemaMismatchEvent event) {
18+
}
4319

44-
void combinedSchemaMismatch(CombinedSchemaMismatchEvent event);
20+
default void schemaReferenced(SchemaReferencedEvent event) {
21+
}
4522

46-
void schemaReferenced(SchemaReferencedEvent event);
23+
default void ifSchemaMatch(ConditionalSchemaMatchEvent event) {
24+
}
4725

48-
void ifSchemaMatch(ConditionalSchemaMatchEvent event);
26+
default void ifSchemaMismatch(ConditionalSchemaMismatchEvent event) {
27+
}
4928

50-
void ifSchemaMismatch(ConditionalSchemaMismatchEvent event);
29+
default void thenSchemaMatch(ConditionalSchemaMatchEvent event) {
30+
}
5131

52-
void thenSchemaMatch(ConditionalSchemaMatchEvent event);
32+
default void thenSchemaMismatch(ConditionalSchemaMismatchEvent event) {
33+
}
5334

54-
void thenSchemaMismatch(ConditionalSchemaMismatchEvent event);
35+
default void elseSchemaMatch(ConditionalSchemaMatchEvent event) {
5536

56-
void elseSchemaMatch(ConditionalSchemaMatchEvent event);
37+
}
5738

58-
void elseSchemaMismatch(ConditionalSchemaMismatchEvent event);
39+
default void elseSchemaMismatch(ConditionalSchemaMismatchEvent event) {
40+
}
5941
}
6042

0 commit comments

Comments
 (0)