From 221f030c2aa9d34a91deb70f9ac920e50861a381 Mon Sep 17 00:00:00 2001 From: Matthijs Geers Date: Thu, 7 Mar 2024 15:12:15 +0100 Subject: [PATCH 1/5] Add mvn settings These should allow deployment credentials to be obtained from the local environment variables --- .mvn/local-settings.xml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 .mvn/local-settings.xml diff --git a/.mvn/local-settings.xml b/.mvn/local-settings.xml new file mode 100644 index 0000000..84b37cf --- /dev/null +++ b/.mvn/local-settings.xml @@ -0,0 +1,14 @@ + + + + + + + ossrh + ${env.OSSRH_USERNAME} + ${env.OSSRH_PASSWORD} + + + \ No newline at end of file From def9aa711cc319f58f3d29c5a5d823e7fc40638e Mon Sep 17 00:00:00 2001 From: Siebe Krijgsman Date: Thu, 5 Dec 2024 13:19:23 +0100 Subject: [PATCH 2/5] Added ossrh repository and bumped nexus-staging-maven-plugin to fix an issue with deployment --- pom.xml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index d5a7f11..cf051de 100644 --- a/pom.xml +++ b/pom.xml @@ -208,7 +208,7 @@ org.sonatype.plugins nexus-staging-maven-plugin - 1.6.7 + 1.6.14 @@ -222,7 +222,12 @@ test + + + ossrh + https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/ + ossrh https://s01.oss.sonatype.org/content/repositories/snapshots From bddf9c0dcfe42519d49d6731362a068664796825 Mon Sep 17 00:00:00 2001 From: Siebe Krijgsman Date: Thu, 20 Feb 2025 13:50:19 +0100 Subject: [PATCH 3/5] bump version --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index cf051de..0a9a541 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ com.riscure trsfile - 2.2.6-SNAPSHOT + 2.2.7-SNAPSHOT jar ${project.groupId}:${project.artifactId} From 9fab245fb308c8be95f205b5ddf450a166786d63 Mon Sep 17 00:00:00 2001 From: Siebe Krijgsman Date: Tue, 2 Sep 2025 17:26:31 +0200 Subject: [PATCH 4/5] #1: The UTF8Decoder should not be a static final Because then it's shared between multiple instances, which can cause threading errors when writing --- src/main/java/com/riscure/trs/TraceSet.java | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/riscure/trs/TraceSet.java b/src/main/java/com/riscure/trs/TraceSet.java index 85cf8dc..ee46acb 100644 --- a/src/main/java/com/riscure/trs/TraceSet.java +++ b/src/main/java/com/riscure/trs/TraceSet.java @@ -36,7 +36,6 @@ public class TraceSet implements AutoCloseable { private static final String UNKNOWN_SAMPLE_CODING = "Error reading TRS file: unknown sample coding '%d'"; private static final long MAX_BUFFER_SIZE = Integer.MAX_VALUE; private static final String PARAMETER_NOT_DEFINED = "Parameter %s is saved in the trace, but was not found in the header definition"; - private static final CharsetDecoder UTF8_DECODER = StandardCharsets.UTF_8.newDecoder(); //Reading variables private int metaDataSize; @@ -56,9 +55,11 @@ public class TraceSet implements AutoCloseable { //Shared variables private final TRSMetaData metaData; - private boolean open; private final boolean writing; //whether the trace is opened in write mode private final Path path; + private final CharsetDecoder utf8Decoder = StandardCharsets.UTF_8.newDecoder(); + + private boolean open; private TraceSet(String inputFileName) throws IOException, TRSFormatException { this.writing = false; @@ -244,10 +245,10 @@ private String fitUtf8StringToByteLength(String s, int maxBytes) { ByteBuffer bb = ByteBuffer.wrap(sba, 0, maxBytes); CharBuffer cb = CharBuffer.allocate(maxBytes); // Ignore an incomplete character - UTF8_DECODER.reset(); - UTF8_DECODER.onMalformedInput(CodingErrorAction.IGNORE); - UTF8_DECODER.decode(bb, cb, true); - UTF8_DECODER.flush(cb); + utf8Decoder.reset(); + utf8Decoder.onMalformedInput(CodingErrorAction.IGNORE); + utf8Decoder.decode(bb, cb, true); + utf8Decoder.flush(cb); return new String(cb.array(), 0, cb.position()); } From 299a999dd8ca041ce3be2090a79e0c5e8f03fda3 Mon Sep 17 00:00:00 2001 From: Siebe Krijgsman Date: Wed, 3 Sep 2025 07:39:27 +0200 Subject: [PATCH 5/5] bump version --- README.md | 2 +- pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index e2e2ed1..4cd5dd1 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ This library is available on Maven Central. Use the following information to inc com.riscure trsfile - 2.2.6 + 2.2.7 #### Basic diff --git a/pom.xml b/pom.xml index fcdf048..de92e60 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ com.riscure trsfile - 2.2.7-SNAPSHOT + 2.2.7 jar ${project.groupId}:${project.artifactId}