risdenk commented on code in PR #2919:
URL: https://github.com/apache/calcite/pull/2919#discussion_r1050847408
##########
core/src/main/java/org/apache/calcite/util/Util.java:
##########
@@ -1048,6 +1048,19 @@ public static String getStackTrace(Throwable t) {
return sw.toString();
}
+ /**
+ * Checks a RuntimeException for AccessControlException without importing JDK
+ * classes that are deprecated with the anticipated removal of Java security
manager.
+ * Ignores the RuntimeException if it is an AccessControlException otherwise
throws.
+ * @param e RuntimeException to check if it is an AccessControlException
+ */
+ @API(since = "1.33", status = API.Status.EXPERIMENTAL)
+ public static void ignoreAccessControlException(RuntimeException e) {
Review Comment:
So I thought about trying to put the whole `try/catch` in here but that got
into issues with return values and handling other exceptions. There may be a
way to do this with lambdas or functions passed in. I just punted on that and
made this a simple method just for checking `AccessControlException`
--
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]