← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 19028: Program indicator service, code style

 

------------------------------------------------------------
revno: 19028
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2015-04-27 13:22:45 +0200
message:
  Program indicator service, code style
modified:
  dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/program/DefaultProgramIndicatorService.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-services/dhis-service-tracker/src/main/java/org/hisp/dhis/program/DefaultProgramIndicatorService.java'
--- dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/program/DefaultProgramIndicatorService.java	2015-04-27 11:16:44 +0000
+++ dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/program/DefaultProgramIndicatorService.java	2015-04-27 11:22:45 +0000
@@ -288,23 +288,23 @@
             }
             else if ( ProgramIndicator.KEY_PROGRAM_VARIABLE.equals( key ) )
             {
-                if ( uid.equals( ProgramIndicator.CURRENT_DATE ) )
+                if ( ProgramIndicator.CURRENT_DATE.equals( uid ) )
                 {
                     matcher.appendReplacement( description, "Current date" );
                 }
-                else if ( uid.equals( ProgramIndicator.ENROLLMENT_DATE ) )
+                else if ( ProgramIndicator.ENROLLMENT_DATE.equals( uid ) )
                 {
                     matcher.appendReplacement( description, "Enrollment date" );
                 }
-                else if ( uid.equals( ProgramIndicator.INCIDENT_DATE ) )
+                else if ( ProgramIndicator.INCIDENT_DATE.equals( uid ) )
                 {
                     matcher.appendReplacement( description, "Incident date" );
                 }
-                else if ( uid.equals( ProgramIndicator.VAR_VALUE_COUNT ) )
+                else if ( ProgramIndicator.VAR_VALUE_COUNT.equals( uid ) )
                 {
                     matcher.appendReplacement( description, "Value count" );
                 }
-                else if ( uid.equals( ProgramIndicator.VAR_ZERO_POS_VALUE_COUNT ) )
+                else if ( ProgramIndicator.VAR_ZERO_POS_VALUE_COUNT.equals( uid ) )
                 {
                     matcher.appendReplacement( description, "Zero or positive value count" );
                 }
@@ -514,7 +514,7 @@
                     {
                         String value = attributeValue.getValue();
                         
-                        if( attribute.getValueType().equals( TrackedEntityAttribute.TYPE_DATE ))
+                        if ( attribute.getValueType().equals( TrackedEntityAttribute.TYPE_DATE ) )
                         {
                             value = DateUtils.daysBetween( new Date(), DateUtils.getDefaultDate( value ) ) + " ";
                         }
@@ -552,15 +552,15 @@
                 Date currentDate = new Date();
                 Date date = null;
                 
-                if ( uid.equals( ProgramIndicator.ENROLLMENT_DATE ) )
+                if ( ProgramIndicator.ENROLLMENT_DATE.equals( uid ) )
                 {
                     date = programInstance.getEnrollmentDate();
                 }
-                else if ( uid.equals( ProgramIndicator.INCIDENT_DATE ) )
+                else if ( ProgramIndicator.INCIDENT_DATE.equals( uid ) )
                 {
                     date = programInstance.getDateOfIncident();
                 }
-                else if ( uid.equals( ProgramIndicator.CURRENT_DATE ) )
+                else if ( ProgramIndicator.CURRENT_DATE.equals( uid ) )
                 {
                     date = currentDate;
                 }