You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@james.apache.org by bt...@apache.org on 2021/02/23 03:45:20 UTC
[james-project] 07/14: JAMES-3477 Clearly state that
MimeMessageInputStreamSource is not thread safe
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-project.git
commit 041d49abf31e5dcef07a1b9c5edeb6b3f4da070b
Author: Benoit Tellier <bt...@linagora.com>
AuthorDate: Mon Dec 28 17:39:12 2020 +0700
JAMES-3477 Clearly state that MimeMessageInputStreamSource is not thread safe
---
.../org/apache/james/server/core/MimeMessageInputStreamSource.java | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/server/container/core/src/main/java/org/apache/james/server/core/MimeMessageInputStreamSource.java b/server/container/core/src/main/java/org/apache/james/server/core/MimeMessageInputStreamSource.java
index e6cfe38..db95342 100644
--- a/server/container/core/src/main/java/org/apache/james/server/core/MimeMessageInputStreamSource.java
+++ b/server/container/core/src/main/java/org/apache/james/server/core/MimeMessageInputStreamSource.java
@@ -39,6 +39,8 @@ import org.apache.james.lifecycle.api.Disposable;
* Takes an input stream and creates a repeatable input stream source for a
* MimeMessageWrapper. It does this by completely reading the input stream and
* saving that to data to an {@link DeferredFileOutputStream} with its threshold set to 100kb
+ *
+ * This class is not thread safe!
*/
public class MimeMessageInputStreamSource extends MimeMessageSource implements Disposable {
@@ -128,7 +130,7 @@ public class MimeMessageInputStreamSource extends MimeMessageSource implements D
* @return a <code>BufferedInputStream</code> containing the data
*/
@Override
- public synchronized InputStream getInputStream() throws IOException {
+ public InputStream getInputStream() throws IOException {
InputStream in;
if (out.isInMemory()) {
in = new SharedByteArrayInputStream(out.getData());
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org