← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 20570: Simplify boolean expressions

 

------------------------------------------------------------
revno: 20570
committer: Halvdan Hoem Grelland <halvdanhg@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2015-10-07 15:48:07 +0200
message:
  Simplify boolean expressions
modified:
  dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/scheduling/SpringScheduler.java


--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/scheduling/SpringScheduler.java'
--- dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/scheduling/SpringScheduler.java	2015-10-07 13:46:41 +0000
+++ dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/scheduling/SpringScheduler.java	2015-10-07 13:48:07 +0000
@@ -110,7 +110,7 @@
         {
             ScheduledFuture<?> future = futures.get( key );
             
-            boolean result = future != null ? future.cancel( true ) : false;
+            boolean result = future != null && future.cancel( true );
             
             futures.remove( key );
             
@@ -133,7 +133,7 @@
             
             ScheduledFuture<?> future = futures.get( key );
             
-            boolean result = future != null ? future.cancel( true ) : false;
+            boolean result = future != null && future.cancel( true );
             
             keys.remove();