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.

NPE DbxRequestUtil.finishReponse doesn't account for null body

See original GitHub issue
java.lang.NullPointerException
        at com.dropbox.core.util.IOUtil.closeInput(IOUtil.java:129)
        at com.dropbox.core.DbxRequestUtil.finishResponse(DbxRequestUtil.java:482)
        at com.dropbox.core.DbxRequestUtil$2.run(DbxRequestUtil.java:473)
        at com.dropbox.core.DbxRequestUtil.runAndRetry(DbxRequestUtil.java:517)
        at com.dropbox.core.DbxRequestUtil.doPostNoAuth(DbxRequestUtil.java:469)
        at com.dropbox.core.DbxWebAuth.finish(DbxWebAuth.java:401)
        at com.dropbox.core.DbxWebAuth.finishFromCode(DbxWebAuth.java:309)

finishReponse has the line IOUtil.closeInput(response.getBody());, but we had an instance where getBody() returned null.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
jamie-everlawcommented, Sep 23, 2022

Great, thanks!

1reaction
jamie-everlawcommented, Sep 23, 2022

@handstandsam What do you mean by example? I provided part of the stack trace that involves this sdk.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Check for null values in rules - IBM
Cause. Checking for null values and initializing them is a necessary step in the implementation of a ruleset, because input objects might be ......
Read more >
How to avoid deferencing NPE on return value when throwing ...
I have a validator service ( that checks if the DTO I receive via API does not contain null values in Double and...
Read more >
Tired of Null Pointer Exceptions? Consider Using Java SE 8's ...
A common (bad) practice is to return the null reference to indicate the absence of a sound card. Unfortunately, this means the call...
Read more >
Null is your friend, not a mistake | by Roman Elizarov - Medium
NullPointerException is dreaded in Java. All sorts of workarounds exist to avoid nulls. Fear not. They are not needed with Kotlin.
Read more >
Null Pointer Exception In Java - GeeksforGeeks
NullPointerException is thrown when program attempts to use an object ... we must verify that object is not null, before we request a...
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