protostuff icon indicating copy to clipboard operation
protostuff copied to clipboard

Strongly Encapsulate JDK Internals PolymorphicThrowableSchema

Open snsyzf opened this issue 2 years ago • 1 comments

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

}

snsyzf avatar Oct 29 '21 01:10 snsyzf

@snsyzf thanks for reporting. Can you try testing against 1.8.0-SNAPSHOT and see if you still get problems?

dyu avatar Nov 02 '21 07:11 dyu