Fix isPrimitiveType

This commit is contained in:
dotasek 2023-12-18 18:15:57 -05:00
parent 0f84ccd14c
commit 94f0dd2898
1 changed files with 3 additions and 6 deletions

View File

@ -533,16 +533,13 @@ public class VersionSpecificWorkerContextWrapper extends I18nBase implements IWo
return allStructures.stream() return allStructures.stream()
.filter(structureDefinition -> .filter(structureDefinition ->
structureDefinition.getKind() == StructureDefinition.StructureDefinitionKind.PRIMITIVETYPE) structureDefinition.getKind() == StructureDefinition.StructureDefinitionKind.PRIMITIVETYPE)
.anyMatch(structureDefinition -> s.equals(structureDefinition.getType())); .anyMatch(structureDefinition -> s.equals(structureDefinition.getName()));
} }
@Override @Override
public boolean isDataType(String s) { public boolean isDataType(String s) {
List<StructureDefinition> allStructures = new ArrayList<>(allStructures()); // List<StructureDefinition> allStructures = new ArrayList<>(allStructures());
return allStructures.stream() return !isPrimitiveType(s);
.filter(structureDefinition ->
structureDefinition.getKind() == StructureDefinition.StructureDefinitionKind.COMPLEXTYPE)
.anyMatch(structureDefinition -> s.equals(structureDefinition.getType()));
} }
@Override @Override