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 9ed4080  Javadoc: Use "file name" instead of "filename".
9ed4080 is described below

commit 9ed408061e37f440bd65bafc507f5d2d4a28ca68
Author: Gary Gregory <gardgreg...@gmail.com>
AuthorDate: Thu May 30 16:56:50 2019 -0400

    Javadoc: Use "file name" instead of "filename".
    
    Camel case vars "filename" to "fileName".
---
 .../commons/net/examples/ftp/ServerToServerFTP.java    |  2 +-
 .../commons/net/examples/mail/IMAPExportMbox.java      |  2 +-
 .../org/apache/commons/net/examples/mail/SMTPMail.java |  6 +++---
 .../apache/commons/net/examples/nntp/PostMessage.java  |  6 +++---
 .../org/apache/commons/net/tftp/TFTPRequestPacket.java | 18 +++++++++---------
 .../apache/commons/net/ftp/ListingFunctionalTest.java  |  4 ++--
 .../commons/net/ftp/parser/DownloadListings.java       |  4 ++--
 7 files changed, 21 insertions(+), 21 deletions(-)

diff --git 
a/src/main/java/org/apache/commons/net/examples/ftp/ServerToServerFTP.java 
b/src/main/java/org/apache/commons/net/examples/ftp/ServerToServerFTP.java
index 7258b67..ca0645f 100644
--- a/src/main/java/org/apache/commons/net/examples/ftp/ServerToServerFTP.java
+++ b/src/main/java/org/apache/commons/net/examples/ftp/ServerToServerFTP.java
@@ -193,7 +193,7 @@ __main:
             else
             {
                 System.err.println(
-                    "Couldn't initiate transfer.  Check that filenames are 
valid.");
+                    "Couldn't initiate transfer. Check that file names are 
valid.");
                 break __main;
             }
 
diff --git 
a/src/main/java/org/apache/commons/net/examples/mail/IMAPExportMbox.java 
b/src/main/java/org/apache/commons/net/examples/mail/IMAPExportMbox.java
index 839f09c..3cdf11d 100644
--- a/src/main/java/org/apache/commons/net/examples/mail/IMAPExportMbox.java
+++ b/src/main/java/org/apache/commons/net/examples/mail/IMAPExportMbox.java
@@ -146,7 +146,7 @@ public final class IMAPExportMbox
             System.err.println("\t-. print a . for each complete message 
received");
             System.err.println("\t-X print the X-IMAP line for each complete 
message received");
             System.err.println("\tthe mboxfile is where the messages are 
stored; use '-' to write to standard output.");
-            System.err.println("\tPrefix filename with '+' to append to the 
file. Prefix with '-' to allow overwrite.");
+            System.err.println("\tPrefix file name with '+' to append to the 
file. Prefix with '-' to allow overwrite.");
             System.err.println("\ta sequence-set is a list of numbers/number 
ranges e.g. 1,2,3-10,20:* - default 1:*");
             System.err.println("\titemnames are the message data item name(s) 
e.g. BODY.PEEK[HEADER.FIELDS (SUBJECT)]" +
                                " or a macro e.g. ALL - default (INTERNALDATE 
BODY.PEEK[])");
diff --git a/src/main/java/org/apache/commons/net/examples/mail/SMTPMail.java 
b/src/main/java/org/apache/commons/net/examples/mail/SMTPMail.java
index e3a6eb2..adf26ed 100644
--- a/src/main/java/org/apache/commons/net/examples/mail/SMTPMail.java
+++ b/src/main/java/org/apache/commons/net/examples/mail/SMTPMail.java
@@ -44,7 +44,7 @@ public final class SMTPMail
 
     public static void main(String[] args)
     {
-        String sender, recipient, subject, filename, server, cc;
+        String sender, recipient, subject, fileName, server, cc;
         List<String> ccList = new ArrayList<String>();
         BufferedReader stdin;
         FileReader fileReader = null;
@@ -100,11 +100,11 @@ public final class SMTPMail
             System.out.print("Filename: ");
             System.out.flush();
 
-            filename = stdin.readLine();
+            fileName = stdin.readLine();
 
             try
             {
-                fileReader = new FileReader(filename);
+                fileReader = new FileReader(fileName);
             }
             catch (FileNotFoundException e)
             {
diff --git 
a/src/main/java/org/apache/commons/net/examples/nntp/PostMessage.java 
b/src/main/java/org/apache/commons/net/examples/nntp/PostMessage.java
index 043260c..0e0061b 100644
--- a/src/main/java/org/apache/commons/net/examples/nntp/PostMessage.java
+++ b/src/main/java/org/apache/commons/net/examples/nntp/PostMessage.java
@@ -43,7 +43,7 @@ public final class PostMessage
 
     public static void main(String[] args)
     {
-        String from, subject, newsgroup, filename, server, organization;
+        String from, subject, newsgroup, fileName, server, organization;
         String references;
         BufferedReader stdin;
         FileReader fileReader = null;
@@ -122,11 +122,11 @@ public final class PostMessage
             System.out.print("Filename: ");
             System.out.flush();
 
-            filename = stdin.readLine();
+            fileName = stdin.readLine();
 
             try
             {
-                fileReader = new FileReader(filename);
+                fileReader = new FileReader(fileName);
             }
             catch (FileNotFoundException e)
             {
diff --git a/src/main/java/org/apache/commons/net/tftp/TFTPRequestPacket.java 
b/src/main/java/org/apache/commons/net/tftp/TFTPRequestPacket.java
index ef806c1..3e02720 100644
--- a/src/main/java/org/apache/commons/net/tftp/TFTPRequestPacket.java
+++ b/src/main/java/org/apache/commons/net/tftp/TFTPRequestPacket.java
@@ -70,7 +70,7 @@ public abstract class TFTPRequestPacket extends TFTPPacket
     private final int _mode;
 
     /*** The file name of the request. ***/
-    private final String _filename;
+    private final String _fileName;
 
     /***
      * Creates a request packet of a given type to be sent to a host at a
@@ -89,7 +89,7 @@ public abstract class TFTPRequestPacket extends TFTPPacket
     {
         super(type, destination, port);
 
-        _filename = fileName;
+        _fileName = fileName;
         _mode = mode;
     }
 
@@ -126,10 +126,10 @@ public abstract class TFTPRequestPacket extends TFTPPacket
             ++index;
         }
 
-        _filename = buffer.toString();
+        _fileName = buffer.toString();
 
         if (index >= length) {
-            throw new TFTPPacketException("Bad filename and mode format.");
+            throw new TFTPPacketException("Bad file name and mode format.");
         }
 
         buffer.setLength(0);
@@ -181,12 +181,12 @@ public abstract class TFTPRequestPacket extends TFTPPacket
     {
         int fileLength, modeLength;
 
-        fileLength = _filename.length();
+        fileLength = _fileName.length();
         modeLength = _modeBytes[_mode].length;
 
         data[0] = 0;
         data[1] = (byte)_type;
-        System.arraycopy(_filename.getBytes(), 0, data, 2, fileLength);
+        System.arraycopy(_fileName.getBytes(), 0, data, 2, fileLength);
         data[fileLength + 2] = 0;
         System.arraycopy(_modeBytes[_mode], 0, data, fileLength + 3,
                          modeLength);
@@ -216,13 +216,13 @@ public abstract class TFTPRequestPacket extends TFTPPacket
         int fileLength, modeLength;
         byte[] data;
 
-        fileLength = _filename.length();
+        fileLength = _fileName.length();
         modeLength = _modeBytes[_mode].length;
 
         data = new byte[fileLength + modeLength + 4];
         data[0] = 0;
         data[1] = (byte)_type;
-        System.arraycopy(_filename.getBytes(), 0, data, 2, fileLength);
+        System.arraycopy(_fileName.getBytes(), 0, data, 2, fileLength);
         data[fileLength + 2] = 0;
         System.arraycopy(_modeBytes[_mode], 0, data, fileLength + 3,
                          modeLength);
@@ -247,6 +247,6 @@ public abstract class TFTPRequestPacket extends TFTPPacket
      ***/
     public final String getFilename()
     {
-        return _filename;
+        return _fileName;
     }
 }
diff --git 
a/src/test/java/org/apache/commons/net/ftp/ListingFunctionalTest.java 
b/src/test/java/org/apache/commons/net/ftp/ListingFunctionalTest.java
index a5ecd1c..1fa27be 100644
--- a/src/test/java/org/apache/commons/net/ftp/ListingFunctionalTest.java
+++ b/src/test/java/org/apache/commons/net/ftp/ListingFunctionalTest.java
@@ -131,9 +131,9 @@ public class ListingFunctionalTest extends TestCase
             }
             else
             {
-                String filename = (String) element;
+                String fileName = (String) element;
 
-                found = filename.endsWith(string);
+                found = fileName.endsWith(string);
             }
         }
 
diff --git 
a/src/test/java/org/apache/commons/net/ftp/parser/DownloadListings.java 
b/src/test/java/org/apache/commons/net/ftp/parser/DownloadListings.java
index e69b575..7459c20 100644
--- a/src/test/java/org/apache/commons/net/ftp/parser/DownloadListings.java
+++ b/src/test/java/org/apache/commons/net/ftp/parser/DownloadListings.java
@@ -70,14 +70,14 @@ public class DownloadListings extends FTPClient {
         removeProtocolCommandListener(listener);
     }
 
-    private void download(String path, FTPCmd command, File filename) throws 
Exception {
+    private void download(String path, FTPCmd command, File fileName) throws 
Exception {
         Socket socket;
         if ((socket = _openDataConnection_(command, getListArguments(path))) 
== null) {
             System.out.println(getReplyString());
             return;
         }
         InputStream inputStream = socket.getInputStream();
-        OutputStream outputStream = new FileOutputStream(filename);
+        OutputStream outputStream = new FileOutputStream(fileName);
         Util.copyStream(inputStream, outputStream );
         inputStream.close();
         socket.close();

Reply via email to