dcapwell commented on code in PR #4175:
URL: https://github.com/apache/cassandra/pull/4175#discussion_r2151071468


##########
src/java/org/apache/cassandra/service/accord/txn/TxnCondition.java:
##########
@@ -289,54 +291,99 @@ public boolean applies(TxnData data)
             FilteredPartition partition = reference.getPartition(data);
             boolean exists = partition != null && !partition.isEmpty();
 
-            Row row = null;
-            if (exists)
+            if (reference.column() != null
+                && !reference.column().isPartitionKey())

Review Comment:
   This was a pet pev of mine in kotlin (the same people who made those tool 
you reference)... between the first and second call to `column` it might become 
null... by storing to a variable, you remove the possibility.
   
   This is an issue with the static analysis, it doesn't really understand the 
callers and really doesn't grasp that this is basically immutable.  
   
   I am 100% fine changing though, less warnings the better



-- 
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: pr-unsubscr...@cassandra.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscr...@cassandra.apache.org
For additional commands, e-mail: pr-h...@cassandra.apache.org

Reply via email to