diff --git a/commons/http-framework/core/src/main/java/org/forgerock/http/io/ByteArrayBranchingStream.java b/commons/http-framework/core/src/main/java/org/forgerock/http/io/ByteArrayBranchingStream.java index f5b09043b..8c15b1545 100644 --- a/commons/http-framework/core/src/main/java/org/forgerock/http/io/ByteArrayBranchingStream.java +++ b/commons/http-framework/core/src/main/java/org/forgerock/http/io/ByteArrayBranchingStream.java @@ -13,6 +13,7 @@ * * Copyright 2010–2011 ApexIdentity Inc. * Portions Copyright 2011-2016 ForgeRock AS. + * Portions Copyrighted 2026 3A Systems, LLC */ package org.forgerock.http.io; @@ -102,7 +103,7 @@ public boolean markSupported() { } @Override - public void mark(int readlimit) { + public synchronized void mark(int readlimit) { mark = position; } diff --git a/persistit/core/src/main/java/com/persistit/PersistitMap.java b/persistit/core/src/main/java/com/persistit/PersistitMap.java index 6639524f4..4acdf1369 100644 --- a/persistit/core/src/main/java/com/persistit/PersistitMap.java +++ b/persistit/core/src/main/java/com/persistit/PersistitMap.java @@ -741,7 +741,7 @@ public static class PersistitMapException extends RuntimeException { } @Override - public Throwable getCause() { + public synchronized Throwable getCause() { return _exception; } } diff --git a/persistit/core/src/main/java/com/persistit/Value.java b/persistit/core/src/main/java/com/persistit/Value.java index 7e7cdb172..8f95cf61e 100644 --- a/persistit/core/src/main/java/com/persistit/Value.java +++ b/persistit/core/src/main/java/com/persistit/Value.java @@ -5056,12 +5056,12 @@ protected final void readStreamHeader() throws IOException { } @Override - public void mark(final int readLimit) { + public synchronized void mark(final int readLimit) { _mark = _value._next; } @Override - public void reset() throws IOException { + public synchronized void reset() throws IOException { if (_mark < 0) { throw new IOException("No mark"); } else {