Skip to content

Commit

Permalink
Better NPE handling
Browse files Browse the repository at this point in the history
  • Loading branch information
semancik committed May 18, 2016
1 parent 1de91b9 commit 3232663
Showing 1 changed file with 3 additions and 0 deletions.
Expand Up @@ -935,6 +935,9 @@ private <T extends ObjectType, O extends ObjectType> ObjectFilter preProcessObje
if (specTypeQName != null) {
specTypeQName = prismContext.getSchemaRegistry().qualifyTypeName(specTypeQName);
PrismObjectDefinition<?> specObjectDef = prismContext.getSchemaRegistry().findObjectDefinitionByType(specTypeQName);
if (specObjectDef == null) {
throw new SchemaException("Unknown object type "+specTypeQName+" in "+autz.getHumanReadableDesc());
}
Class<?> specObjectClass = specObjectDef.getCompileTimeClass();
if (!objectType.isAssignableFrom(specObjectClass)) {
LOGGER.trace(" Authorization not applicable for object because of type mismatch, authorization {}, query {}",
Expand Down

0 comments on commit 3232663

Please sign in to comment.