stardustman commented on PR #1579: URL: https://github.com/apache/incubator-fury/pull/1579#issuecomment-2081324940
> > this 0.4.1 version in [mvnrepository](https://mvnrepository.com/artifact/org.furyio/fury-core/0.4.1) compile with jdk17? or other version? > > The major in class file is 52, so it should be java8 already if this jar was compiled using jdk8's javac to get class file, this should not report error when execute with jdk8. but I get error when I serialize the ByteBuffer, example code like this: ```java import io.fury.Fury; import io.fury.ThreadLocalFury; import io.fury.ThreadSafeFury; import io.fury.config.Language; import java.nio.ByteBuffer; public class FuryTest { // Note that Fury instances should be reused between // multiple serializations of different objects. private static final ThreadSafeFury fury = new ThreadLocalFury(classLoader -> { Fury f = Fury.builder() .withLanguage(Language.JAVA) .withClassLoader(classLoader) .requireClassRegistration(false) .build(); return f; }); public static byte[] encoder(Object object) { return fury.serialize(object); } public static <T> T decoder(byte[] bytes) { return (T) fury.deserialize(bytes); } public static void main(String[] args) { byte len = 10; ByteBuffer byteBuffer = ByteBuffer.allocate(len); for (int i = 0; i < len; i++) { byteBuffer.put((byte) i); } byte[] bytes = FuryTest.encoder(byteBuffer); System.out.println(bytes.length); } } ``` -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
