You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As an example, the FlightOfferSearch class has an array representing Stops within a Segment. If there are no stops, the array is NULL and can cause an NPE when using java streams.
Its best practice to either return an Optional or return an empty collection to guard against NPE's.
Steps to Reproduce
Make a call to Amadeus Shopping flightOffersSearch API using any available test env data
Examine the returned FlightOfferSearch object. Collections, such as Stops, with no data, are returned with NULL assignment
Expected Behavior: Collections with no data should be empty, not NULL
Actual Behavior: Collections such as Stops have a NULL assignment, causing NPE when streaming is applied.