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 f4186ef9 Java declaration style
f4186ef9 is described below

commit f4186ef949ea6656c5ac940b798171e5f58df82f
Author: Gary Gregory <garydgreg...@gmail.com>
AuthorDate: Tue Jul 23 09:28:55 2024 -0400

    Java declaration style
---
 src/main/java/org/apache/commons/net/daytime/DaytimeTCPClient.java | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/src/main/java/org/apache/commons/net/daytime/DaytimeTCPClient.java 
b/src/main/java/org/apache/commons/net/daytime/DaytimeTCPClient.java
index cb604f79..88380d15 100644
--- a/src/main/java/org/apache/commons/net/daytime/DaytimeTCPClient.java
+++ b/src/main/java/org/apache/commons/net/daytime/DaytimeTCPClient.java
@@ -56,14 +56,11 @@ public final class DaytimeTCPClient extends SocketClient {
      * @throws IOException If an error occurs while fetching the time string.
      */
     public String getTime() throws IOException {
-        int read;
         final StringBuilder result = new StringBuilder(buffer.length);
-        final BufferedReader reader;
-
-        reader = new BufferedReader(new InputStreamReader(_input_, 
getCharset()));
+        final BufferedReader reader = new BufferedReader(new 
InputStreamReader(_input_, getCharset()));
 
         while (true) {
-            read = reader.read(buffer, 0, buffer.length);
+            int read = reader.read(buffer, 0, buffer.length);
             if (read <= 0) {
                 break;
             }

Reply via email to