Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/issue/202_Java_21' into develop_2
Browse files Browse the repository at this point in the history
  • Loading branch information
hhund committed Jul 15, 2024
2 parents 777feb6 + 530ae57 commit 05def1a
Show file tree
Hide file tree
Showing 56 changed files with 341 additions and 200 deletions.
12 changes: 5 additions & 7 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
name: "CodeQL"
name: Java 21 CodeQL

on:
push:
branches: [ "main", "develop", "hotfix/*", "release/*" ]
branches: develop_2
pull_request:
branches: [ "main", "develop", "hotfix/*", "release/*" ]
schedule:
- cron: '21 15 * * 0' # Sundays, 15:21
branches: develop_2

jobs:
analyze:
Expand All @@ -25,12 +23,12 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up JDK 17
- name: Set up JDK 21
if: ${{ matrix.language == 'java-kotlin' }}
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 17
java-version: 21
cache: 'maven'

- name: Initialize CodeQL
Expand Down
10 changes: 6 additions & 4 deletions .github/workflows/maven-build.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
name: Java CI Build with Maven
name: Java 21 CI Build with Maven

on: push
on:
pull_request:
branches: develop_2

jobs:
build:
Expand All @@ -9,11 +11,11 @@ jobs:

steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
- name: Set up JDK 21
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 17
java-version: 21
cache: 'maven'
- name: Build with Maven
run: mvn --batch-mode --fail-at-end --threads 1C -DforkCount=2 -Dgpg.skip clean verify
8 changes: 4 additions & 4 deletions .github/workflows/maven-publish.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: Java CI Publish with Maven
name: Java 21 CI Publish with Maven

on:
pull_request:
types: closed
branches: develop
branches: develop_2

jobs:
publish:
Expand All @@ -15,11 +15,11 @@ jobs:

steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
- name: Set up JDK 21
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 17
java-version: 21
cache: 'maven'
check-latest: true
- name: Publish with Maven
Expand Down
4 changes: 2 additions & 2 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ preferred-citation:
doi: 10.3233/SHTI210060
type: proceedings
title: "Data Sharing Framework (DSF)"
version: 1.5.2
date-released: 2024-04-17
version: 2.0.0
date-released: 2024-06-10
url: https://dsf.dev
repository-code: https://github.com/datasharingframework/dsf
repository-artifact: https://github.com/datasharingframework/dsf/releases
Expand Down
2 changes: 1 addition & 1 deletion dsf-bpe/dsf-bpe-process-api-v1/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>dev.dsf</groupId>
<artifactId>dsf-bpe-pom</artifactId>
<version>1.5.2-SNAPSHOT</version>
<version>2.0.0-SNAPSHOT</version>
</parent>

<dependencies>
Expand Down
2 changes: 1 addition & 1 deletion dsf-bpe/dsf-bpe-server-jetty/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ RUN chown root:java ./ && \
chmod 1775 ./log


FROM azul/zulu-openjdk:17-jre-headless
FROM azul/zulu-openjdk:21-jre-headless
LABEL org.opencontainers.image.source=https://github.com/datasharingframework/dsf
LABEL org.opencontainers.image.description="DSF BPE Server"
LABEL org.opencontainers.image.licenses="Apache License, Version 2.0"
Expand Down
2 changes: 1 addition & 1 deletion dsf-bpe/dsf-bpe-server-jetty/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>dev.dsf</groupId>
<artifactId>dsf-bpe-pom</artifactId>
<version>1.5.2-SNAPSHOT</version>
<version>2.0.0-SNAPSHOT</version>
</parent>

<dependencies>
Expand Down
2 changes: 1 addition & 1 deletion dsf-bpe/dsf-bpe-server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>dev.dsf</groupId>
<artifactId>dsf-bpe-pom</artifactId>
<version>1.5.2-SNAPSHOT</version>
<version>2.0.0-SNAPSHOT</version>
</parent>

<dependencies>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package dev.dsf.bpe.spring.config;

import java.net.URI;
import java.net.URL;
import java.nio.file.Path;
import java.nio.file.Paths;
Expand Down Expand Up @@ -296,7 +297,7 @@ public static PropertySourcesPlaceholderConfigurer propertySourcesPlaceholderCon
@Override
public void afterPropertiesSet() throws Exception
{
URL url = new URL(fhirServerBaseUrl);
URL url = new URI(fhirServerBaseUrl).toURL();
if (!Arrays.asList("http", "https").contains(url.getProtocol()))
{
logger.warn("Invalid DSF FHIR server base URL: '{}', URL not starting with 'http://' or 'https://'",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
package dev.dsf.bpe.ui;

import java.io.OutputStreamWriter;
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URI;
import java.util.Objects;

import org.springframework.beans.factory.InitializingBean;
Expand Down Expand Up @@ -53,18 +52,6 @@ public void afterPropertiesSet() throws Exception
Objects.requireNonNull(serverBaseUrl, "serverBaseUrl");
}

private String getServerBaseUrlPathWithLeadingSlash()
{
try
{
return new URL(serverBaseUrl).getPath();
}
catch (MalformedURLException e)
{
throw new RuntimeException(e);
}
}

@Override
public StreamingOutput write(Context context, MainValues mainValues)
{
Expand All @@ -78,7 +65,7 @@ public StreamingOutput write(Context context, MainValues mainValues)
context.setVariable("username", mainValues.username());
context.setVariable("openid", mainValues.openid());

context.setVariable("basePath", getServerBaseUrlPathWithLeadingSlash());
context.setVariable("basePath", URI.create(serverBaseUrl).getPath());
context.setVariable("modCssExists", modCssExists);
context.setVariable("theme", theme == null ? null : theme.toString());

Expand Down
2 changes: 1 addition & 1 deletion dsf-bpe/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>dev.dsf</groupId>
<artifactId>dsf-pom</artifactId>
<version>1.5.2-SNAPSHOT</version>
<version>2.0.0-SNAPSHOT</version>
</parent>

<modules>
Expand Down
2 changes: 1 addition & 1 deletion dsf-common/dsf-common-auth/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>dev.dsf</groupId>
<artifactId>dsf-common-pom</artifactId>
<version>1.5.2-SNAPSHOT</version>
<version>2.0.0-SNAPSHOT</version>
</parent>

<dependencies>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package dev.dsf.common.auth.conf;

import java.net.MalformedURLException;
import java.net.URL;
import java.net.URI;
import java.net.URISyntaxException;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.security.cert.CertificateEncodingException;
Expand Down Expand Up @@ -261,9 +261,9 @@ private String toEmail(String iss, String sub)

try
{
return sub + "@" + new URL(iss).getHost();
return sub + "@" + new URI(iss).getHost();
}
catch (MalformedURLException e)
catch (URISyntaxException e)
{
return null;
}
Expand Down
2 changes: 1 addition & 1 deletion dsf-common/dsf-common-config/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>dev.dsf</groupId>
<artifactId>dsf-common-pom</artifactId>
<version>1.5.2-SNAPSHOT</version>
<version>2.0.0-SNAPSHOT</version>
</parent>

<dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ private static String nullIfUrlInvalid(String url)

try
{
URL u = new URL(url);
URL u = new URI(url).toURL();
if (u.getHost() == null || u.getHost().isBlank())
{
logger.warn("Forward proxy url '{}' malformed: no host name", u);
Expand All @@ -56,7 +56,7 @@ else if (!"http".equals(u.getProtocol()) && !"https".equals(u.getProtocol()))

return url;
}
catch (MalformedURLException e)
catch (IllegalArgumentException | MalformedURLException | URISyntaxException e)
{
logger.warn("Forward proxy url '{}' malformed: {}", url, e.getMessage());
return null;
Expand Down
2 changes: 1 addition & 1 deletion dsf-common/dsf-common-db/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>dev.dsf</groupId>
<artifactId>dsf-common-pom</artifactId>
<version>1.5.2-SNAPSHOT</version>
<version>2.0.0-SNAPSHOT</version>
</parent>

<dependencies>
Expand Down
2 changes: 1 addition & 1 deletion dsf-common/dsf-common-documentation/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
<parent>
<groupId>dev.dsf</groupId>
<artifactId>dsf-common-pom</artifactId>
<version>1.5.2-SNAPSHOT</version>
<version>2.0.0-SNAPSHOT</version>
</parent>
</project>
2 changes: 1 addition & 1 deletion dsf-common/dsf-common-jetty/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>dev.dsf</groupId>
<artifactId>dsf-common-pom</artifactId>
<version>1.5.2-SNAPSHOT</version>
<version>2.0.0-SNAPSHOT</version>
</parent>

<dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
import java.io.IOException;
import java.io.InputStream;
import java.net.MalformedURLException;
import java.net.URI;
import java.net.URISyntaxException;
import java.net.URL;
import java.nio.file.Files;
import java.nio.file.Path;
Expand Down Expand Up @@ -433,13 +435,13 @@ private Proxy oidcClientProxy()
{
try
{
URL proxyUrl = new URL(config.getUrl());
URL proxyUrl = new URI(config.getUrl()).toURL();

Address address = new Address(proxyUrl.getHost(),
proxyUrl.getPort() < 0 ? proxyUrl.getDefaultPort() : proxyUrl.getPort());
return new HttpProxy(address, "https".equals(proxyUrl.getProtocol()));
}
catch (MalformedURLException e)
catch (MalformedURLException | URISyntaxException e)
{
throw new RuntimeException(e);
}
Expand Down
2 changes: 1 addition & 1 deletion dsf-common/dsf-common-status/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>dev.dsf</groupId>
<artifactId>dsf-common-pom</artifactId>
<version>1.5.2-SNAPSHOT</version>
<version>2.0.0-SNAPSHOT</version>
</parent>

<dependencies>
Expand Down
2 changes: 1 addition & 1 deletion dsf-common/dsf-common-ui/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>dev.dsf</groupId>
<artifactId>dsf-common-pom</artifactId>
<version>1.5.2-SNAPSHOT</version>
<version>2.0.0-SNAPSHOT</version>
</parent>

<dependencies>
Expand Down
2 changes: 1 addition & 1 deletion dsf-common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>dev.dsf</groupId>
<artifactId>dsf-pom</artifactId>
<version>1.5.2-SNAPSHOT</version>
<version>2.0.0-SNAPSHOT</version>
</parent>

<modules>
Expand Down
2 changes: 1 addition & 1 deletion dsf-fhir/dsf-fhir-auth/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>dev.dsf</groupId>
<artifactId>dsf-fhir-pom</artifactId>
<version>1.5.2-SNAPSHOT</version>
<version>2.0.0-SNAPSHOT</version>
</parent>

<dependencies>
Expand Down
2 changes: 1 addition & 1 deletion dsf-fhir/dsf-fhir-rest-adapter/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>dev.dsf</groupId>
<artifactId>dsf-fhir-pom</artifactId>
<version>1.5.2-SNAPSHOT</version>
<version>2.0.0-SNAPSHOT</version>
</parent>

<dependencies>
Expand Down
2 changes: 1 addition & 1 deletion dsf-fhir/dsf-fhir-server-jetty/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ RUN chown root:java ./ && \
chmod 1775 ./log


FROM azul/zulu-openjdk:17-jre-headless
FROM azul/zulu-openjdk:21-jre-headless
LABEL org.opencontainers.image.source=https://github.com/datasharingframework/dsf
LABEL org.opencontainers.image.description="DSF FHIR Server"
LABEL org.opencontainers.image.licenses="Apache License, Version 2.0"
Expand Down
2 changes: 1 addition & 1 deletion dsf-fhir/dsf-fhir-server-jetty/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>dev.dsf</groupId>
<artifactId>dsf-fhir-pom</artifactId>
<version>1.5.2-SNAPSHOT</version>
<version>2.0.0-SNAPSHOT</version>
</parent>

<dependencies>
Expand Down
2 changes: 1 addition & 1 deletion dsf-fhir/dsf-fhir-server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>dev.dsf</groupId>
<artifactId>dsf-fhir-pom</artifactId>
<version>1.5.2-SNAPSHOT</version>
<version>2.0.0-SNAPSHOT</version>
</parent>

<dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,8 @@
import java.io.OutputStreamWriter;
import java.io.StringReader;
import java.io.StringWriter;
import java.net.MalformedURLException;
import java.net.URI;
import java.net.URISyntaxException;
import java.net.URL;
import java.nio.charset.StandardCharsets;
import java.util.List;
import java.util.Map;
Expand Down Expand Up @@ -175,9 +173,9 @@ private String getServerBaseUrlPathWithLeadingSlash()
{
try
{
return new URL(serverBaseUrl).getPath();
return new URI(serverBaseUrl).getPath();
}
catch (MalformedURLException e)
catch (URISyntaxException e)
{
throw new RuntimeException(e);
}
Expand Down
Loading

0 comments on commit 05def1a

Please sign in to comment.