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


##########
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:
   Ok, found the issue.  Not all `RepairMessage` have a `desc`
   
   ```
   public class CleanupMessage extends RepairMessage
   {
       public final TimeUUID parentRepairSession;
   
       public CleanupMessage(TimeUUID parentRepairSession)
       {
           super(null);
           this.parentRepairSession = parentRepairSession;
       }
   ```
   
   this leads to NPE



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