rayfarias56 / minrva-estimote-server

The server for the Minrva: Wayfinder app
0 stars 1 forks source link

Refactor Code to use Optional #29

Closed rayfarias56 closed 8 years ago

rayfarias56 commented 8 years ago

Having a function return null, as is done several times in this code base, is often error prone (see: Using and Avoiding Null Explained). I had first avoided using Optional, because I was under the impression Guava would need to be imported and I was having dependency issues prior to using Maven. Yet, I've also just found out that Java8 has Optionals.

rayfarias56 commented 8 years ago

Additional Google'ing yields possible arguments against Java.util's Optional: https://developer.atlassian.com/blog/2015/08/optional-broken/

An informed decision should be made when/if this issue gets addressed.

rayfarias56 commented 8 years ago

Was addressed and resolved in: https://github.com/rayfarias56/minrva-estimote-server/commit/d0a300146679576fa63ce01e77e765ac14e0a4ac