From 76293ebd2036ab5e26725ebd0d3cf730fde89a3e Mon Sep 17 00:00:00 2001 From: Bananeweizen Date: Wed, 10 Sep 2014 07:32:40 +0200 Subject: refactoring: remove double negation --- main/src/cgeo/geocaching/sensors/GeoData.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main/src/cgeo/geocaching/sensors/GeoData.java b/main/src/cgeo/geocaching/sensors/GeoData.java index 561c09f..d39b3ed 100644 --- a/main/src/cgeo/geocaching/sensors/GeoData.java +++ b/main/src/cgeo/geocaching/sensors/GeoData.java @@ -31,10 +31,10 @@ public class GeoData extends Location implements IGeoData { @Nullable static Location best(@Nullable final Location gpsLocation, @Nullable final Location netLocation) { - if (isRecent(gpsLocation) || !(netLocation != null)) { + if (isRecent(gpsLocation) || netLocation == null) { return gpsLocation; } - if (!(gpsLocation != null)) { + if (gpsLocation == null) { return netLocation; } return gpsLocation.getTime() >= netLocation.getTime() ? gpsLocation : netLocation; -- cgit v1.1