Change schema resource fetching (#3)

This commit is contained in:
Anna Czajka 2018-09-03 12:30:40 +02:00 committed by Dominik Przybysz
parent 579dd08d2f
commit 9c6afd599f

View file

@ -158,7 +158,7 @@ class Mock implements Comparable<Mock> {
if (schema) {
try {
validator = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI)
.newSchema(new File(this.class.getResource("/$schema").path))
.newSchema(this.class.getResource("/$schema"))
.newValidator()
} catch (Exception e) {
throw new RuntimeException('mock request schema is invalid schema', e)