Open LegoRocks opened 1 week ago
You cannot reintrospect already introspected class
But then why does it work if you add @SerdeImport
to class that is part of the source set like the following?
@Singleton
@SerdeImport(Foo::class)
class FooService
MappedEntity adds introspected annotation
Expected Behavior
Using the
@SerdeImport
on a test class should enable the serialization of a class annotated with@MappedEntity
the same way as if the entity was annotated with@Serdable
.Actual Behaviour
@SerdeImport
has seemingly no effect and trying to serialize the entity during a test causes anIntrospectionException
.This only affects tests.
@SerdeImport
works as expected when used in the actual application code.Steps To Reproduce
Create class annotated with
@MappedEntity
in the applications source main folderRun test that using
@SerdeImport
for the created class and attempt to serialize it.When either removing
@MappedEntity
or adding@Serdable
the test runs successful.Environment Information
Example Application
No response
Version
4.6.3