Skip to content

Commit

Permalink
Fixed common tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
mederly committed Sep 23, 2017
1 parent 767218b commit ac6d1d9
Showing 1 changed file with 10 additions and 6 deletions.
Expand Up @@ -1189,12 +1189,16 @@ public void applyDefinition(@NotNull PrismContainerDefinition<C> containerDef, b
return; // there's a definition already
}
if (!complexTypeDefinition.getTypeName().equals(containerDef.getTypeName())) {
// this is the case in which we are going to overwrite a specific definition
// (e.g. WfPrimaryChangeProcessorStateType) with a generic one (e.g. WfProcessorSpecificStateType)
// --> we should either skip this, or fetch the fresh definition from the prism context
ComplexTypeDefinition freshCtd = prismContext.getSchemaRegistry().findComplexTypeDefinitionByType(complexTypeDefinition.getTypeName());
if (freshCtd != null) {
definitionToUse = freshCtd;
if (!definitionToUse.isRuntimeSchema()) {
// this is the case in which we are going to overwrite a specific definition
// (e.g. WfPrimaryChangeProcessorStateType) with a generic one (e.g. WfProcessorSpecificStateType)
// --> we should either skip this, or fetch the fresh definition from the prism context
ComplexTypeDefinition freshCtd = prismContext.getSchemaRegistry().findComplexTypeDefinitionByType(complexTypeDefinition.getTypeName());
if (freshCtd != null) {
definitionToUse = freshCtd;
}
} else {
// we are probably applying a dynamic definition over static one -- so, let's proceed
}
}
}
Expand Down

0 comments on commit ac6d1d9

Please sign in to comment.