linkedin / linkedin/avro-util

NPE in FastDeserializerGenerator.java:920

Open
#180 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug fastavro
Dominant language
Java
Stars
87
Forks
73
Avg merge
2h 50m
Merged PRs (30d)
1

Description

`
com.linkedin.avro.fastserde.FastDeserializerGeneratorException: java.lang.NullPointerException
at com.linkedin.avro.fastserde.FastDeserializerGenerator.generateDeserializer(FastDeserializerGenerator.java:156) ~[avro-fastserde-0.2.29.jar:?]
at com.linkedin.avro.fastserde.FastSerdeCache.buildFastSpecificDeserializer(FastSerdeCache.java:315) ~[avro-fastserde-0.2.29.jar:?]
at com.linkedin.avro.fastserde.FastSerdeCache.buildSpecificDeserializer(FastSerdeCache.java:340) ~[avro-fastserde-0.2.29.jar:?]
at com.linkedin.avro.fastserde.FastSerdeCache.lambda$getFastSpecificDeserializer$0(FastSerdeCache.java:213) ~[avro-fastserde-0.2.29.jar:?]
at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1700) [?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
at java.lang.Thread.run(Thread.java:834) [?:?]
Caused by: java.lang.NullPointerException
at com.linkedin.avro.fastserde.FastDeserializerGenerator.processEnum(FastDeserializerGenerator.java:920) ~[avro-fastserde-0.2.29.jar:?]
at com.linkedin.avro.fastserde.FastDeserializerGenerator.processSimpleType(FastDeserializerGenerator.java:189) ~[avro-fastserde-0.2.29.jar:?]
at com.linkedin.avro.fastserde.FastDeserializerGenerator.processArray(FastDeserializerGenerator.java:716) ~[avro-fastserde-0.2.29.jar:?]
at com.linkedin.avro.fastserde.FastDeserializerGenerator.processComplexType(FastDeserializerGenerator.java:169) ~[avro-fastserde-0.2.29.jar:?]
at com.linkedin.avro.fastserde.FastDeserializerGenerator.processRecord(FastDeserializerGenerator.java:314) ~[avro-fastserde-0.2.29.jar:?]
at com.linkedin.avro.fastserde.FastDeserializerGenerator.processComplexType(FastDeserializerGenerator.java:165) ~[avro-fastserde-0.2.29.jar:?]
at com.linkedin.avro.fastserde.FastDeserializerGenerator.processArray(FastDeserializerGenerator.java:713) ~[avro-fastserde-0.2.29.jar:?]
at com.linkedin.avro.fastserde.FastDeserializerGenerator.processComplexType(FastDeserializerGenerator.java:169) ~[avro-fastserde-0.2.29.jar:?]
at com.linkedin.avro.fastserde.FastDeserializerGenerator.processUnion(FastDeserializerGenerator.java:591) ~[avro-fastserde-0.2.29.jar:?]
at com.linkedin.avro.fastserde.FastDeserializerGenerator.processComplexType(FastDeserializerGenerator.java:177) ~[avro-fastserde-0.2.29.jar:?]
at com.linkedin.avro.fastserde.FastDeserializerGenerator.processRecord(FastDeserializerGenerator.java:314) ~[avro-fastserde-0.2.29.jar:?]
at com.linkedin.avro.fastserde.FastDeserializerGenerator.generateDeserializer(FastDeserializerGenerator.java:118) ~[avro-fastserde-0.2.29.jar:?]
`

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in FastDeserializerGenerator.java around processEnum at line 920, then trace the processSimpleType, processArray, processUnion, and processRecord calls shown in the stack trace. Reproduce the reported deserializer-generation path and identify which enum-related value is null; done means the path no longer fails with the reported NullPointerException and has a regression test.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.