From b2a9836cdab3e48c88ed1fe98c6cf5f320d8b20e Mon Sep 17 00:00:00 2001 From: jamesagnew Date: Mon, 14 Dec 2015 22:12:54 -0500 Subject: [PATCH] More logging to try and figure out the travis failures --- .../RuntimeChildUndeclaredExtensionDefinition.java | 2 +- .../src/main/java/ca/uhn/fhir/parser/ParserState.java | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeChildUndeclaredExtensionDefinition.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeChildUndeclaredExtensionDefinition.java index 2aa52514c92..b3e313a2c22 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeChildUndeclaredExtensionDefinition.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeChildUndeclaredExtensionDefinition.java @@ -178,7 +178,7 @@ public class RuntimeChildUndeclaredExtensionDefinition extends BaseRuntimeChildD * type. */ if (!qualifiedName.startsWith("ca.uhn.fhir.model")) { - if (!qualifiedName.startsWith("org.hl7.fhir.instance.model")) { + if (!qualifiedName.startsWith("org.hl7.fhir")) { continue; } } diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/ParserState.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/ParserState.java index 658918f384c..b91d8667e0a 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/ParserState.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/ParserState.java @@ -28,6 +28,7 @@ import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; +import java.util.TreeSet; import javax.xml.stream.events.StartElement; import javax.xml.stream.events.XMLEvent; @@ -1731,9 +1732,10 @@ class ParserState { public void enteringNewElement(String theNamespaceUri, String theLocalPart) throws DataFormatException { BaseRuntimeElementDefinition target = myContext.getRuntimeChildUndeclaredExtensionDefinition().getChildByName(theLocalPart); if (target == null) { - myErrorHandler.unknownElement(null, theLocalPart); - push(new SwallowChildrenWholeState(getPreResourceState())); - return; + throw new DataFormatException("Unknown " + theLocalPart + " - Valid names are: " + new TreeSet(myContext.getRuntimeChildUndeclaredExtensionDefinition().getValidChildNames())); +// myErrorHandler.unknownElement(null, theLocalPart); +// push(new SwallowChildrenWholeState(getPreResourceState())); +// return; } switch (target.getChildType()) {