FuelSDK-Java icon indicating copy to clipboard operation
FuelSDK-Java copied to clipboard

[BUG] NullPointerException on ETResponse.getObject

Open h-valer opened this issue 4 years ago • 0 comments

Describe the bug A clear and concise description of what the bug is. Method getObject() do a direct access to .getObject(), but getResult can be null, causing a null pointer exception.

To Reproduce Steps to reproduce the behavior. Instantiate a new ETResponse.java with individualResults.size() equals to zero.

Expected behavior A clear and concise description of what you expected to happen. Expect the function getObject() to fail gracefully.

Screenshots If applicable, add screenshots to help explain your problem.

Code snippet A code snippet that demonstrates the issue or a link to a code repository the developers can easily pull down to recreate the issue locally. Screen Shot 2019-09-09 at 2 28 59 PM

Note: Because the developers need to copy and paste the code snippet, including a code snippet as a media file (e.g. gif) is not sufficient.

Environment

  • SDK Version [e.g. 1.1.0]
  • Java/ JDK version

The bug has the severity

  • [ ] Critical: The defect affects critical functionality or critical data. It does not have a workaround.
  • [ ] Major: The defect affects major functionality or major data. It has a workaround but is not obvious and is difficult.
  • [ ] Minor: The defect affects minor functionality or non-critical data. It has an easy workaround.
  • [ ] Trivial: The defect does not affect functionality or data. It does not even need a workaround. It does not impact productivity or efficiency. It is merely an inconvenience.

Additional context Add any other context about the problem here.

h-valer avatar Sep 09 '19 17:09 h-valer