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


##########
src/java/org/apache/cassandra/exceptions/RepairException.java:
##########
@@ -27,9 +29,9 @@ public class RepairException extends Exception
 {
     private final boolean shouldLogWarn;
 
-    private RepairException(RepairJobDesc desc, PreviewKind previewKind, 
String message, boolean shouldLogWarn)
+    private RepairException(@Nullable RepairJobDesc desc, PreviewKind 
previewKind, String message, boolean shouldLogWarn)
     {
-        this(desc.toString(previewKind != null ? previewKind : 
PreviewKind.NONE) + ' ' + message, shouldLogWarn);
+        this((desc == null ? "" : desc.toString(previewKind != null ? 
previewKind : PreviewKind.NONE)) + ' ' + message, shouldLogWarn);

Review Comment:
   I forget, but there was 1 specific code path that NPE due to this... so I 
just documented... ill try to find the call path again



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