From b28fe3b882554a5b27a5f4ab38e7f47d3011706a Mon Sep 17 00:00:00 2001 From: James Agnew Date: Mon, 11 Dec 2023 18:24:40 -0500 Subject: [PATCH] Jakarta Bump Part 2 (#5533) * Make expunge service extensible * Work * Licence headers * Version bump some dependencies * Version bumps * Adapt to new html unit version * Reintroduce errorprone * Test fix * Header * Work on jakarta * Test fixes * Restore errorprone * More pom tweaks * Apply spotless * Errorprone tweak * errorprone tweak * Version bump * License headers * Version bump * Postgres bump --- hapi-deployable-pom/pom.xml | 2 +- hapi-fhir-android/pom.xml | 2 +- hapi-fhir-base/pom.xml | 2 +- .../ca/uhn/fhir/context/ModelScanner.java | 2 +- .../parser/json/jackson/JacksonStructure.java | 33 +- .../parser/json/jackson/JacksonWriter.java | 32 +- hapi-fhir-bom/pom.xml | 4 +- hapi-fhir-checkstyle/pom.xml | 2 +- hapi-fhir-cli/hapi-fhir-cli-api/pom.xml | 2 +- hapi-fhir-cli/hapi-fhir-cli-app/pom.xml | 2 +- hapi-fhir-cli/pom.xml | 2 +- hapi-fhir-client-okhttp/pom.xml | 2 +- hapi-fhir-client/pom.xml | 2 +- hapi-fhir-converter/pom.xml | 2 +- hapi-fhir-dist/pom.xml | 2 +- hapi-fhir-docs/pom.xml | 2 +- .../hapi/fhir/changelog/7_0_0/changes.yaml | 17 +- hapi-fhir-jacoco/pom.xml | 2 +- hapi-fhir-jaxrsserver-base/pom.xml | 2 +- hapi-fhir-jpa/pom.xml | 2 +- hapi-fhir-jpaserver-base/pom.xml | 2 +- .../dao/expunge/ExpungeEverythingService.java | 18 +- .../r4/MemberMatchR4ResourceProvider.java | 19 + .../provider/r4/MemberMatcherR4Helper.java | 19 + .../pom.xml | 2 +- hapi-fhir-jpaserver-hfql/pom.xml | 2 +- hapi-fhir-jpaserver-ips/pom.xml | 4 +- .../generator/IpsGeneratorSvcImplTest.java | 15 +- hapi-fhir-jpaserver-mdm/pom.xml | 2 +- hapi-fhir-jpaserver-model/pom.xml | 2 +- hapi-fhir-jpaserver-searchparam/pom.xml | 2 +- hapi-fhir-jpaserver-subscription/pom.xml | 2 +- hapi-fhir-jpaserver-test-dstu2/pom.xml | 2 +- hapi-fhir-jpaserver-test-dstu3/pom.xml | 2 +- hapi-fhir-jpaserver-test-r4/pom.xml | 2 +- .../jpa/dao/BaseHapiFhirResourceDaoTest.java | 6 +- hapi-fhir-jpaserver-test-r4b/pom.xml | 2 +- hapi-fhir-jpaserver-test-r5/pom.xml | 4 +- ...anceReindexServiceImplNarrativeR5Test.java | 4 +- hapi-fhir-jpaserver-test-utilities/pom.xml | 2 +- hapi-fhir-jpaserver-uhnfhirtest/pom.xml | 2 +- hapi-fhir-server-cds-hooks/pom.xml | 2 +- hapi-fhir-server-mdm/pom.xml | 2 +- hapi-fhir-server-openapi/pom.xml | 4 +- .../rest/openapi/OpenApiInterceptorTest.java | 6 +- hapi-fhir-server/pom.xml | 2 +- .../hapi-fhir-caching-api/pom.xml | 2 +- .../hapi-fhir-caching-caffeine/pom.xml | 4 +- .../hapi-fhir-caching-guava/pom.xml | 2 +- .../hapi-fhir-caching-testing/pom.xml | 2 +- hapi-fhir-serviceloaders/pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../hapi-fhir-spring-boot-samples/pom.xml | 2 +- .../hapi-fhir-spring-boot-starter/pom.xml | 2 +- hapi-fhir-spring-boot/pom.xml | 2 +- hapi-fhir-sql-migrate/pom.xml | 2 +- hapi-fhir-storage-batch2-jobs/pom.xml | 2 +- .../pom.xml | 2 +- hapi-fhir-storage-batch2/pom.xml | 2 +- hapi-fhir-storage-cr/pom.xml | 2 +- hapi-fhir-storage-mdm/pom.xml | 2 +- hapi-fhir-storage-test-utilities/pom.xml | 2 +- hapi-fhir-storage/pom.xml | 2 +- .../jpa/api/model/DeleteConflictList.java | 2 +- hapi-fhir-structures-dstu2.1/pom.xml | 9 +- hapi-fhir-structures-dstu2/pom.xml | 2 +- .../ca/uhn/fhir/util/FhirTerserDstu2Test.java | 10 +- hapi-fhir-structures-dstu3/pom.xml | 2 +- .../uhn/fhir/parser/JsonParserDstu3Test.java | 9 +- hapi-fhir-structures-hl7org-dstu2/pom.xml | 9 +- hapi-fhir-structures-r4/pom.xml | 9 +- .../ca/uhn/fhir/util/FhirTerserR4Test.java | 10 +- hapi-fhir-structures-r4b/pom.xml | 9 +- hapi-fhir-structures-r5/pom.xml | 9 +- hapi-fhir-test-utilities/pom.xml | 18 +- .../ca/uhn/fhir/test/utilities/HtmlUtil.java | 14 +- .../MockMvcWebConnectionForHtmlUnit3.java | 763 ++++++++++++++++++ hapi-fhir-testpage-overlay/pom.xml | 4 +- .../java/ca/uhn/fhir/jpa/test/WebTest.java | 30 +- .../pom.xml | 2 +- hapi-fhir-validation-resources-dstu2/pom.xml | 2 +- hapi-fhir-validation-resources-dstu3/pom.xml | 2 +- hapi-fhir-validation-resources-r4/pom.xml | 2 +- hapi-fhir-validation-resources-r4b/pom.xml | 2 +- hapi-fhir-validation-resources-r5/pom.xml | 2 +- hapi-fhir-validation/pom.xml | 9 +- hapi-tinder-plugin/pom.xml | 2 +- hapi-tinder-test/pom.xml | 2 +- pom.xml | 148 ++-- release-pipeline.yml | 2 +- test-job-template.yml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- 97 files changed, 1083 insertions(+), 300 deletions(-) create mode 100644 hapi-fhir-test-utilities/src/main/java/ca/uhn/fhir/test/utilities/MockMvcWebConnectionForHtmlUnit3.java diff --git a/hapi-deployable-pom/pom.xml b/hapi-deployable-pom/pom.xml index 68c9469af79..e0fdc9defbd 100644 --- a/hapi-deployable-pom/pom.xml +++ b/hapi-deployable-pom/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-fhir - 6.11.6-SNAPSHOT + 6.11.7-SNAPSHOT ../pom.xml diff --git a/hapi-fhir-android/pom.xml b/hapi-fhir-android/pom.xml index 20e3f294c28..ee1c47560a0 100644 --- a/hapi-fhir-android/pom.xml +++ b/hapi-fhir-android/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 6.11.6-SNAPSHOT + 6.11.7-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-base/pom.xml b/hapi-fhir-base/pom.xml index a3646a8bb89..0b400e33354 100644 --- a/hapi-fhir-base/pom.xml +++ b/hapi-fhir-base/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 6.11.6-SNAPSHOT + 6.11.7-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/ModelScanner.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/ModelScanner.java index 5a36998f6a5..7913bc10fa9 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/ModelScanner.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/ModelScanner.java @@ -498,7 +498,7 @@ class ModelScanner { nextElementType = ReflectionUtil.getGenericCollectionTypeOfField(next); } else if (Collection.class.isAssignableFrom(nextElementType)) { throw new ConfigurationException(Msg.code(1722) + "Field '" + next.getName() + "' in type '" - + next.getClass().getCanonicalName() + + nextElementType.getCanonicalName() + "' is a Collection - Only java.util.List curently supported"); } return nextElementType; diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/json/jackson/JacksonStructure.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/json/jackson/JacksonStructure.java index 27d93057d0c..14b0831c301 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/json/jackson/JacksonStructure.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/json/jackson/JacksonStructure.java @@ -28,6 +28,7 @@ import ca.uhn.fhir.parser.json.BaseJsonLikeWriter; import ca.uhn.fhir.parser.json.JsonLikeStructure; import com.fasterxml.jackson.core.JsonGenerator; import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.core.StreamReadConstraints; import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.JsonNode; @@ -114,14 +115,38 @@ public class JacksonStructure implements JsonLikeStructure { setNativeArray((ArrayNode) OBJECT_MAPPER.readTree(pbr)); } } catch (Exception e) { - if (e.getMessage().startsWith("Unexpected char 39")) { + String message; + if (e instanceof JsonProcessingException) { + /* + * Currently there is no way of preventing Jackson from adding this + * annoying REDACTED message from certain messages we get back from + * the parser, so we just manually strip them. Hopefully Jackson + * will accept this request at some point: + * https://github.com/FasterXML/jackson-core/issues/1158 + */ + JsonProcessingException jpe = (JsonProcessingException) e; + StringBuilder messageBuilder = new StringBuilder(); + String originalMessage = jpe.getOriginalMessage(); + originalMessage = originalMessage.replace( + "Source: REDACTED (`StreamReadFeature.INCLUDE_SOURCE_IN_LOCATION` disabled); ", ""); + messageBuilder.append(originalMessage); + if (jpe.getLocation() != null) { + messageBuilder.append("\n at ["); + jpe.getLocation().appendOffsetDescription(messageBuilder); + messageBuilder.append("]"); + } + message = messageBuilder.toString(); + } else { + message = e.getMessage(); + } + + if (message.startsWith("Unexpected char 39")) { throw new DataFormatException( - Msg.code(1860) + "Failed to parse JSON encoded FHIR content: " + e.getMessage() + " - " + Msg.code(1860) + "Failed to parse JSON encoded FHIR content: " + message + " - " + "This may indicate that single quotes are being used as JSON escapes where double quotes are required", e); } - throw new DataFormatException( - Msg.code(1861) + "Failed to parse JSON encoded FHIR content: " + e.getMessage(), e); + throw new DataFormatException(Msg.code(1861) + "Failed to parse JSON encoded FHIR content: " + message, e); } } diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/json/jackson/JacksonWriter.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/json/jackson/JacksonWriter.java index d0101d0af7c..1e4ba3af13c 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/json/jackson/JacksonWriter.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/json/jackson/JacksonWriter.java @@ -45,29 +45,15 @@ public class JacksonWriter extends BaseJsonLikeWriter { @Override public BaseJsonLikeWriter init() { if (isPrettyPrint()) { - DefaultPrettyPrinter prettyPrinter = new DefaultPrettyPrinter() { - - /** - * Objects should serialize as - *
-				 * {
-				 *    "key": "value"
-				 * }
-				 * 
- * in order to be consistent with Gson behaviour, instead of the jackson default - *
-				 * {
-				 *    "key" : "value"
-				 * }
-				 * 
- */ - @Override - public DefaultPrettyPrinter withSeparators(Separators separators) { - _separators = separators; - _objectFieldValueSeparatorWithSpaces = separators.getObjectFieldValueSeparator() + " "; - return this; - } - }; + DefaultPrettyPrinter prettyPrinter = new DefaultPrettyPrinter() + .withSeparators(new Separators( + Separators.DEFAULT_ROOT_VALUE_SEPARATOR, + ':', + Separators.Spacing.AFTER, + ',', + Separators.Spacing.NONE, + ',', + Separators.Spacing.NONE)); prettyPrinter = prettyPrinter.withObjectIndenter(new DefaultIndenter(" ", "\n")); myJsonGenerator.setPrettyPrinter(prettyPrinter); diff --git a/hapi-fhir-bom/pom.xml b/hapi-fhir-bom/pom.xml index b2773869274..39b230f2ea5 100644 --- a/hapi-fhir-bom/pom.xml +++ b/hapi-fhir-bom/pom.xml @@ -4,7 +4,7 @@ 4.0.0 ca.uhn.hapi.fhir hapi-fhir-bom - 6.11.6-SNAPSHOT + 6.11.7-SNAPSHOT pom HAPI FHIR BOM @@ -12,7 +12,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 6.11.6-SNAPSHOT + 6.11.7-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-checkstyle/pom.xml b/hapi-fhir-checkstyle/pom.xml index 6da8dc879f8..22eba74f131 100644 --- a/hapi-fhir-checkstyle/pom.xml +++ b/hapi-fhir-checkstyle/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-fhir - 6.11.6-SNAPSHOT + 6.11.7-SNAPSHOT ../pom.xml diff --git a/hapi-fhir-cli/hapi-fhir-cli-api/pom.xml b/hapi-fhir-cli/hapi-fhir-cli-api/pom.xml index 0f10093bb2d..aa68ece2aeb 100644 --- a/hapi-fhir-cli/hapi-fhir-cli-api/pom.xml +++ b/hapi-fhir-cli/hapi-fhir-cli-api/pom.xml @@ -4,7 +4,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 6.11.6-SNAPSHOT + 6.11.7-SNAPSHOT ../../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-cli/hapi-fhir-cli-app/pom.xml b/hapi-fhir-cli/hapi-fhir-cli-app/pom.xml index 735d00ba971..a1d5071ed88 100644 --- a/hapi-fhir-cli/hapi-fhir-cli-app/pom.xml +++ b/hapi-fhir-cli/hapi-fhir-cli-app/pom.xml @@ -6,7 +6,7 @@ ca.uhn.hapi.fhir hapi-fhir-cli - 6.11.6-SNAPSHOT + 6.11.7-SNAPSHOT ../pom.xml diff --git a/hapi-fhir-cli/pom.xml b/hapi-fhir-cli/pom.xml index 991e6dd9398..dbcfdedd285 100644 --- a/hapi-fhir-cli/pom.xml +++ b/hapi-fhir-cli/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-fhir - 6.11.6-SNAPSHOT + 6.11.7-SNAPSHOT ../pom.xml diff --git a/hapi-fhir-client-okhttp/pom.xml b/hapi-fhir-client-okhttp/pom.xml index 989bcc5d793..78bda8b4a32 100644 --- a/hapi-fhir-client-okhttp/pom.xml +++ b/hapi-fhir-client-okhttp/pom.xml @@ -4,7 +4,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 6.11.6-SNAPSHOT + 6.11.7-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-client/pom.xml b/hapi-fhir-client/pom.xml index 24edf6e004e..8dfd0a83790 100644 --- a/hapi-fhir-client/pom.xml +++ b/hapi-fhir-client/pom.xml @@ -4,7 +4,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 6.11.6-SNAPSHOT + 6.11.7-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-converter/pom.xml b/hapi-fhir-converter/pom.xml index 4d405093e0d..9589ca5d79c 100644 --- a/hapi-fhir-converter/pom.xml +++ b/hapi-fhir-converter/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 6.11.6-SNAPSHOT + 6.11.7-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-dist/pom.xml b/hapi-fhir-dist/pom.xml index 559206b714f..e896e8c4bf0 100644 --- a/hapi-fhir-dist/pom.xml +++ b/hapi-fhir-dist/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-fhir - 6.11.6-SNAPSHOT + 6.11.7-SNAPSHOT ../pom.xml diff --git a/hapi-fhir-docs/pom.xml b/hapi-fhir-docs/pom.xml index 442d1e50a92..53b477e73d8 100644 --- a/hapi-fhir-docs/pom.xml +++ b/hapi-fhir-docs/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 6.11.6-SNAPSHOT + 6.11.7-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/7_0_0/changes.yaml b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/7_0_0/changes.yaml index 891e4962f07..dae1d7e2967 100644 --- a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/7_0_0/changes.yaml +++ b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/7_0_0/changes.yaml @@ -4,13 +4,20 @@ title: "The version of a few dependencies have been bumped to the latest versions (dependent HAPI modules listed in brackets): " diff --git a/hapi-fhir-jacoco/pom.xml b/hapi-fhir-jacoco/pom.xml index 7e93003e9cd..96c394d0795 100644 --- a/hapi-fhir-jacoco/pom.xml +++ b/hapi-fhir-jacoco/pom.xml @@ -11,7 +11,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 6.11.6-SNAPSHOT + 6.11.7-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-jaxrsserver-base/pom.xml b/hapi-fhir-jaxrsserver-base/pom.xml index f06c0efa45d..ce646c625d0 100644 --- a/hapi-fhir-jaxrsserver-base/pom.xml +++ b/hapi-fhir-jaxrsserver-base/pom.xml @@ -4,7 +4,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 6.11.6-SNAPSHOT + 6.11.7-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-jpa/pom.xml b/hapi-fhir-jpa/pom.xml index ea7d862fe7c..dc3ad059655 100644 --- a/hapi-fhir-jpa/pom.xml +++ b/hapi-fhir-jpa/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 6.11.6-SNAPSHOT + 6.11.7-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-jpaserver-base/pom.xml b/hapi-fhir-jpaserver-base/pom.xml index cb0e622aa62..f8b5642bab5 100644 --- a/hapi-fhir-jpaserver-base/pom.xml +++ b/hapi-fhir-jpaserver-base/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 6.11.6-SNAPSHOT + 6.11.7-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/expunge/ExpungeEverythingService.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/expunge/ExpungeEverythingService.java index 49d5c3903ed..9962eed3ef3 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/expunge/ExpungeEverythingService.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/expunge/ExpungeEverythingService.java @@ -140,6 +140,18 @@ public class ExpungeEverythingService implements IExpungeEverythingService { RequestPartitionId requestPartitionId = myRequestPartitionHelperSvc.determineReadPartitionForRequest(theRequest, details); + deleteAll(theRequest, propagation, requestPartitionId, counter); + + purgeAllCaches(); + + ourLog.info("COMPLETED GLOBAL $expunge - Deleted {} rows", counter.get()); + } + + protected void deleteAll( + @Nullable RequestDetails theRequest, + Propagation propagation, + RequestPartitionId requestPartitionId, + AtomicInteger counter) { myTxService .withRequest(theRequest) .withPropagation(propagation) @@ -248,10 +260,6 @@ public class ExpungeEverythingService implements IExpungeEverythingService { .execute(() -> { counter.addAndGet(doExpungeEverythingQuery("DELETE from " + Search.class.getSimpleName() + " d")); }); - - purgeAllCaches(); - - ourLog.info("COMPLETED GLOBAL $expunge - Deleted {} rows", counter.get()); } @Override @@ -263,7 +271,7 @@ public class ExpungeEverythingService implements IExpungeEverythingService { myMemoryCacheService.invalidateAllCaches(); } - private int expungeEverythingByTypeWithoutPurging( + protected int expungeEverythingByTypeWithoutPurging( RequestDetails theRequest, Class theEntityType, RequestPartitionId theRequestPartitionId) { HapiTransactionService.noTransactionAllowed(); diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/r4/MemberMatchR4ResourceProvider.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/r4/MemberMatchR4ResourceProvider.java index e69de29bb2d..6d4426c36c2 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/r4/MemberMatchR4ResourceProvider.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/r4/MemberMatchR4ResourceProvider.java @@ -0,0 +1,19 @@ +/*- + * #%L + * HAPI FHIR JPA Server + * %% + * Copyright (C) 2014 - 2023 Smile CDR, Inc. + * %% + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * #L% + */ diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/r4/MemberMatcherR4Helper.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/r4/MemberMatcherR4Helper.java index e69de29bb2d..6d4426c36c2 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/r4/MemberMatcherR4Helper.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/r4/MemberMatcherR4Helper.java @@ -0,0 +1,19 @@ +/*- + * #%L + * HAPI FHIR JPA Server + * %% + * Copyright (C) 2014 - 2023 Smile CDR, Inc. + * %% + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * #L% + */ diff --git a/hapi-fhir-jpaserver-elastic-test-utilities/pom.xml b/hapi-fhir-jpaserver-elastic-test-utilities/pom.xml index 8e35474cce4..646a34bf07a 100644 --- a/hapi-fhir-jpaserver-elastic-test-utilities/pom.xml +++ b/hapi-fhir-jpaserver-elastic-test-utilities/pom.xml @@ -6,7 +6,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 6.11.6-SNAPSHOT + 6.11.7-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-jpaserver-hfql/pom.xml b/hapi-fhir-jpaserver-hfql/pom.xml index ab4b57b1c78..254e53aa47f 100644 --- a/hapi-fhir-jpaserver-hfql/pom.xml +++ b/hapi-fhir-jpaserver-hfql/pom.xml @@ -3,7 +3,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 6.11.6-SNAPSHOT + 6.11.7-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-jpaserver-ips/pom.xml b/hapi-fhir-jpaserver-ips/pom.xml index 9c9b0177659..c284d9ed955 100644 --- a/hapi-fhir-jpaserver-ips/pom.xml +++ b/hapi-fhir-jpaserver-ips/pom.xml @@ -3,7 +3,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 6.11.6-SNAPSHOT + 6.11.7-SNAPSHOT ../hapi-deployable-pom/pom.xml @@ -40,7 +40,7 @@ test - net.sourceforge.htmlunit + org.htmlunit htmlunit test diff --git a/hapi-fhir-jpaserver-ips/src/test/java/ca/uhn/fhir/jpa/ips/generator/IpsGeneratorSvcImplTest.java b/hapi-fhir-jpaserver-ips/src/test/java/ca/uhn/fhir/jpa/ips/generator/IpsGeneratorSvcImplTest.java index 99de498ddd4..fbdaf9fa0d4 100644 --- a/hapi-fhir-jpaserver-ips/src/test/java/ca/uhn/fhir/jpa/ips/generator/IpsGeneratorSvcImplTest.java +++ b/hapi-fhir-jpaserver-ips/src/test/java/ca/uhn/fhir/jpa/ips/generator/IpsGeneratorSvcImplTest.java @@ -15,11 +15,11 @@ import ca.uhn.fhir.rest.param.TokenParam; import ca.uhn.fhir.rest.server.SimpleBundleProvider; import ca.uhn.fhir.test.utilities.HtmlUtil; import ca.uhn.fhir.util.ClasspathUtil; -import com.gargoylesoftware.htmlunit.html.DomElement; -import com.gargoylesoftware.htmlunit.html.DomNodeList; -import com.gargoylesoftware.htmlunit.html.HtmlPage; -import com.gargoylesoftware.htmlunit.html.HtmlTable; -import com.gargoylesoftware.htmlunit.html.HtmlTableRow; +import org.htmlunit.html.DomElement; +import org.htmlunit.html.DomNodeList; +import org.htmlunit.html.HtmlPage; +import org.htmlunit.html.HtmlTable; +import org.htmlunit.html.HtmlTableRow; import com.google.common.collect.Lists; import org.hl7.fhir.instance.model.api.IBaseResource; import org.hl7.fhir.r4.model.AllergyIntolerance; @@ -49,6 +49,11 @@ import org.hl7.fhir.r4.model.Procedure; import org.hl7.fhir.r4.model.Reference; import org.hl7.fhir.r4.model.Resource; import org.hl7.fhir.r4.model.StringType; +import org.htmlunit.html.DomElement; +import org.htmlunit.html.DomNodeList; +import org.htmlunit.html.HtmlPage; +import org.htmlunit.html.HtmlTable; +import org.htmlunit.html.HtmlTableRow; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; diff --git a/hapi-fhir-jpaserver-mdm/pom.xml b/hapi-fhir-jpaserver-mdm/pom.xml index b8313787855..94bd39c91a2 100644 --- a/hapi-fhir-jpaserver-mdm/pom.xml +++ b/hapi-fhir-jpaserver-mdm/pom.xml @@ -6,7 +6,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 6.11.6-SNAPSHOT + 6.11.7-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-jpaserver-model/pom.xml b/hapi-fhir-jpaserver-model/pom.xml index b104e23fcda..5000d617b40 100644 --- a/hapi-fhir-jpaserver-model/pom.xml +++ b/hapi-fhir-jpaserver-model/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 6.11.6-SNAPSHOT + 6.11.7-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-jpaserver-searchparam/pom.xml b/hapi-fhir-jpaserver-searchparam/pom.xml index 8da2185e60d..20a05eaa091 100755 --- a/hapi-fhir-jpaserver-searchparam/pom.xml +++ b/hapi-fhir-jpaserver-searchparam/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 6.11.6-SNAPSHOT + 6.11.7-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-jpaserver-subscription/pom.xml b/hapi-fhir-jpaserver-subscription/pom.xml index 5d2d35a4323..dca57d868d6 100644 --- a/hapi-fhir-jpaserver-subscription/pom.xml +++ b/hapi-fhir-jpaserver-subscription/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 6.11.6-SNAPSHOT + 6.11.7-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-jpaserver-test-dstu2/pom.xml b/hapi-fhir-jpaserver-test-dstu2/pom.xml index 9167015e41e..d168f8148a2 100644 --- a/hapi-fhir-jpaserver-test-dstu2/pom.xml +++ b/hapi-fhir-jpaserver-test-dstu2/pom.xml @@ -6,7 +6,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 6.11.6-SNAPSHOT + 6.11.7-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-jpaserver-test-dstu3/pom.xml b/hapi-fhir-jpaserver-test-dstu3/pom.xml index f7d7d3b0462..b23b2ed48f0 100644 --- a/hapi-fhir-jpaserver-test-dstu3/pom.xml +++ b/hapi-fhir-jpaserver-test-dstu3/pom.xml @@ -6,7 +6,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 6.11.6-SNAPSHOT + 6.11.7-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-jpaserver-test-r4/pom.xml b/hapi-fhir-jpaserver-test-r4/pom.xml index 7d66d9765c2..fbcdfb36f6e 100644 --- a/hapi-fhir-jpaserver-test-r4/pom.xml +++ b/hapi-fhir-jpaserver-test-r4/pom.xml @@ -6,7 +6,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 6.11.6-SNAPSHOT + 6.11.7-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-jpaserver-test-r4/src/test/java/ca/uhn/fhir/jpa/dao/BaseHapiFhirResourceDaoTest.java b/hapi-fhir-jpaserver-test-r4/src/test/java/ca/uhn/fhir/jpa/dao/BaseHapiFhirResourceDaoTest.java index 7fdd962e5c0..6aff8e400a7 100644 --- a/hapi-fhir-jpaserver-test-r4/src/test/java/ca/uhn/fhir/jpa/dao/BaseHapiFhirResourceDaoTest.java +++ b/hapi-fhir-jpaserver-test-r4/src/test/java/ca/uhn/fhir/jpa/dao/BaseHapiFhirResourceDaoTest.java @@ -65,7 +65,7 @@ class BaseHapiFhirResourceDaoTest { private IRequestPartitionHelperSvc myRequestPartitionHelperSvc; @Mock - private IIdHelperService myIdHelperService; + private IIdHelperService myIdHelperService; @Mock private EntityManager myEntityManager; @@ -86,10 +86,10 @@ class BaseHapiFhirResourceDaoTest { private ISearchParamRegistry mySearchParamRegistry; @Mock - private SearchBuilderFactory mySearchBuilderFactory; + private SearchBuilderFactory mySearchBuilderFactory; @Mock - private ISearchBuilder myISearchBuilder; + private ISearchBuilder myISearchBuilder; @Captor private ArgumentCaptor mySearchParameterMapCaptor; diff --git a/hapi-fhir-jpaserver-test-r4b/pom.xml b/hapi-fhir-jpaserver-test-r4b/pom.xml index 1ea5c6a1838..fc9a0d3a742 100644 --- a/hapi-fhir-jpaserver-test-r4b/pom.xml +++ b/hapi-fhir-jpaserver-test-r4b/pom.xml @@ -6,7 +6,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 6.11.6-SNAPSHOT + 6.11.7-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-jpaserver-test-r5/pom.xml b/hapi-fhir-jpaserver-test-r5/pom.xml index 7702cbadfc9..df1d9fc41e3 100644 --- a/hapi-fhir-jpaserver-test-r5/pom.xml +++ b/hapi-fhir-jpaserver-test-r5/pom.xml @@ -6,7 +6,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 6.11.6-SNAPSHOT + 6.11.7-SNAPSHOT ../hapi-deployable-pom/pom.xml @@ -29,7 +29,7 @@ test - net.sourceforge.htmlunit + org.htmlunit htmlunit test diff --git a/hapi-fhir-jpaserver-test-r5/src/test/java/ca/uhn/fhir/jpa/search/reindex/InstanceReindexServiceImplNarrativeR5Test.java b/hapi-fhir-jpaserver-test-r5/src/test/java/ca/uhn/fhir/jpa/search/reindex/InstanceReindexServiceImplNarrativeR5Test.java index 90da515b1a9..472d68df121 100644 --- a/hapi-fhir-jpaserver-test-r5/src/test/java/ca/uhn/fhir/jpa/search/reindex/InstanceReindexServiceImplNarrativeR5Test.java +++ b/hapi-fhir-jpaserver-test-r5/src/test/java/ca/uhn/fhir/jpa/search/reindex/InstanceReindexServiceImplNarrativeR5Test.java @@ -16,8 +16,8 @@ import ca.uhn.fhir.jpa.model.entity.ResourceTable; import ca.uhn.fhir.jpa.model.entity.SearchParamPresentEntity; import ca.uhn.fhir.jpa.searchparam.extractor.ResourceIndexedSearchParams; import ca.uhn.fhir.test.utilities.HtmlUtil; -import com.gargoylesoftware.htmlunit.html.HtmlPage; -import com.gargoylesoftware.htmlunit.html.HtmlTable; +import org.htmlunit.html.HtmlPage; +import org.htmlunit.html.HtmlTable; import org.hl7.fhir.r4.model.IdType; import org.hl7.fhir.r4.model.Parameters; import org.hl7.fhir.r4.model.StringType; diff --git a/hapi-fhir-jpaserver-test-utilities/pom.xml b/hapi-fhir-jpaserver-test-utilities/pom.xml index 7835f21d097..9a2166c22ea 100644 --- a/hapi-fhir-jpaserver-test-utilities/pom.xml +++ b/hapi-fhir-jpaserver-test-utilities/pom.xml @@ -6,7 +6,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 6.11.6-SNAPSHOT + 6.11.7-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-jpaserver-uhnfhirtest/pom.xml b/hapi-fhir-jpaserver-uhnfhirtest/pom.xml index cdce42511cb..0409211c054 100644 --- a/hapi-fhir-jpaserver-uhnfhirtest/pom.xml +++ b/hapi-fhir-jpaserver-uhnfhirtest/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-fhir - 6.11.6-SNAPSHOT + 6.11.7-SNAPSHOT ../pom.xml diff --git a/hapi-fhir-server-cds-hooks/pom.xml b/hapi-fhir-server-cds-hooks/pom.xml index 4783987e814..dd01ffff387 100644 --- a/hapi-fhir-server-cds-hooks/pom.xml +++ b/hapi-fhir-server-cds-hooks/pom.xml @@ -7,7 +7,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 6.11.6-SNAPSHOT + 6.11.7-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-server-mdm/pom.xml b/hapi-fhir-server-mdm/pom.xml index 6916512846f..6e163215517 100644 --- a/hapi-fhir-server-mdm/pom.xml +++ b/hapi-fhir-server-mdm/pom.xml @@ -7,7 +7,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 6.11.6-SNAPSHOT + 6.11.7-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-server-openapi/pom.xml b/hapi-fhir-server-openapi/pom.xml index e7073b4ed48..dfe33aeeb93 100644 --- a/hapi-fhir-server-openapi/pom.xml +++ b/hapi-fhir-server-openapi/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 6.11.6-SNAPSHOT + 6.11.7-SNAPSHOT ../hapi-deployable-pom/pom.xml @@ -88,7 +88,7 @@ test - net.sourceforge.htmlunit + org.htmlunit htmlunit test diff --git a/hapi-fhir-server-openapi/src/test/java/ca/uhn/fhir/rest/openapi/OpenApiInterceptorTest.java b/hapi-fhir-server-openapi/src/test/java/ca/uhn/fhir/rest/openapi/OpenApiInterceptorTest.java index c7f4470da5f..3ea0ddea35a 100644 --- a/hapi-fhir-server-openapi/src/test/java/ca/uhn/fhir/rest/openapi/OpenApiInterceptorTest.java +++ b/hapi-fhir-server-openapi/src/test/java/ca/uhn/fhir/rest/openapi/OpenApiInterceptorTest.java @@ -26,9 +26,9 @@ import ca.uhn.fhir.test.utilities.HtmlUtil; import ca.uhn.fhir.test.utilities.HttpClientExtension; import ca.uhn.fhir.test.utilities.server.RestfulServerExtension; import ca.uhn.fhir.util.ExtensionConstants; -import com.gargoylesoftware.htmlunit.html.DomElement; -import com.gargoylesoftware.htmlunit.html.HtmlDivision; -import com.gargoylesoftware.htmlunit.html.HtmlPage; +import org.htmlunit.html.DomElement; +import org.htmlunit.html.HtmlDivision; +import org.htmlunit.html.HtmlPage; import io.swagger.v3.core.util.Yaml; import io.swagger.v3.oas.models.OpenAPI; import io.swagger.v3.oas.models.PathItem; diff --git a/hapi-fhir-server/pom.xml b/hapi-fhir-server/pom.xml index 4b72020ad08..3a521cd7eae 100644 --- a/hapi-fhir-server/pom.xml +++ b/hapi-fhir-server/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 6.11.6-SNAPSHOT + 6.11.7-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-serviceloaders/hapi-fhir-caching-api/pom.xml b/hapi-fhir-serviceloaders/hapi-fhir-caching-api/pom.xml index 6c7f8c1c78f..717dc503b22 100644 --- a/hapi-fhir-serviceloaders/hapi-fhir-caching-api/pom.xml +++ b/hapi-fhir-serviceloaders/hapi-fhir-caching-api/pom.xml @@ -7,7 +7,7 @@ hapi-fhir-serviceloaders ca.uhn.hapi.fhir - 6.11.6-SNAPSHOT + 6.11.7-SNAPSHOT ../pom.xml diff --git a/hapi-fhir-serviceloaders/hapi-fhir-caching-caffeine/pom.xml b/hapi-fhir-serviceloaders/hapi-fhir-caching-caffeine/pom.xml index 86aac948f89..4892de65b91 100644 --- a/hapi-fhir-serviceloaders/hapi-fhir-caching-caffeine/pom.xml +++ b/hapi-fhir-serviceloaders/hapi-fhir-caching-caffeine/pom.xml @@ -7,7 +7,7 @@ hapi-fhir-serviceloaders ca.uhn.hapi.fhir - 6.11.6-SNAPSHOT + 6.11.7-SNAPSHOT ../pom.xml @@ -21,7 +21,7 @@ ca.uhn.hapi.fhir hapi-fhir-caching-api - 6.11.6-SNAPSHOT + 6.11.7-SNAPSHOT diff --git a/hapi-fhir-serviceloaders/hapi-fhir-caching-guava/pom.xml b/hapi-fhir-serviceloaders/hapi-fhir-caching-guava/pom.xml index 272592c7417..4ac7744f800 100644 --- a/hapi-fhir-serviceloaders/hapi-fhir-caching-guava/pom.xml +++ b/hapi-fhir-serviceloaders/hapi-fhir-caching-guava/pom.xml @@ -7,7 +7,7 @@ hapi-fhir-serviceloaders ca.uhn.hapi.fhir - 6.11.6-SNAPSHOT + 6.11.7-SNAPSHOT ../pom.xml diff --git a/hapi-fhir-serviceloaders/hapi-fhir-caching-testing/pom.xml b/hapi-fhir-serviceloaders/hapi-fhir-caching-testing/pom.xml index b57e4eb225e..68182ea7940 100644 --- a/hapi-fhir-serviceloaders/hapi-fhir-caching-testing/pom.xml +++ b/hapi-fhir-serviceloaders/hapi-fhir-caching-testing/pom.xml @@ -7,7 +7,7 @@ hapi-fhir ca.uhn.hapi.fhir - 6.11.6-SNAPSHOT + 6.11.7-SNAPSHOT ../../pom.xml diff --git a/hapi-fhir-serviceloaders/pom.xml b/hapi-fhir-serviceloaders/pom.xml index 4902a9f4f8f..45d0307e9d7 100644 --- a/hapi-fhir-serviceloaders/pom.xml +++ b/hapi-fhir-serviceloaders/pom.xml @@ -5,7 +5,7 @@ hapi-deployable-pom ca.uhn.hapi.fhir - 6.11.6-SNAPSHOT + 6.11.7-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-autoconfigure/pom.xml b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-autoconfigure/pom.xml index 26034b2ca9a..4e76a3e78e7 100644 --- a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-autoconfigure/pom.xml +++ b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-autoconfigure/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 6.11.6-SNAPSHOT + 6.11.7-SNAPSHOT ../../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-client-apache/pom.xml b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-client-apache/pom.xml index c871663a0aa..2b50aacd7ef 100644 --- a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-client-apache/pom.xml +++ b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-client-apache/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-fhir-spring-boot-samples - 6.11.6-SNAPSHOT + 6.11.7-SNAPSHOT hapi-fhir-spring-boot-sample-client-apache diff --git a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-client-okhttp/pom.xml b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-client-okhttp/pom.xml index 160992bb7d0..4f5bae777e6 100644 --- a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-client-okhttp/pom.xml +++ b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-client-okhttp/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-fhir-spring-boot-samples - 6.11.6-SNAPSHOT + 6.11.7-SNAPSHOT diff --git a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-server-jersey/pom.xml b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-server-jersey/pom.xml index ffe1e1c0257..6ac1fcffe05 100644 --- a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-server-jersey/pom.xml +++ b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-server-jersey/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-fhir-spring-boot-samples - 6.11.6-SNAPSHOT + 6.11.7-SNAPSHOT diff --git a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/pom.xml b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/pom.xml index c236010d22f..213031cf9f9 100644 --- a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/pom.xml +++ b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-fhir-spring-boot - 6.11.6-SNAPSHOT + 6.11.7-SNAPSHOT diff --git a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-starter/pom.xml b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-starter/pom.xml index 9749dc73399..4c620fb3e24 100644 --- a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-starter/pom.xml +++ b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-starter/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 6.11.6-SNAPSHOT + 6.11.7-SNAPSHOT ../../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-spring-boot/pom.xml b/hapi-fhir-spring-boot/pom.xml index fe8de44baaa..08ebc710049 100644 --- a/hapi-fhir-spring-boot/pom.xml +++ b/hapi-fhir-spring-boot/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-fhir - 6.11.6-SNAPSHOT + 6.11.7-SNAPSHOT ../pom.xml diff --git a/hapi-fhir-sql-migrate/pom.xml b/hapi-fhir-sql-migrate/pom.xml index 277a9d6dc07..5152c3ba85f 100644 --- a/hapi-fhir-sql-migrate/pom.xml +++ b/hapi-fhir-sql-migrate/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 6.11.6-SNAPSHOT + 6.11.7-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-storage-batch2-jobs/pom.xml b/hapi-fhir-storage-batch2-jobs/pom.xml index 9b4b34c786e..a7f5d8ecbaf 100644 --- a/hapi-fhir-storage-batch2-jobs/pom.xml +++ b/hapi-fhir-storage-batch2-jobs/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 6.11.6-SNAPSHOT + 6.11.7-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-storage-batch2-test-utilities/pom.xml b/hapi-fhir-storage-batch2-test-utilities/pom.xml index a0a10cc15c4..38658c74f86 100644 --- a/hapi-fhir-storage-batch2-test-utilities/pom.xml +++ b/hapi-fhir-storage-batch2-test-utilities/pom.xml @@ -7,7 +7,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 6.11.6-SNAPSHOT + 6.11.7-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-storage-batch2/pom.xml b/hapi-fhir-storage-batch2/pom.xml index 5116f3e588f..42541c03098 100644 --- a/hapi-fhir-storage-batch2/pom.xml +++ b/hapi-fhir-storage-batch2/pom.xml @@ -7,7 +7,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 6.11.6-SNAPSHOT + 6.11.7-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-storage-cr/pom.xml b/hapi-fhir-storage-cr/pom.xml index 35371deeacf..9ff0f31d888 100644 --- a/hapi-fhir-storage-cr/pom.xml +++ b/hapi-fhir-storage-cr/pom.xml @@ -7,7 +7,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 6.11.6-SNAPSHOT + 6.11.7-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-storage-mdm/pom.xml b/hapi-fhir-storage-mdm/pom.xml index 8a189a15a25..6612210e842 100644 --- a/hapi-fhir-storage-mdm/pom.xml +++ b/hapi-fhir-storage-mdm/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 6.11.6-SNAPSHOT + 6.11.7-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-storage-test-utilities/pom.xml b/hapi-fhir-storage-test-utilities/pom.xml index 74d61aa3131..d58ac7db8c2 100644 --- a/hapi-fhir-storage-test-utilities/pom.xml +++ b/hapi-fhir-storage-test-utilities/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 6.11.6-SNAPSHOT + 6.11.7-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-storage/pom.xml b/hapi-fhir-storage/pom.xml index c464af460e0..c4059235dcf 100644 --- a/hapi-fhir-storage/pom.xml +++ b/hapi-fhir-storage/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 6.11.6-SNAPSHOT + 6.11.7-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-storage/src/main/java/ca/uhn/fhir/jpa/api/model/DeleteConflictList.java b/hapi-fhir-storage/src/main/java/ca/uhn/fhir/jpa/api/model/DeleteConflictList.java index 825a4cc69e7..b5de2225856 100644 --- a/hapi-fhir-storage/src/main/java/ca/uhn/fhir/jpa/api/model/DeleteConflictList.java +++ b/hapi-fhir-storage/src/main/java/ca/uhn/fhir/jpa/api/model/DeleteConflictList.java @@ -114,7 +114,7 @@ public class DeleteConflictList implements Iterable { @Override public void remove() { - Assert.isTrue(myLastOperationWasNext); + Assert.isTrue(myLastOperationWasNext, "myLastOperationWasNext is not true"); myNextIndex--; myList.remove(myNextIndex); myLastOperationWasNext = false; diff --git a/hapi-fhir-structures-dstu2.1/pom.xml b/hapi-fhir-structures-dstu2.1/pom.xml index da4b2f7ca2a..dac3392fc7e 100644 --- a/hapi-fhir-structures-dstu2.1/pom.xml +++ b/hapi-fhir-structures-dstu2.1/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 6.11.6-SNAPSHOT + 6.11.7-SNAPSHOT ../hapi-deployable-pom/pom.xml @@ -224,13 +224,6 @@ true - - org.apache.maven.plugins - maven-compiler-plugin - - true - - org.apache.felix maven-bundle-plugin diff --git a/hapi-fhir-structures-dstu2/pom.xml b/hapi-fhir-structures-dstu2/pom.xml index 73785e72f84..4532fb82ccf 100644 --- a/hapi-fhir-structures-dstu2/pom.xml +++ b/hapi-fhir-structures-dstu2/pom.xml @@ -4,7 +4,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 6.11.6-SNAPSHOT + 6.11.7-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/util/FhirTerserDstu2Test.java b/hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/util/FhirTerserDstu2Test.java index b7e149e007f..64bff5e51fa 100644 --- a/hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/util/FhirTerserDstu2Test.java +++ b/hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/util/FhirTerserDstu2Test.java @@ -863,17 +863,19 @@ public class FhirTerserDstu2Test { /** * See http://stackoverflow.com/questions/182636/how-to-determine-the-class-of-a-generic-type */ + @SuppressWarnings({"UnnecessaryLocalVariable", "unchecked"}) private static Class> getListClass(Class theClass) { - return new ClassGetter>() { - }.get(); + Class listClass = List.class; + return listClass; } /** * See http://stackoverflow.com/questions/182636/how-to-determine-the-class-of-a-generic-type */ + @SuppressWarnings({"UnnecessaryLocalVariable", "unchecked"}) private static Class>> getListClass2() { - return new ClassGetter>>() { - }.get(); + Class listClass = List.class; + return listClass; } /** diff --git a/hapi-fhir-structures-dstu3/pom.xml b/hapi-fhir-structures-dstu3/pom.xml index 2808e54b94f..f4cfda0fd24 100644 --- a/hapi-fhir-structures-dstu3/pom.xml +++ b/hapi-fhir-structures-dstu3/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 6.11.6-SNAPSHOT + 6.11.7-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-structures-dstu3/src/test/java/ca/uhn/fhir/parser/JsonParserDstu3Test.java b/hapi-fhir-structures-dstu3/src/test/java/ca/uhn/fhir/parser/JsonParserDstu3Test.java index bcff5de5fb3..cfa190aa1db 100644 --- a/hapi-fhir-structures-dstu3/src/test/java/ca/uhn/fhir/parser/JsonParserDstu3Test.java +++ b/hapi-fhir-structures-dstu3/src/test/java/ca/uhn/fhir/parser/JsonParserDstu3Test.java @@ -9,6 +9,7 @@ import ca.uhn.fhir.parser.XmlParserDstu3Test.TestPatientFor327; import ca.uhn.fhir.parser.json.BaseJsonLikeValue.ScalarType; import ca.uhn.fhir.parser.json.BaseJsonLikeValue.ValueType; import ca.uhn.fhir.util.ClasspathUtil; +import ca.uhn.fhir.util.JsonUtil; import ca.uhn.fhir.util.TestUtil; import ca.uhn.fhir.validation.FhirValidator; import ca.uhn.fhir.validation.ValidationResult; @@ -157,7 +158,7 @@ public class JsonParserDstu3Test { fail(); } catch (DataFormatException e) { assertEquals(Msg.code(1861) + "Failed to parse JSON encoded FHIR content: Unexpected character ('=' (code 61)): was expecting a colon to separate field name and value\n" + - " at [Source: UNKNOWN; line: 4, column: 18]", e.getMessage()); + " at [line: 4, column: 18]", e.getMessage()); } } @@ -2324,8 +2325,10 @@ public class JsonParserDstu3Test { ourCtx.newJsonParser().parseResource(Bundle.class, bundle); fail(); } catch (DataFormatException e) { - assertEquals(Msg.code(1861) + "Failed to parse JSON encoded FHIR content: Unexpected close marker '}': expected ']' (for root starting at [Source: UNKNOWN; line: 1])\n" + - " at [Source: UNKNOWN; line: 4, column: 3]", e.getMessage()); + // I'm hoping at some point we can get rid of the REDACTED message entirely. + // Request filed with Jackson: https://github.com/FasterXML/jackson-core/issues/1158 + assertEquals(Msg.code(1861) + "Failed to parse JSON encoded FHIR content: Unexpected close marker '}': expected ']' (for root starting at [line: 1])\n" + + " at [line: 4, column: 3]", e.getMessage()); } } diff --git a/hapi-fhir-structures-hl7org-dstu2/pom.xml b/hapi-fhir-structures-hl7org-dstu2/pom.xml index 5fee48ad79f..91c113e8e84 100644 --- a/hapi-fhir-structures-hl7org-dstu2/pom.xml +++ b/hapi-fhir-structures-hl7org-dstu2/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 6.11.6-SNAPSHOT + 6.11.7-SNAPSHOT ../hapi-deployable-pom/pom.xml @@ -235,13 +235,6 @@ true - - org.apache.maven.plugins - maven-compiler-plugin - - true - - org.apache.felix maven-bundle-plugin diff --git a/hapi-fhir-structures-r4/pom.xml b/hapi-fhir-structures-r4/pom.xml index ecfd48b5401..f2d1ae5e412 100644 --- a/hapi-fhir-structures-r4/pom.xml +++ b/hapi-fhir-structures-r4/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 6.11.6-SNAPSHOT + 6.11.7-SNAPSHOT ../hapi-deployable-pom/pom.xml @@ -303,13 +303,6 @@ true - - org.apache.maven.plugins - maven-compiler-plugin - - true - - org.apache.felix maven-bundle-plugin diff --git a/hapi-fhir-structures-r4/src/test/java/ca/uhn/fhir/util/FhirTerserR4Test.java b/hapi-fhir-structures-r4/src/test/java/ca/uhn/fhir/util/FhirTerserR4Test.java index 5182d2491a9..42ee74b22fb 100644 --- a/hapi-fhir-structures-r4/src/test/java/ca/uhn/fhir/util/FhirTerserR4Test.java +++ b/hapi-fhir-structures-r4/src/test/java/ca/uhn/fhir/util/FhirTerserR4Test.java @@ -1553,17 +1553,19 @@ public class FhirTerserR4Test { /** * See http://stackoverflow.com/questions/182636/how-to-determine-the-class-of-a-generic-type */ + @SuppressWarnings({"UnnecessaryLocalVariable", "unchecked"}) private static Class> getListClass(Class theClass) { - return new ClassGetter>() { - }.get(); + Class listClass = List.class; + return listClass; } /** * See http://stackoverflow.com/questions/182636/how-to-determine-the-class-of-a-generic-type */ + @SuppressWarnings({"UnnecessaryLocalVariable", "unchecked"}) private static Class>> getListClass2() { - return new ClassGetter>>() { - }.get(); + Class listClass = List.class; + return listClass; } } diff --git a/hapi-fhir-structures-r4b/pom.xml b/hapi-fhir-structures-r4b/pom.xml index 50e766a38f3..937f228073f 100644 --- a/hapi-fhir-structures-r4b/pom.xml +++ b/hapi-fhir-structures-r4b/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 6.11.6-SNAPSHOT + 6.11.7-SNAPSHOT ../hapi-deployable-pom/pom.xml @@ -287,13 +287,6 @@ true - - org.apache.maven.plugins - maven-compiler-plugin - - true - - org.apache.felix maven-bundle-plugin diff --git a/hapi-fhir-structures-r5/pom.xml b/hapi-fhir-structures-r5/pom.xml index 57170dcaece..2c4111ad99a 100644 --- a/hapi-fhir-structures-r5/pom.xml +++ b/hapi-fhir-structures-r5/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 6.11.6-SNAPSHOT + 6.11.7-SNAPSHOT ../hapi-deployable-pom/pom.xml @@ -276,13 +276,6 @@ true - - org.apache.maven.plugins - maven-compiler-plugin - - true - - org.apache.felix maven-bundle-plugin diff --git a/hapi-fhir-test-utilities/pom.xml b/hapi-fhir-test-utilities/pom.xml index 568f69cdc4c..dcbb597eae8 100644 --- a/hapi-fhir-test-utilities/pom.xml +++ b/hapi-fhir-test-utilities/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 6.11.6-SNAPSHOT + 6.11.7-SNAPSHOT ../hapi-deployable-pom/pom.xml @@ -102,22 +102,8 @@ - net.sourceforge.htmlunit + org.htmlunit htmlunit - - - xml-apis - xml-apis - - - xerces - xercesImpl - - - org.eclipse.jetty.websocket - websocket-client - - diff --git a/hapi-fhir-test-utilities/src/main/java/ca/uhn/fhir/test/utilities/HtmlUtil.java b/hapi-fhir-test-utilities/src/main/java/ca/uhn/fhir/test/utilities/HtmlUtil.java index 2f90b77abe0..beee282dd1b 100644 --- a/hapi-fhir-test-utilities/src/main/java/ca/uhn/fhir/test/utilities/HtmlUtil.java +++ b/hapi-fhir-test-utilities/src/main/java/ca/uhn/fhir/test/utilities/HtmlUtil.java @@ -19,14 +19,14 @@ */ package ca.uhn.fhir.test.utilities; -import com.gargoylesoftware.htmlunit.BrowserVersion; -import com.gargoylesoftware.htmlunit.StringWebResponse; -import com.gargoylesoftware.htmlunit.WebClient; -import com.gargoylesoftware.htmlunit.html.HtmlForm; -import com.gargoylesoftware.htmlunit.html.HtmlInput; -import com.gargoylesoftware.htmlunit.html.HtmlPage; -import com.gargoylesoftware.htmlunit.html.parser.neko.HtmlUnitNekoHtmlParser; import org.awaitility.Awaitility; +import org.htmlunit.BrowserVersion; +import org.htmlunit.StringWebResponse; +import org.htmlunit.WebClient; +import org.htmlunit.html.HtmlForm; +import org.htmlunit.html.HtmlInput; +import org.htmlunit.html.HtmlPage; +import org.htmlunit.html.parser.neko.HtmlUnitNekoHtmlParser; import java.io.IOException; import java.net.URL; diff --git a/hapi-fhir-test-utilities/src/main/java/ca/uhn/fhir/test/utilities/MockMvcWebConnectionForHtmlUnit3.java b/hapi-fhir-test-utilities/src/main/java/ca/uhn/fhir/test/utilities/MockMvcWebConnectionForHtmlUnit3.java new file mode 100644 index 00000000000..2614c9e1338 --- /dev/null +++ b/hapi-fhir-test-utilities/src/main/java/ca/uhn/fhir/test/utilities/MockMvcWebConnectionForHtmlUnit3.java @@ -0,0 +1,763 @@ +/*- + * #%L + * HAPI FHIR Test Utilities + * %% + * Copyright (C) 2014 - 2023 Smile CDR, Inc. + * %% + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * #L% + */ +package ca.uhn.fhir.test.utilities; + +import java.io.File; +import java.io.IOException; +import java.nio.charset.Charset; +import java.nio.charset.StandardCharsets; +import java.nio.file.Files; +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.Date; +import java.util.Enumeration; +import java.util.HashMap; +import java.util.List; +import java.util.Locale; +import java.util.Map; +import java.util.Set; +import java.util.StringTokenizer; + +import jakarta.servlet.ServletContext; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpSession; +import org.htmlunit.CookieManager; +import org.htmlunit.FormEncodingType; +import org.htmlunit.WebClient; +import org.htmlunit.WebConnection; +import org.htmlunit.WebRequest; +import org.htmlunit.WebResponse; +import org.htmlunit.WebResponseData; +import org.htmlunit.util.Cookie; +import org.apache.http.impl.cookie.BasicClientCookie; + +import org.htmlunit.util.KeyDataPair; +import org.htmlunit.util.NameValuePair; +import org.springframework.beans.Mergeable; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.lang.Nullable; +import org.springframework.mock.web.MockHttpServletRequest; +import org.springframework.mock.web.MockHttpServletResponse; +import org.springframework.mock.web.MockHttpSession; +import org.springframework.mock.web.MockPart; +import org.springframework.test.web.servlet.MockMvc; +import org.springframework.test.web.servlet.RequestBuilder; +import org.springframework.test.web.servlet.ResultActions; +import org.springframework.test.web.servlet.SmartRequestBuilder; +import org.springframework.test.web.servlet.request.MockHttpServletRequestBuilder; +import org.springframework.test.web.servlet.request.MockMvcRequestBuilders; +import org.springframework.test.web.servlet.request.RequestPostProcessor; +import org.springframework.util.Assert; +import org.springframework.util.ObjectUtils; +import org.springframework.util.StringUtils; +import org.springframework.web.util.UriComponents; +import org.springframework.web.util.UriComponentsBuilder; +import org.springframework.web.util.UriUtils; + +/** + * This class is just a duplication or the Spring class by the same name + * (MockMvcWebConnection). It exists to use the new org.htmlunit namespace. + * + * This should no longer be necessary once this is fixed: + * https://github.com/spring-projects/spring-framework/issues/30392 + */ +public final class MockMvcWebConnectionForHtmlUnit3 implements WebConnection { + + private final Map sessions = new HashMap<>(); + + private final MockMvc mockMvc; + + @Nullable + private final String contextPath; + + private WebClient webClient; + + private static final int MAX_FORWARDS = 100; + + + /** + * Create a new instance that assumes the context path of the application + * is {@code ""} (i.e., the root context). + *

For example, the URL {@code http://localhost/test/this} would use + * {@code ""} as the context path. + * @param mockMvc the {@code MockMvc} instance to use; never {@code null} + * @param webClient the {@link WebClient} to use. never {@code null} + */ + public MockMvcWebConnectionForHtmlUnit3(MockMvc mockMvc, WebClient webClient) { + this(mockMvc, webClient, ""); + } + + /** + * Create a new instance with the specified context path. + *

The path may be {@code null} in which case the first path segment + * of the URL is turned into the contextPath. Otherwise it must conform + * to {@link jakarta.servlet.http.HttpServletRequest#getContextPath()} + * which states that it can be an empty string and otherwise must start + * with a "/" character and not end with a "/" character. + * @param mockMvc the {@code MockMvc} instance to use (never {@code null}) + * @param webClient the {@link WebClient} to use (never {@code null}) + * @param contextPath the contextPath to use + */ + public MockMvcWebConnectionForHtmlUnit3(MockMvc mockMvc, WebClient webClient, @Nullable String contextPath) { + Assert.notNull(mockMvc, "MockMvc must not be null"); + Assert.notNull(webClient, "WebClient must not be null"); + validateContextPath(contextPath); + + this.webClient = webClient; + this.mockMvc = mockMvc; + this.contextPath = contextPath; + } + + /** + * Validate the supplied {@code contextPath}. + *

If the value is not {@code null}, it must conform to + * {@link jakarta.servlet.http.HttpServletRequest#getContextPath()} which + * states that it can be an empty string and otherwise must start with + * a "/" character and not end with a "/" character. + * @param contextPath the path to validate + */ + static void validateContextPath(@Nullable String contextPath) { + if (contextPath == null || contextPath.isEmpty()) { + return; + } + Assert.isTrue(contextPath.startsWith("/"), () -> "contextPath '" + contextPath + "' must start with '/'."); + Assert.isTrue(!contextPath.endsWith("/"), () -> "contextPath '" + contextPath + "' must not end with '/'."); + } + + + public void setWebClient(WebClient webClient) { + Assert.notNull(webClient, "WebClient must not be null"); + this.webClient = webClient; + } + + + @Override + public WebResponse getResponse(WebRequest webRequest) throws IOException { + long startTime = System.currentTimeMillis(); + HtmlUnitRequestBuilder requestBuilder = new HtmlUnitRequestBuilder(this.sessions, this.webClient, webRequest); + requestBuilder.setContextPath(this.contextPath); + + MockHttpServletResponse httpServletResponse = getResponse(requestBuilder); + String forwardedUrl = httpServletResponse.getForwardedUrl(); + int forwards = 0; + while (forwardedUrl != null && forwards < MAX_FORWARDS) { + requestBuilder.setForwardPostProcessor(new ForwardRequestPostProcessor(forwardedUrl)); + httpServletResponse = getResponse(requestBuilder); + forwardedUrl = httpServletResponse.getForwardedUrl(); + forwards += 1; + } + if (forwards == MAX_FORWARDS) { + throw new IllegalStateException("Forwarded " + forwards + " times in a row, potential infinite forward loop"); + } + storeCookies(webRequest, httpServletResponse.getCookies()); + + return new MockWebResponseBuilder(startTime, webRequest, httpServletResponse).build(); + } + + private MockHttpServletResponse getResponse(RequestBuilder requestBuilder) throws IOException { + ResultActions resultActions; + try { + resultActions = this.mockMvc.perform(requestBuilder); + } + catch (Exception ex) { + throw new IOException(ex); + } + + return resultActions.andReturn().getResponse(); + } + + private void storeCookies(WebRequest webRequest, jakarta.servlet.http.Cookie[] cookies) { + Date now = new Date(); + CookieManager cookieManager = this.webClient.getCookieManager(); + for (jakarta.servlet.http.Cookie cookie : cookies) { + if (cookie.getDomain() == null) { + cookie.setDomain(webRequest.getUrl().getHost()); + } + Cookie toManage = createCookie(cookie); + Date expires = toManage.getExpires(); + if (expires == null || expires.after(now)) { + cookieManager.addCookie(toManage); + } + else { + cookieManager.removeCookie(toManage); + } + } + } + + @SuppressWarnings("removal") + private static org.htmlunit.util.Cookie createCookie(jakarta.servlet.http.Cookie cookie) { + Date expires = null; + if (cookie.getMaxAge() > -1) { + expires = new Date(System.currentTimeMillis() + cookie.getMaxAge() * 1000); + } + BasicClientCookie result = new BasicClientCookie(cookie.getName(), cookie.getValue()); + result.setDomain(cookie.getDomain()); + result.setComment(cookie.getComment()); + result.setExpiryDate(expires); + result.setPath(cookie.getPath()); + result.setSecure(cookie.getSecure()); + if (cookie.isHttpOnly()) { + result.setAttribute("httponly", "true"); + } + return new org.htmlunit.util.Cookie(result); + } + + @Override + public void close() { + } + + + + + final class HtmlUnitRequestBuilder implements RequestBuilder, Mergeable { + + private final Map sessions; + + private final WebClient webClient; + + private final WebRequest webRequest; + + @Nullable + private String contextPath; + + @Nullable + private RequestBuilder parentBuilder; + + @Nullable + private SmartRequestBuilder parentPostProcessor; + + @Nullable + private RequestPostProcessor forwardPostProcessor; + + + /** + * Construct a new {@code HtmlUnitRequestBuilder}. + * @param sessions a {@link Map} from session {@linkplain HttpSession#getId() IDs} + * to currently managed {@link HttpSession} objects; never {@code null} + * @param webClient the WebClient for retrieving cookies + * @param webRequest the {@link WebRequest} to transform into a + * {@link MockHttpServletRequest}; never {@code null} + */ + public HtmlUnitRequestBuilder(Map sessions, WebClient webClient, WebRequest webRequest) { + Assert.notNull(sessions, "Sessions Map must not be null"); + Assert.notNull(webClient, "WebClient must not be null"); + Assert.notNull(webRequest, "WebRequest must not be null"); + this.sessions = sessions; + this.webClient = webClient; + this.webRequest = webRequest; + } + + + /** + * Set the contextPath to be used. + *

The value may be null in which case the first path segment of the + * URL is turned into the contextPath. Otherwise it must conform to + * {@link HttpServletRequest#getContextPath()} which states it can be + * an empty string, or it must start with a "/" and not end with a "/". + * @param contextPath a valid contextPath + * @throws IllegalArgumentException if the contextPath is not a valid + * {@link HttpServletRequest#getContextPath()} + */ + public void setContextPath(@Nullable String contextPath) { + validateContextPath(contextPath); + this.contextPath = contextPath; + } + + public void setForwardPostProcessor(RequestPostProcessor forwardPostProcessor) { + this.forwardPostProcessor = forwardPostProcessor; + } + + + @Override + public MockHttpServletRequest buildRequest(ServletContext servletContext) { + String httpMethod = this.webRequest.getHttpMethod().name(); + UriComponents uri = UriComponentsBuilder.fromUriString(this.webRequest.getUrl().toExternalForm()).build(); + + MockHttpServletRequest request = new HtmlUnitRequestBuilder.HtmlUnitMockHttpServletRequest( + servletContext, httpMethod, (uri.getPath() != null ? uri.getPath() : "")); + + parent(request, this.parentBuilder); + + request.setProtocol("HTTP/1.1"); + request.setScheme(uri.getScheme() != null ? uri.getScheme() : ""); + request.setServerName(uri.getHost() != null ? uri.getHost() : ""); // needs to be first for additional headers + ports(uri, request); + authType(request); + contextPath(request, uri); + servletPath(uri, request); + request.setPathInfo(null); + + Charset charset = this.webRequest.getCharset(); + charset = (charset != null ? charset : StandardCharsets.ISO_8859_1); + request.setCharacterEncoding(charset.name()); + content(request, charset); + contentType(request); + + cookies(request); + this.webRequest.getAdditionalHeaders().forEach(request::addHeader); + locales(request); + params(request); + request.setQueryString(uri.getQuery()); + + return postProcess(request); + } + + private void parent(MockHttpServletRequest request, @Nullable RequestBuilder parent) { + if (parent == null) { + return; + } + + MockHttpServletRequest parentRequest = parent.buildRequest(request.getServletContext()); + + // session + HttpSession parentSession = parentRequest.getSession(false); + if (parentSession != null) { + HttpSession localSession = request.getSession(); + Assert.state(localSession != null, "No local HttpSession"); + Enumeration attrNames = parentSession.getAttributeNames(); + while (attrNames.hasMoreElements()) { + String attrName = attrNames.nextElement(); + Object attrValue = parentSession.getAttribute(attrName); + localSession.setAttribute(attrName, attrValue); + } + } + + // header + Enumeration headerNames = parentRequest.getHeaderNames(); + while (headerNames.hasMoreElements()) { + String attrName = headerNames.nextElement(); + Enumeration attrValues = parentRequest.getHeaders(attrName); + while (attrValues.hasMoreElements()) { + String attrValue = attrValues.nextElement(); + request.addHeader(attrName, attrValue); + } + } + + // parameter + Map parentParams = parentRequest.getParameterMap(); + parentParams.forEach(request::addParameter); + + // cookie + jakarta.servlet.http.Cookie[] parentCookies = parentRequest.getCookies(); + if (!ObjectUtils.isEmpty(parentCookies)) { + request.setCookies(parentCookies); + } + + // request attribute + Enumeration parentAttrNames = parentRequest.getAttributeNames(); + while (parentAttrNames.hasMoreElements()) { + String parentAttrName = parentAttrNames.nextElement(); + request.setAttribute(parentAttrName, parentRequest.getAttribute(parentAttrName)); + } + } + + private void ports(UriComponents uriComponents, MockHttpServletRequest request) { + int serverPort = uriComponents.getPort(); + request.setServerPort(serverPort); + if (serverPort == -1) { + int portConnection = this.webRequest.getUrl().getDefaultPort(); + request.setLocalPort(serverPort); + request.setRemotePort(portConnection); + } + else { + request.setRemotePort(serverPort); + } + } + + private void authType(MockHttpServletRequest request) { + String authorization = getHeader("Authorization"); + String[] authSplit = StringUtils.split(authorization, ": "); + if (authSplit != null) { + request.setAuthType(authSplit[0]); + } + } + + @Nullable + private String getHeader(String headerName) { + return this.webRequest.getAdditionalHeaders().get(headerName); + } + + private void contextPath(MockHttpServletRequest request, UriComponents uriComponents) { + if (this.contextPath == null) { + List pathSegments = uriComponents.getPathSegments(); + if (pathSegments.isEmpty()) { + request.setContextPath(""); + } + else { + request.setContextPath("/" + pathSegments.get(0)); + } + } + else { + String path = uriComponents.getPath(); + Assert.isTrue(path != null && path.startsWith(this.contextPath), + () -> "\"" + uriComponents.getPath() + + "\" should start with context path \"" + this.contextPath + "\""); + request.setContextPath(this.contextPath); + } + } + + private void servletPath(UriComponents uriComponents, MockHttpServletRequest request) { + String path = uriComponents.getPath(); + String requestPath = (path != null ? path : ""); + String servletPath = requestPath.substring(request.getContextPath().length()); + servletPath = UriUtils.decode(servletPath, StandardCharsets.UTF_8); + request.setServletPath(servletPath); + } + + private void content(MockHttpServletRequest request, Charset charset) { + String requestBody = this.webRequest.getRequestBody(); + if (requestBody == null) { + return; + } + request.setContent(requestBody.getBytes(charset)); + } + + private void contentType(MockHttpServletRequest request) { + String contentType = getHeader("Content-Type"); + if (contentType == null) { + FormEncodingType encodingType = this.webRequest.getEncodingType(); + if (encodingType != null) { + contentType = encodingType.getName(); + } + } + request.setContentType(contentType != null ? contentType : MediaType.ALL_VALUE); + } + + private void cookies(MockHttpServletRequest request) { + List cookies = new ArrayList<>(); + + String cookieHeaderValue = getHeader("Cookie"); + if (cookieHeaderValue != null) { + StringTokenizer tokens = new StringTokenizer(cookieHeaderValue, "=;"); + while (tokens.hasMoreTokens()) { + String cookieName = tokens.nextToken().trim(); + Assert.isTrue(tokens.hasMoreTokens(), + () -> "Expected value for cookie name '" + cookieName + + "': full cookie header was [" + cookieHeaderValue + "]"); + String cookieValue = tokens.nextToken().trim(); + processCookie(request, cookies, new jakarta.servlet.http.Cookie(cookieName, cookieValue)); + } + } + + Set managedCookies = this.webClient.getCookies(this.webRequest.getUrl()); + for (org.htmlunit.util.Cookie cookie : managedCookies) { + processCookie(request, cookies, new jakarta.servlet.http.Cookie(cookie.getName(), cookie.getValue())); + } + + jakarta.servlet.http.Cookie[] parentCookies = request.getCookies(); + if (parentCookies != null) { + Collections.addAll(cookies, parentCookies); + } + + if (!ObjectUtils.isEmpty(cookies)) { + request.setCookies(cookies.toArray(new jakarta.servlet.http.Cookie[0])); + } + } + + private void processCookie(MockHttpServletRequest request, List cookies, jakarta.servlet.http.Cookie cookie) { + cookies.add(cookie); + if ("JSESSIONID".equals(cookie.getName())) { + request.setRequestedSessionId(cookie.getValue()); + request.setSession(httpSession(request, cookie.getValue())); + } + } + + private MockHttpSession httpSession(MockHttpServletRequest request, final String sessionid) { + MockHttpSession session; + synchronized (this.sessions) { + session = this.sessions.get(sessionid); + if (session == null) { + session = new HtmlUnitRequestBuilder.HtmlUnitMockHttpSession(request, sessionid); + session.setNew(true); + synchronized (this.sessions) { + this.sessions.put(sessionid, session); + } + addSessionCookie(request, sessionid); + } + else { + session.setNew(false); + } + } + return session; + } + + private void addSessionCookie(MockHttpServletRequest request, String sessionid) { + this.webClient.getCookieManager().addCookie(createCookie(request, sessionid)); + } + + private void removeSessionCookie(MockHttpServletRequest request, String sessionid) { + this.webClient.getCookieManager().removeCookie(createCookie(request, sessionid)); + } + + private org.htmlunit.util.Cookie createCookie(MockHttpServletRequest request, String sessionid) { + return new org.htmlunit.util.Cookie(request.getServerName(), "JSESSIONID", sessionid, + request.getContextPath() + "/", null, request.isSecure(), true); + } + + private void locales(MockHttpServletRequest request) { + String locale = getHeader("Accept-Language"); + if (locale == null) { + request.addPreferredLocale(Locale.getDefault()); + } + } + + private void params(MockHttpServletRequest request) { + for (NameValuePair param : this.webRequest.getParameters()) { + addRequestParameter(request, param); + } + } + + private void addRequestParameter(MockHttpServletRequest request, NameValuePair param) { + if (param instanceof KeyDataPair pair) { + File file = pair.getFile(); + MockPart part; + if (file != null) { + part = new MockPart(pair.getName(), file.getName(), readAllBytes(file)); + } + else { + // Support empty file upload OR file upload via setData(). + // For an empty file upload, getValue() returns an empty string, and + // getData() returns null. + // For a file upload via setData(), getData() returns the file data, and + // getValue() returns the file name (if set) or an empty string. + part = new MockPart(pair.getName(), pair.getValue(), pair.getData()); + } + MediaType mediaType = (pair.getMimeType() != null ? MediaType.valueOf(pair.getMimeType()) : + MediaType.APPLICATION_OCTET_STREAM); + part.getHeaders().setContentType(mediaType); + request.addPart(part); + } + else { + request.addParameter(param.getName(), param.getValue()); + } + } + + private byte[] readAllBytes(File file) { + try { + return Files.readAllBytes(file.toPath()); + } + catch (IOException ex) { + throw new IllegalStateException(ex); + } + } + + private MockHttpServletRequest postProcess(MockHttpServletRequest request) { + if (this.parentPostProcessor != null) { + request = this.parentPostProcessor.postProcessRequest(request); + } + if (this.forwardPostProcessor != null) { + request = this.forwardPostProcessor.postProcessRequest(request); + } + return request; + } + + + /* Mergeable methods */ + + @Override + public boolean isMergeEnabled() { + return true; + } + + @Override + public Object merge(@Nullable Object parent) { + if (parent instanceof RequestBuilder requestBuilder) { + if (parent instanceof MockHttpServletRequestBuilder) { + MockHttpServletRequestBuilder copiedParent = MockMvcRequestBuilders.get("/"); + copiedParent.merge(parent); + this.parentBuilder = copiedParent; + } + else { + this.parentBuilder = requestBuilder; + } + if (parent instanceof SmartRequestBuilder smartRequestBuilder) { + this.parentPostProcessor = smartRequestBuilder; + } + } + return this; + } + + + /** + * An extension to {@link MockHttpServletRequest} that ensures that when a + * new {@link HttpSession} is created, it is added to the managed sessions. + */ + private final class HtmlUnitMockHttpServletRequest extends MockHttpServletRequest { + + public HtmlUnitMockHttpServletRequest(ServletContext servletContext, String method, String requestURI) { + super(servletContext, method, requestURI); + } + + @Override + public HttpSession getSession(boolean create) { + HttpSession session = super.getSession(false); + if (session == null && create) { + HtmlUnitRequestBuilder.HtmlUnitMockHttpSession newSession = new HtmlUnitRequestBuilder.HtmlUnitMockHttpSession(this); + setSession(newSession); + newSession.setNew(true); + String sessionid = newSession.getId(); + synchronized (HtmlUnitRequestBuilder.this.sessions) { + HtmlUnitRequestBuilder.this.sessions.put(sessionid, newSession); + } + addSessionCookie(this, sessionid); + session = newSession; + } + return session; + } + } + + + /** + * An extension to {@link MockHttpSession} that ensures when + * {@link #invalidate()} is called that the {@link HttpSession} + * is removed from the managed sessions. + */ + private final class HtmlUnitMockHttpSession extends MockHttpSession { + + private final MockHttpServletRequest request; + + public HtmlUnitMockHttpSession(MockHttpServletRequest request) { + super(request.getServletContext()); + this.request = request; + } + + private HtmlUnitMockHttpSession(MockHttpServletRequest request, String id) { + super(request.getServletContext(), id); + this.request = request; + } + + @Override + public void invalidate() { + super.invalidate(); + synchronized (HtmlUnitRequestBuilder.this.sessions) { + HtmlUnitRequestBuilder.this.sessions.remove(getId()); + } + removeSessionCookie(this.request, getId()); + } + } + + } + + + final class MockWebResponseBuilder { + + private static final String DEFAULT_STATUS_MESSAGE = "N/A"; + + + private final long startTime; + + private final WebRequest webRequest; + + private final MockHttpServletResponse response; + + + public MockWebResponseBuilder(long startTime, WebRequest webRequest, MockHttpServletResponse response) { + Assert.notNull(webRequest, "WebRequest must not be null"); + Assert.notNull(response, "HttpServletResponse must not be null"); + this.startTime = startTime; + this.webRequest = webRequest; + this.response = response; + } + + + public WebResponse build() throws IOException { + WebResponseData webResponseData = webResponseData(); + long endTime = System.currentTimeMillis(); + return new WebResponse(webResponseData, this.webRequest, endTime - this.startTime); + } + + private WebResponseData webResponseData() throws IOException { + List responseHeaders = responseHeaders(); + int statusCode = (this.response.getRedirectedUrl() != null ? + HttpStatus.MOVED_PERMANENTLY.value() : this.response.getStatus()); + String statusMessage = statusMessage(statusCode); + return new WebResponseData(this.response.getContentAsByteArray(), statusCode, statusMessage, responseHeaders); + } + + private String statusMessage(int statusCode) { + String errorMessage = this.response.getErrorMessage(); + if (StringUtils.hasText(errorMessage)) { + return errorMessage; + } + + try { + return HttpStatus.valueOf(statusCode).getReasonPhrase(); + } + catch (IllegalArgumentException ex) { + // ignore + } + + return DEFAULT_STATUS_MESSAGE; + } + + private List responseHeaders() { + Collection headerNames = this.response.getHeaderNames(); + List responseHeaders = new ArrayList<>(headerNames.size()); + for (String headerName : headerNames) { + List headerValues = this.response.getHeaderValues(headerName); + for (Object value : headerValues) { + responseHeaders.add(new NameValuePair(headerName, String.valueOf(value))); + } + } + String location = this.response.getRedirectedUrl(); + if (location != null) { + responseHeaders.add(new NameValuePair("Location", location)); + } + return responseHeaders; + } + + } + + + + final class ForwardRequestPostProcessor implements RequestPostProcessor { + + private final String forwardedUrl; + + + public ForwardRequestPostProcessor(String forwardedUrl) { + Assert.hasText(forwardedUrl, "Forwarded URL must not be null or empty"); + this.forwardedUrl = forwardedUrl; + } + + @Override + public MockHttpServletRequest postProcessRequest(MockHttpServletRequest request) { + request.setRequestURI(this.forwardedUrl); + request.setServletPath(initServletPath(request.getContextPath())); + return request; + } + + private String initServletPath(String contextPath) { + if (StringUtils.hasText(contextPath)) { + Assert.state(this.forwardedUrl.startsWith(contextPath), "Forward supported to same contextPath only"); + return (this.forwardedUrl.length() > contextPath.length() ? + this.forwardedUrl.substring(contextPath.length()) : ""); + } + else { + return this.forwardedUrl; + } + } + + } + + +} diff --git a/hapi-fhir-testpage-overlay/pom.xml b/hapi-fhir-testpage-overlay/pom.xml index e8d648c4fa1..e16f86ae51f 100644 --- a/hapi-fhir-testpage-overlay/pom.xml +++ b/hapi-fhir-testpage-overlay/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-fhir - 6.11.6-SNAPSHOT + 6.11.7-SNAPSHOT ../pom.xml @@ -201,7 +201,7 @@ test - net.sourceforge.htmlunit + org.htmlunit htmlunit test diff --git a/hapi-fhir-testpage-overlay/src/test/java/ca/uhn/fhir/jpa/test/WebTest.java b/hapi-fhir-testpage-overlay/src/test/java/ca/uhn/fhir/jpa/test/WebTest.java index 0fec091de1c..8c39d6e7fb5 100644 --- a/hapi-fhir-testpage-overlay/src/test/java/ca/uhn/fhir/jpa/test/WebTest.java +++ b/hapi-fhir-testpage-overlay/src/test/java/ca/uhn/fhir/jpa/test/WebTest.java @@ -7,40 +7,34 @@ import ca.uhn.fhir.jpa.fql.executor.StaticHfqlExecutionResult; import ca.uhn.fhir.jpa.fql.provider.HfqlRestProvider; import ca.uhn.fhir.rest.annotation.IdParam; import ca.uhn.fhir.rest.annotation.Operation; -import ca.uhn.fhir.rest.annotation.Validate; import ca.uhn.fhir.rest.server.exceptions.InternalErrorException; import ca.uhn.fhir.rest.server.exceptions.PreconditionFailedException; -import ca.uhn.fhir.rest.server.servlet.ServletRequestDetails; import ca.uhn.fhir.test.utilities.JettyUtil; +import ca.uhn.fhir.test.utilities.MockMvcWebConnectionForHtmlUnit3; import ca.uhn.fhir.test.utilities.server.HashMapResourceProviderExtension; import ca.uhn.fhir.test.utilities.server.RestfulServerExtension; -import com.gargoylesoftware.css.parser.CSSErrorHandler; -import com.gargoylesoftware.htmlunit.Page; -import com.gargoylesoftware.htmlunit.SilentCssErrorHandler; -import com.gargoylesoftware.htmlunit.WebClient; -import com.gargoylesoftware.htmlunit.html.HtmlAnchor; -import com.gargoylesoftware.htmlunit.html.HtmlButton; -import com.gargoylesoftware.htmlunit.html.HtmlPage; -import com.gargoylesoftware.htmlunit.html.HtmlTable; -import com.gargoylesoftware.htmlunit.html.HtmlTableCell; -import com.gargoylesoftware.htmlunit.html.HtmlTableRow; -import com.gargoylesoftware.htmlunit.html.HtmlTextArea; -import com.gargoylesoftware.htmlunit.html.XHtmlPage; -import org.eclipse.jetty.server.Server; -import org.eclipse.jetty.server.handler.ContextHandler; import org.eclipse.jetty.ee10.servlet.ServletContextHandler; import org.eclipse.jetty.ee10.servlet.ServletHandler; import org.eclipse.jetty.ee10.servlet.ServletHolder; +import org.eclipse.jetty.server.Server; import org.hl7.fhir.instance.model.api.IIdType; import org.hl7.fhir.r4.model.Bundle; import org.hl7.fhir.r4.model.Composition; -import org.hl7.fhir.r4.model.Enumerations; import org.hl7.fhir.r4.model.HumanName; import org.hl7.fhir.r4.model.IdType; import org.hl7.fhir.r4.model.InstantType; import org.hl7.fhir.r4.model.OperationOutcome; import org.hl7.fhir.r4.model.Parameters; import org.hl7.fhir.r4.model.Patient; +import org.htmlunit.SilentCssErrorHandler; +import org.htmlunit.WebClient; +import org.htmlunit.cssparser.parser.CSSErrorHandler; +import org.htmlunit.html.HtmlAnchor; +import org.htmlunit.html.HtmlButton; +import org.htmlunit.html.HtmlPage; +import org.htmlunit.html.HtmlTable; +import org.htmlunit.html.HtmlTableCell; +import org.htmlunit.html.HtmlTableRow; import org.junit.jupiter.api.AfterAll; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Order; @@ -119,7 +113,7 @@ public class WebTest { } myWebClient = new WebClient(); - myWebClient.setWebConnection(new MockMvcWebConnection(ourMockMvc, myWebClient)); + myWebClient.setWebConnection(new MockMvcWebConnectionForHtmlUnit3(ourMockMvc, myWebClient)); myWebClient.getOptions().setJavaScriptEnabled(true); myWebClient.getOptions().setCssEnabled(false); CSSErrorHandler errorHandler = new SilentCssErrorHandler(); diff --git a/hapi-fhir-validation-resources-dstu2.1/pom.xml b/hapi-fhir-validation-resources-dstu2.1/pom.xml index 9dbdc4381d9..83a66052cab 100644 --- a/hapi-fhir-validation-resources-dstu2.1/pom.xml +++ b/hapi-fhir-validation-resources-dstu2.1/pom.xml @@ -4,7 +4,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 6.11.6-SNAPSHOT + 6.11.7-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-validation-resources-dstu2/pom.xml b/hapi-fhir-validation-resources-dstu2/pom.xml index 836ac7fdf0b..8ada6af4694 100644 --- a/hapi-fhir-validation-resources-dstu2/pom.xml +++ b/hapi-fhir-validation-resources-dstu2/pom.xml @@ -4,7 +4,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 6.11.6-SNAPSHOT + 6.11.7-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-validation-resources-dstu3/pom.xml b/hapi-fhir-validation-resources-dstu3/pom.xml index 1ddb70d7865..c40a055b673 100644 --- a/hapi-fhir-validation-resources-dstu3/pom.xml +++ b/hapi-fhir-validation-resources-dstu3/pom.xml @@ -4,7 +4,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 6.11.6-SNAPSHOT + 6.11.7-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-validation-resources-r4/pom.xml b/hapi-fhir-validation-resources-r4/pom.xml index 4844fe77370..09851ccaae7 100644 --- a/hapi-fhir-validation-resources-r4/pom.xml +++ b/hapi-fhir-validation-resources-r4/pom.xml @@ -4,7 +4,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 6.11.6-SNAPSHOT + 6.11.7-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-validation-resources-r4b/pom.xml b/hapi-fhir-validation-resources-r4b/pom.xml index 1cd1e33c683..6f76cc68bfa 100644 --- a/hapi-fhir-validation-resources-r4b/pom.xml +++ b/hapi-fhir-validation-resources-r4b/pom.xml @@ -4,7 +4,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 6.11.6-SNAPSHOT + 6.11.7-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-validation-resources-r5/pom.xml b/hapi-fhir-validation-resources-r5/pom.xml index 325db1c3cb3..8d2eb9d4a2a 100644 --- a/hapi-fhir-validation-resources-r5/pom.xml +++ b/hapi-fhir-validation-resources-r5/pom.xml @@ -4,7 +4,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 6.11.6-SNAPSHOT + 6.11.7-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-validation/pom.xml b/hapi-fhir-validation/pom.xml index 7fe98a2f911..d9c0db5bf70 100644 --- a/hapi-fhir-validation/pom.xml +++ b/hapi-fhir-validation/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 6.11.6-SNAPSHOT + 6.11.7-SNAPSHOT ../hapi-deployable-pom/pom.xml @@ -337,13 +337,6 @@ true - - org.apache.maven.plugins - maven-compiler-plugin - - true - - org.apache.felix maven-bundle-plugin diff --git a/hapi-tinder-plugin/pom.xml b/hapi-tinder-plugin/pom.xml index f8a2808aecd..7346ec210df 100644 --- a/hapi-tinder-plugin/pom.xml +++ b/hapi-tinder-plugin/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-fhir - 6.11.6-SNAPSHOT + 6.11.7-SNAPSHOT ../pom.xml diff --git a/hapi-tinder-test/pom.xml b/hapi-tinder-test/pom.xml index a09a1f8c99a..476c18dfb17 100644 --- a/hapi-tinder-test/pom.xml +++ b/hapi-tinder-test/pom.xml @@ -4,7 +4,7 @@ ca.uhn.hapi.fhir hapi-fhir - 6.11.6-SNAPSHOT + 6.11.7-SNAPSHOT ../pom.xml diff --git a/pom.xml b/pom.xml index a7e261d20c1..810d4256f6d 100644 --- a/pom.xml +++ b/pom.xml @@ -9,7 +9,7 @@ ca.uhn.hapi.fhir hapi-fhir pom - 6.11.6-SNAPSHOT + 6.11.7-SNAPSHOT HAPI-FHIR An open-source implementation of the FHIR specification in Java. @@ -898,7 +898,7 @@ 6.1.2.2 - 2.37.0 + 2.41.1 -Dfile.encoding=UTF-8 -Xmx2048m @@ -914,7 +914,7 @@ 1.2.0 4.2.5 1.2 - 3.1.1 + 3.1.8 10.6.0 2.12.1 1.15 @@ -924,7 +924,7 @@ 3.12.0 1.2 10.14.2.0 - 2.10.0 + 2.23.0 4.8.1 0.7.9 32.1.1-jre @@ -937,20 +937,20 @@ 3.0.3 12.0.3 3.0.2 - 5.9.1 + 5.10.1 0.64.8 9.4.0 6.4.0.Final 6.2.2.Final - 1.4.7 + 1.4.14 8.11.2 2.2 8.0.0.Final 4.4.13 4.5.13 - 2.15.3 - 2.15.3 + 2.16.0 + 2.16.0 3.3.0 1.8 4.10.0 @@ -959,27 +959,27 @@ 6.2.5.Final 7.1.2 9.5.4 - 2.9.0 + 2.13.0 0.9.11 9.8.0-15 1.2_5 2.2.19 - 2.0.3 + 2.0.9 2.19.0 - 6.0.12 - 2023.0.4 + 6.1.1 + 2023.1.0 4.3.3 - 3.1.4 - 1.2.2.RELEASE + 3.2.0 + 2.0.4 3.1.4 - 1.19.0 + 1.19.3 3.1.2.RELEASE 4.4.1 UTF-8 1.0.1 - 1.28.4 - 8.9.2 + 1.44.0 + 8.11.1 1.0.8 @@ -1366,7 +1366,7 @@ com.microsoft.sqlserver mssql-jdbc - 12.2.0.jre11 + 12.4.2.jre11 - org.eclipse.jetty.websocket - websocket-client - - - net.sf.json-lib json-lib @@ -1435,7 +1423,7 @@ net.ttddyy datasource-proxy - 1.7 + 1.9 org.antlr @@ -1443,15 +1431,27 @@ 4.0.8 + org.apache.commons commons-dbcp2 - 2.9.0 + 2.11.0 org.apache.commons commons-lang3 ${commons_lang3_version} + + org.apache.commons + commons-pool2 + + 2.12.0 + org.apache.commons commons-text @@ -1737,7 +1737,7 @@ org.fusesource.jansi jansi - 2.4.0 + 2.4.1 org.glassfish @@ -1806,6 +1806,26 @@ hamcrest ${hamcrest_version} + + org.htmlunit + htmlunit + 3.9.0 + + + xml-apis + xml-apis + + + xerces + xercesImpl + + + + org.eclipse.jetty.websocket + websocket-client + + + org.exparity hamcrest-date @@ -1959,12 +1979,12 @@ org.postgresql postgresql - 42.5.1 + 42.7.1 com.oracle.database.jdbc ojdbc11 - 21.5.0.0 + 23.3.0.23.09 org.quartz-scheduler @@ -2329,6 +2349,27 @@ true 500m 2000m + + -XDcompilePolicy=simple + -Xplugin:ErrorProne -Xep:MissingSummary:OFF + -J--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED + -J--add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED + -J--add-exports=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED + -J--add-exports=jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED + -J--add-exports=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED + -J--add-exports=jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED + -J--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED + -J--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED + -J--add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED + -J--add-opens=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED + + + + com.google.errorprone + error_prone_core + ${error_prone_core_version} + + @@ -2349,7 +2390,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.2.0 + 3.6.3 org.apache.maven.plugins @@ -3053,41 +3094,6 @@ - - ERRORPRONE - - - - org.apache.maven.plugins - maven-compiler-plugin - - true - - -XDcompilePolicy=simple - -Xplugin:ErrorProne - -J--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED - -J--add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED - -J--add-exports=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED - -J--add-exports=jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED - -J--add-exports=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED - -J--add-exports=jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED - -J--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED - -J--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED - -J--add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED - -J--add-opens=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED - - - - com.google.errorprone - error_prone_core - ${error_prone_core_version} - - - - - - - FASTINSTALL diff --git a/release-pipeline.yml b/release-pipeline.yml index 318b008cd3b..62a3475771a 100644 --- a/release-pipeline.yml +++ b/release-pipeline.yml @@ -170,7 +170,7 @@ jobs: inputs: goals: 'clean install' # These are Maven CLI options (and show up in the build logs) - "-nsu"=Don't update snapshots. We can remove this when Maven OSS is more healthy - options: '-P JACOCO,CI,ERRORPRONE -e -B -Dmaven.repo.local=$(MAVEN_CACHE_FOLDER) -Dmaven.wagon.http.pool=false -Dhttp.keepAlive=false -Dstyle.color=always -Djansi.force=true' + options: '-P JACOCO,CI -e -B -Dmaven.repo.local=$(MAVEN_CACHE_FOLDER) -Dmaven.wagon.http.pool=false -Dhttp.keepAlive=false -Dstyle.color=always -Djansi.force=true' # These are JVM options (and don't show up in the build logs) mavenOptions: '-Xmx1024m $(MAVEN_OPTS) -Dorg.slf4j.simpleLogger.showDateTime=true -Dorg.slf4j.simpleLogger.dateTimeFormat=HH:mm:ss,SSS -Duser.timezone=America/Toronto' jdkVersionOption: 1.11 diff --git a/test-job-template.yml b/test-job-template.yml index 40b0322182e..8ea5be78a42 100644 --- a/test-job-template.yml +++ b/test-job-template.yml @@ -60,7 +60,7 @@ jobs: mavenPomFile: '$(System.DefaultWorkingDirectory)/pom.xml' goals: 'clean verify jacoco:report -pl ${{ p.module }}' # These are Maven CLI options (and show up in the build logs) - "-nsu"=Don't update snapshots. We can remove this when Maven OSS is more healthy - options: '-P JACOCO,CI,ERRORPRONE -e -B -Dmaven.repo.local=$(MAVEN_CACHE_FOLDER) -Dmaven.wagon.http.pool=false -Dhttp.keepAlive=false -Dstyle.color=always -Djansi.force=true' + options: '-P JACOCO,CI -e -B -Dmaven.repo.local=$(MAVEN_CACHE_FOLDER) -Dmaven.wagon.http.pool=false -Dhttp.keepAlive=false -Dstyle.color=always -Djansi.force=true' # These are JVM options (and don't show up in the build logs) mavenOptions: '-Xmx1024m $(MAVEN_OPTS) -Dorg.slf4j.simpleLogger.showDateTime=true -Dorg.slf4j.simpleLogger.dateTimeFormat=HH:mm:ss,SSS -Duser.timezone=America/Toronto' jdkVersionOption: 1.11 diff --git a/tests/hapi-fhir-base-test-jaxrsserver-kotlin/pom.xml b/tests/hapi-fhir-base-test-jaxrsserver-kotlin/pom.xml index 9177158c94d..2909352b306 100644 --- a/tests/hapi-fhir-base-test-jaxrsserver-kotlin/pom.xml +++ b/tests/hapi-fhir-base-test-jaxrsserver-kotlin/pom.xml @@ -7,7 +7,7 @@ ca.uhn.hapi.fhir hapi-fhir - 6.11.6-SNAPSHOT + 6.11.7-SNAPSHOT ../../pom.xml diff --git a/tests/hapi-fhir-base-test-mindeps-client/pom.xml b/tests/hapi-fhir-base-test-mindeps-client/pom.xml index f69587befeb..6fa67a8ec2a 100644 --- a/tests/hapi-fhir-base-test-mindeps-client/pom.xml +++ b/tests/hapi-fhir-base-test-mindeps-client/pom.xml @@ -4,7 +4,7 @@ ca.uhn.hapi.fhir hapi-fhir - 6.11.6-SNAPSHOT + 6.11.7-SNAPSHOT ../../pom.xml diff --git a/tests/hapi-fhir-base-test-mindeps-server/pom.xml b/tests/hapi-fhir-base-test-mindeps-server/pom.xml index 68bfc818b95..55eed794a47 100644 --- a/tests/hapi-fhir-base-test-mindeps-server/pom.xml +++ b/tests/hapi-fhir-base-test-mindeps-server/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-fhir - 6.11.6-SNAPSHOT + 6.11.7-SNAPSHOT ../../pom.xml