changeset 6378:2ad7f3ada1dc

Artifacts: instanceof null == false, so extra null check needed.
author Sascha L. Teichmann <teichmann@intevation.de>
date Thu, 20 Jun 2013 17:55:18 +0200
parents fa8425c8694c
children 9d5f09698d81
files artifacts/src/main/java/org/dive4elements/river/artifacts/model/Range.java
diffstat 1 files changed, 1 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/Range.java	Thu Jun 20 16:10:58 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/Range.java	Thu Jun 20 17:55:18 2013 +0200
@@ -78,10 +78,7 @@
 
     @Override
     public boolean equals(Object otherRange) {
-        if (otherRange == null) {
-            return false;
-        }
-        else if (otherRange instanceof Range) {
+        if (otherRange instanceof Range) {
             Range oRange = (Range) otherRange;
             return
                 Math.abs(oRange.start - this.start) <= EPSILON

http://dive4elements.wald.intevation.org