-
Notifications
You must be signed in to change notification settings - Fork 246
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
FST fail to deserialize Java records #341
Comments
...deleted |
Hi, same remark and request here. We are thinking about using FST in a rather large project (https://github.com/gama-platform/gama) for both binary (saving large simulations) and JSON (inter-simulations communication) serialisation protocols, but the fact that it can't handle the deserialisation of records is really blocking. Any hint on when/how this can be addressed ? |
A workaround consists in declaring a custom serialiser for the |
I am succesfully running FST on Java 17 on OpenJDK. Also java records appear to be working. This was done with some additional reflection in the FSTUtil in order to get the record field offsets. Then the FST does not fall back to the reflection based setters and the IllegalAccessException is not thrown. I also tried my changes on Java 21 and it worked. I do need to use some --add-opens arguments when I start the jvm. So it is not pretty but it works. I could provide a patch if anyone with maintainer privileges is interested. |
Hi, I don't have maintainer privileges, but I'm certainly interested in your patch. Do you think you could make it available as a pull request ? Cheers |
Could you provide a patch / PR regardless., so we can see your implementation? |
@anttikerola so did you provide it somewhere? |
I do not use records but a patch like this one will give the project the state of "liveliness" even if no-one will merge it to main. It can be a fork and then a pull request. |
Can FST properly do deserialization of Java Records?
I'm using the latest version fst available and trying to emulate serialization/deserialization process
Serialization works fine, but when I'm trying to deserialize the data I'm getting the following error:
Code Example
Java version: bellsoft/liberica-openjdk-debian:17.0.2
FST version: de.ruedigermoeller:fst:3.0.4-jdk17
The text was updated successfully, but these errors were encountered: