apache / dubbo-hessian-lite

Hessian Lite for Apache Dubbo
Apache License 2.0
53 stars 47 forks source link

不支持jdk17吗? #57

Closed keisunique closed 2 years ago

keisunique commented 2 years ago

JDK: 17 hessian-lite version: 3.2.12

序列化代码如下:

 @Override
    public byte[] serialize(Object obj) {
        ByteArrayOutputStream out = new ByteArrayOutputStream();
        Hessian2Output hessian2Output = new Hessian2Output(out);
        try {
            hessian2Output.writeObject(obj);
            hessian2Output.flush();
        } catch (Exception e) {
            e.printStackTrace();
        }
        return out.toByteArray();
    }

报错:

java.lang.reflect.InaccessibleObjectException: Unable to make field final int java.math.BigInteger.signum accessible: module java.base does not "opens java.math" to unnamed module @2f410acfjava.lang.reflect.InaccessibleObjectException: Unable to make field final int java.math.BigInteger.signum accessible: module java.base does not "opens java.math" to unnamed module @2f410acf