Skip to content

Commit

Permalink
MID-9578: DeltaConvertorBean checks explicit types also against XSD c…
Browse files Browse the repository at this point in the history
…onverter

ItemDeltaConversionBean checks explicit type against schema registry and
XSD converter to determine if we still hae type definition present for
proper delta creation, otherwise uses RawType.
  • Loading branch information
tonydamage committed Mar 28, 2024
1 parent 7456230 commit beef47d
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import com.evolveum.midpoint.prism.impl.xnode.XNodeImpl;
import com.evolveum.midpoint.prism.path.ItemName;
import com.evolveum.midpoint.prism.path.ItemPath;
import com.evolveum.midpoint.prism.xml.XmlTypeConverter;
import com.evolveum.midpoint.prism.xnode.MapXNode;
import com.evolveum.midpoint.util.DOMUtil;
import com.evolveum.midpoint.util.exception.SchemaException;
Expand Down Expand Up @@ -196,6 +197,11 @@ private boolean typeNotExists(QName explicitTypeName) {
if (explicitTypeName == null) {
return false;
}
// Supported XSD types do not have type definition as of 4.9-M3
if (XmlTypeConverter.canConvert(explicitTypeName)) {
return false;
}

var typeDef = PrismContext.get().getSchemaRegistry().findTypeDefinitionByType(explicitTypeName);
return typeDef == null;
}
Expand Down

0 comments on commit beef47d

Please sign in to comment.