[Lada-commits] [PATCH 2 of 5] Use equals() to compare int-values of Integer objects

Wald Commits scm-commit at wald.intevation.org
Thu Feb 11 16:28:09 CET 2016


# HG changeset patch
# User Tom Gottfried <tom at intevation.de>
# Date 1455203992 -3600
# Node ID 06d1cace91416ff9f8ad873e50e53f463a43c8cc
# Parent  c0883477db3f7810d793d40f04944b78ece7c13e
Use equals() to compare int-values of Integer objects.

diff -r c0883477db3f -r 06d1cace9141 src/main/java/de/intevation/lada/rest/StatusService.java
--- a/src/main/java/de/intevation/lada/rest/StatusService.java	Thu Feb 11 16:15:40 2016 +0100
+++ b/src/main/java/de/intevation/lada/rest/StatusService.java	Thu Feb 11 16:19:52 2016 +0100
@@ -254,10 +254,9 @@
                     i < userInfo.getFunktionenForMst(status.getErzeuger()).size();
                     i++
                 ) {
-                    if (userInfo.getFunktionenForMst(
-                            status.getErzeuger()).get(i) ==
-                                currentStatus.getStatusStufe() + 1 &&
-                        currentStatus.getStatusWert() != 0
+                    if (userInfo.getFunktionenForMst(status.getErzeuger())
+                            .get(i).equals(currentStatus.getStatusStufe() + 1)
+                        && currentStatus.getStatusWert() != 0
                     ) {
                         next = true;
                     }


More information about the Lada-commits mailing list