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


##########
src/java/org/apache/cassandra/utils/Throwables.java:
##########
@@ -288,12 +288,17 @@ public static Throwable unwrapped(Throwable t)
                unwrapped instanceof InvocationTargetException)
             unwrapped = unwrapped.getCause();
 
-        // I don't think it make sense for those 2 exception classes to ever 
be used with null causes, but no point
-        // in failing here if this happen. We still wrap the original 
exception if that happen so we get a sign
-        // that the assumption of this method is wrong.
-        return unwrapped == null
-               ? new RuntimeException("Got wrapping exception not wrapping 
anything", t)
-               : unwrapped;
+        if (unwrapped == null)
+            throw new RuntimeException("Got wrapping exception not wrapping 
anything", t);
+
+        if (!t.getStackTrace()[t.getStackTrace().length - 
1].getClassName().equals(Thread.class.getName()))

Review Comment:
   I don't follow this logic, can you add some documentation for what this is 
trying to do?



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