diff --git a/hapi-fhir-osgi-core/pom.xml b/hapi-fhir-osgi-core/pom.xml index f11c34b0afb..601fc310ab0 100644 --- a/hapi-fhir-osgi-core/pom.xml +++ b/hapi-fhir-osgi-core/pom.xml @@ -132,10 +132,10 @@ - ${pom.artifactId} + ${project.artifactId} <_nouses>true - <_removeheaders>Built-By, Include-Resource, Private-Package + <_removeheaders>Built-By, Include-Resource, Private-Package, Require-Capability @@ -146,6 +146,7 @@ com.google.*;resolution:=optional;-remove-attribute:=version, com.phloc.commons;resolution:=optional;-remove-attribute:=version, com.phloc.*;resolution:=optional;-remove-attribute:=version, + javassist;-remove-attribute:=version, javax.*;-remove-attribute:=version, net.sf.saxon;resolution:=optional, org.apache.commons.*;-remove-attribute:=version, diff --git a/hapi-fhir-osgi-core/src/main/java/ca/uhn/fhir/osgi/impl/FhirServerImpl.java b/hapi-fhir-osgi-core/src/main/java/ca/uhn/fhir/osgi/FhirServerImpl.java similarity index 97% rename from hapi-fhir-osgi-core/src/main/java/ca/uhn/fhir/osgi/impl/FhirServerImpl.java rename to hapi-fhir-osgi-core/src/main/java/ca/uhn/fhir/osgi/FhirServerImpl.java index fbf0da4dc3e..07d81c40c80 100644 --- a/hapi-fhir-osgi-core/src/main/java/ca/uhn/fhir/osgi/impl/FhirServerImpl.java +++ b/hapi-fhir-osgi-core/src/main/java/ca/uhn/fhir/osgi/FhirServerImpl.java @@ -1,4 +1,4 @@ -package ca.uhn.fhir.osgi.impl; +package ca.uhn.fhir.osgi; /* * #%L @@ -31,8 +31,6 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.osgi.FhirConfigurationException; -import ca.uhn.fhir.osgi.FhirServer; import ca.uhn.fhir.rest.server.RestfulServer; /** diff --git a/hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/parser/JsonParserDstu2Test.java b/hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/parser/JsonParserDstu2Test.java index a3dd22d3f33..b764ba5be39 100644 --- a/hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/parser/JsonParserDstu2Test.java +++ b/hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/parser/JsonParserDstu2Test.java @@ -92,6 +92,24 @@ public class JsonParserDstu2Test { assertThat(output, containsString("\"div\":\"
VALUE
\"")); } + /** + * See #390 + */ + @Test + public void testEncodeAndParseBundleWithNoEntries() { + ca.uhn.fhir.model.dstu2.resource.Bundle b = new ca.uhn.fhir.model.dstu2.resource.Bundle(); + b.setId("123"); + String encoded = ourCtx.newJsonParser().encodeResourceToString(b); + ourLog.info(encoded); + + assertThat(encoded, containsString("123")); + assertThat(encoded, not(containsString("entry"))); + + b = ourCtx.newJsonParser().parseResource(ca.uhn.fhir.model.dstu2.resource.Bundle.class, encoded); + assertEquals("123", b.getId().getIdPart()); + assertEquals(0, b.getEntry().size()); + } + @Test public void testEncodeNarrativeShouldIncludeNamespaceWithProcessingInstruction() {