salesforce-marketingcloud / FuelSDK-Java

Salesforce Marketing Cloud Java SDK
BSD 3-Clause "New" or "Revised" License
72 stars 123 forks source link

[BUG] NullPointerException on ETResponse.getObject #110

Open h-valer opened 5 years ago

h-valer commented 5 years ago

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

The bug has the severity

Additional context Add any other context about the problem here.