bereng commented on a change in pull request #870:
URL: https://github.com/apache/cassandra/pull/870#discussion_r571898892



##########
File path: 
src/java/org/apache/cassandra/cql3/statements/schema/AlterKeyspaceStatement.java
##########
@@ -62,6 +63,9 @@ public AlterKeyspaceStatement(String keyspaceName, 
KeyspaceAttributes attrs)
 
     public Keyspaces apply(Keyspaces schema)
     {
+        if (ClientWarn.instance.get() == null)
+            ClientWarn.instance.captureWarnings();
+        int previousWarningsSize = ClientWarn.instance.getWarnings() == null ? 
0 : ClientWarn.instance.getWarnings().size();

Review comment:
       Yeah on the other hand you can argue you're loosing the semantics on a 
non-inited `ClientWarn` instance returning `0` instead of NPE-ing... :shrug: 
I'd say this is a nit? I am weary of touching such a class for such a specific 
usage and a nit :shrug: 




----------------------------------------------------------------
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:
[email protected]



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

Reply via email to