Ignore null with disabled asm
See original GitHub issueHello. I use JdbcMapperFactory with disabled asm (because of issu 457) I have a POJO with structure like:
{
String id;
String name;
List<String> photos;
List<String> videos;
}
And jdbc call which have a few joins and returns ResultSet where potos or videos can have only nulls.
Mapper calls setter for photos and videos if value is null. It could be very annoying as requires additional checks.
I found an issue 445 where this was fixed. But seems only for CsvMapperBuilder and other builders where asm is used and turned on. Also when I checked InstantiatorFactory.java I can see that there is builderBiInstantiator which also has builderIgnoresNullValues flag. But in my case instantiatorDefinition of type CONSTRUCTOR is alway called.
Is there a way to ignor null values with disabled asm?
I failed to find something which can help me in documentation so had to post an issue.
Thank you, Aleksey
Issue Analytics
- State:
- Created 6 years ago
- Comments:21 (15 by maintainers)
Top GitHub Comments
can you do a local build? to check something if you open the AppendCollectionSetter and modify the set method to
does that fix the problem? if so it’s easy to impl, just need to find a way to pass some config to enable that.
you’re welcome, hard to anticipate all the cases. will try and reproduce the ClassLoader issue but I have no experience with Play no guarantee on that one 😃