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

commit 6bdf9e3d8dac4d7355c723ebe9d6af703147ac7f
Author: Gary Gregory <[email protected]>
AuthorDate: Tue Jun 24 07:41:07 2025 -0400

    Upper case internal constants
    
    Reduce vertical whitespace
---
 .../org/apache/commons/net/io/FromNetASCIIInputStream.java | 14 +++++++-------
 .../apache/commons/net/io/FromNetASCIIOutputStream.java    |  8 ++++----
 2 files changed, 11 insertions(+), 11 deletions(-)

diff --git 
a/src/main/java/org/apache/commons/net/io/FromNetASCIIInputStream.java 
b/src/main/java/org/apache/commons/net/io/FromNetASCIIInputStream.java
index 9b97d21a..cc02df9f 100644
--- a/src/main/java/org/apache/commons/net/io/FromNetASCIIInputStream.java
+++ b/src/main/java/org/apache/commons/net/io/FromNetASCIIInputStream.java
@@ -31,8 +31,8 @@ import org.apache.commons.net.util.NetConstants;
  */
 public final class FromNetASCIIInputStream extends PushbackInputStream {
 
-    static final boolean _noConversionRequired = 
System.lineSeparator().equals("\r\n");
-    static final byte[] _lineSeparatorBytes = 
System.lineSeparator().getBytes(StandardCharsets.US_ASCII);
+    static final boolean NO_CONVERSION_REQUIRED = 
System.lineSeparator().equals("\r\n");
+    static final byte[] LINE_SEPARATOR_BYTES = 
System.lineSeparator().getBytes(StandardCharsets.US_ASCII);
 
     /**
      * Returns true if the NetASCII line separator differs from the system 
line separator, false if they are the same. This method is useful to determine
@@ -41,7 +41,7 @@ public final class FromNetASCIIInputStream extends 
PushbackInputStream {
      * @return True if the NETASCII line separator differs from the local 
system line separator, false if they are the same.
      */
     public static boolean isConversionRequired() {
-        return !_noConversionRequired;
+        return !NO_CONVERSION_REQUIRED;
     }
 
     private int length;
@@ -52,7 +52,7 @@ public final class FromNetASCIIInputStream extends 
PushbackInputStream {
      * @param input the stream to wrap
      */
     public FromNetASCIIInputStream(final InputStream input) {
-        super(input, _lineSeparatorBytes.length + 1);
+        super(input, LINE_SEPARATOR_BYTES.length + 1);
     }
 
     // PushbackInputStream in JDK 1.1.3 returns the wrong thing
@@ -79,7 +79,7 @@ public final class FromNetASCIIInputStream extends 
PushbackInputStream {
      */
     @Override
     public int read() throws IOException {
-        if (_noConversionRequired) {
+        if (NO_CONVERSION_REQUIRED) {
             return super.read();
         }
 
@@ -110,7 +110,7 @@ public final class FromNetASCIIInputStream extends 
PushbackInputStream {
      */
     @Override
     public int read(final byte buffer[], int offset, final int length) throws 
IOException {
-        if (_noConversionRequired) {
+        if (NO_CONVERSION_REQUIRED) {
             return super.read(buffer, offset, length);
         }
 
@@ -156,7 +156,7 @@ public final class FromNetASCIIInputStream extends 
PushbackInputStream {
                 }
                 return '\r';
             }
-            unread(_lineSeparatorBytes);
+            unread(LINE_SEPARATOR_BYTES);
             ch = super.read();
             // This is a kluge for read(byte[], ...) to read the right amount
             --length;
diff --git 
a/src/main/java/org/apache/commons/net/io/FromNetASCIIOutputStream.java 
b/src/main/java/org/apache/commons/net/io/FromNetASCIIOutputStream.java
index 189c3073..e6cd3471 100644
--- a/src/main/java/org/apache/commons/net/io/FromNetASCIIOutputStream.java
+++ b/src/main/java/org/apache/commons/net/io/FromNetASCIIOutputStream.java
@@ -50,7 +50,7 @@ public final class FromNetASCIIOutputStream extends 
FilterOutputStream {
      */
     @Override
     public synchronized void close() throws IOException {
-        if (FromNetASCIIInputStream._noConversionRequired) {
+        if (FromNetASCIIInputStream.NO_CONVERSION_REQUIRED) {
             super.close();
             return;
         }
@@ -82,7 +82,7 @@ public final class FromNetASCIIOutputStream extends 
FilterOutputStream {
      */
     @Override
     public synchronized void write(final byte buffer[], int offset, int 
length) throws IOException {
-        if (FromNetASCIIInputStream._noConversionRequired) {
+        if (FromNetASCIIInputStream.NO_CONVERSION_REQUIRED) {
             // FilterOutputStream method is very slow.
             // super.write(buffer, offset, length);
             out.write(buffer, offset, length);
@@ -104,7 +104,7 @@ public final class FromNetASCIIOutputStream extends 
FilterOutputStream {
      */
     @Override
     public synchronized void write(final int ch) throws IOException {
-        if (FromNetASCIIInputStream._noConversionRequired) {
+        if (FromNetASCIIInputStream.NO_CONVERSION_REQUIRED) {
             out.write(ch);
             return;
         }
@@ -120,7 +120,7 @@ public final class FromNetASCIIOutputStream extends 
FilterOutputStream {
             break;
         case '\n':
             if (lastWasCR) {
-                out.write(FromNetASCIIInputStream._lineSeparatorBytes);
+                out.write(FromNetASCIIInputStream.LINE_SEPARATOR_BYTES);
                 lastWasCR = false;
                 break;
             }

Reply via email to