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
This commit is contained in:
parent
d8298e38d4
commit
b28fe3b882
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-fhir</artifactId>
|
||||
<version>6.11.6-SNAPSHOT</version>
|
||||
<version>6.11.7-SNAPSHOT</version>
|
||||
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-deployable-pom</artifactId>
|
||||
<version>6.11.6-SNAPSHOT</version>
|
||||
<version>6.11.7-SNAPSHOT</version>
|
||||
|
||||
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
|
||||
</parent>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-deployable-pom</artifactId>
|
||||
<version>6.11.6-SNAPSHOT</version>
|
||||
<version>6.11.7-SNAPSHOT</version>
|
||||
|
||||
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
|
||||
</parent>
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -45,29 +45,15 @@ public class JacksonWriter extends BaseJsonLikeWriter {
|
|||
@Override
|
||||
public BaseJsonLikeWriter init() {
|
||||
if (isPrettyPrint()) {
|
||||
DefaultPrettyPrinter prettyPrinter = new DefaultPrettyPrinter() {
|
||||
|
||||
/**
|
||||
* Objects should serialize as
|
||||
* <pre>
|
||||
* {
|
||||
* "key": "value"
|
||||
* }
|
||||
* </pre>
|
||||
* in order to be consistent with Gson behaviour, instead of the jackson default
|
||||
* <pre>
|
||||
* {
|
||||
* "key" : "value"
|
||||
* }
|
||||
* </pre>
|
||||
*/
|
||||
@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);
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-fhir-bom</artifactId>
|
||||
<version>6.11.6-SNAPSHOT</version>
|
||||
<version>6.11.7-SNAPSHOT</version>
|
||||
|
||||
<packaging>pom</packaging>
|
||||
<name>HAPI FHIR BOM</name>
|
||||
|
@ -12,7 +12,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-deployable-pom</artifactId>
|
||||
<version>6.11.6-SNAPSHOT</version>
|
||||
<version>6.11.7-SNAPSHOT</version>
|
||||
|
||||
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
|
||||
</parent>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-fhir</artifactId>
|
||||
<version>6.11.6-SNAPSHOT</version>
|
||||
<version>6.11.7-SNAPSHOT</version>
|
||||
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-deployable-pom</artifactId>
|
||||
<version>6.11.6-SNAPSHOT</version>
|
||||
<version>6.11.7-SNAPSHOT</version>
|
||||
|
||||
<relativePath>../../hapi-deployable-pom/pom.xml</relativePath>
|
||||
</parent>
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-fhir-cli</artifactId>
|
||||
<version>6.11.6-SNAPSHOT</version>
|
||||
<version>6.11.7-SNAPSHOT</version>
|
||||
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-fhir</artifactId>
|
||||
<version>6.11.6-SNAPSHOT</version>
|
||||
<version>6.11.7-SNAPSHOT</version>
|
||||
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-deployable-pom</artifactId>
|
||||
<version>6.11.6-SNAPSHOT</version>
|
||||
<version>6.11.7-SNAPSHOT</version>
|
||||
|
||||
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
|
||||
</parent>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-deployable-pom</artifactId>
|
||||
<version>6.11.6-SNAPSHOT</version>
|
||||
<version>6.11.7-SNAPSHOT</version>
|
||||
|
||||
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
|
||||
</parent>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-deployable-pom</artifactId>
|
||||
<version>6.11.6-SNAPSHOT</version>
|
||||
<version>6.11.7-SNAPSHOT</version>
|
||||
|
||||
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
|
||||
</parent>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-fhir</artifactId>
|
||||
<version>6.11.6-SNAPSHOT</version>
|
||||
<version>6.11.7-SNAPSHOT</version>
|
||||
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-deployable-pom</artifactId>
|
||||
<version>6.11.6-SNAPSHOT</version>
|
||||
<version>6.11.7-SNAPSHOT</version>
|
||||
|
||||
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
|
||||
</parent>
|
||||
|
|
|
@ -4,13 +4,20 @@
|
|||
title: "The version of a few dependencies have been bumped to the latest versions
|
||||
(dependent HAPI modules listed in brackets):
|
||||
<ul>
|
||||
<li>Spring Framework (JPA): 5.3.27 -> 6.0.12</li>
|
||||
<li>Spring Data BOM (JPA): 2021.2.2 -> 2023.0.0</li>
|
||||
<li>Hibernate (JPA): 5.6.15.Final -> 6.2.8.Final</li>
|
||||
<li>Jackson (Base): 2.15.3 -> 2.16.0</li>
|
||||
<li>SLF4j (Base): 2.0.3 -> 2.0.9</li>
|
||||
<li>Logback (Base): 1.4.7 -> 1.4.14</li>
|
||||
<li>Caffeine (Base): 3.1.1 -> 3.1.8</li>
|
||||
<li>Spring Framework (JPA): 5.3.27 -> 6.1.1</li>
|
||||
<li>Spring Boot (JPA-Starter): 5.3.27 -> 6.2.0</li>
|
||||
<li>Spring Data BOM (JPA): 2021.2.2 -> 2023.1.0</li>
|
||||
<li>Hibernate (JPA): 5.6.15.Final -> 6.4.0.Final</li>
|
||||
<li>Hibernate Validator (JPA): 6.1.5.Final -> 8.0.0.Final</li>
|
||||
<li>Hibernate Search (JPA): 6.1.6.Final -> 6.2.1.Final</li>
|
||||
<li>Hibernate Search (JPA): 6.1.6.Final -> 6.2.2.Final</li>
|
||||
<li>Commons-DBCP2 (JPA): 2.9.0 -> 2.11.0</li>
|
||||
<li>Spring Boot (Boot+Starter): 2.7.12 -> 3.1.4</li>
|
||||
<li>Jetty (CLI): 10.0.14 -> 12.0.2</li>
|
||||
<li>Jetty (CLI): 10.0.14 -> 12.0.3</li>
|
||||
<li>Jansi (CLI): 2.4.0 -> 2.4.1</li>
|
||||
<li>Phloc Schematron (Schematron Validator): 5.6.5 -> 7.1.2</li>
|
||||
<li>RestEasy (JAX-RS Server): 5.0.2.Final -> 6.2.5.Final</li>
|
||||
</ul>"
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-deployable-pom</artifactId>
|
||||
<version>6.11.6-SNAPSHOT</version>
|
||||
<version>6.11.7-SNAPSHOT</version>
|
||||
|
||||
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
|
||||
</parent>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-deployable-pom</artifactId>
|
||||
<version>6.11.6-SNAPSHOT</version>
|
||||
<version>6.11.7-SNAPSHOT</version>
|
||||
|
||||
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
|
||||
</parent>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-deployable-pom</artifactId>
|
||||
<version>6.11.6-SNAPSHOT</version>
|
||||
<version>6.11.7-SNAPSHOT</version>
|
||||
|
||||
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
|
||||
</parent>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-deployable-pom</artifactId>
|
||||
<version>6.11.6-SNAPSHOT</version>
|
||||
<version>6.11.7-SNAPSHOT</version>
|
||||
|
||||
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
|
||||
</parent>
|
||||
|
|
|
@ -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 <T> int expungeEverythingByTypeWithoutPurging(
|
||||
protected <T> int expungeEverythingByTypeWithoutPurging(
|
||||
RequestDetails theRequest, Class<T> theEntityType, RequestPartitionId theRequestPartitionId) {
|
||||
HapiTransactionService.noTransactionAllowed();
|
||||
|
||||
|
|
|
@ -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%
|
||||
*/
|
|
@ -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%
|
||||
*/
|
|
@ -6,7 +6,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-deployable-pom</artifactId>
|
||||
<version>6.11.6-SNAPSHOT</version>
|
||||
<version>6.11.7-SNAPSHOT</version>
|
||||
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-deployable-pom</artifactId>
|
||||
<version>6.11.6-SNAPSHOT</version>
|
||||
<version>6.11.7-SNAPSHOT</version>
|
||||
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-deployable-pom</artifactId>
|
||||
<version>6.11.6-SNAPSHOT</version>
|
||||
<version>6.11.7-SNAPSHOT</version>
|
||||
|
||||
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
|
||||
</parent>
|
||||
|
@ -40,7 +40,7 @@
|
|||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>net.sourceforge.htmlunit</groupId>
|
||||
<groupId>org.htmlunit</groupId>
|
||||
<artifactId>htmlunit</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-deployable-pom</artifactId>
|
||||
<version>6.11.6-SNAPSHOT</version>
|
||||
<version>6.11.7-SNAPSHOT</version>
|
||||
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-deployable-pom</artifactId>
|
||||
<version>6.11.6-SNAPSHOT</version>
|
||||
<version>6.11.7-SNAPSHOT</version>
|
||||
|
||||
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
|
||||
</parent>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-deployable-pom</artifactId>
|
||||
<version>6.11.6-SNAPSHOT</version>
|
||||
<version>6.11.7-SNAPSHOT</version>
|
||||
|
||||
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
|
||||
</parent>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-deployable-pom</artifactId>
|
||||
<version>6.11.6-SNAPSHOT</version>
|
||||
<version>6.11.7-SNAPSHOT</version>
|
||||
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-deployable-pom</artifactId>
|
||||
<version>6.11.6-SNAPSHOT</version>
|
||||
<version>6.11.7-SNAPSHOT</version>
|
||||
|
||||
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
|
||||
</parent>
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-deployable-pom</artifactId>
|
||||
<version>6.11.6-SNAPSHOT</version>
|
||||
<version>6.11.7-SNAPSHOT</version>
|
||||
|
||||
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
|
||||
</parent>
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-deployable-pom</artifactId>
|
||||
<version>6.11.6-SNAPSHOT</version>
|
||||
<version>6.11.7-SNAPSHOT</version>
|
||||
|
||||
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
|
||||
</parent>
|
||||
|
|
|
@ -65,7 +65,7 @@ class BaseHapiFhirResourceDaoTest {
|
|||
private IRequestPartitionHelperSvc myRequestPartitionHelperSvc;
|
||||
|
||||
@Mock
|
||||
private IIdHelperService myIdHelperService;
|
||||
private IIdHelperService<JpaPid> myIdHelperService;
|
||||
|
||||
@Mock
|
||||
private EntityManager myEntityManager;
|
||||
|
@ -86,10 +86,10 @@ class BaseHapiFhirResourceDaoTest {
|
|||
private ISearchParamRegistry mySearchParamRegistry;
|
||||
|
||||
@Mock
|
||||
private SearchBuilderFactory mySearchBuilderFactory;
|
||||
private SearchBuilderFactory<JpaPid> mySearchBuilderFactory;
|
||||
|
||||
@Mock
|
||||
private ISearchBuilder myISearchBuilder;
|
||||
private ISearchBuilder<JpaPid> myISearchBuilder;
|
||||
|
||||
@Captor
|
||||
private ArgumentCaptor<SearchParameterMap> mySearchParameterMapCaptor;
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-deployable-pom</artifactId>
|
||||
<version>6.11.6-SNAPSHOT</version>
|
||||
<version>6.11.7-SNAPSHOT</version>
|
||||
|
||||
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
|
||||
</parent>
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-deployable-pom</artifactId>
|
||||
<version>6.11.6-SNAPSHOT</version>
|
||||
<version>6.11.7-SNAPSHOT</version>
|
||||
|
||||
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
|
||||
</parent>
|
||||
|
@ -29,7 +29,7 @@
|
|||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>net.sourceforge.htmlunit</groupId>
|
||||
<groupId>org.htmlunit</groupId>
|
||||
<artifactId>htmlunit</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-deployable-pom</artifactId>
|
||||
<version>6.11.6-SNAPSHOT</version>
|
||||
<version>6.11.7-SNAPSHOT</version>
|
||||
|
||||
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
|
||||
</parent>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-fhir</artifactId>
|
||||
<version>6.11.6-SNAPSHOT</version>
|
||||
<version>6.11.7-SNAPSHOT</version>
|
||||
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-deployable-pom</artifactId>
|
||||
<version>6.11.6-SNAPSHOT</version>
|
||||
<version>6.11.7-SNAPSHOT</version>
|
||||
|
||||
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
|
||||
</parent>
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-deployable-pom</artifactId>
|
||||
<version>6.11.6-SNAPSHOT</version>
|
||||
<version>6.11.7-SNAPSHOT</version>
|
||||
|
||||
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
|
||||
</parent>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-deployable-pom</artifactId>
|
||||
<version>6.11.6-SNAPSHOT</version>
|
||||
<version>6.11.7-SNAPSHOT</version>
|
||||
|
||||
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
|
||||
</parent>
|
||||
|
@ -88,7 +88,7 @@
|
|||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>net.sourceforge.htmlunit</groupId>
|
||||
<groupId>org.htmlunit</groupId>
|
||||
<artifactId>htmlunit</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-deployable-pom</artifactId>
|
||||
<version>6.11.6-SNAPSHOT</version>
|
||||
<version>6.11.7-SNAPSHOT</version>
|
||||
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<parent>
|
||||
<artifactId>hapi-fhir-serviceloaders</artifactId>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<version>6.11.6-SNAPSHOT</version>
|
||||
<version>6.11.7-SNAPSHOT</version>
|
||||
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<parent>
|
||||
<artifactId>hapi-fhir-serviceloaders</artifactId>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<version>6.11.6-SNAPSHOT</version>
|
||||
<version>6.11.7-SNAPSHOT</version>
|
||||
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
@ -21,7 +21,7 @@
|
|||
<dependency>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-fhir-caching-api</artifactId>
|
||||
<version>6.11.6-SNAPSHOT</version>
|
||||
<version>6.11.7-SNAPSHOT</version>
|
||||
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<parent>
|
||||
<artifactId>hapi-fhir-serviceloaders</artifactId>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<version>6.11.6-SNAPSHOT</version>
|
||||
<version>6.11.7-SNAPSHOT</version>
|
||||
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<parent>
|
||||
<artifactId>hapi-fhir</artifactId>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<version>6.11.6-SNAPSHOT</version>
|
||||
<version>6.11.7-SNAPSHOT</version>
|
||||
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<artifactId>hapi-deployable-pom</artifactId>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<version>6.11.6-SNAPSHOT</version>
|
||||
<version>6.11.7-SNAPSHOT</version>
|
||||
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-deployable-pom</artifactId>
|
||||
<version>6.11.6-SNAPSHOT</version>
|
||||
<version>6.11.7-SNAPSHOT</version>
|
||||
|
||||
<relativePath>../../hapi-deployable-pom/pom.xml</relativePath>
|
||||
</parent>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-fhir-spring-boot-samples</artifactId>
|
||||
<version>6.11.6-SNAPSHOT</version>
|
||||
<version>6.11.7-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>hapi-fhir-spring-boot-sample-client-apache</artifactId>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-fhir-spring-boot-samples</artifactId>
|
||||
<version>6.11.6-SNAPSHOT</version>
|
||||
<version>6.11.7-SNAPSHOT</version>
|
||||
|
||||
</parent>
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-fhir-spring-boot-samples</artifactId>
|
||||
<version>6.11.6-SNAPSHOT</version>
|
||||
<version>6.11.7-SNAPSHOT</version>
|
||||
|
||||
</parent>
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-fhir-spring-boot</artifactId>
|
||||
<version>6.11.6-SNAPSHOT</version>
|
||||
<version>6.11.7-SNAPSHOT</version>
|
||||
|
||||
</parent>
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-deployable-pom</artifactId>
|
||||
<version>6.11.6-SNAPSHOT</version>
|
||||
<version>6.11.7-SNAPSHOT</version>
|
||||
|
||||
<relativePath>../../hapi-deployable-pom/pom.xml</relativePath>
|
||||
</parent>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-fhir</artifactId>
|
||||
<version>6.11.6-SNAPSHOT</version>
|
||||
<version>6.11.7-SNAPSHOT</version>
|
||||
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-deployable-pom</artifactId>
|
||||
<version>6.11.6-SNAPSHOT</version>
|
||||
<version>6.11.7-SNAPSHOT</version>
|
||||
|
||||
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
|
||||
</parent>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-deployable-pom</artifactId>
|
||||
<version>6.11.6-SNAPSHOT</version>
|
||||
<version>6.11.7-SNAPSHOT</version>
|
||||
|
||||
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
|
||||
</parent>
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-deployable-pom</artifactId>
|
||||
<version>6.11.6-SNAPSHOT</version>
|
||||
<version>6.11.7-SNAPSHOT</version>
|
||||
|
||||
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
|
||||
</parent>
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-deployable-pom</artifactId>
|
||||
<version>6.11.6-SNAPSHOT</version>
|
||||
<version>6.11.7-SNAPSHOT</version>
|
||||
|
||||
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
|
||||
</parent>
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-deployable-pom</artifactId>
|
||||
<version>6.11.6-SNAPSHOT</version>
|
||||
<version>6.11.7-SNAPSHOT</version>
|
||||
|
||||
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
|
||||
</parent>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-deployable-pom</artifactId>
|
||||
<version>6.11.6-SNAPSHOT</version>
|
||||
<version>6.11.7-SNAPSHOT</version>
|
||||
|
||||
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
|
||||
</parent>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-deployable-pom</artifactId>
|
||||
<version>6.11.6-SNAPSHOT</version>
|
||||
<version>6.11.7-SNAPSHOT</version>
|
||||
|
||||
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
|
||||
</parent>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-deployable-pom</artifactId>
|
||||
<version>6.11.6-SNAPSHOT</version>
|
||||
<version>6.11.7-SNAPSHOT</version>
|
||||
|
||||
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
|
||||
</parent>
|
||||
|
|
|
@ -114,7 +114,7 @@ public class DeleteConflictList implements Iterable<DeleteConflict> {
|
|||
|
||||
@Override
|
||||
public void remove() {
|
||||
Assert.isTrue(myLastOperationWasNext);
|
||||
Assert.isTrue(myLastOperationWasNext, "myLastOperationWasNext is not true");
|
||||
myNextIndex--;
|
||||
myList.remove(myNextIndex);
|
||||
myLastOperationWasNext = false;
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-deployable-pom</artifactId>
|
||||
<version>6.11.6-SNAPSHOT</version>
|
||||
<version>6.11.7-SNAPSHOT</version>
|
||||
|
||||
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
|
||||
</parent>
|
||||
|
@ -224,13 +224,6 @@
|
|||
<skipUpdateLicense>true</skipUpdateLicense>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<configuration>
|
||||
<fork>true</fork>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.felix</groupId>
|
||||
<artifactId>maven-bundle-plugin</artifactId>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-deployable-pom</artifactId>
|
||||
<version>6.11.6-SNAPSHOT</version>
|
||||
<version>6.11.7-SNAPSHOT</version>
|
||||
|
||||
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
|
||||
</parent>
|
||||
|
|
|
@ -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 <T> Class<List<T>> getListClass(Class<T> theClass) {
|
||||
return new ClassGetter<List<T>>() {
|
||||
}.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<List<BaseRuntimeElementDefinition<?>>> getListClass2() {
|
||||
return new ClassGetter<List<BaseRuntimeElementDefinition<?>>>() {
|
||||
}.get();
|
||||
Class listClass = List.class;
|
||||
return listClass;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-deployable-pom</artifactId>
|
||||
<version>6.11.6-SNAPSHOT</version>
|
||||
<version>6.11.7-SNAPSHOT</version>
|
||||
|
||||
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
|
||||
</parent>
|
||||
|
|
|
@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-deployable-pom</artifactId>
|
||||
<version>6.11.6-SNAPSHOT</version>
|
||||
<version>6.11.7-SNAPSHOT</version>
|
||||
|
||||
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
|
||||
</parent>
|
||||
|
@ -235,13 +235,6 @@
|
|||
<skipUpdateLicense>true</skipUpdateLicense>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<configuration>
|
||||
<fork>true</fork>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.felix</groupId>
|
||||
<artifactId>maven-bundle-plugin</artifactId>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-deployable-pom</artifactId>
|
||||
<version>6.11.6-SNAPSHOT</version>
|
||||
<version>6.11.7-SNAPSHOT</version>
|
||||
|
||||
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
|
||||
</parent>
|
||||
|
@ -303,13 +303,6 @@
|
|||
<skipUpdateLicense>true</skipUpdateLicense>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<configuration>
|
||||
<fork>true</fork>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.felix</groupId>
|
||||
<artifactId>maven-bundle-plugin</artifactId>
|
||||
|
|
|
@ -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 <T> Class<List<T>> getListClass(Class<T> theClass) {
|
||||
return new ClassGetter<List<T>>() {
|
||||
}.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<List<BaseRuntimeElementDefinition<?>>> getListClass2() {
|
||||
return new ClassGetter<List<BaseRuntimeElementDefinition<?>>>() {
|
||||
}.get();
|
||||
Class listClass = List.class;
|
||||
return listClass;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-deployable-pom</artifactId>
|
||||
<version>6.11.6-SNAPSHOT</version>
|
||||
<version>6.11.7-SNAPSHOT</version>
|
||||
|
||||
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
|
||||
</parent>
|
||||
|
@ -287,13 +287,6 @@
|
|||
<skipUpdateLicense>true</skipUpdateLicense>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<configuration>
|
||||
<fork>true</fork>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.felix</groupId>
|
||||
<artifactId>maven-bundle-plugin</artifactId>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-deployable-pom</artifactId>
|
||||
<version>6.11.6-SNAPSHOT</version>
|
||||
<version>6.11.7-SNAPSHOT</version>
|
||||
|
||||
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
|
||||
</parent>
|
||||
|
@ -276,13 +276,6 @@
|
|||
<skipUpdateLicense>true</skipUpdateLicense>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<configuration>
|
||||
<fork>true</fork>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.felix</groupId>
|
||||
<artifactId>maven-bundle-plugin</artifactId>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-deployable-pom</artifactId>
|
||||
<version>6.11.6-SNAPSHOT</version>
|
||||
<version>6.11.7-SNAPSHOT</version>
|
||||
|
||||
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
|
||||
</parent>
|
||||
|
@ -102,22 +102,8 @@
|
|||
|
||||
<!-- HTMLUnit -->
|
||||
<dependency>
|
||||
<groupId>net.sourceforge.htmlunit</groupId>
|
||||
<groupId>org.htmlunit</groupId>
|
||||
<artifactId>htmlunit</artifactId>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>xml-apis</groupId>
|
||||
<artifactId>xml-apis</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>xerces</groupId>
|
||||
<artifactId>xercesImpl</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>org.eclipse.jetty.websocket</groupId>
|
||||
<artifactId>websocket-client</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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<String, MockHttpSession> 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).
|
||||
* <p>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.
|
||||
* <p>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}.
|
||||
* <p>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<String, MockHttpSession> 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<String, MockHttpSession> 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.
|
||||
* <p>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<String> attrNames = parentSession.getAttributeNames();
|
||||
while (attrNames.hasMoreElements()) {
|
||||
String attrName = attrNames.nextElement();
|
||||
Object attrValue = parentSession.getAttribute(attrName);
|
||||
localSession.setAttribute(attrName, attrValue);
|
||||
}
|
||||
}
|
||||
|
||||
// header
|
||||
Enumeration<String> headerNames = parentRequest.getHeaderNames();
|
||||
while (headerNames.hasMoreElements()) {
|
||||
String attrName = headerNames.nextElement();
|
||||
Enumeration<String> attrValues = parentRequest.getHeaders(attrName);
|
||||
while (attrValues.hasMoreElements()) {
|
||||
String attrValue = attrValues.nextElement();
|
||||
request.addHeader(attrName, attrValue);
|
||||
}
|
||||
}
|
||||
|
||||
// parameter
|
||||
Map<String, String[]> 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<String> 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<String> 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<jakarta.servlet.http.Cookie> 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<org.htmlunit.util.Cookie> 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<jakarta.servlet.http.Cookie> 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<NameValuePair> 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<NameValuePair> responseHeaders() {
|
||||
Collection<String> headerNames = this.response.getHeaderNames();
|
||||
List<NameValuePair> responseHeaders = new ArrayList<>(headerNames.size());
|
||||
for (String headerName : headerNames) {
|
||||
List<Object> 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;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-fhir</artifactId>
|
||||
<version>6.11.6-SNAPSHOT</version>
|
||||
<version>6.11.7-SNAPSHOT</version>
|
||||
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
@ -201,7 +201,7 @@
|
|||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>net.sourceforge.htmlunit</groupId>
|
||||
<groupId>org.htmlunit</groupId>
|
||||
<artifactId>htmlunit</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-deployable-pom</artifactId>
|
||||
<version>6.11.6-SNAPSHOT</version>
|
||||
<version>6.11.7-SNAPSHOT</version>
|
||||
|
||||
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
|
||||
</parent>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-deployable-pom</artifactId>
|
||||
<version>6.11.6-SNAPSHOT</version>
|
||||
<version>6.11.7-SNAPSHOT</version>
|
||||
|
||||
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
|
||||
</parent>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-deployable-pom</artifactId>
|
||||
<version>6.11.6-SNAPSHOT</version>
|
||||
<version>6.11.7-SNAPSHOT</version>
|
||||
|
||||
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
|
||||
</parent>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-deployable-pom</artifactId>
|
||||
<version>6.11.6-SNAPSHOT</version>
|
||||
<version>6.11.7-SNAPSHOT</version>
|
||||
|
||||
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
|
||||
</parent>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-deployable-pom</artifactId>
|
||||
<version>6.11.6-SNAPSHOT</version>
|
||||
<version>6.11.7-SNAPSHOT</version>
|
||||
|
||||
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
|
||||
</parent>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-deployable-pom</artifactId>
|
||||
<version>6.11.6-SNAPSHOT</version>
|
||||
<version>6.11.7-SNAPSHOT</version>
|
||||
|
||||
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
|
||||
</parent>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-deployable-pom</artifactId>
|
||||
<version>6.11.6-SNAPSHOT</version>
|
||||
<version>6.11.7-SNAPSHOT</version>
|
||||
|
||||
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
|
||||
</parent>
|
||||
|
@ -337,13 +337,6 @@
|
|||
<skipUpdateLicense>true</skipUpdateLicense>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<configuration>
|
||||
<fork>true</fork>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.felix</groupId>
|
||||
<artifactId>maven-bundle-plugin</artifactId>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-fhir</artifactId>
|
||||
<version>6.11.6-SNAPSHOT</version>
|
||||
<version>6.11.7-SNAPSHOT</version>
|
||||
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-fhir</artifactId>
|
||||
<version>6.11.6-SNAPSHOT</version>
|
||||
<version>6.11.7-SNAPSHOT</version>
|
||||
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
|
148
pom.xml
148
pom.xml
|
@ -9,7 +9,7 @@
|
|||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-fhir</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
<version>6.11.6-SNAPSHOT</version>
|
||||
<version>6.11.7-SNAPSHOT</version>
|
||||
|
||||
<name>HAPI-FHIR</name>
|
||||
<description>An open-source implementation of the FHIR specification in Java.</description>
|
||||
|
@ -898,7 +898,7 @@
|
|||
|
||||
<properties>
|
||||
<fhir_core_version>6.1.2.2</fhir_core_version>
|
||||
<spotless_version>2.37.0</spotless_version>
|
||||
<spotless_version>2.41.1</spotless_version>
|
||||
<surefire_jvm_args>-Dfile.encoding=UTF-8 -Xmx2048m</surefire_jvm_args>
|
||||
|
||||
|
||||
|
@ -914,7 +914,7 @@
|
|||
<activation_api_version>1.2.0</activation_api_version>
|
||||
<apache_karaf_version>4.2.5</apache_karaf_version>
|
||||
<aries_spifly_version>1.2</aries_spifly_version>
|
||||
<caffeine_version>3.1.1</caffeine_version>
|
||||
<caffeine_version>3.1.8</caffeine_version>
|
||||
<checkstyle_version>10.6.0</checkstyle_version>
|
||||
<maven_changes_version>2.12.1</maven_changes_version>
|
||||
<commons_codec_version>1.15</commons_codec_version>
|
||||
|
@ -924,7 +924,7 @@
|
|||
<commons_lang3_version>3.12.0</commons_lang3_version>
|
||||
<com_jamesmurty_utils_version>1.2</com_jamesmurty_utils_version>
|
||||
<derby_version>10.14.2.0</derby_version>
|
||||
<error_prone_core_version>2.10.0</error_prone_core_version>
|
||||
<error_prone_core_version>2.23.0</error_prone_core_version>
|
||||
<mockito_version>4.8.1</mockito_version>
|
||||
<nullaway_version>0.7.9</nullaway_version>
|
||||
<guava_version>32.1.1-jre</guava_version>
|
||||
|
@ -937,20 +937,20 @@
|
|||
<jersey_version>3.0.3</jersey_version>
|
||||
<jetty_version>12.0.3</jetty_version>
|
||||
<jsr305_version>3.0.2</jsr305_version>
|
||||
<junit_version>5.9.1</junit_version>
|
||||
<junit_version>5.10.1</junit_version>
|
||||
<flexmark_version>0.64.8</flexmark_version>
|
||||
<flyway_version>9.4.0</flyway_version>
|
||||
<hibernate_version>6.4.0.Final</hibernate_version>
|
||||
<hibernate_search_version>6.2.2.Final</hibernate_search_version>
|
||||
<logback_version>1.4.7</logback_version>
|
||||
<logback_version>1.4.14</logback_version>
|
||||
<!-- Update lucene version when you update hibernate-search version -->
|
||||
<lucene_version>8.11.2</lucene_version>
|
||||
<hamcrest_version>2.2</hamcrest_version>
|
||||
<hibernate_validator_version>8.0.0.Final</hibernate_validator_version>
|
||||
<httpcore_version>4.4.13</httpcore_version>
|
||||
<httpclient_version>4.5.13</httpclient_version>
|
||||
<jackson_version>2.15.3</jackson_version>
|
||||
<jackson_databind_version>2.15.3</jackson_databind_version>
|
||||
<jackson_version>2.16.0</jackson_version>
|
||||
<jackson_databind_version>2.16.0</jackson_databind_version>
|
||||
<maven_assembly_plugin_version>3.3.0</maven_assembly_plugin_version>
|
||||
<maven_license_plugin_version>1.8</maven_license_plugin_version>
|
||||
<okhttp_version>4.10.0</okhttp_version>
|
||||
|
@ -959,27 +959,27 @@
|
|||
<resteasy_version>6.2.5.Final</resteasy_version>
|
||||
<ph_schematron_version>7.1.2</ph_schematron_version>
|
||||
<ph_commons_version>9.5.4</ph_commons_version>
|
||||
<plexus_compiler_api_version>2.9.0</plexus_compiler_api_version>
|
||||
<plexus_compiler_api_version>2.13.0</plexus_compiler_api_version>
|
||||
<reflections_version>0.9.11</reflections_version>
|
||||
<servicemix_saxon_version>9.8.0-15</servicemix_saxon_version>
|
||||
<servicemix_xmlresolver_version>1.2_5</servicemix_xmlresolver_version>
|
||||
<swagger_version>2.2.19</swagger_version>
|
||||
<slf4j_version>2.0.3</slf4j_version>
|
||||
<slf4j_version>2.0.9</slf4j_version>
|
||||
<log4j_to_slf4j_version>2.19.0</log4j_to_slf4j_version>
|
||||
<spring_version>6.0.12</spring_version>
|
||||
<spring_data_bom_version>2023.0.4</spring_data_bom_version>
|
||||
<spring_version>6.1.1</spring_version>
|
||||
<spring_data_bom_version>2023.1.0</spring_data_bom_version>
|
||||
<spring_batch_version>4.3.3</spring_batch_version>
|
||||
<spring_boot_version>3.1.4</spring_boot_version>
|
||||
<spring_retry_version>1.2.2.RELEASE</spring_retry_version>
|
||||
<spring_boot_version>3.2.0</spring_boot_version>
|
||||
<spring_retry_version>2.0.4</spring_retry_version>
|
||||
|
||||
<stax2_api_version>3.1.4</stax2_api_version>
|
||||
<testcontainers_version>1.19.0</testcontainers_version>
|
||||
<testcontainers_version>1.19.3</testcontainers_version>
|
||||
<thymeleaf-version>3.1.2.RELEASE</thymeleaf-version>
|
||||
<woodstox_core_asl_version>4.4.1</woodstox_core_asl_version>
|
||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||
<ebay_cors_filter_version>1.0.1</ebay_cors_filter_version>
|
||||
<elastic_apm_version>1.28.4</elastic_apm_version>
|
||||
<elasticsearch_version>8.9.2</elasticsearch_version>
|
||||
<elastic_apm_version>1.44.0</elastic_apm_version>
|
||||
<elasticsearch_version>8.11.1</elasticsearch_version>
|
||||
<ucum_version>1.0.8</ucum_version>
|
||||
|
||||
<!-- CQL Support -->
|
||||
|
@ -1366,7 +1366,7 @@
|
|||
<dependency>
|
||||
<groupId>com.microsoft.sqlserver</groupId>
|
||||
<artifactId>mssql-jdbc</artifactId>
|
||||
<version>12.2.0.jre11</version>
|
||||
<version>12.4.2.jre11</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<!--
|
||||
|
@ -1402,18 +1402,6 @@
|
|||
<artifactId>springdoc-openapi-starter-webmvc-ui</artifactId>
|
||||
<version>2.2.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>net.sourceforge.htmlunit</groupId>
|
||||
<artifactId>htmlunit</artifactId>
|
||||
<version>2.70.0</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<!-- Don't let HTMLUnit bring in Jetty 9 -->
|
||||
<groupId>org.eclipse.jetty.websocket</groupId>
|
||||
<artifactId>websocket-client</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>net.sf.json-lib</groupId>
|
||||
<artifactId>json-lib</artifactId>
|
||||
|
@ -1435,7 +1423,7 @@
|
|||
<dependency>
|
||||
<groupId>net.ttddyy</groupId>
|
||||
<artifactId>datasource-proxy</artifactId>
|
||||
<version>1.7</version>
|
||||
<version>1.9</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.antlr</groupId>
|
||||
|
@ -1443,15 +1431,27 @@
|
|||
<version>4.0.8</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<!--
|
||||
Note if you bump the version here - The commons-dbcp2 2.11.0 version
|
||||
explicitly depends on commons-pool2 2.12.0, so we explicitly specify that
|
||||
version below as well. If you bump this, make sure you're bumping the
|
||||
pool2 version appropriately too.
|
||||
-->
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-dbcp2</artifactId>
|
||||
<version>2.9.0</version>
|
||||
<version>2.11.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-lang3</artifactId>
|
||||
<version>${commons_lang3_version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-pool2</artifactId>
|
||||
<!-- See the note above about commons-dbcp2 before bumping versions here -->
|
||||
<version>2.12.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-text</artifactId>
|
||||
|
@ -1737,7 +1737,7 @@
|
|||
<dependency>
|
||||
<groupId>org.fusesource.jansi</groupId>
|
||||
<artifactId>jansi</artifactId>
|
||||
<version>2.4.0</version>
|
||||
<version>2.4.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.glassfish</groupId>
|
||||
|
@ -1806,6 +1806,26 @@
|
|||
<artifactId>hamcrest</artifactId>
|
||||
<version>${hamcrest_version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.htmlunit</groupId>
|
||||
<artifactId>htmlunit</artifactId>
|
||||
<version>3.9.0</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>xml-apis</groupId>
|
||||
<artifactId>xml-apis</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>xerces</groupId>
|
||||
<artifactId>xercesImpl</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<!-- Don't let HTMLUnit bring in Jetty 9 -->
|
||||
<groupId>org.eclipse.jetty.websocket</groupId>
|
||||
<artifactId>websocket-client</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.exparity</groupId>
|
||||
<artifactId>hamcrest-date</artifactId>
|
||||
|
@ -1959,12 +1979,12 @@
|
|||
<dependency>
|
||||
<groupId>org.postgresql</groupId>
|
||||
<artifactId>postgresql</artifactId>
|
||||
<version>42.5.1</version>
|
||||
<version>42.7.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.oracle.database.jdbc</groupId>
|
||||
<artifactId>ojdbc11</artifactId>
|
||||
<version>21.5.0.0</version>
|
||||
<version>23.3.0.23.09</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.quartz-scheduler</groupId>
|
||||
|
@ -2329,6 +2349,27 @@
|
|||
<fork>true</fork>
|
||||
<meminitial>500m</meminitial>
|
||||
<maxmem>2000m</maxmem>
|
||||
<compilerArgs>
|
||||
<arg>-XDcompilePolicy=simple</arg>
|
||||
<arg>-Xplugin:ErrorProne -Xep:MissingSummary:OFF</arg>
|
||||
<arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED</arg>
|
||||
<arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED</arg>
|
||||
<arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED</arg>
|
||||
<arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED</arg>
|
||||
<arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED</arg>
|
||||
<arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED</arg>
|
||||
<arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED</arg>
|
||||
<arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED</arg>
|
||||
<arg>-J--add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED</arg>
|
||||
<arg>-J--add-opens=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED</arg>
|
||||
</compilerArgs>
|
||||
<annotationProcessorPaths>
|
||||
<path>
|
||||
<groupId>com.google.errorprone</groupId>
|
||||
<artifactId>error_prone_core</artifactId>
|
||||
<version>${error_prone_core_version}</version>
|
||||
</path>
|
||||
</annotationProcessorPaths>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
|
@ -2349,7 +2390,7 @@
|
|||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-javadoc-plugin</artifactId>
|
||||
<version>3.2.0</version>
|
||||
<version>3.6.3</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
|
@ -3053,41 +3094,6 @@
|
|||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
<profile>
|
||||
<id>ERRORPRONE</id>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<configuration>
|
||||
<fork>true</fork>
|
||||
<compilerArgs>
|
||||
<arg>-XDcompilePolicy=simple</arg>
|
||||
<arg>-Xplugin:ErrorProne</arg>
|
||||
<arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED</arg>
|
||||
<arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED</arg>
|
||||
<arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED</arg>
|
||||
<arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED</arg>
|
||||
<arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED</arg>
|
||||
<arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED</arg>
|
||||
<arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED</arg>
|
||||
<arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED</arg>
|
||||
<arg>-J--add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED</arg>
|
||||
<arg>-J--add-opens=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED</arg>
|
||||
</compilerArgs>
|
||||
<annotationProcessorPaths>
|
||||
<path>
|
||||
<groupId>com.google.errorprone</groupId>
|
||||
<artifactId>error_prone_core</artifactId>
|
||||
<version>${error_prone_core_version}</version>
|
||||
</path>
|
||||
</annotationProcessorPaths>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
<profile>
|
||||
<id>FASTINSTALL</id>
|
||||
<properties>
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-fhir</artifactId>
|
||||
<version>6.11.6-SNAPSHOT</version>
|
||||
<version>6.11.7-SNAPSHOT</version>
|
||||
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-fhir</artifactId>
|
||||
<version>6.11.6-SNAPSHOT</version>
|
||||
<version>6.11.7-SNAPSHOT</version>
|
||||
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-fhir</artifactId>
|
||||
<version>6.11.6-SNAPSHOT</version>
|
||||
<version>6.11.7-SNAPSHOT</version>
|
||||
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
|
Loading…
Reference in New Issue