Skip to content

[Java] Fory instances with different config are not independent due to codegen #3116

@nealeu

Description

@nealeu

Search before asking

  • I had searched in the issues and found no similar issues.

Version

JDK 0.14.1

Component(s)

Java

Minimal reproduce step

Create two Fory instances with codegen enabled, one with a custom serializer (in my case) and one without.

Serialize the same object with the customised class as a field within the object graph (e.g. in our case we have some BSON ObjectId refs).

What did you expect to see?

I should be able to serialise and deserialise with each successfully.

What did you see instead?

Deserialisation using the non-customised Fory fails because the codegen expects the custom Serializer which it has never been told about.

Anything Else?

I think this should be obvious in terms of isolating codegen between differently configured Fory instances/pools.

Are you willing to submit a PR?

  • I'm willing to submit a PR!

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions