question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Ignore null with disabled asm

See original GitHub issue

Hello. 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:closed
  • Created 6 years ago
  • Comments:21 (15 by maintainers)

github_iconTop GitHub Comments

1reaction
arnaudrogercommented, Oct 9, 2017

can you do a local build? to check something if you open the AppendCollectionSetter and modify the set method to

    public void set(Collection<E> target, E value) throws Exception {
        if (value != null)
            target.add(value);
    }

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.

0reactions
arnaudrogercommented, Oct 12, 2017

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 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

K7931: Error Message: Null in request - AskF5
If you determine that the request is legitimate, you can disable either violation by performing one of the three following procedures:.
Read more >
null-handling ignored · Issue #437 - GitHub
EMPTY_ELEMENT_AS_NULL is disabled, the actual test code defined in super.emptyAsMember() is asserted to fail; when the feature is enabled, it is ...
Read more >
TypeError: asm.js type error: Disabled by debugger
Asm.js optimizations aren't possible when the debugger is running. It will fallback to be executed as normal JS and can debugged that way....
Read more >
4 Configuring Automatic Restart of an Oracle Database
This example disables automatic restart for the Oracle ASM disk group named recovery . srvctl disable diskgroup -diskgroup recovery. Example 4-7 Enabling ...
Read more >
`UnknownIssueId` still prints warnings when disabled ...
Related to b/158295165 , I'm struggling to fully disable this task, ... null: Unknown issue id "ComposableLambdaParameterNaming" null: Unknown issue id ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found