Skip to content
This repository has been archived by the owner on Jul 11, 2022. It is now read-only.

Commit

Permalink
Bug 1654644 - Check instance type before casting to PropertyDefinitio…
Browse files Browse the repository at this point in the history
…nSimple
  • Loading branch information
josejulio authored and burmanm committed Mar 7, 2019
1 parent e88648a commit bbb17bc
Showing 1 changed file with 3 additions and 2 deletions.
Expand Up @@ -88,11 +88,12 @@ private static CtClass getSimpleTypeClass(ClassPool cp, PropertyDefinitionSimple
}

public static CtClass translateConfiguration(ClassPool cp, ConfigurationDefinition def) throws NotFoundException {
final String OPERATION_RESULT = "operationResult";
if (def == null) {
return CtClass.voidType;
} else if (def.getPropertyDefinitionSimple("operationResult") != null) {
} else if (def.get(OPERATION_RESULT) != null && def.get(OPERATION_RESULT) instanceof PropertyDefinitionSimple) {
// Its a simple type
return getSimpleTypeClass(cp, def.getPropertyDefinitionSimple("operationResult"));
return getSimpleTypeClass(cp, def.getPropertyDefinitionSimple(OPERATION_RESULT));
} else {

// TODO GH: Build a custom type?
Expand Down

0 comments on commit bbb17bc

Please sign in to comment.