Strongly Encapsulate JDK Internals PolymorphicThrowableSchema
snsyzf opened this issue · 1 comments
snsyzf commented
Java 17 Strongly Encapsulate JDK Internals, the code not working
public abstract class PolymorphicThrowableSchema extends PolymorphicSchema
{
static final java.lang.reflect.Field __cause;
static
{
java.lang.reflect.Field cause;
try
{
cause = Throwable.class.getDeclaredField("cause");
cause.setAccessible(true);
}
catch (Exception e)
{
cause = null;
}
__cause = cause;
}
}