Commit a6bf074d authored by Maxime Lefrançois's avatar Maxime Lefrançois

do not read ontology twice

parent defe2a35
......@@ -77,6 +77,7 @@ public class Clause_9_4_1_Checker extends AbstractClauseChecker {
version.getModel().read(input, SAREF.BASE, Lang.TTL.getLabel());
} catch (Exception ex) {
if (ex instanceof RuntimeIOException && ex.getCause() instanceof MalformedInputException) {
version.getModel().removeAll();
try (InputStreamReader input2 = new InputStreamReader(new FileInputStream(file),
Charset.defaultCharset())) {
version.getModel().read(input2, SAREF.BASE, Lang.TTL.getLabel());
......
......@@ -101,6 +101,7 @@ public class Clause_9_6_1_Checker extends AbstractClauseChecker {
example.getModel().read(input, SAREF.BASE, Lang.TTL.getLabel());
} catch (Exception ex) {
if (ex instanceof RuntimeIOException && ex.getCause() instanceof MalformedInputException) {
example.getModel().removeAll();
try (InputStreamReader input2 = new InputStreamReader(new FileInputStream(p.toFile()),
Charset.defaultCharset())) {
example.getModel().read(input2, SAREF.BASE, Lang.TTL.getLabel());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment