You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2020/11/21 03:00:36 UTC

[commons-net] branch master updated: No need to initialize to default value.

This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-net.git


The following commit(s) were added to refs/heads/master by this push:
     new 82a772f  No need to initialize to default value.
82a772f is described below

commit 82a772f40e4ec50ac9a4c03aebf33b5035f6f5d5
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Fri Nov 20 22:00:31 2020 -0500

    No need to initialize to default value.
---
 .../java/org/apache/commons/net/ftp/parser/MVSFTPEntryParserTest.java  | 2 +-
 src/test/java/org/apache/commons/net/pop3/POP3ClientCommandsTest.java  | 3 +--
 src/test/java/org/apache/commons/net/telnet/TelnetClientTest.java      | 3 +--
 3 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/src/test/java/org/apache/commons/net/ftp/parser/MVSFTPEntryParserTest.java b/src/test/java/org/apache/commons/net/ftp/parser/MVSFTPEntryParserTest.java
index 9c8d208..99d74c6 100644
--- a/src/test/java/org/apache/commons/net/ftp/parser/MVSFTPEntryParserTest.java
+++ b/src/test/java/org/apache/commons/net/ftp/parser/MVSFTPEntryParserTest.java
@@ -212,7 +212,7 @@ public class MVSFTPEntryParserTest extends FTPParseTestFramework {
      */
     @Override
     public void testParseFieldsOnFile() throws Exception {
-        FTPFile file = null;
+        FTPFile file;
 
         final MVSFTPEntryParser parser = new MVSFTPEntryParser();
 
diff --git a/src/test/java/org/apache/commons/net/pop3/POP3ClientCommandsTest.java b/src/test/java/org/apache/commons/net/pop3/POP3ClientCommandsTest.java
index 6997a62..eb27f77 100644
--- a/src/test/java/org/apache/commons/net/pop3/POP3ClientCommandsTest.java
+++ b/src/test/java/org/apache/commons/net/pop3/POP3ClientCommandsTest.java
@@ -385,11 +385,10 @@ public class POP3ClientCommandsTest extends TestCase
         reset();
         connect();
         login();
-        int reportedSize = 0;
         int actualSize = 0;
 
         final POP3MessageInfo msg = pop3Client.listMessage(1);
-        reportedSize = msg.size;
+        int reportedSize = msg.size;
 
         //Now try to retrieve more lines than exist in the message
         final Reader r = pop3Client.retrieveMessageTop(1, 100000);
diff --git a/src/test/java/org/apache/commons/net/telnet/TelnetClientTest.java b/src/test/java/org/apache/commons/net/telnet/TelnetClientTest.java
index 37c808d..2d05bd3 100644
--- a/src/test/java/org/apache/commons/net/telnet/TelnetClientTest.java
+++ b/src/test/java/org/apache/commons/net/telnet/TelnetClientTest.java
@@ -804,9 +804,8 @@ extends TestCase implements TelnetNotificationHandler
         Thread.sleep(1000);
         final InputStream instr = NOREAD.client.getInputStream();
         final byte[] buff = new byte[4];
-        int ret_read = 0;
 
-        ret_read = instr.read(buff);
+        int ret_read = instr.read(buff);
         if(ret_read == 1 && buff[0] == 'A')
         {
             read_ok = true;