dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #36064
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 18466: Code style
------------------------------------------------------------
revno: 18466
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2015-03-03 14:43:52 +0100
message:
Code style
modified:
dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/BaseIdentifiableObject.java
dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/enrollment/Enrollments.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/common/BaseIdentifiableObject.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/BaseIdentifiableObject.java 2015-02-26 15:21:29 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/BaseIdentifiableObject.java 2015-03-03 13:43:52 +0000
@@ -378,8 +378,8 @@
public int hashCode()
{
int result = getUid() != null ? getUid().hashCode() : 0;
- result = 31 * result + (getCode() != null ? getCode().hashCode() : 0);
- result = 31 * result + (getName() != null ? getName().hashCode() : 0);
+ result = 31 * result + ( getCode() != null ? getCode().hashCode() : 0 );
+ result = 31 * result + ( getName() != null ? getName().hashCode() : 0 );
return result;
}
=== modified file 'dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/enrollment/Enrollments.java'
--- dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/enrollment/Enrollments.java 2015-01-17 07:41:26 +0000
+++ dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/enrollment/Enrollments.java 2015-03-03 13:43:52 +0000
@@ -65,12 +65,22 @@
@Override
public boolean equals( Object o )
{
- if ( this == o ) return true;
- if ( o == null || getClass() != o.getClass() ) return false;
+ if ( this == o )
+ {
+ return true;
+ }
+
+ if ( o == null || getClass() != o.getClass() )
+ {
+ return false;
+ }
Enrollments that = (Enrollments) o;
- if ( enrollments != null ? !enrollments.equals( that.enrollments ) : that.enrollments != null ) return false;
+ if ( enrollments != null ? !enrollments.equals( that.enrollments ) : that.enrollments != null )
+ {
+ return false;
+ }
return true;
}
@@ -78,7 +88,9 @@
@Override
public int hashCode()
{
- return enrollments != null ? enrollments.hashCode() : 0;
+ int result = 0;
+ result = 31 * result + ( enrollments != null ? enrollments.hashCode() : 0 );
+ return result;
}
@Override