bytelazy commented on issue #2720:
URL: https://github.com/apache/fory/issues/2720#issuecomment-3381414480

   # env
   java version: 11.0.24
   fory version: 0.11.0
   
   # output
   - follow minimal reproduce step, the results:
   ```bash
   
   java.lang.IllegalArgumentException: class demo.EnumReproTest$EnumWrapper is 
not a struct
   
        at 
org.apache.fory.util.Preconditions.checkArgument(Preconditions.java:77)
        at 
org.apache.fory.meta.TypeDefEncoder.encodeClassDef(TypeDefEncoder.java:96)
        at 
org.apache.fory.meta.TypeDefEncoder.buildClassDefWithFieldInfos(TypeDefEncoder.java:81)
        at 
org.apache.fory.meta.TypeDefEncoder.buildTypeDef(TypeDefEncoder.java:65)
        at org.apache.fory.meta.ClassDef.buildClassDef(ClassDef.java:1030)
        at org.apache.fory.meta.ClassDef.buildClassDef(ClassDef.java:1025)
        at 
org.apache.fory.resolver.ClassResolver.lambda$getClassDef$12(ClassResolver.java:1747)
        at java.base/java.util.HashMap.computeIfAbsent(HashMap.java:1134)
        at 
org.apache.fory.resolver.ClassResolver.getClassDef(ClassResolver.java:1747)
        at 
org.apache.fory.serializer.ObjectSerializer.<init>(ObjectSerializer.java:98)
        at 
org.apache.fory.serializer.ObjectSerializer.<init>(ObjectSerializer.java:82)
        at 
org.apache.fory.resolver.XtypeResolver.lambda$register$0(XtypeResolver.java:237)
        at 
org.apache.fory.serializer.LazySerializer.xwrite(LazySerializer.java:61)
        at org.apache.fory.Fory.xwriteData(Fory.java:611)
        at org.apache.fory.Fory.xwriteRef(Fory.java:546)
        at org.apache.fory.Fory.xwrite(Fory.java:419)
        at org.apache.fory.Fory.serialize(Fory.java:327)
        at org.apache.fory.Fory.serialize(Fory.java:279)
        at demo.EnumReproTest.reproduceIssue2720(EnumReproTest.java:51)
        at java.base/java.lang.reflect.Method.invoke(Method.java:566)
        at java.base/java.util.ArrayList.forEach(ArrayList.java:1541)
        at java.base/java.util.ArrayList.forEach(ArrayList.java:1541)
   
   ```
   
   - change language.xlang to language.java, the results: 
   ```bash
   ```
   
   


-- 
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]

Reply via email to