fix syntax

This commit is contained in:
Grahame Grieve 2022-09-03 10:38:27 +10:00
parent f67c08d0af
commit 4d4009f0e4

View File

@ -120,6 +120,9 @@ public abstract class ParserBase {
public Element parseSingle(InputStream stream) throws IOException, FHIRFormatError, DefinitionException, FHIRException {
List<NamedElement> res = parse(stream);
if (res.size() == 1) {
throw new FHIRException("Parsing FHIR content returned no elements in a context where one element is required");
}
if (res.size() != 1) {
throw new FHIRException("Parsing FHIR content returned multiple elements in a context where only one element is allowed");
}