Skip to content

Commit 5c465af

Browse files
committed
Update -validator dependency
Signed-off-by: Francis Galiegue <[email protected]>
1 parent eadc61d commit 5c465af

File tree

2 files changed

+13
-22
lines changed

2 files changed

+13
-22
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070
<dependency>
7171
<groupId>com.github.fge</groupId>
7272
<artifactId>json-schema-validator</artifactId>
73-
<version>2.1.0</version>
73+
<version>2.1.1</version>
7474
</dependency>
7575
<dependency>
7676
<groupId>com.github.reinert</groupId>

src/main/java/com/github/fge/jsonschema2pojo/DraftV3OnlySyntaxProcessor.java

Lines changed: 12 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,16 @@
1515
public final class DraftV3OnlySyntaxProcessor
1616
implements Processor<ValueHolder<SchemaTree>, ValueHolder<SchemaTree>>
1717
{
18+
private static final Function<ValueHolder<SchemaTree>, JsonRef> FUNCTION
19+
= new Function<ValueHolder<SchemaTree>, JsonRef>()
20+
{
21+
@Override
22+
public JsonRef apply(final ValueHolder<SchemaTree> input)
23+
{
24+
return input.getValue().getDollarSchema();
25+
}
26+
};
27+
1828
private final Processor<ValueHolder<SchemaTree>, ValueHolder<SchemaTree>>
1929
processor;
2030

@@ -26,9 +36,8 @@ public DraftV3OnlySyntaxProcessor()
2636
final JsonRef draftv3
2737
= JsonRef.fromURI(SchemaVersion.DRAFTV3.getLocation());
2838

29-
final ProcessorMap<JsonRef, ValueHolder<SchemaTree>,
30-
ValueHolder<SchemaTree>> map
31-
= new SchemaMap()
39+
final ProcessorMap<JsonRef, ValueHolder<SchemaTree>, ValueHolder<SchemaTree>> map
40+
= new ProcessorMap<JsonRef, ValueHolder<SchemaTree>, ValueHolder<SchemaTree>>(FUNCTION)
3241
.addEntry(draftv3, syntaxProcessor)
3342
.addEntry(JsonRef.emptyRef(), syntaxProcessor)
3443
.setDefaultProcessor(UNSUPPORTED);
@@ -56,22 +65,4 @@ public ValueHolder<SchemaTree> process(final ProcessingReport report,
5665
throw new UnsupportedVersionException();
5766
}
5867
};
59-
60-
private static final class SchemaMap
61-
extends ProcessorMap<JsonRef, ValueHolder<SchemaTree>, ValueHolder<SchemaTree>>
62-
{
63-
64-
@Override
65-
protected Function<ValueHolder<SchemaTree>, JsonRef> f()
66-
{
67-
return new Function<ValueHolder<SchemaTree>, JsonRef>()
68-
{
69-
@Override
70-
public JsonRef apply(final ValueHolder<SchemaTree> input)
71-
{
72-
return input.getValue().getDollarSchema();
73-
}
74-
};
75-
}
76-
}
7768
}

0 commit comments

Comments
 (0)