This is an automated email from the ASF dual-hosted git repository. btellier pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/james-mime4j.git
commit e88d55b60a34b73a7eefc478a310d4616f01e350 Author: Benoit Tellier <btell...@linagora.com> AuthorDate: Mon Jun 20 11:57:09 2022 +0700 MIME4J-318 BufferedLineReaderInputStream: shift table can be reused --- .../org/apache/james/mime4j/io/BufferedLineReaderInputStream.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/src/main/java/org/apache/james/mime4j/io/BufferedLineReaderInputStream.java b/core/src/main/java/org/apache/james/mime4j/io/BufferedLineReaderInputStream.java index 887c6262..64d4122b 100644 --- a/core/src/main/java/org/apache/james/mime4j/io/BufferedLineReaderInputStream.java +++ b/core/src/main/java/org/apache/james/mime4j/io/BufferedLineReaderInputStream.java @@ -41,6 +41,7 @@ public class BufferedLineReaderInputStream extends LineReaderInputStream { private byte[] buffer; private int bufpos; private int buflen; + private int[] shiftTable; private final int maxLineLen; @@ -60,6 +61,7 @@ public class BufferedLineReaderInputStream extends LineReaderInputStream { this.buflen = 0; this.maxLineLen = maxLineLen; this.truncated = false; + this.shiftTable = new int[256]; } public BufferedLineReaderInputStream( @@ -244,7 +246,7 @@ public class BufferedLineReaderInputStream extends LineReaderInputStream { return -1; } - int[] shiftTable = new int[256]; + for (int i = 0; i < shiftTable.length; i++) { shiftTable[i] = pattern.length + 1; } --------------------------------------------------------------------- To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org For additional commands, e-mail: server-dev-h...@james.apache.org