blerer commented on a change in pull request #482: CASSANDRA-15650 Fix flaky
test org.apache.cassandra.distributed.test.*RepairCoordinatorFastTest
URL: https://github.com/apache/cassandra/pull/482#discussion_r399185294
##########
File path: src/java/org/apache/cassandra/utils/Throwables.java
##########
@@ -230,6 +230,24 @@ public static RuntimeException unchecked(Throwable t)
return t instanceof RuntimeException ? (RuntimeException)t : new
RuntimeException(t);
}
+ /**
+ * throw the exception without wrapping as a runtime exception. This
relies on a trick to stop the compiler from
+ * forcing checking of checked exceptions so a exception can be rethrown
unchecked
+ */
+ public static RuntimeException throwAsUncheckedException(Throwable t)
Review comment:
This is based on something that we cannot guaranty will work in the future
and I am not truly convinced of its benefit over wrapping the Exception in a
Runtime one.
----------------------------------------------------------------
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]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]