maedhroz commented on code in PR #2660:
URL: https://github.com/apache/cassandra/pull/2660#discussion_r1317805455
##########
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:
nit: Have to actually read more to figure out where the nulls can come from,
but if we control that, I wonder if there's an alternative. Always a little
worry of allowing `null` in general when `RepairJobDesc` is usually not
supposed to be...
--
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]