tolbertam commented on code in PR #2969:
URL: https://github.com/apache/cassandra/pull/2969#discussion_r1446326580


##########
src/java/org/apache/cassandra/transport/messages/StartupMessage.java:
##########
@@ -118,8 +121,29 @@ else if (compression.equals("lz4"))
             clientState.setDriverVersion(options.get(DRIVER_VERSION));
         }
 
-        if (DatabaseDescriptor.getAuthenticator().requireAuthentication())
+        IAuthenticator authenticator = DatabaseDescriptor.getAuthenticator();
+        if (authenticator.requireAuthentication()) {

Review Comment:
   looked around and corrected this and another place I was not following 
convention.
   
   Was wondering if it's ever been discussed to enforce this through 
checkstyle?  I suspect maybe it has and was rejected because of possible chaos 
to reconcile it;  These rules found ~595 violations but a bunch of them come 
from the same set of files, so maybe manageable.
   
   ```diff
   ❯ git diff
   diff --git a/.build/checkstyle.xml b/.build/checkstyle.xml
   index 8b81f21281..9bd22dc1ac 100644
   --- a/.build/checkstyle.xml
   +++ b/.build/checkstyle.xml
   @@ -179,6 +179,10 @@
          <message key="matchxpath.match"
                   value="'Deprecated annotation must provide 'since' value."/>
        </module>
   +    <module name="LeftCurly">
   +        <property name="option" value="nl"/>
   +        <property name="tokens" 
value="ANNOTATION_DEF,CLASS_DEF,CTOR_DEF,ENUM_CONSTANT_DEF,INTERFACE_DEF,LITERAL_CASE,LITERAL_CATCH,LITERAL_DEFAULT,LITERAL_DO,LITERAL_ELSE,LITERAL_FINALLY,LITERAL_FOR,LITERAL_IF,LITERAL_SWITCH,LITERAL_SYNCHRONIZED,LITERAL_TRY,LITERAL_WHILE,METHOD_DEF,OBJBLOCK,STATIC_INIT,RECORD_DEF,COMPACT_CTOR_DEF"/>
   +    </module>
      </module>
   
    </module>
   ```



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to