diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index e69de29bb..9622adf3d 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -0,0 +1,2 @@ +Other changes: +* Fix trailing slashes for JAVA_HOME tests diff --git a/org.hl7.fhir.convertors/pom.xml b/org.hl7.fhir.convertors/pom.xml index e075d44c6..7f0e5b37f 100644 --- a/org.hl7.fhir.convertors/pom.xml +++ b/org.hl7.fhir.convertors/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir org.hl7.fhir.core - 5.6.4-SNAPSHOT + 5.6.8-SNAPSHOT ../pom.xml diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/loaders/loaderR5/R4ToR5Loader.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/loaders/loaderR5/R4ToR5Loader.java index b19c957f1..04b12e807 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/loaders/loaderR5/R4ToR5Loader.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/loaders/loaderR5/R4ToR5Loader.java @@ -1,7 +1,5 @@ package org.hl7.fhir.convertors.loaders.loaderR5; -import org.apache.http.auth.AuthScheme; - /* Copyright (c) 2011+, HL7, Inc. All rights reserved. diff --git a/org.hl7.fhir.dstu2/pom.xml b/org.hl7.fhir.dstu2/pom.xml index 14bf36b4e..a67967b5e 100644 --- a/org.hl7.fhir.dstu2/pom.xml +++ b/org.hl7.fhir.dstu2/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir org.hl7.fhir.core - 5.6.4-SNAPSHOT + 5.6.8-SNAPSHOT ../pom.xml diff --git a/org.hl7.fhir.dstu2016may/pom.xml b/org.hl7.fhir.dstu2016may/pom.xml index 102831e06..b375c8ed4 100644 --- a/org.hl7.fhir.dstu2016may/pom.xml +++ b/org.hl7.fhir.dstu2016may/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir org.hl7.fhir.core - 5.6.4-SNAPSHOT + 5.6.8-SNAPSHOT ../pom.xml diff --git a/org.hl7.fhir.dstu3/pom.xml b/org.hl7.fhir.dstu3/pom.xml index 35ca508d6..5177f99c7 100644 --- a/org.hl7.fhir.dstu3/pom.xml +++ b/org.hl7.fhir.dstu3/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir org.hl7.fhir.core - 5.6.4-SNAPSHOT + 5.6.8-SNAPSHOT ../pom.xml diff --git a/org.hl7.fhir.r4/pom.xml b/org.hl7.fhir.r4/pom.xml index 08a34704d..72cee3441 100644 --- a/org.hl7.fhir.r4/pom.xml +++ b/org.hl7.fhir.r4/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir org.hl7.fhir.core - 5.6.4-SNAPSHOT + 5.6.8-SNAPSHOT ../pom.xml diff --git a/org.hl7.fhir.r4/src/main/java/org/hl7/fhir/r4/utils/client/network/FhirLoggingInterceptor.java b/org.hl7.fhir.r4/src/main/java/org/hl7/fhir/r4/utils/client/network/FhirLoggingInterceptor.java index 9775308b5..16f8aa443 100644 --- a/org.hl7.fhir.r4/src/main/java/org/hl7/fhir/r4/utils/client/network/FhirLoggingInterceptor.java +++ b/org.hl7.fhir.r4/src/main/java/org/hl7/fhir/r4/utils/client/network/FhirLoggingInterceptor.java @@ -2,8 +2,8 @@ package org.hl7.fhir.r4.utils.client.network; import okhttp3.*; import org.hl7.fhir.utilities.ToolingClientLogger; -import org.jetbrains.annotations.NotNull; +import javax.annotation.Nonnull; import java.io.IOException; import java.util.ArrayList; import java.util.List; @@ -22,9 +22,8 @@ public class FhirLoggingInterceptor implements Interceptor { return this; } - @NotNull @Override - public Response intercept(@NotNull Interceptor.Chain chain) throws IOException { + public Response intercept(@Nonnull Interceptor.Chain chain) throws IOException { // Log Request Request request = chain.request(); logger.logRequest(request.method(), request.url().toString(), new ArrayList<>(request.headers().names()), diff --git a/org.hl7.fhir.r5/pom.xml b/org.hl7.fhir.r5/pom.xml index f9646bbd7..4c5db9556 100644 --- a/org.hl7.fhir.r5/pom.xml +++ b/org.hl7.fhir.r5/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir org.hl7.fhir.core - 5.6.4-SNAPSHOT + 5.6.8-SNAPSHOT ../pom.xml diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/utils/ToolingExtensions.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/utils/ToolingExtensions.java index a107dfc26..2c40dff4d 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/utils/ToolingExtensions.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/utils/ToolingExtensions.java @@ -69,7 +69,9 @@ import java.util.Map; import org.apache.commons.lang3.StringUtils; import org.fhir.ucum.Utilities; import org.hl7.fhir.exceptions.FHIRException; +import org.hl7.fhir.r5.model.Base; import org.hl7.fhir.r5.model.BooleanType; +import org.hl7.fhir.r5.model.CanonicalResource; import org.hl7.fhir.r5.model.CanonicalType; import org.hl7.fhir.r5.model.CodeSystem.ConceptDefinitionComponent; import org.hl7.fhir.r5.model.CodeType; @@ -89,6 +91,7 @@ import org.hl7.fhir.r5.model.IntegerType; import org.hl7.fhir.r5.model.MarkdownType; import org.hl7.fhir.r5.model.OperationOutcome.OperationOutcomeIssueComponent; import org.hl7.fhir.r5.model.PrimitiveType; +import org.hl7.fhir.r5.model.Property; import org.hl7.fhir.r5.model.Questionnaire.QuestionnaireItemComponent; import org.hl7.fhir.r5.model.Questionnaire.QuestionnaireItemType; import org.hl7.fhir.r5.model.StringType; @@ -900,5 +903,25 @@ public class ToolingExtensions { dr.getExtension().add(Factory.newExtension(url, new UriType(value), true)); } + public static boolean usesExtension(String url, Base base) { + if ("Extension".equals(base.fhirType())) { + Property p = base.getNamedProperty("url"); + for (Base b : p.getValues()) { + if (url.equals(b.primitiveValue())) { + return true; + } + } + } + + for (Property p : base.children() ) { + for (Base v : p.getValues()) { + if (usesExtension(url, v)) { + return true; + } + } + } + return false; + } + } \ No newline at end of file diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/utils/client/network/Client.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/utils/client/network/Client.java index 02c18b66f..b719907d9 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/utils/client/network/Client.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/utils/client/network/Client.java @@ -4,7 +4,6 @@ import okhttp3.Headers; import okhttp3.MediaType; import okhttp3.Request; import okhttp3.RequestBody; -import okhttp3.logging.HttpLoggingInterceptor; import org.hl7.fhir.r5.model.Bundle; import org.hl7.fhir.r5.model.Resource; import org.hl7.fhir.r5.utils.client.EFhirClientException; diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/utils/client/network/FhirLoggingInterceptor.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/utils/client/network/FhirLoggingInterceptor.java index d012b0acd..b68d58430 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/utils/client/network/FhirLoggingInterceptor.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/utils/client/network/FhirLoggingInterceptor.java @@ -2,8 +2,8 @@ package org.hl7.fhir.r5.utils.client.network; import okhttp3.*; import org.hl7.fhir.utilities.ToolingClientLogger; -import org.jetbrains.annotations.NotNull; +import javax.annotation.Nonnull; import java.io.IOException; import java.util.ArrayList; import java.util.List; @@ -22,9 +22,8 @@ public class FhirLoggingInterceptor implements Interceptor { return this; } - @NotNull @Override - public Response intercept(@NotNull Interceptor.Chain chain) throws IOException { + public Response intercept(@Nonnull Interceptor.Chain chain) throws IOException { // Log Request Request request = chain.request(); logger.logRequest(request.method(), request.url().toString(), new ArrayList<>(request.headers().names()), diff --git a/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/utils/client/FHIRToolingClientTest.java b/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/utils/client/FHIRToolingClientTest.java index 966392cf4..cc352cbc1 100644 --- a/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/utils/client/FHIRToolingClientTest.java +++ b/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/utils/client/FHIRToolingClientTest.java @@ -6,7 +6,6 @@ import okhttp3.internal.http2.Header; import org.hl7.fhir.r5.model.*; import org.hl7.fhir.r5.utils.client.network.Client; import org.hl7.fhir.r5.utils.client.network.ResourceRequest; -import org.jetbrains.annotations.NotNull; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; @@ -96,7 +95,6 @@ class FHIRToolingClientTest { return bundle; } - @NotNull private Patient generatePatient() { // Create a patient object Patient patient = new Patient(); @@ -115,7 +113,6 @@ class FHIRToolingClientTest { return patient; } - @NotNull private Observation generateObservation() { // Create an observation object Observation observation = new Observation(); diff --git a/org.hl7.fhir.report/pom.xml b/org.hl7.fhir.report/pom.xml index ea2717cb8..1950d77f4 100644 --- a/org.hl7.fhir.report/pom.xml +++ b/org.hl7.fhir.report/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir org.hl7.fhir.core - 5.6.4-SNAPSHOT + 5.6.8-SNAPSHOT ../pom.xml diff --git a/org.hl7.fhir.utilities/pom.xml b/org.hl7.fhir.utilities/pom.xml index b50554bd2..8f3133ce3 100644 --- a/org.hl7.fhir.utilities/pom.xml +++ b/org.hl7.fhir.utilities/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir org.hl7.fhir.core - 5.6.4-SNAPSHOT + 5.6.8-SNAPSHOT ../pom.xml diff --git a/org.hl7.fhir.utilities/src/test/java/org/hl7/fhir/utilities/UtilitiesTest.java b/org.hl7.fhir.utilities/src/test/java/org/hl7/fhir/utilities/UtilitiesTest.java index b2264c95f..f941577f6 100644 --- a/org.hl7.fhir.utilities/src/test/java/org/hl7/fhir/utilities/UtilitiesTest.java +++ b/org.hl7.fhir.utilities/src/test/java/org/hl7/fhir/utilities/UtilitiesTest.java @@ -22,17 +22,20 @@ class UtilitiesTest { public static final String TEST_TXT = "test.txt"; + private static final String getNormalizedJavaHomeDir() { + return System.getenv("JAVA_HOME") == null ? null : Paths.get(System.getenv("JAVA_HOME")).normalize().toString(); + } + public static final String LINUX_TEMP_DIR = "/tmp/"; public static final String LINUX_USER_DIR = System.getProperty("user.home") + "/"; - public static final String LINUX_JAVA_HOME = System.getenv("JAVA_HOME") + "/"; + public static final String LINUX_JAVA_HOME = getNormalizedJavaHomeDir() + "/"; public static final String WIN_TEMP_DIR = "c:\\temp\\"; public static final String WIN_USER_DIR = System.getProperty("user.home") + "\\"; - public static final String WIN_JAVA_HOME = System.getenv("JAVA_HOME") + "\\"; + public static final String WIN_JAVA_HOME = getNormalizedJavaHomeDir() + "\\"; public static final String OSX_USER_DIR = System.getProperty("user.home") + "/"; - public static final String OSX_JAVA_HOME = System.getenv("JAVA_HOME") == null ? null : Paths.get(System.getenv("JAVA_HOME")).normalize().toString() + "/"; - + public static final String OSX_JAVA_HOME = getNormalizedJavaHomeDir() + "/"; @Test @DisplayName("Test Utilities.path maps temp directory correctly") public void testTempDirPath() throws IOException { diff --git a/org.hl7.fhir.validation.cli/pom.xml b/org.hl7.fhir.validation.cli/pom.xml index ff023a407..f73bfeca3 100644 --- a/org.hl7.fhir.validation.cli/pom.xml +++ b/org.hl7.fhir.validation.cli/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir org.hl7.fhir.core - 5.6.4-SNAPSHOT + 5.6.8-SNAPSHOT ../pom.xml diff --git a/org.hl7.fhir.validation/pom.xml b/org.hl7.fhir.validation/pom.xml index f9cf3f718..99c765e56 100644 --- a/org.hl7.fhir.validation/pom.xml +++ b/org.hl7.fhir.validation/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir org.hl7.fhir.core - 5.6.4-SNAPSHOT + 5.6.8-SNAPSHOT ../pom.xml diff --git a/pom.xml b/pom.xml index 7833bf776..250a82e20 100644 --- a/pom.xml +++ b/pom.xml @@ -14,12 +14,12 @@ HAPI FHIR --> org.hl7.fhir.core - 5.6.4-SNAPSHOT + 5.6.8-SNAPSHOT pom 5.1.0 - 1.1.79-SNAPSHOT + 1.1.79 5.7.1 1.7.1 3.0.0-M5