diff --git a/CITATION.cff b/CITATION.cff
index b4fdf24c5..f40b3c7a1 100644
--- a/CITATION.cff
+++ b/CITATION.cff
@@ -6,8 +6,8 @@ authors:
- family-names: Wettstein
given-names: Reto
title: "HiGHmed Data Sharing Framework (HiGHmed DSF)"
-version: 0.5.0
-date-released: 2021-08-24
+version: 0.5.1
+date-released: 2021-09-03
url: https://github.com/highmed/highmed-dsf/wiki
repository-code: https://github.com/highmed/highmed-dsf
repository-artifact: https://github.com/highmed/highmed-dsf/releases
diff --git a/dsf-bpe/dsf-bpe-process-base/pom.xml b/dsf-bpe/dsf-bpe-process-base/pom.xml
index ff52defa6..72ff5219b 100755
--- a/dsf-bpe/dsf-bpe-process-base/pom.xml
+++ b/dsf-bpe/dsf-bpe-process-base/pom.xml
@@ -7,7 +7,7 @@
org.highmed.dsf
dsf-bpe-pom
- 0.5.0
+ 0.5.1
diff --git a/dsf-bpe/dsf-bpe-process-base/src/main/java/org/highmed/dsf/fhir/resources/ResourceProviderImpl.java b/dsf-bpe/dsf-bpe-process-base/src/main/java/org/highmed/dsf/fhir/resources/ResourceProviderImpl.java
index 6afca0f74..6a07f4f4e 100644
--- a/dsf-bpe/dsf-bpe-process-base/src/main/java/org/highmed/dsf/fhir/resources/ResourceProviderImpl.java
+++ b/dsf-bpe/dsf-bpe-process-base/src/main/java/org/highmed/dsf/fhir/resources/ResourceProviderImpl.java
@@ -279,7 +279,7 @@ private static T parseResourceAndSetVersion(String
Supplier parserSupplier, ClassLoader classLoader, PropertyResolver resolver, String fileName,
Class type)
{
- logger.debug("Reading {} from {} and replacing all occurrence of {} with {}", type.getSimpleName(), fileName,
+ logger.debug("Reading {} from {} and replacing all occurrences of {} with {}", type.getSimpleName(), fileName,
VERSION_PATTERN_STRING, processPluginVersion);
try (InputStream in = classLoader.getResourceAsStream(fileName))
diff --git a/dsf-bpe/dsf-bpe-server-jetty/pom.xml b/dsf-bpe/dsf-bpe-server-jetty/pom.xml
index 7898496e8..8809f4dcc 100755
--- a/dsf-bpe/dsf-bpe-server-jetty/pom.xml
+++ b/dsf-bpe/dsf-bpe-server-jetty/pom.xml
@@ -7,7 +7,7 @@
org.highmed.dsf
dsf-bpe-pom
- 0.5.0
+ 0.5.1
diff --git a/dsf-bpe/dsf-bpe-server/pom.xml b/dsf-bpe/dsf-bpe-server/pom.xml
index b79e71b03..677a3983f 100755
--- a/dsf-bpe/dsf-bpe-server/pom.xml
+++ b/dsf-bpe/dsf-bpe-server/pom.xml
@@ -7,7 +7,7 @@
org.highmed.dsf
dsf-bpe-pom
- 0.5.0
+ 0.5.1
diff --git a/dsf-bpe/dsf-bpe-server/src/main/java/org/highmed/dsf/fhir/task/TaskHandler.java b/dsf-bpe/dsf-bpe-server/src/main/java/org/highmed/dsf/fhir/task/TaskHandler.java
index aa8a75324..20aadfc5c 100755
--- a/dsf-bpe/dsf-bpe-server/src/main/java/org/highmed/dsf/fhir/task/TaskHandler.java
+++ b/dsf-bpe/dsf-bpe-server/src/main/java/org/highmed/dsf/fhir/task/TaskHandler.java
@@ -190,7 +190,7 @@ private ProcessDefinition getProcessDefinition(String processDomain, String proc
if (processVersion != null && !processVersion.isBlank())
return repositoryService.createProcessDefinitionQuery()
.processDefinitionKey(processDomain + "_" + processDefinitionKey).versionTag(processVersion)
- .latestVersion().singleResult();
+ .singleResult();
else
return repositoryService.createProcessDefinitionQuery()
.processDefinitionKey(processDomain + "_" + processDefinitionKey).latestVersion().singleResult();
diff --git a/dsf-bpe/dsf-bpe-webservice-client/pom.xml b/dsf-bpe/dsf-bpe-webservice-client/pom.xml
index 5f23589d4..d14208454 100755
--- a/dsf-bpe/dsf-bpe-webservice-client/pom.xml
+++ b/dsf-bpe/dsf-bpe-webservice-client/pom.xml
@@ -7,7 +7,7 @@
org.highmed.dsf
dsf-bpe-pom
- 0.5.0
+ 0.5.1
diff --git a/dsf-bpe/pom.xml b/dsf-bpe/pom.xml
index 081cf6033..4800abaea 100755
--- a/dsf-bpe/pom.xml
+++ b/dsf-bpe/pom.xml
@@ -8,7 +8,7 @@
org.highmed.dsf
dsf-pom
- 0.5.0
+ 0.5.1
diff --git a/dsf-fhir/dsf-fhir-auth/pom.xml b/dsf-fhir/dsf-fhir-auth/pom.xml
index 494592270..145790c3a 100644
--- a/dsf-fhir/dsf-fhir-auth/pom.xml
+++ b/dsf-fhir/dsf-fhir-auth/pom.xml
@@ -7,7 +7,7 @@
org.highmed.dsf
dsf-fhir-pom
- 0.5.0
+ 0.5.1
diff --git a/dsf-fhir/dsf-fhir-rest-adapter/pom.xml b/dsf-fhir/dsf-fhir-rest-adapter/pom.xml
index 940356618..021aa4f5f 100755
--- a/dsf-fhir/dsf-fhir-rest-adapter/pom.xml
+++ b/dsf-fhir/dsf-fhir-rest-adapter/pom.xml
@@ -7,7 +7,7 @@
org.highmed.dsf
dsf-fhir-pom
- 0.5.0
+ 0.5.1
diff --git a/dsf-fhir/dsf-fhir-server-jetty/pom.xml b/dsf-fhir/dsf-fhir-server-jetty/pom.xml
index 9bfa13782..ccd2a8167 100755
--- a/dsf-fhir/dsf-fhir-server-jetty/pom.xml
+++ b/dsf-fhir/dsf-fhir-server-jetty/pom.xml
@@ -7,7 +7,7 @@
org.highmed.dsf
dsf-fhir-pom
- 0.5.0
+ 0.5.1
diff --git a/dsf-fhir/dsf-fhir-server/pom.xml b/dsf-fhir/dsf-fhir-server/pom.xml
index a22c2cbbc..73952a01e 100755
--- a/dsf-fhir/dsf-fhir-server/pom.xml
+++ b/dsf-fhir/dsf-fhir-server/pom.xml
@@ -7,7 +7,7 @@
org.highmed.dsf
dsf-fhir-pom
- 0.5.0
+ 0.5.1
diff --git a/dsf-fhir/dsf-fhir-server/src/main/java/org/highmed/dsf/fhir/dao/jdbc/OrganizationAffiliationDaoJdbc.java b/dsf-fhir/dsf-fhir-server/src/main/java/org/highmed/dsf/fhir/dao/jdbc/OrganizationAffiliationDaoJdbc.java
index 1d2162a12..607dab3d5 100644
--- a/dsf-fhir/dsf-fhir-server/src/main/java/org/highmed/dsf/fhir/dao/jdbc/OrganizationAffiliationDaoJdbc.java
+++ b/dsf-fhir/dsf-fhir-server/src/main/java/org/highmed/dsf/fhir/dao/jdbc/OrganizationAffiliationDaoJdbc.java
@@ -72,7 +72,7 @@ public List readActiveNotDeletedByMemberOrganizationIde
{
List affiliations = new ArrayList<>();
- if (result.next())
+ while (result.next())
{
OrganizationAffiliation oA = getResource(result, 1);
String organizationIdentifier = result.getString(2);
diff --git a/dsf-fhir/dsf-fhir-server/src/test/java/org/highmed/dsf/fhir/dao/OrganizationAffiliationDaoTest.java b/dsf-fhir/dsf-fhir-server/src/test/java/org/highmed/dsf/fhir/dao/OrganizationAffiliationDaoTest.java
index a2d6fea0d..b1e15cba6 100644
--- a/dsf-fhir/dsf-fhir-server/src/test/java/org/highmed/dsf/fhir/dao/OrganizationAffiliationDaoTest.java
+++ b/dsf-fhir/dsf-fhir-server/src/test/java/org/highmed/dsf/fhir/dao/OrganizationAffiliationDaoTest.java
@@ -1,10 +1,12 @@
package org.highmed.dsf.fhir.dao;
import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
import java.sql.Connection;
+import java.sql.SQLException;
import java.util.List;
import java.util.UUID;
@@ -70,38 +72,21 @@ public void testReadActiveNotDeletedByMemberOrganizationIdentifier() throws Exce
try (Connection connection = getDao().newReadWriteTransaction())
{
- Organization memberOrg = new Organization();
- memberOrg.setActive(true);
- memberOrg.addIdentifier().setSystem(identifierSystem).setValue(identifierValue);
+ Organization memberOrg = createAndStoreOrganizationInDb(identifierValue, connection);
+ Organization parentOrg = createAndStoreOrganizationInDb(parentIdentifier, connection);
- Organization parentOrg = new Organization();
- parentOrg.setActive(true);
- parentOrg.addIdentifier().setSystem(identifierSystem).setValue(parentIdentifier);
-
- Organization createdMemberOrg = organizationDao.createWithTransactionAndId(connection, memberOrg,
- UUID.randomUUID());
-
- Organization createdParentOrg = organizationDao.createWithTransactionAndId(connection, parentOrg,
- UUID.randomUUID());
-
- OrganizationAffiliation affiliation = new OrganizationAffiliation();
- affiliation.setActive(true);
- affiliation.getParticipatingOrganization()
- .setReference("Organization/" + createdMemberOrg.getIdElement().getIdPart());
- affiliation.getOrganization().setReference("Organization/" + createdParentOrg.getIdElement().getIdPart());
-
- OrganizationAffiliation createdAffiliation = getDao().createWithTransactionAndId(connection, affiliation,
- UUID.randomUUID());
+ OrganizationAffiliation affiliation = createAndStoreOrganizationAffiliationInDb(parentOrg, memberOrg,
+ connection);
List affiliations = getDao()
.readActiveNotDeletedByMemberOrganizationIdentifierIncludingOrganizationIdentifiersWithTransaction(
connection, identifierValue);
assertNotNull(affiliations);
assertEquals(1, affiliations.size());
- assertEquals(createdAffiliation.getIdElement().getIdPart(), affiliations.get(0).getIdElement().getIdPart());
+ assertEquals(affiliation.getIdElement().getIdPart(), affiliations.get(0).getIdElement().getIdPart());
assertTrue(affiliations.get(0).hasParticipatingOrganization());
assertTrue(affiliations.get(0).getParticipatingOrganization().hasReference());
- assertEquals("Organization/" + createdMemberOrg.getIdElement().getIdPart(),
+ assertEquals("Organization/" + memberOrg.getIdElement().getIdPart(),
affiliations.get(0).getParticipatingOrganization().getReference());
assertTrue(affiliations.get(0).getParticipatingOrganization().hasIdentifier());
assertTrue(affiliations.get(0).getParticipatingOrganization().getIdentifier().hasSystem());
@@ -112,7 +97,7 @@ public void testReadActiveNotDeletedByMemberOrganizationIdentifier() throws Exce
affiliations.get(0).getParticipatingOrganization().getIdentifier().getValue());
assertTrue(affiliations.get(0).hasOrganization());
assertTrue(affiliations.get(0).getOrganization().hasReference());
- assertEquals("Organization/" + createdParentOrg.getIdElement().getIdPart(),
+ assertEquals("Organization/" + parentOrg.getIdElement().getIdPart(),
affiliations.get(0).getOrganization().getReference());
assertTrue(affiliations.get(0).getOrganization().hasIdentifier());
assertTrue(affiliations.get(0).getOrganization().getIdentifier().hasSystem());
@@ -122,6 +107,62 @@ public void testReadActiveNotDeletedByMemberOrganizationIdentifier() throws Exce
}
}
+ @Test
+ public void testSizeOfReadActiveNotDeletedByMemberOrganizationIdentifier() throws Exception
+ {
+ final String parentFooIdentifier = "parentFoo.org";
+ final String parentBarIdentifier = "parentBar.org";
+
+ try (Connection connection = getDao().newReadWriteTransaction())
+ {
+ Organization memberOrg = createAndStoreOrganizationInDb(identifierValue, connection);
+ Organization parentFooOrg = createAndStoreOrganizationInDb(parentFooIdentifier, connection);
+ Organization parentBarOrg = createAndStoreOrganizationInDb(parentBarIdentifier, connection);
+
+ createAndStoreOrganizationAffiliationInDb(parentFooOrg, memberOrg, connection);
+ createAndStoreOrganizationAffiliationInDb(parentBarOrg, memberOrg, connection);
+
+ List affiliations = getDao()
+ .readActiveNotDeletedByMemberOrganizationIdentifierIncludingOrganizationIdentifiersWithTransaction(
+ connection, identifierValue);
+ assertNotNull(affiliations);
+
+ assertEquals(2, affiliations.size());
+ assertEquals(identifierValue,
+ affiliations.get(0).getParticipatingOrganization().getIdentifier().getValue());
+ assertEquals(identifierValue,
+ affiliations.get(1).getParticipatingOrganization().getIdentifier().getValue());
+ assertNotEquals(affiliations.get(0).getOrganization().getIdentifier().getValue(),
+ affiliations.get(1).getOrganization().getIdentifier().getValue());
+ assertTrue(List.of(parentFooIdentifier, parentBarIdentifier)
+ .contains(affiliations.get(0).getOrganization().getIdentifier().getValue()));
+ assertTrue(List.of(parentFooIdentifier, parentBarIdentifier)
+ .contains(affiliations.get(1).getOrganization().getIdentifier().getValue()));
+ }
+ }
+
+ private Organization createAndStoreOrganizationInDb(String identifierValue, Connection connection)
+ throws SQLException
+ {
+ Organization memberOrg = new Organization();
+ memberOrg.setActive(true);
+ memberOrg.addIdentifier().setSystem(identifierSystem).setValue(identifierValue);
+
+ return organizationDao.createWithTransactionAndId(connection, memberOrg, UUID.randomUUID());
+ }
+
+ private OrganizationAffiliation createAndStoreOrganizationAffiliationInDb(Organization parent, Organization member,
+ Connection connection) throws SQLException
+ {
+ OrganizationAffiliation organizationAffiliation = new OrganizationAffiliation();
+ organizationAffiliation.setActive(true);
+ organizationAffiliation.getParticipatingOrganization()
+ .setReference("Organization/" + member.getIdElement().getIdPart());
+ organizationAffiliation.getOrganization().setReference("Organization/" + parent.getIdElement().getIdPart());
+
+ return getDao().createWithTransactionAndId(connection, organizationAffiliation, UUID.randomUUID());
+ }
+
@Override
@Test
public void testReadAccessTriggerAll() throws Exception
diff --git a/dsf-fhir/dsf-fhir-validation/pom.xml b/dsf-fhir/dsf-fhir-validation/pom.xml
index bb05d88c3..c8a26eec7 100644
--- a/dsf-fhir/dsf-fhir-validation/pom.xml
+++ b/dsf-fhir/dsf-fhir-validation/pom.xml
@@ -7,7 +7,7 @@
org.highmed.dsf
dsf-fhir-pom
- 0.5.0
+ 0.5.1
@@ -93,7 +93,7 @@
-
diff --git a/dsf-fhir/dsf-fhir-webservice-client/pom.xml b/dsf-fhir/dsf-fhir-webservice-client/pom.xml
index 5dea20b08..68e38e721 100755
--- a/dsf-fhir/dsf-fhir-webservice-client/pom.xml
+++ b/dsf-fhir/dsf-fhir-webservice-client/pom.xml
@@ -7,7 +7,7 @@
org.highmed.dsf
dsf-fhir-pom
- 0.5.0
+ 0.5.1
diff --git a/dsf-fhir/dsf-fhir-websocket-client/pom.xml b/dsf-fhir/dsf-fhir-websocket-client/pom.xml
index f4a015ae0..5bf7646dd 100755
--- a/dsf-fhir/dsf-fhir-websocket-client/pom.xml
+++ b/dsf-fhir/dsf-fhir-websocket-client/pom.xml
@@ -7,7 +7,7 @@
org.highmed.dsf
dsf-fhir-pom
- 0.5.0
+ 0.5.1
diff --git a/dsf-fhir/pom.xml b/dsf-fhir/pom.xml
index e9512cb67..fc09b44b2 100755
--- a/dsf-fhir/pom.xml
+++ b/dsf-fhir/pom.xml
@@ -8,7 +8,7 @@
org.highmed.dsf
dsf-pom
- 0.5.0
+ 0.5.1
diff --git a/dsf-mpi/dsf-mpi-client-pdq/pom.xml b/dsf-mpi/dsf-mpi-client-pdq/pom.xml
index 7705a6b0a..6887c31d4 100644
--- a/dsf-mpi/dsf-mpi-client-pdq/pom.xml
+++ b/dsf-mpi/dsf-mpi-client-pdq/pom.xml
@@ -9,7 +9,7 @@
dsf-mpi-pom
org.highmed.dsf
- 0.5.0
+ 0.5.1
diff --git a/dsf-mpi/dsf-mpi-client-stub/pom.xml b/dsf-mpi/dsf-mpi-client-stub/pom.xml
index 3a81ef433..15ed0eb4a 100644
--- a/dsf-mpi/dsf-mpi-client-stub/pom.xml
+++ b/dsf-mpi/dsf-mpi-client-stub/pom.xml
@@ -9,7 +9,7 @@
dsf-mpi-pom
org.highmed.dsf
- 0.5.0
+ 0.5.1
diff --git a/dsf-mpi/dsf-mpi-client/pom.xml b/dsf-mpi/dsf-mpi-client/pom.xml
index b8bdd9cfd..3c899b0e7 100644
--- a/dsf-mpi/dsf-mpi-client/pom.xml
+++ b/dsf-mpi/dsf-mpi-client/pom.xml
@@ -9,7 +9,7 @@
dsf-mpi-pom
org.highmed.dsf
- 0.5.0
+ 0.5.1
diff --git a/dsf-mpi/pom.xml b/dsf-mpi/pom.xml
index 7fdafb3cf..2ab265daa 100644
--- a/dsf-mpi/pom.xml
+++ b/dsf-mpi/pom.xml
@@ -10,7 +10,7 @@
dsf-pom
org.highmed.dsf
- 0.5.0
+ 0.5.1
diff --git a/dsf-openehr/dsf-openehr-client-impl/pom.xml b/dsf-openehr/dsf-openehr-client-impl/pom.xml
index f2cd000cd..5fd8065d7 100644
--- a/dsf-openehr/dsf-openehr-client-impl/pom.xml
+++ b/dsf-openehr/dsf-openehr-client-impl/pom.xml
@@ -9,7 +9,7 @@
dsf-openehr-pom
org.highmed.dsf
- 0.5.0
+ 0.5.1
diff --git a/dsf-openehr/dsf-openehr-client-stub/pom.xml b/dsf-openehr/dsf-openehr-client-stub/pom.xml
index f0a16543b..26a9ad09a 100644
--- a/dsf-openehr/dsf-openehr-client-stub/pom.xml
+++ b/dsf-openehr/dsf-openehr-client-stub/pom.xml
@@ -8,7 +8,7 @@
dsf-openehr-pom
org.highmed.dsf
- 0.5.0
+ 0.5.1
diff --git a/dsf-openehr/dsf-openehr-client/pom.xml b/dsf-openehr/dsf-openehr-client/pom.xml
index 16f4c838a..27e432626 100644
--- a/dsf-openehr/dsf-openehr-client/pom.xml
+++ b/dsf-openehr/dsf-openehr-client/pom.xml
@@ -8,7 +8,7 @@
dsf-openehr-pom
org.highmed.dsf
- 0.5.0
+ 0.5.1
diff --git a/dsf-openehr/dsf-openehr-model/pom.xml b/dsf-openehr/dsf-openehr-model/pom.xml
index 25a9b5a8f..5e88785e5 100644
--- a/dsf-openehr/dsf-openehr-model/pom.xml
+++ b/dsf-openehr/dsf-openehr-model/pom.xml
@@ -8,7 +8,7 @@
dsf-openehr-pom
org.highmed.dsf
- 0.5.0
+ 0.5.1
diff --git a/dsf-openehr/pom.xml b/dsf-openehr/pom.xml
index a27889be7..0d1f16c0c 100755
--- a/dsf-openehr/pom.xml
+++ b/dsf-openehr/pom.xml
@@ -10,7 +10,7 @@
dsf-pom
org.highmed.dsf
- 0.5.0
+ 0.5.1
diff --git a/dsf-pseudonymization/dsf-pseudonymization-base/pom.xml b/dsf-pseudonymization/dsf-pseudonymization-base/pom.xml
index c54be80f1..4f60457bb 100644
--- a/dsf-pseudonymization/dsf-pseudonymization-base/pom.xml
+++ b/dsf-pseudonymization/dsf-pseudonymization-base/pom.xml
@@ -7,7 +7,7 @@
org.highmed.dsf
dsf-pseudonymization-pom
- 0.5.0
+ 0.5.1
diff --git a/dsf-pseudonymization/dsf-pseudonymization-medic/pom.xml b/dsf-pseudonymization/dsf-pseudonymization-medic/pom.xml
index 871ece75f..0d305dcaa 100644
--- a/dsf-pseudonymization/dsf-pseudonymization-medic/pom.xml
+++ b/dsf-pseudonymization/dsf-pseudonymization-medic/pom.xml
@@ -7,7 +7,7 @@
org.highmed.dsf
dsf-pseudonymization-pom
- 0.5.0
+ 0.5.1
diff --git a/dsf-pseudonymization/dsf-pseudonymization-ttp/pom.xml b/dsf-pseudonymization/dsf-pseudonymization-ttp/pom.xml
index 17d2f987e..45259aa12 100644
--- a/dsf-pseudonymization/dsf-pseudonymization-ttp/pom.xml
+++ b/dsf-pseudonymization/dsf-pseudonymization-ttp/pom.xml
@@ -7,7 +7,7 @@
org.highmed.dsf
dsf-pseudonymization-pom
- 0.5.0
+ 0.5.1
diff --git a/dsf-pseudonymization/pom.xml b/dsf-pseudonymization/pom.xml
index 7d8122d91..acd30da4d 100644
--- a/dsf-pseudonymization/pom.xml
+++ b/dsf-pseudonymization/pom.xml
@@ -8,7 +8,7 @@
org.highmed.dsf
dsf-pom
- 0.5.0
+ 0.5.1
diff --git a/dsf-tools/dsf-tools-build-info-reader/pom.xml b/dsf-tools/dsf-tools-build-info-reader/pom.xml
index 19ca7d0d9..fc54fcbdb 100644
--- a/dsf-tools/dsf-tools-build-info-reader/pom.xml
+++ b/dsf-tools/dsf-tools-build-info-reader/pom.xml
@@ -7,7 +7,7 @@
org.highmed.dsf
dsf-tools-pom
- 0.5.0
+ 0.5.1
diff --git a/dsf-tools/dsf-tools-bundle-generator/pom.xml b/dsf-tools/dsf-tools-bundle-generator/pom.xml
index 415b7dd62..f2e5959e2 100755
--- a/dsf-tools/dsf-tools-bundle-generator/pom.xml
+++ b/dsf-tools/dsf-tools-bundle-generator/pom.xml
@@ -7,7 +7,7 @@
org.highmed.dsf
dsf-tools-pom
- 0.5.0
+ 0.5.1
diff --git a/dsf-tools/dsf-tools-db-migration/pom.xml b/dsf-tools/dsf-tools-db-migration/pom.xml
index 4bcd086f6..cccc5354a 100755
--- a/dsf-tools/dsf-tools-db-migration/pom.xml
+++ b/dsf-tools/dsf-tools-db-migration/pom.xml
@@ -7,7 +7,7 @@
org.highmed.dsf
dsf-tools-pom
- 0.5.0
+ 0.5.1
diff --git a/dsf-tools/dsf-tools-docker-secrets-reader/pom.xml b/dsf-tools/dsf-tools-docker-secrets-reader/pom.xml
index e20f01dbf..af8be23c0 100644
--- a/dsf-tools/dsf-tools-docker-secrets-reader/pom.xml
+++ b/dsf-tools/dsf-tools-docker-secrets-reader/pom.xml
@@ -7,7 +7,7 @@
org.highmed.dsf
dsf-tools-pom
- 0.5.0
+ 0.5.1
diff --git a/dsf-tools/dsf-tools-docker-secrets-reader/src/main/java/org/highmed/dsf/tools/docker/secrets/DockerSecretsPropertySourceFactory.java b/dsf-tools/dsf-tools-docker-secrets-reader/src/main/java/org/highmed/dsf/tools/docker/secrets/DockerSecretsPropertySourceFactory.java
index 27d62d508..92d53d5bb 100644
--- a/dsf-tools/dsf-tools-docker-secrets-reader/src/main/java/org/highmed/dsf/tools/docker/secrets/DockerSecretsPropertySourceFactory.java
+++ b/dsf-tools/dsf-tools-docker-secrets-reader/src/main/java/org/highmed/dsf/tools/docker/secrets/DockerSecretsPropertySourceFactory.java
@@ -83,7 +83,18 @@ private String readSecretsFile(String key, String secretsFile)
try
{
- return new String(Files.readAllBytes(secretsFilePath), StandardCharsets.UTF_8);
+ List secretLines = Files.readAllLines(secretsFilePath, StandardCharsets.UTF_8);
+
+ if (secretLines.isEmpty())
+ {
+ logger.warn("Secrets file for property {} is empty", key);
+ return null;
+ }
+
+ if (secretLines.size() > 1)
+ logger.warn("Secrets file for property {} contains multiple lines, using only the first line", key);
+
+ return secretLines.get(0);
}
catch (IOException e)
{
diff --git a/dsf-tools/dsf-tools-proxy-test/pom.xml b/dsf-tools/dsf-tools-proxy-test/pom.xml
index 8a26b8b2b..e49b9b6f9 100755
--- a/dsf-tools/dsf-tools-proxy-test/pom.xml
+++ b/dsf-tools/dsf-tools-proxy-test/pom.xml
@@ -7,7 +7,7 @@
org.highmed.dsf
dsf-tools-pom
- 0.5.0
+ 0.5.1
diff --git a/dsf-tools/dsf-tools-test-data-generator/pom.xml b/dsf-tools/dsf-tools-test-data-generator/pom.xml
index 35d4d3aba..5a794cd77 100755
--- a/dsf-tools/dsf-tools-test-data-generator/pom.xml
+++ b/dsf-tools/dsf-tools-test-data-generator/pom.xml
@@ -7,7 +7,7 @@
org.highmed.dsf
dsf-tools-pom
- 0.5.0
+ 0.5.1
diff --git a/dsf-tools/pom.xml b/dsf-tools/pom.xml
index b3dfdf1a6..4d08e0606 100755
--- a/dsf-tools/pom.xml
+++ b/dsf-tools/pom.xml
@@ -8,7 +8,7 @@
org.highmed.dsf
dsf-pom
- 0.5.0
+ 0.5.1
diff --git a/pom.xml b/pom.xml
index 21732fe9d..a277a35f2 100755
--- a/pom.xml
+++ b/pom.xml
@@ -4,7 +4,7 @@
org.highmed.dsf
dsf-pom
- 0.5.0
+ 0.5.1
pom