(Object value, Object type)
| 1232 | } |
| 1233 | |
| 1234 | public static boolean isInstance(Object value, Object type) { |
| 1235 | if (!(type instanceof Class<?> clazz)) { |
| 1236 | return false; |
| 1237 | } |
| 1238 | |
| 1239 | Object target = unwrapIfThrowable(value); |
| 1240 | return clazz.isInstance(target); |
| 1241 | } |
| 1242 | |
| 1243 | private static Object unwrapIfThrowable(Object value) { |
| 1244 | if (!(value instanceof Throwable t)) { |