zookeeper-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [zookeeper] enixon commented on a change in pull request #1049: ZOOKEEPER-3475 Enable Checkstyle configuration on zookeeper-server
Date Mon, 12 Aug 2019 19:55:49 GMT
enixon commented on a change in pull request #1049: ZOOKEEPER-3475 Enable Checkstyle configuration
on zookeeper-server
URL: https://github.com/apache/zookeeper/pull/1049#discussion_r313094970
 
 

 ##########
 File path: zookeeper-server/src/main/java/org/apache/zookeeper/server/quorum/QuorumCnxManager.java
 ##########
 @@ -202,78 +201,81 @@
             }
         }
 
-        static public InitialMessage parse(Long protocolVersion, DataInputStream din)
-            throws InitialMessageException, IOException {
+        public static InitialMessage parse(
+                Long protocolVersion,
+                DataInputStream din
+        ) throws InitialMessageException, IOException {
             Long sid;
 
             if (protocolVersion != PROTOCOL_VERSION) {
-                throw new InitialMessageException(
-                        "Got unrecognized protocol version %s", protocolVersion);
+                throw new InitialMessageException("Got unrecognized protocol version %s",
protocolVersion);
             }
 
             sid = din.readLong();
 
             int remaining = din.readInt();
             if (remaining <= 0 || remaining > maxBuffer) {
-                throw new InitialMessageException(
-                        "Unreasonable buffer length: %s", remaining);
+                throw new InitialMessageException("Unreasonable buffer length: %s", remaining);
             }
 
             byte[] b = new byte[remaining];
-            int num_read = din.read(b);
+            int numRead = din.read(b);
 
 Review comment:
   I disagree (slightly). The more standard naming style is easier to read and a one-time
cost on open PRs (which will always exist) and on private patches doesn't seem too bad. It
would be different if private repo owners intended to opt out of the change (by reverting
the patch when merging) but I don't see why that would be preferable. 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message