} else {
ret = doc.createElementNS(null, dataType.getLocalName());
}
- if (data instanceof AttributesContainer) {
+ if (data instanceof AttributesContainer && ((AttributesContainer) data).getAttributes() != null) {
for (Entry<QName, String> attribute : ((AttributesContainer) data).getAttributes().entrySet()) {
ret.setAttributeNS(attribute.getKey().getNamespace().toString(), attribute.getKey().getLocalName(),
attribute.getValue());
TypeDefinitionAwareCodec<Object, ? extends TypeDefinition<?>> codec = codecProvider.codecFor(schema.getType());
String text = xmlElement.getTextContent();
Object value;
- if(codec != null) {
+ if (codec != null) {
value = codec.deserialize(text);
-
+
} else {
value = xmlElement.getTextContent();
}
TypeDefinitionAwareCodec<Object, ? extends TypeDefinition<?>> codec = codecProvider.codecFor(schema.getType());
String text = xmlElement.getTextContent();
Object value;
- if(codec != null) {
+ if (codec != null) {
value = codec.deserialize(text);
-
+
} else {
value = xmlElement.getTextContent();
}
for (ModuleImport dependency : info.getDependencies()) {
LOG.debug("Source: {} Resolving dependency: {}",identifier,dependency);
ResolutionState dependencyState = resolveDependency(dependency);
- if (dependencyState == ResolutionState.MISSING_SOURCE) {
+ if (dependencyState != ResolutionState.EVERYTHING_OK) {
potentialState = ResolutionState.MISSING_DEPENDENCY;
missingDependencies.put(identifier, dependency);
}