zookeeper-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [zookeeper] hanm commented on a change in pull request #1049: ZOOKEEPER-3475 Enable Checkstyle configuration on zookeeper-server
Date Mon, 12 Aug 2019 22:19:49 GMT
hanm 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_r313153091

 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",
             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:
   @enixon I think my main argument on proposing of doing the naming changes as a future pull
request instead of as part of this pull request is to ensure this pull request does not contain
any semantic changes, make both this and the future pull request easier to review and evaluate.
That approach has the down side of having to do another (or other sets of) pull requests for
enabling more check styles rules, but I feel the benefit of staging the work out weight the
cost of invalidate any PR or causing internal private code rebase multiple times, as each
future pull request will be well scoped, and the amortized cost would likely be low for rebasing

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:

With regards,
Apache Git Services

View raw message