← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 20081: Misc fixes

 

------------------------------------------------------------
revno: 20081
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2015-09-10 18:35:55 +0200
message:
  Misc fixes
modified:
  dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/databrowser/jdbc/JDBCDataBrowserStore.java
  dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/AnalyticsIndex.java
  dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataset/DefaultDataSetService.java
  dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/i18n/I18nManager.java
  dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/legend/LegendSetDeletionHandler.java
  dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/program/DefaultProgramValidationService.java
  dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/program/ProgramTypeUserType.java
  dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/setting/DefaultStyleManager.java
  dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/sms/config/DefaultSmsConfigurationManager.java
  dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/sms/config/GateWayFactory.java
  dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/sms/outbound/DefaultOutboundSmsTransportService.java
  dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/trackedentity/TrackedEntityAuditDeletionHandler.java
  dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/validation/ValidatorThread.java
  dhis-2/dhis-services/dhis-service-core/src/main/resources/i18n_global.properties
  dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/setting/SystemSettingManagerTest.java
  dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/setting/SystemSettingStoreTest.java
  dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/pdfform/DefaultPdfDataEntryFormService.java
  dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/webmessage/DescriptiveWebMessage.java
  dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/completeness/jdbc/JDBCDataSetCompletenessStore.java
  dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/dataelementhistory/DefaultHistoryRetriever.java
  dhis-2/dhis-services/dhis-service-reporting/src/test/java/org/hisp/dhis/mapgeneration/GeoToolsMapObjectTest.java
  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/MathUtils.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-administration/src/main/java/org/hisp/dhis/databrowser/jdbc/JDBCDataBrowserStore.java'
--- dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/databrowser/jdbc/JDBCDataBrowserStore.java	2015-01-17 07:41:26 +0000
+++ dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/databrowser/jdbc/JDBCDataBrowserStore.java	2015-09-10 16:35:55 +0000
@@ -421,7 +421,7 @@
         List<Integer> headerIds = new ArrayList<>();
         setHeaderStructure( grid, rs, headerIds, isZeroAdded );
 
-        if ( rs.first() != true )
+        if ( !rs.first() )
         {
             return countRows;
         }

=== modified file 'dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/AnalyticsIndex.java'
--- dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/AnalyticsIndex.java	2015-01-17 07:41:26 +0000
+++ dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/AnalyticsIndex.java	2015-09-10 16:35:55 +0000
@@ -80,10 +80,12 @@
         {
             return true;
         }
+        
         if ( object == null )
         {
             return false;
         }
+        
         if ( getClass() != object.getClass() )
         {
             return false;

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataset/DefaultDataSetService.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataset/DefaultDataSetService.java	2015-08-26 06:51:40 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataset/DefaultDataSetService.java	2015-09-10 16:35:55 +0000
@@ -369,7 +369,7 @@
 
         boolean expired = dataSet.getExpiryDays() != DataSet.NO_EXPIRY && new DateTime( period.getEndDate() ).plusDays( dataSet.getExpiryDays() ).isBefore( new DateTime( now ) );
 
-        boolean exception = lockExceptionStore.getCount( dataSet, period, organisationUnit ) > 0l;
+        boolean exception = lockExceptionStore.getCount( dataSet, period, organisationUnit ) > 0L;
         
         if ( expired && !exception )
         {
@@ -415,7 +415,7 @@
 
         boolean expired = expiryDays != DataSet.NO_EXPIRY && new DateTime( period.getEndDate() ).plusDays( expiryDays ).isBefore( new DateTime( now ) );
 
-        return expired && lockExceptionStore.getCount( dataElement, period, organisationUnit ) == 0l;
+        return expired && lockExceptionStore.getCount( dataElement, period, organisationUnit ) == 0L;
     }
 
     @Override

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/i18n/I18nManager.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/i18n/I18nManager.java	2015-01-17 07:41:26 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/i18n/I18nManager.java	2015-09-10 16:35:55 +0000
@@ -2,9 +2,6 @@
 
 import java.util.Locale;
 
-import org.hisp.dhis.i18n.I18n;
-import org.hisp.dhis.i18n.I18nFormat;
-
 /*
  * Copyright (c) 2004-2015, University of Oslo
  * All rights reserved.

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/legend/LegendSetDeletionHandler.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/legend/LegendSetDeletionHandler.java	2015-02-24 13:16:58 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/legend/LegendSetDeletionHandler.java	2015-09-10 16:35:55 +0000
@@ -28,9 +28,6 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-import org.hisp.dhis.legend.Legend;
-import org.hisp.dhis.legend.LegendService;
-import org.hisp.dhis.legend.LegendSet;
 import org.hisp.dhis.system.deletion.DeletionHandler;
 import org.springframework.beans.factory.annotation.Autowired;
 

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/program/DefaultProgramValidationService.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/program/DefaultProgramValidationService.java	2015-09-04 09:29:23 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/program/DefaultProgramValidationService.java	2015-09-10 16:35:55 +0000
@@ -28,6 +28,7 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+import org.apache.commons.math3.util.MathUtils;
 import org.hisp.dhis.dataelement.DataElement;
 import org.hisp.dhis.trackedentitydatavalue.TrackedEntityDataValue;
 import org.hisp.dhis.trackedentitydatavalue.TrackedEntityDataValueService;
@@ -157,11 +158,11 @@
                 {
                     double leftSide = Double.parseDouble( leftSideValue );
                     double rightSide = Double.parseDouble( rightSideValue );
-                    if ( !((operator.equals( "==" ) && leftSide == rightSide)
+                    if ( !((operator.equals( "==" ) && MathUtils.equals( leftSide, rightSide ) )
                         || (operator.equals( "<" ) && leftSide < rightSide)
                         || (operator.equals( "<=" ) && leftSide <= rightSide)
                         || (operator.equals( ">" ) && leftSide > rightSide)
-                        || (operator.equals( ">=" ) && leftSide >= rightSide) || (operator.equals( "!=" ) && leftSide != rightSide)) )
+                        || (operator.equals( ">=" ) && leftSide >= rightSide) || (operator.equals( "!=" ) && !MathUtils.equals( leftSide, rightSide ) )) )
                     {
                         ProgramValidationResult validationResult = new ProgramValidationResult( programStageInstance,
                             validate, leftSideValue, rightSideValue );

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/program/ProgramTypeUserType.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/program/ProgramTypeUserType.java	2015-07-02 07:05:55 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/program/ProgramTypeUserType.java	2015-09-10 16:35:55 +0000
@@ -1,3 +1,5 @@
+package org.hisp.dhis.program;
+
 /*
  * Copyright (c) 2004-2014, University of Oslo
  * All rights reserved.
@@ -25,10 +27,8 @@
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
-package org.hisp.dhis.program;
 
 import org.hisp.dhis.hibernate.EnumUserType;
-import org.hisp.dhis.program.ProgramType;
 
 /**
  * @author Chau Thu Tran

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/setting/DefaultStyleManager.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/setting/DefaultStyleManager.java	2015-01-17 07:41:26 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/setting/DefaultStyleManager.java	2015-09-10 16:35:55 +0000
@@ -31,8 +31,6 @@
 import java.io.File;
 import java.util.SortedMap;
 
-import org.hisp.dhis.setting.StyleManager;
-import org.hisp.dhis.setting.SystemSettingManager;
 import org.hisp.dhis.user.UserSettingService;
 
 /**

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/sms/config/DefaultSmsConfigurationManager.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/sms/config/DefaultSmsConfigurationManager.java	2015-01-17 07:41:26 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/sms/config/DefaultSmsConfigurationManager.java	2015-09-10 16:35:55 +0000
@@ -35,9 +35,6 @@
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.hisp.dhis.setting.SystemSettingManager;
-import org.hisp.dhis.sms.config.SmsConfigurable;
-import org.hisp.dhis.sms.config.SmsConfiguration;
-import org.hisp.dhis.sms.config.SmsGatewayConfig;
 import org.springframework.beans.factory.annotation.Autowired;
 
 /**

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/sms/config/GateWayFactory.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/sms/config/GateWayFactory.java	2015-01-17 07:41:26 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/sms/config/GateWayFactory.java	2015-09-10 16:35:55 +0000
@@ -29,12 +29,6 @@
  */
 
 import org.hisp.dhis.sms.SmsServiceException;
-import org.hisp.dhis.sms.config.BulkSmsGatewayConfig;
-import org.hisp.dhis.sms.config.ClickatellGatewayConfig;
-import org.hisp.dhis.sms.config.GenericHttpGatewayConfig;
-import org.hisp.dhis.sms.config.ModemGatewayConfig;
-import org.hisp.dhis.sms.config.SMPPGatewayConfig;
-import org.hisp.dhis.sms.config.SmsGatewayConfig;
 import org.smslib.AGateway;
 import org.smslib.AGateway.Protocols;
 import org.smslib.http.BulkSmsHTTPGateway;

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/sms/outbound/DefaultOutboundSmsTransportService.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/sms/outbound/DefaultOutboundSmsTransportService.java	2015-02-22 20:02:00 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/sms/outbound/DefaultOutboundSmsTransportService.java	2015-09-10 16:35:55 +0000
@@ -44,7 +44,6 @@
 import org.hisp.dhis.sms.config.SMPPGatewayConfig;
 import org.hisp.dhis.sms.config.SmsConfiguration;
 import org.hisp.dhis.sms.config.SmsGatewayConfig;
-import org.hisp.dhis.sms.outbound.OutboundSmsTransportService;
 import org.smslib.AGateway;
 import org.smslib.GatewayException;
 import org.smslib.IInboundMessageNotification;

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/trackedentity/TrackedEntityAuditDeletionHandler.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/trackedentity/TrackedEntityAuditDeletionHandler.java	2015-06-23 15:59:19 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/trackedentity/TrackedEntityAuditDeletionHandler.java	2015-09-10 16:35:55 +0000
@@ -32,9 +32,6 @@
 import java.util.Iterator;
 
 import org.hisp.dhis.system.deletion.DeletionHandler;
-import org.hisp.dhis.trackedentity.TrackedEntityInstance;
-import org.hisp.dhis.trackedentity.TrackedEntityAudit;
-import org.hisp.dhis.trackedentity.TrackedEntityAuditService;
 
 /**
  * @author Chau Thu Tran

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/validation/ValidatorThread.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/validation/ValidatorThread.java	2015-06-15 13:44:20 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/validation/ValidatorThread.java	2015-09-10 16:35:55 +0000
@@ -268,7 +268,7 @@
                     Collection<DataElementOperand> deos = context.getExpressionService().getOperandsInExpression(
                         rule.getLeftSide().getExpression() );
                     
-                    if ( ValidationRule.RULE_TYPE_VALIDATION == rule.getRuleType() )
+                    if ( ValidationRule.RULE_TYPE_VALIDATION.equals( rule.getRuleType() ) )
                     {
                         // Make a copy so we can add to it.
                         deos = new HashSet<>( deos );

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/resources/i18n_global.properties'
--- dhis-2/dhis-services/dhis-service-core/src/main/resources/i18n_global.properties	2015-09-10 08:53:19 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/resources/i18n_global.properties	2015-09-10 16:35:55 +0000
@@ -452,7 +452,6 @@
 intro=Intro
 help_contents=Help Contents
 about_dhis2=About DHIS 2
-user_account=User account
 last_name=Last name
 unknown=Unknown
 java_opts=Java opts
@@ -523,7 +522,6 @@
 interface_style=Interface style
 server_memory=Server memory
 cpu_cores=CPU cores
-user_groups=User groups
 please_select=Please select
 browse_it_here=Browse it here
 
@@ -579,7 +577,7 @@
 profile=Profile
 account=Account
 update_user=Update user
-user_account=User Account
+user_account=User account
 user_name=Username
 old_password=Old password
 new_password=New password

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/setting/SystemSettingManagerTest.java'
--- dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/setting/SystemSettingManagerTest.java	2015-06-16 05:11:29 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/setting/SystemSettingManagerTest.java	2015-09-10 16:35:55 +0000
@@ -54,8 +54,8 @@
     @Test
     public void testSaveGetSystemSetting()
     {
-        systemSettingManager.saveSystemSetting( "settingA", new String( "valueA" ) );
-        systemSettingManager.saveSystemSetting( "settingB", new String( "valueB" ) );
+        systemSettingManager.saveSystemSetting( "settingA", "valueA" );
+        systemSettingManager.saveSystemSetting( "settingB", "valueB" );
 
         assertEquals( new String( "valueA" ), systemSettingManager.getSystemSetting( "settingA" ) );
         assertEquals( new String( "valueB" ), systemSettingManager.getSystemSetting( "settingB" ) );
@@ -64,16 +64,16 @@
     @Test
     public void testGetDefaultSystemSetting()
     {
-        assertEquals( new String( "valueA" ), systemSettingManager.getSystemSetting( "settingA", new String( "valueA" ) ) );
-        assertEquals( new String( "valueB" ), systemSettingManager.getSystemSetting( "settingB", new String( "valueB" ) ) );
+        assertEquals( new String( "valueA" ), systemSettingManager.getSystemSetting( "settingA", "valueA" ) );
+        assertEquals( new String( "valueB" ), systemSettingManager.getSystemSetting( "settingB", "valueB" ) );
     }
 
     @Test
     public void testGetAllSystemSettings()
     {
-        systemSettingManager.saveSystemSetting( "settingA", new String( "valueA" ) );
-        systemSettingManager.saveSystemSetting( "settingB", new String( "valueB" ) );
-        systemSettingManager.saveSystemSetting( "settingC", new String( "valueC" ) );
+        systemSettingManager.saveSystemSetting( "settingA", "valueA" );
+        systemSettingManager.saveSystemSetting( "settingB", "valueB" );
+        systemSettingManager.saveSystemSetting( "settingC", "valueC" );
         
         List<SystemSetting> settings = systemSettingManager.getAllSystemSettings();
         
@@ -84,9 +84,9 @@
     @Test
     public void testGetSystemSettingsAsMap()
     {
-        systemSettingManager.saveSystemSetting( "settingA", new String( "valueA" ) );
-        systemSettingManager.saveSystemSetting( "settingB", new String( "valueB" ) );
-        systemSettingManager.saveSystemSetting( "settingC", new String( "valueC" ) );
+        systemSettingManager.saveSystemSetting( "settingA", "valueA" );
+        systemSettingManager.saveSystemSetting( "settingB", "valueB" );
+        systemSettingManager.saveSystemSetting( "settingC", "valueC" );
 
         Map<String, Serializable> settingsMap = systemSettingManager.getSystemSettingsAsMap();
 

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/setting/SystemSettingStoreTest.java'
--- dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/setting/SystemSettingStoreTest.java	2015-06-16 05:11:29 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/setting/SystemSettingStoreTest.java	2015-09-10 16:35:55 +0000
@@ -57,15 +57,15 @@
     {
         settingA = new SystemSetting();
         settingA.setName( "Setting1" );
-        settingA.setValue( new String( "Value1" ) );
+        settingA.setValue( "Value1" );
 
         settingB = new SystemSetting();
         settingB.setName( "Setting2" );
-        settingB.setValue( new String( "Value2" ) );
+        settingB.setValue( "Value2" );
 
         settingC = new SystemSetting();
         settingC.setName( "Setting3" );
-        settingC.setValue( new String( "Value3" ) );
+        settingC.setValue( "Value3" );
     }
 
     @Test
@@ -80,7 +80,7 @@
         assertEquals( "Setting1", settingA.getName() );
         assertEquals( "Value1", settingA.getValue() );
 
-        settingA.setValue( new String( "Value1.1" ) );
+        settingA.setValue( "Value1.1" );
         systemSettingStore.update( settingA );
 
         settingA = systemSettingStore.get( idA );
@@ -98,7 +98,7 @@
         
         assertEquals( "Value1", settingA.getValue() );
         
-        settingA.setValue( new String( "Value2" ) );
+        settingA.setValue( "Value2" );
         
         systemSettingStore.update( settingA );
 

=== modified file 'dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/pdfform/DefaultPdfDataEntryFormService.java'
--- dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/pdfform/DefaultPdfDataEntryFormService.java	2015-09-01 06:14:53 +0000
+++ dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/pdfform/DefaultPdfDataEntryFormService.java	2015-09-10 16:35:55 +0000
@@ -248,7 +248,7 @@
         // Add Section Name and Section Spacing
         insertTable_TextRow( writer, mainTable, TEXT_BLANK );
 
-        if ( sectionName != "" )
+        if ( sectionName != null && !sectionName.isEmpty() )
         {
             insertTable_TextRow( writer, mainTable, sectionName,
                 pdfFormFontSettings.getFont( PdfFormFontSettings.FONTTYPE_SECTIONHEADER ) );
@@ -752,7 +752,7 @@
         // add weekly date range info here.
         SimpleDateFormat simpleDateFormat_Weekly = null;
 
-        if ( periods.size() > 1 && periods.get( 0 ).getPeriodType().getName() == WeeklyPeriodType.NAME )
+        if ( periods.size() > 1 && periods.get( 0 ).getPeriodType().getName().equals( WeeklyPeriodType.NAME ) )
         {
             simpleDateFormat_Weekly = new SimpleDateFormat( Period.DEFAULT_DATE_FORMAT );
         }
@@ -785,13 +785,13 @@
         int startYear = currYear - PERIODRANGE_PREVYEARS;
         int endYear = currYear + PERIODRANGE_FUTUREYEARS;
 
-        if ( periodType.getName() == QuarterlyPeriodType.NAME
-            || periodType.getName() == SixMonthlyPeriodType.NAME
-            || periodType.getName() == SixMonthlyAprilPeriodType.NAME
-            || periodType.getName() == YearlyPeriodType.NAME
-            || periodType.getName() == FinancialAprilPeriodType.NAME
-            || periodType.getName() == FinancialJulyPeriodType.NAME
-            || periodType.getName() == FinancialOctoberPeriodType.NAME )
+        if ( periodType.getName().equals( QuarterlyPeriodType.NAME )
+            || periodType.getName().equals( SixMonthlyPeriodType.NAME )
+            || periodType.getName().equals( SixMonthlyAprilPeriodType.NAME )
+            || periodType.getName().equals( YearlyPeriodType.NAME )
+            || periodType.getName().equals( FinancialAprilPeriodType.NAME )
+            || periodType.getName().equals( FinancialJulyPeriodType.NAME )
+            || periodType.getName().equals( FinancialOctoberPeriodType.NAME ) )
         {
             startYear = currYear - PERIODRANGE_PREVYEARS_YEARLY;
             endYear = currYear + PERIODRANGE_FUTUREYEARS_YEARLY;

=== modified file 'dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/webmessage/DescriptiveWebMessage.java'
--- dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/webmessage/DescriptiveWebMessage.java	2015-06-05 11:19:27 +0000
+++ dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/webmessage/DescriptiveWebMessage.java	2015-09-10 16:35:55 +0000
@@ -28,8 +28,6 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-import org.hisp.dhis.dxf2.webmessage.WebMessage;
-
 import com.fasterxml.jackson.annotation.JsonProperty;
 
 /**

=== modified file 'dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/completeness/jdbc/JDBCDataSetCompletenessStore.java'
--- dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/completeness/jdbc/JDBCDataSetCompletenessStore.java	2015-06-16 10:36:25 +0000
+++ dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/completeness/jdbc/JDBCDataSetCompletenessStore.java	2015-09-10 16:35:55 +0000
@@ -228,7 +228,7 @@
         }
         catch ( Exception ex )
         {
-            log.debug( "Index already exists" );
+            log.debug( "Index already exists", ex );
         }
     }
     
@@ -242,7 +242,7 @@
         }
         catch ( Exception ex )
         {
-            log.debug( "Index does not exist" );
+            log.debug( "Index does not exist", ex );
         }
     }
 }

=== modified file 'dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/dataelementhistory/DefaultHistoryRetriever.java'
--- dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/dataelementhistory/DefaultHistoryRetriever.java	2015-09-01 06:14:53 +0000
+++ dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/dataelementhistory/DefaultHistoryRetriever.java	2015-09-10 16:35:55 +0000
@@ -28,6 +28,7 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+import org.apache.commons.math3.util.MathUtils;
 import org.apache.commons.math3.util.Precision;
 import org.hisp.dhis.dataelement.DataElement;
 import org.hisp.dhis.dataelement.DataElementCategoryOptionCombo;
@@ -141,7 +142,7 @@
 
         double maxValue = getMaxValue( history );
 
-        if ( maxValue != Double.NEGATIVE_INFINITY )
+        if ( !MathUtils.equals( maxValue, Double.NEGATIVE_INFINITY ) )
         {
             history.setMaxValue( maxValue );
 

=== modified file 'dhis-2/dhis-services/dhis-service-reporting/src/test/java/org/hisp/dhis/mapgeneration/GeoToolsMapObjectTest.java'
--- dhis-2/dhis-services/dhis-service-reporting/src/test/java/org/hisp/dhis/mapgeneration/GeoToolsMapObjectTest.java	2015-01-17 07:41:26 +0000
+++ dhis-2/dhis-services/dhis-service-reporting/src/test/java/org/hisp/dhis/mapgeneration/GeoToolsMapObjectTest.java	2015-09-10 16:35:55 +0000
@@ -33,7 +33,6 @@
 import java.awt.Color;
 
 import org.hisp.dhis.DhisSpringTest;
-import org.hisp.dhis.mapgeneration.InternalMapObject;
 import org.junit.Ignore;
 import org.junit.Test;
 

=== 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	2015-08-27 17:18:00 +0000
+++ dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/DateUtils.java	2015-09-10 16:35:55 +0000
@@ -580,14 +580,7 @@
             return false; // The user hasn't specified any dates
         }
 
-        if ( !date1.before( date2 ) )
-        {
-            return true; // Return true if date2 is earlier than date1
-        }
-        else
-        {
-            return false;
-        }
+        return !date1.before( date2 );
     }
 
     /**

=== modified file 'dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/MathUtils.java'
--- dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/MathUtils.java	2015-07-14 09:47:47 +0000
+++ dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/MathUtils.java	2015-09-10 16:35:55 +0000
@@ -93,7 +93,7 @@
         final JEP parser = getJep();
         parser.parseExpression( expression );
         
-        return ( parser.getValue() == 1.0 );
+        return isEqual( parser.getValue(), 1.0 );
     }
     
     /** 
@@ -258,7 +258,7 @@
      */
     public static double roundToSignificantDigits( double value, int n )
     {
-        if( value == 0.0 )
+        if ( isEqual( value, 0.0 ) )
         {
             return 0.0;
         }