This is an automated email from the ASF dual-hosted git repository.
jamesbognar pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/juneau.git
The following commit(s) were added to refs/heads/master by this push:
new 7625cfb Add byte buffer reuse to IOUtils.
7625cfb is described below
commit 7625cfbe85fbe5ca2886fb274eb26077eead2bb2
Author: JamesBognar <[email protected]>
AuthorDate: Mon Mar 8 13:55:31 2021 -0500
Add byte buffer reuse to IOUtils.
---
.../src/main/java/org/apache/juneau/internal/IOUtils.java | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git
a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/internal/IOUtils.java
b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/internal/IOUtils.java
index c95ac5f..1f099db 100644
---
a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/internal/IOUtils.java
+++
b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/internal/IOUtils.java
@@ -33,6 +33,7 @@ public final class IOUtils {
}
};
+ private static final int BUFF_SIZE = 1024;
private static final ThreadLocal<byte[]> BYTE_BUFFER_CACHE =
(Boolean.getBoolean("juneau.disableIoBufferReuse") ? null : new
ThreadLocal<>());
private static final ThreadLocal<char[]> CHAR_BUFFER_CACHE =
(Boolean.getBoolean("juneau.disableIoBufferReuse") ? null : new
ThreadLocal<>());
@@ -61,8 +62,6 @@ public final class IOUtils {
public void close() throws IOException {}
};
- private static final int BUFF_SIZE = 1024;
-
//-----------------------------------------------------------------------------------------------------------------
// Piping utilities.
//-----------------------------------------------------------------------------------------------------------------