You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jmeter.apache.org by vl...@apache.org on 2023/05/17 16:38:59 UTC
[jmeter] branch master updated: chore: replace deprecated NullOutputStream.NULL_OUTPUT_STREAM with NullOutputStream.INSTANCE
This is an automated email from the ASF dual-hosted git repository.
vladimirsitnikov pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/jmeter.git
The following commit(s) were added to refs/heads/master by this push:
new 2a24991b9d chore: replace deprecated NullOutputStream.NULL_OUTPUT_STREAM with NullOutputStream.INSTANCE
2a24991b9d is described below
commit 2a24991b9d6487a870cf3ec96fe741b66a2a1fa0
Author: Vladimir Sitnikov <si...@gmail.com>
AuthorDate: Wed May 17 19:38:36 2023 +0300
chore: replace deprecated NullOutputStream.NULL_OUTPUT_STREAM with NullOutputStream.INSTANCE
See https://github.com/apache/jmeter/pull/5924
---
.../main/java/org/apache/jmeter/protocol/ftp/sampler/FTPSampler.java | 2 +-
.../main/java/org/apache/jmeter/protocol/smtp/sampler/SmtpSampler.java | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/protocol/ftp/src/main/java/org/apache/jmeter/protocol/ftp/sampler/FTPSampler.java b/src/protocol/ftp/src/main/java/org/apache/jmeter/protocol/ftp/sampler/FTPSampler.java
index ba0f943e58..5808730a49 100644
--- a/src/protocol/ftp/src/main/java/org/apache/jmeter/protocol/ftp/sampler/FTPSampler.java
+++ b/src/protocol/ftp/src/main/java/org/apache/jmeter/protocol/ftp/sampler/FTPSampler.java
@@ -237,7 +237,7 @@ public class FTPSampler extends AbstractSampler implements Interruptible {
}
}
if (target == null){
- target = NullOutputStream.NULL_OUTPUT_STREAM;
+ target = NullOutputStream.INSTANCE;
}
input = ftp.retrieveFileStream(remote);
if (input == null){// Could not access file or other error
diff --git a/src/protocol/mail/src/main/java/org/apache/jmeter/protocol/smtp/sampler/SmtpSampler.java b/src/protocol/mail/src/main/java/org/apache/jmeter/protocol/smtp/sampler/SmtpSampler.java
index 5008b78ab9..60c6aff2ff 100644
--- a/src/protocol/mail/src/main/java/org/apache/jmeter/protocol/smtp/sampler/SmtpSampler.java
+++ b/src/protocol/mail/src/main/java/org/apache/jmeter/protocol/smtp/sampler/SmtpSampler.java
@@ -191,7 +191,7 @@ public class SmtpSampler extends AbstractSampler {
private long calculateMessageSize(Message message) throws IOException, MessagingException {
if (getPropertyAsBoolean(MESSAGE_SIZE_STATS)) {
// calculate message size
- CountingOutputStream cs = new CountingOutputStream(NullOutputStream.NULL_OUTPUT_STREAM);
+ CountingOutputStream cs = new CountingOutputStream(NullOutputStream.INSTANCE);
message.writeTo(cs);
return cs.getByteCount();
} else {