-
Notifications
You must be signed in to change notification settings - Fork 828
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Serializing UUID not working with java 17 (but same works on java 11) #859
Comments
@MrTetrixx: You will need to add the following arguments for now:
See our current surefire setup for other I'll look into improving JDK 17 support in the near future. |
Ahh ok, yeah we have a bunch of those already but one more won't hurt I guess. |
Is there any update on this? I'm running into the same issue when trying to serialize static class FileSerializer extends FieldSerializer<File> {
public FileSerializer(Kryo kryo, Class<File> type) {
super(kryo, type);
}
@Override
public void write (Kryo kryo, Output output, File object) {
output.writeString(object.getPath());
}
@Override
public File read(Kryo kryo, Input input, Class<? extends File> type) {
return new File(input.readString());
}
} Using OS: Windows 11 |
@OleksandrVoronin: I briefly looked into it, but it seems there is not much that can be done. In case of UUID, the serializer needs to access internals via reflection. JDK modules are now encapsulated by default, so users need to open them up for reflection. Your case does not need reflection though and shouldn't require JVM args. The issue is that you extend |
There is a related issue for |
We have a project that we are wanted to build with java 17 instead of 11. No code changes - just building java 11 code with java 17. Tests started to fail and it seems the UUID serializer created by kryo does not work when building with java 17. I have added a small reproducer.
To reproduce change java version in the pom.xml to 17 and it will fail with:
Environment:
The text was updated successfully, but these errors were encountered: