Xceptance / neodymium-library

A test automation library based on common other best practice open source libraries. It adds missing functionalities but does not reinvent the wheel. Just glues stuff together nicely and adds some sprinkles.
MIT License
80 stars 11 forks source link

Check returns for null #189

Open occupant23 opened 3 years ago

occupant23 commented 3 years ago

Try to remove returning null where possible to improve our API. Let's detect and discuss those areas first and change the API after the discussion.

E.g. return empty Strings or empty Collections or consider using Optional

oomelianchuk commented 3 years ago

I found 6 null returns in total. These are:

IMO, we could replace all the null returns with optional ones. The last method (NeodymiumProxyHttpClientFactory line 130-139) wouldn't allow us to do so due to overriding, so I suggest throwing an exception in case of authentication failure.