dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #34111
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 17518: Logical duh
------------------------------------------------------------
revno: 17518
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2014-11-18 09:48:59 +0100
message:
Logical duh
modified:
dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/DateUtils.java
dhis-2/dhis-support/dhis-support-system/src/test/java/org/hisp/dhis/system/util/DateUtilsTest.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/util/DateUtils.java'
--- dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/DateUtils.java 2014-11-17 18:13:25 +0000
+++ dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/DateUtils.java 2014-11-18 08:48:59 +0000
@@ -131,7 +131,7 @@
return date2 != null ? date2 : null;
}
- return date2 != null ? ( date1.before( date2 ) ? date1 : date2 ) : date1;
+ return date2 != null ? ( date1.after( date2 ) ? date1 : date2 ) : date1;
}
/**
=== modified file 'dhis-2/dhis-support/dhis-support-system/src/test/java/org/hisp/dhis/system/util/DateUtilsTest.java'
--- dhis-2/dhis-support/dhis-support-system/src/test/java/org/hisp/dhis/system/util/DateUtilsTest.java 2014-11-17 18:13:25 +0000
+++ dhis-2/dhis-support/dhis-support-system/src/test/java/org/hisp/dhis/system/util/DateUtilsTest.java 2014-11-18 08:48:59 +0000
@@ -77,8 +77,8 @@
Date date3 = null;
Date date4 = null;
- assertEquals( date1, DateUtils.max( date1, date2 ) );
- assertEquals( date1, DateUtils.max( date2, date1 ) );
+ assertEquals( date2, DateUtils.max( date1, date2 ) );
+ assertEquals( date2, DateUtils.max( date2, date1 ) );
assertEquals( date1, DateUtils.max( date1, date3 ) );
assertEquals( date1, DateUtils.max( date3, date1 ) );