forecastio-lib-java icon indicating copy to clipboard operation
forecastio-lib-java copied to clipboard

ForecastIO.hasXXX should also check if XXX is not empty

Open shaiay opened this issue 9 years ago • 5 comments

Currently these methods only check if the object is non null, and if so, start querying it. However if it's not null but empty this will fail. Adding a check of isEmpty will ix it

shaiay avatar Apr 09 '16 17:04 shaiay

Would the change in ForecastIO.java look like: public boolean hasCurrently(){ if(this.currently.isEmpty()) return false; else return true; }

jamesdesmond avatar Dec 28 '16 14:12 jamesdesmond

Yes, that's what I had in mind

On Wed, Dec 28, 2016, 16:45 James Desmond [email protected] wrote:

Would the change in ForecastIO.java look like: public boolean hasCurrently(){ if(this.currently.isEmpty()) return false; else return true; }

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/dvdme/forecastio-lib-java/issues/23#issuecomment-269486295, or mute the thread https://github.com/notifications/unsubscribe-auth/AAphsUSGOd2h4fUtYDiQgG2Qi4lBGLCeks5rMnYcgaJpZM4IDqbe .

shaiay avatar Dec 28 '16 17:12 shaiay

I just pushed a commit to the dev branch with that change.

dvdme avatar Dec 28 '16 18:12 dvdme

Thanks

On Wed, Dec 28, 2016, 20:49 David Ervideira [email protected] wrote:

I just pushed a commit to the dev branch with that change.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/dvdme/forecastio-lib-java/issues/23#issuecomment-269521833, or mute the thread https://github.com/notifications/unsubscribe-auth/AAphsVXFFfrG2DTdDkwAvjaBZS2K0yOHks5rMq9RgaJpZM4IDqbe .

shaiay avatar Dec 28 '16 18:12 shaiay

No problem. I've been setting up CI and unit tests só that changes don't take me so long to do.

dvdme avatar Dec 28 '16 18:12 dvdme