Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated dependencies and resolving CVEs, bumped SpringBoot to 3.3.5 #6449

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,40 @@
(dependent HAPI modules listed in brackets):
<ul>
<li>org.hl7.fhir.core (Base): 6.3.25 -&gt; 6.4.0</li>
<li>spring-boot-bom (Base): 3.2.6 -&gt; 3.3.5</li>
<li>spring-retry (Base): 2.0.6 -&gt; 2.0.10</li>
<li>spring-data-bom (Base): 2023.1.6 -&gt; 2024.0.5</li>
<li>spring (Base): 6.1.8 -&gt; 6.1.14</li>
<li>slf4j-api (Base): 2.0.13 -&gt; 2.0.16</li>
<li>log4j-to-slf4j (Base): 2.19.0 -&gt; 2.24.1</li>
<li>jackson (Base): 2.17.1 -&gt; 2.18.1</li>
<li>jackson-databind (Base): 2.17.1 -&gt; 2.18.1</li>
<li>opentelemetry-instrumentation-bom (Base): 2.8.0 -&gt; 2.9.0</li>
<li>resteasy (Base): 6.2.9.Final -&gt; 6.2.10.Final</li>
<li>logback-classic (Base): 1.4.14 -&gt; 1.5.12</li>
<li>owasp-java-html-sanitizer (Base): 20211018.2 -&gt; 20240325.1</li>
<li>graphql-java (Base): 21.5 -&gt; 22.3</li>
<li>simple-java-mail (Base): 8.11.2 -&gt; 8.12.2</li>
<li>okio-jvm (Base): 3.4.0 -&gt; 3.9.1</li>
<li>commons-cli (Base): 1.5.0 -&gt; 1.9.0</li>
<li>org.jetbrains.annotations (Base): 23.0.0 -&gt; 26.0.1</li>
<li>xmlunit-core (Base): 2.4.0 -&gt; 2.10.0</li>
<li>jboss-logging (Tinder): 3.4.2.Final -&gt; 3.6.1.Final</li>
<li>springdoc-openapi-starter-webmvc-ui (Server): 2.2.0 -&gt; 2.6.0</li>
<li>ace-builds (Server): 1.22.0 -&gt; 1.36.3</li>
<li>bootstrap (Server): 4.5.2 -&gt; 4.6.2</li>
<li>Eonasdan-bootstrap-datetimepicker (Server): 4.17.47 -&gt; 4.17.49</li>
<li>font-awesome (Server): 5.8.2 -&gt; 5.15.4</li>
<li>swagger-ui (Server): 4.1.3 -&gt; 4.19.1</li>
<li>httpcore (Client): 4.4.13 -&gt; 4.4.16</li>
<li>httpclient (Client): 4.5.13 -&gt; 4.5.14</li>
<li>flyway (JPA): 9.4.0 -&gt; 10.20.1</li>
<li>hibernate (JPA): 6.4.1.Final -&gt; 6.6.2.Final</li>
<li>hibernate-search (JPA): 7.0.0.Final -&gt; 7.2.1.Final</li>
<li>elastic-apm (JPA): 1.44.0 -&gt; 1.52.0</li>
<li>elastic-search (JPA): 8.14.3 -&gt; 8.15.3</li>
<li>lucene (JPA): 9.8.0 -&gt; 9.12.0</li>
<li>postgresql (JPA): 42.7.3 -&gt; 42.7.4</li>
<li>mysql-connector-j (JPA): 8.2.0 -&gt; 9.1.0</li>
<li>ojdbc11 (JPA): 23.3.0.23.09 -&gt; 23.6.0.24.10</li>
</ul>"
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
## Entities annotations

The `@Embedded` Annotation is no longer allowed, in presences of the `@Entity` one.
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,6 @@ List<String> fetchAllChunkIdsForStepWithStatus(
@Param("status") WorkChunkStatusEnum theStatus);

@Query(
"SELECT new ca.uhn.fhir.batch2.model.BatchWorkChunkStatusDTO(e.myTargetStepId, e.myStatus, min(e.myStartTime), max(e.myEndTime), avg(e.myEndTime - e.myStartTime), count(*)) FROM Batch2WorkChunkEntity e WHERE e.myInstanceId=:instanceId GROUP BY e.myTargetStepId, e.myStatus")
"SELECT new ca.uhn.fhir.batch2.model.BatchWorkChunkStatusDTO(e.myTargetStepId, e.myStatus, min(e.myStartTime), max(e.myEndTime), avg(cast((e.myEndTime - e.myStartTime) as long)), count(*)) FROM Batch2WorkChunkEntity e WHERE e.myInstanceId=:instanceId GROUP BY e.myTargetStepId, e.myStatus")
List<BatchWorkChunkStatusDTO> fetchWorkChunkStatusForInstance(@Param("instanceId") String theInstanceId);
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,11 @@
package ca.uhn.fhir.jpa.dao.search;

import jakarta.annotation.Nonnull;
import org.hibernate.search.engine.search.common.NamedValues;
import org.hibernate.search.engine.search.predicate.SearchPredicate;
import org.hibernate.search.engine.search.predicate.dsl.BooleanPredicateClausesStep;
import org.hibernate.search.engine.search.predicate.dsl.ExistsPredicateFieldStep;
import org.hibernate.search.engine.search.predicate.dsl.KnnPredicateFieldStep;
import org.hibernate.search.engine.search.predicate.dsl.MatchAllPredicateOptionsStep;
import org.hibernate.search.engine.search.predicate.dsl.MatchIdPredicateMatchingStep;
import org.hibernate.search.engine.search.predicate.dsl.MatchNonePredicateFinalStep;
Expand All @@ -34,6 +36,8 @@
import org.hibernate.search.engine.search.predicate.dsl.NotPredicateFinalStep;
import org.hibernate.search.engine.search.predicate.dsl.PhrasePredicateFieldStep;
import org.hibernate.search.engine.search.predicate.dsl.PredicateFinalStep;
import org.hibernate.search.engine.search.predicate.dsl.PrefixPredicateFieldStep;
import org.hibernate.search.engine.search.predicate.dsl.QueryStringPredicateFieldStep;
import org.hibernate.search.engine.search.predicate.dsl.RangePredicateFieldStep;
import org.hibernate.search.engine.search.predicate.dsl.RegexpPredicateFieldStep;
import org.hibernate.search.engine.search.predicate.dsl.SearchPredicateFactory;
Expand Down Expand Up @@ -221,6 +225,11 @@ public WildcardPredicateFieldStep<?> wildcard() {
return myPredicateFactory.wildcard();
}

@Override
public PrefixPredicateFieldStep<?> prefix() {
return myPredicateFactory.prefix();
}

@Override
public RegexpPredicateFieldStep<?> regexp() {
return myPredicateFactory.regexp();
Expand All @@ -246,6 +255,11 @@ public SimpleQueryStringPredicateFieldStep<?> simpleQueryString() {
return myPredicateFactory.simpleQueryString();
}

@Override
public QueryStringPredicateFieldStep<?> queryString() {
return myPredicateFactory.queryString();
}

@Override
public ExistsPredicateFieldStep<?> exists() {
return myPredicateFactory.exists();
Expand All @@ -262,6 +276,16 @@ public NamedPredicateOptionsStep named(String path) {
return myPredicateFactory.named(path);
}

@Override
public KnnPredicateFieldStep knn(int i) {
return myPredicateFactory.knn(i);
}

@Override
public PredicateFinalStep withParameters(Function<? super NamedValues, ? extends PredicateFinalStep> function) {
return myPredicateFactory.withParameters(function);
}

@Override
public <T> T extension(SearchPredicateFactoryExtension<T> extension) {
return myPredicateFactory.extension(extension);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@
import ca.uhn.fhir.util.VersionUtil;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.google.gson.JsonArray;
import com.google.gson.JsonSerializer;
import graphql.ExecutionResult;
import graphql.GraphQL;
import graphql.language.InterfaceTypeDefinition;
Expand Down Expand Up @@ -80,6 +82,7 @@ public class GraphQLProviderWithIntrospection extends GraphQLProvider {
private final ISearchParamRegistry mySearchParamRegistry;
private final VersionSpecificWorkerContextWrapper myContext;
private final IDaoRegistry myDaoRegistry;
private final Gson myGson;

/**
* Constructor
Expand All @@ -97,6 +100,11 @@ public GraphQLProviderWithIntrospection(

myContext = VersionSpecificWorkerContextWrapper.newVersionSpecificWorkerContextWrapper(theValidationSupport);
myGenerator = new GraphQLSchemaGenerator(myContext, VersionUtil.getVersion());

GsonBuilder gsonBuilder = new GsonBuilder();
gsonBuilder.registerTypeAdapter(Collections.emptyList().getClass(), (JsonSerializer<Object>)
(src, typeOfSrc, context) -> new JsonArray());
myGson = gsonBuilder.create();
}

@Override
Expand Down Expand Up @@ -250,8 +258,7 @@ private String generateSchema(
ExecutionResult executionResult = build.execute(theQueryBody);

Map<String, Object> data = executionResult.toSpecification();
Gson gson = new GsonBuilder().create();
return gson.toJson(data);
return myGson.toJson(data);
}

@Nonnull
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
package ca.uhn.fhir.jpa.model.entity;

import jakarta.persistence.Column;
import jakarta.persistence.Embeddable;
import jakarta.persistence.Entity;
import jakarta.persistence.ForeignKey;
import jakarta.persistence.GeneratedValue;
Expand All @@ -35,7 +34,6 @@

import java.io.Serializable;

@Embeddable
@Entity
@Table(
name = "HFJ_HISTORY_TAG",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
import ca.uhn.fhir.model.api.IQueryParameterType;
import jakarta.annotation.Nullable;
import jakarta.persistence.Column;
import jakarta.persistence.Embeddable;
import jakarta.persistence.Entity;
import jakarta.persistence.EntityListeners;
import jakarta.persistence.FetchType;
Expand All @@ -42,7 +41,6 @@
import org.apache.commons.lang3.builder.ToStringStyle;
import org.hibernate.annotations.GenericGenerator;

@Embeddable
@EntityListeners(IndexStorageOptimizationListener.class)
@Entity
@Table(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
import ca.uhn.fhir.rest.param.DateRangeParam;
import ca.uhn.fhir.util.DateUtils;
import jakarta.persistence.Column;
import jakarta.persistence.Embeddable;
import jakarta.persistence.Entity;
import jakarta.persistence.EntityListeners;
import jakarta.persistence.FetchType;
Expand Down Expand Up @@ -56,7 +55,6 @@
import java.text.SimpleDateFormat;
import java.util.Date;

@Embeddable
@EntityListeners(IndexStorageOptimizationListener.class)
@Entity
@Table(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
import ca.uhn.fhir.model.api.IQueryParameterType;
import ca.uhn.fhir.rest.param.NumberParam;
import jakarta.persistence.Column;
import jakarta.persistence.Embeddable;
import jakarta.persistence.Entity;
import jakarta.persistence.EntityListeners;
import jakarta.persistence.FetchType;
Expand All @@ -48,7 +47,6 @@
import java.math.BigDecimal;
import java.util.Objects;

@Embeddable
@EntityListeners(IndexStorageOptimizationListener.class)
@Entity
@Table(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
import ca.uhn.fhir.model.api.IQueryParameterType;
import ca.uhn.fhir.rest.param.QuantityParam;
import jakarta.persistence.Column;
import jakarta.persistence.Embeddable;
import jakarta.persistence.Entity;
import jakarta.persistence.EntityListeners;
import jakarta.persistence.FetchType;
Expand All @@ -50,7 +49,6 @@
import static org.apache.commons.lang3.StringUtils.isBlank;

// @formatter:off
@Embeddable
@EntityListeners(IndexStorageOptimizationListener.class)
@Entity
@Table(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
import ca.uhn.fhir.model.api.IQueryParameterType;
import ca.uhn.fhir.rest.param.QuantityParam;
import jakarta.persistence.Column;
import jakarta.persistence.Embeddable;
import jakarta.persistence.Entity;
import jakarta.persistence.EntityListeners;
import jakarta.persistence.FetchType;
Expand All @@ -52,7 +51,6 @@
import static org.apache.commons.lang3.StringUtils.isBlank;

// @formatter:off
@Embeddable
@EntityListeners(IndexStorageOptimizationListener.class)
@Entity
@Table(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
import ca.uhn.fhir.rest.param.StringParam;
import ca.uhn.fhir.util.StringUtil;
import jakarta.persistence.Column;
import jakarta.persistence.Embeddable;
import jakarta.persistence.Entity;
import jakarta.persistence.EntityListeners;
import jakarta.persistence.ForeignKey;
Expand All @@ -48,7 +47,6 @@
import static org.apache.commons.lang3.StringUtils.defaultString;

// @formatter:off
@Embeddable
@EntityListeners(IndexStorageOptimizationListener.class)
@Entity
@Table(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
import ca.uhn.fhir.rest.api.Constants;
import ca.uhn.fhir.rest.param.TokenParam;
import jakarta.persistence.Column;
import jakarta.persistence.Embeddable;
import jakarta.persistence.Entity;
import jakarta.persistence.EntityListeners;
import jakarta.persistence.FetchType;
Expand All @@ -52,7 +51,6 @@
import static org.apache.commons.lang3.StringUtils.defaultString;
import static org.apache.commons.lang3.StringUtils.trim;

@Embeddable
@EntityListeners(IndexStorageOptimizationListener.class)
@Entity
@Table(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
import ca.uhn.fhir.model.api.IQueryParameterType;
import ca.uhn.fhir.rest.param.UriParam;
import jakarta.persistence.Column;
import jakarta.persistence.Embeddable;
import jakarta.persistence.Entity;
import jakarta.persistence.EntityListeners;
import jakarta.persistence.FetchType;
Expand All @@ -47,7 +46,6 @@
import static ca.uhn.fhir.jpa.model.util.SearchParamHash.hashSearchParam;
import static org.apache.commons.lang3.StringUtils.defaultString;

@Embeddable
@EntityListeners(IndexStorageOptimizationListener.class)
@Entity
@Table(
Expand Down
12 changes: 2 additions & 10 deletions hapi-fhir-sql-migrate/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,13 @@
<groupId>org.apache.derby</groupId>
<artifactId>derby</artifactId>
<scope>test</scope>
<version>10.16.1.1</version>
<version>10.17.1.0</version>
</dependency>
<dependency>
<groupId>org.apache.derby</groupId>
<artifactId>derbytools</artifactId>
<scope>test</scope>
<version>10.16.1.1</version>
<version>10.17.1.0</version>
</dependency>
<dependency>
<groupId>org.postgresql</groupId>
Expand All @@ -80,13 +80,6 @@
<artifactId>logback-classic</artifactId>
<scope>test</scope>
</dependency>

<dependency>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-fhir-test-utilities</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>junit-jupiter</artifactId>
Expand Down Expand Up @@ -131,7 +124,6 @@
</dependency>

<!-- test -->

<dependency>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-fhir-test-utilities</artifactId>
Expand Down
Loading
Loading