From 8b12fcb67ab69af7329f55a5dd2b999f636c36bd Mon Sep 17 00:00:00 2001 From: Hauke Hund Date: Wed, 2 Oct 2024 21:14:58 +0200 Subject: [PATCH] fixed length checks (copy/paste error) --- .../java/dev/dsf/fhir/dao/OrganizationAffiliationDaoTest.java | 4 ++-- .../src/test/java/dev/dsf/fhir/dao/OrganizationDaoTest.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dsf-fhir/dsf-fhir-server/src/test/java/dev/dsf/fhir/dao/OrganizationAffiliationDaoTest.java b/dsf-fhir/dsf-fhir-server/src/test/java/dev/dsf/fhir/dao/OrganizationAffiliationDaoTest.java index 19d5a5753..9a0b5e82a 100644 --- a/dsf-fhir/dsf-fhir-server/src/test/java/dev/dsf/fhir/dao/OrganizationAffiliationDaoTest.java +++ b/dsf-fhir/dsf-fhir-server/src/test/java/dev/dsf/fhir/dao/OrganizationAffiliationDaoTest.java @@ -349,8 +349,8 @@ public int read(char[] cbuf, int off, int len) throws IOException { String line = generateLine(); - if (len != TASK_ROW_LINE_LENGTH) - throw new IllegalArgumentException("Buffer length " + TASK_ROW_LINE_LENGTH + " expected"); + if (line.length() != TASK_ROW_LINE_LENGTH) + throw new IllegalArgumentException("Line length " + TASK_ROW_LINE_LENGTH + " expected"); System.arraycopy(line.toCharArray(), 0, cbuf, 0, TASK_ROW_LINE_LENGTH); currentTask++; diff --git a/dsf-fhir/dsf-fhir-server/src/test/java/dev/dsf/fhir/dao/OrganizationDaoTest.java b/dsf-fhir/dsf-fhir-server/src/test/java/dev/dsf/fhir/dao/OrganizationDaoTest.java index dd732de90..608088ec1 100755 --- a/dsf-fhir/dsf-fhir-server/src/test/java/dev/dsf/fhir/dao/OrganizationDaoTest.java +++ b/dsf-fhir/dsf-fhir-server/src/test/java/dev/dsf/fhir/dao/OrganizationDaoTest.java @@ -282,8 +282,8 @@ public int read(char[] cbuf, int off, int len) throws IOException { String line = generateLine(); - if (len != TASK_ROW_LINE_LENGTH) - throw new IllegalArgumentException("Buffer length " + TASK_ROW_LINE_LENGTH + " expected"); + if (line.length() != TASK_ROW_LINE_LENGTH) + throw new IllegalArgumentException("Line length " + TASK_ROW_LINE_LENGTH + " expected"); System.arraycopy(line.toCharArray(), 0, cbuf, 0, TASK_ROW_LINE_LENGTH); currentTask++;