X-czh opened a new issue, #2170:
URL: https://github.com/apache/fury/issues/2170

   ### Search before asking
   
   - [x] I had searched in the [issues](https://github.com/apache/fury/issues) 
and found no similar issues.
   
   
   ### Version
   
   0.10.2 (already cherry picked #2135)
   
   ### Component(s)
   
   Java
   
   ### Minimal reproduce step
   
   ##  Reproduction requirements
   1. Serializing a nested map (directly serializing a map works)
   2. The map type is anything but Map<String, String>
   3. The map contains both null and non-null values
   4. Codegen is enabled
    
   ## Reproduction code
   ```java
   public class Pojo {
        public Map<String,List<Long>> stringInt64ListMap;
   }
   ```
   
   ```java
   Fury fury = 
Fury.builder().withLanguage(Language.JAVA).withCodegen(true).build();
   fury.register(Pojo.class);
   Pojo pojo = new Pojo();
   pojo.stringInt64ListMap = new HashMap<String, List<Long>>();
   pojo.stringInt64ListMap.put("a", Arrays.asList(100L, 200L, 300L));
   pojo.stringInt64ListMap.put("b", null);
   fury.serialize(pojo);
   ```
   
   ### What did you expect to see?
   
   No exception
   
   ### What did you see instead?
   
   ```
   java.lang.NullPointerException
        at 
org.apache.flink.api.java.typeutils.runtime.fury.PojoFuryCodec_0.writeChunk$(PojoFuryCodec_0.java:104)
        at 
org.apache.flink.api.java.typeutils.runtime.fury.PojoFuryCodec_0.writeFields$(PojoFuryCodec_0.java:142)
        at 
org.apache.flink.api.java.typeutils.runtime.fury.PojoFuryCodec_0.write(PojoFuryCodec_0.java:232)
        at org.apache.fury.Fury.writeData(Fury.java:597)
        at org.apache.fury.Fury.write(Fury.java:351)
        at org.apache.fury.Fury.serialize(Fury.java:273)
        at org.apache.fury.Fury.serialize(Fury.java:227)
        at 
org.apache.flink.api.java.typeutils.runtime.fury.FuryTest.test(FuryTest.java:43)
   ```
   
   ### Anything Else?
   
   _No response_
   
   ### Are you willing to submit a PR?
   
   - [ ] I'm willing to submit a PR!


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