dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #27549
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 13719: Consistency fix for ProgramStageInstance hashcode
------------------------------------------------------------
revno: 13719
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2014-01-14 12:01:33 +0100
message:
Consistency fix for ProgramStageInstance hashcode
modified:
dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStageInstance.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-api/src/main/java/org/hisp/dhis/program/ProgramStageInstance.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStageInstance.java 2014-01-08 02:53:44 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStageInstance.java 2014-01-14 11:01:33 +0000
@@ -131,13 +131,9 @@
return false;
}
- // TODO include due date and execution date to make consistent with
- // hashcode
-
final ProgramStageInstance other = (ProgramStageInstance) object;
return programInstance.equals( other.getProgramInstance() ) && programStage.equals( other.getProgramStage() );
-
}
@Override
@@ -148,8 +144,6 @@
result = result * prime + programInstance.hashCode();
result = result * prime + programStage.hashCode();
- result = result * prime + dueDate.hashCode();
- result = result * prime + ((executionDate == null) ? 0 : executionDate.hashCode());
return result;
}