Skip to content

Commit

Permalink
check not null
Browse files Browse the repository at this point in the history
  • Loading branch information
jimkont committed Feb 22, 2016
1 parent 45d34ae commit df3b7a7
Showing 1 changed file with 7 additions and 3 deletions.
Expand Up @@ -184,7 +184,7 @@ private void setAdditionalData() throws InitializationError {
}
}

private SchemaSource createSchemaSourceFromSchema() {
private SchemaSource createSchemaSourceFromSchema() throws InitializationError {
return SchemaSourceFactory.createSchemaSourceSimple(getSchema().uri(), getSchemaReader());
}

Expand All @@ -199,8 +199,12 @@ private RdfReader getSchemaReader() {
return schemaReader;
}

private Schema getSchema() {
return getTestClass().getAnnotation(Schema.class);
private Schema getSchema() throws InitializationError {
Schema schema = getTestClass().getAnnotation(Schema.class);
if (schema == null) {
throw new InitializationError("Cannot read Schema");
}
return schema;
}

RdfReader getAdditionalDataModel() {
Expand Down

0 comments on commit df3b7a7

Please sign in to comment.