← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 19947: minor fixes for ValueType, also converted to using <> as type parameters where applicable

 

------------------------------------------------------------
revno: 19947
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2015-09-03 10:11:47 +0700
message:
  minor fixes for ValueType, also converted to using <> as type parameters where applicable
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/BaseAnalyticalObject.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/ListMap.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/MapMap.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/NameableObjectUtils.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/SetMap.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/CategoryOptionGroupSet.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElementCategory.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElementGroupSet.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/node/LinearNodePipeline.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/organisationunit/OrganisationUnit.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/organisationunit/OrganisationUnitGroupSet.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/period/RelativePeriods.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/validation/ValidationSummary.java
  dhis-2/dhis-api/src/test/java/org/hisp/dhis/common/BaseAnalyticalObjectTest.java
  dhis-2/dhis-api/src/test/java/org/hisp/dhis/datavalue/DataValueTest.java
  dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataapproval/hibernate/HibernateDataApprovalStore.java
  dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataentryform/DefaultDataEntryFormService.java
  dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/organisationunit/DefaultOrganisationUnitService.java
  dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/trackedentity/DefaultTrackedEntityInstanceReminderService.java
  dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/user/DefaultCurrentUserService.java
  dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/program/ProgramDataEntryServiceTest.java
  dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/program/ProgramExpressionServiceTest.java
  dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/program/ProgramIndicatorServiceTest.java
  dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/program/ProgramInstanceServiceTest.java
  dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/program/ProgramInstanceStoreTest.java
  dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/program/ProgramServiceTest.java
  dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/program/ProgramStageDataElementServiceTest.java
  dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/program/ProgramStageDataElementStoreTest.java
  dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/program/ProgramStageInstanceServiceTest.java
  dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/program/ProgramStageInstanceStoreTest.java
  dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/program/ProgramStageSectionServiceTest.java
  dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/program/ProgramStageSectionStoreTest.java
  dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/program/ProgramStageServiceTest.java
  dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/program/ProgramStageStoreTest.java
  dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/program/ProgramStoreTest.java
  dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/program/ProgramValidationServiceTest.java
  dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/program/ProgramValidationStoreTest.java
  dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/programrule/ProgramRuleServiceTest.java
  dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/trackedentity/TrackedEntityInstanceReminderServiceTest.java
  dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/trackedentity/TrackedEntityInstanceServiceTest.java
  dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/trackedentitydatavalue/TrackedEntityDataValueServiceTest.java
  dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/trackedentitydatavalue/TrackedEntityDataValueStoreTest.java
  dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/datavalueset/DefaultDataValueSetService.java
  dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/gml/DefaultGmlImportService.java
  dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/DefaultImportService.java
  dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/DefaultObjectBridge.java
  dhis-2/dhis-services/dhis-service-dxf2/src/test/java/org/hisp/dhis/dxf2/events/NoRegistrationSingleEventServiceTest.java
  dhis-2/dhis-services/dhis-service-dxf2/src/test/java/org/hisp/dhis/dxf2/events/RegistrationMultiEventsServiceTest.java
  dhis-2/dhis-services/dhis-service-dxf2/src/test/java/org/hisp/dhis/dxf2/events/RegistrationSingleEventServiceTest.java
  dhis-2/dhis-services/dhis-service-dxf2/src/test/java/org/hisp/dhis/dxf2/events/TrackedEntityInstanceServiceTest.java
  dhis-2/dhis-services/dhis-service-dxf2/src/test/java/org/hisp/dhis/dxf2/metadata/DefaultExportServiceTest.java
  dhis-2/dhis-services/dhis-service-eventreporting/src/main/java/org/hisp/dhis/caseaggregation/hibernate/HibernateCaseAggregationConditionStore.java
  dhis-2/dhis-services/dhis-service-eventreporting/src/test/java/org/hisp/dhis/caseaggregation/CaseAggregationConditionServiceTest.java
  dhis-2/dhis-services/dhis-service-eventreporting/src/test/java/org/hisp/dhis/caseaggregation/CaseAggregationConditionStoreTest.java
  dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/mapping/NameMappingUtil.java
  dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/mobile/service/ActivityReportingServiceImpl.java
  dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/mobile/service/DefaultProgramService.java
  dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/mobile/service/FacilityReportingServiceImpl.java
  dhis-2/dhis-services/dhis-service-reporting/src/test/java/org/hisp/dhis/reporttable/ReportTableStoreTest.java
  dhis-2/dhis-services/dhis-service-reporting/src/test/java/org/hisp/dhis/reporttable/ReportTableTest.java
  dhis-2/dhis-support/dhis-support-commons/src/main/java/org/hisp/dhis/commons/collection/ListUtils.java
  dhis-2/dhis-support/dhis-support-commons/src/main/java/org/hisp/dhis/commons/util/TextUtils.java
  dhis-2/dhis-support/dhis-support-system/src/test/java/org/hisp/dhis/system/util/ExpressionUtilsTest.java
  dhis-2/dhis-support/dhis-support-test/src/main/java/org/hisp/dhis/DhisConvenienceTest.java
  dhis-2/dhis-support/dhis-support-test/src/main/java/org/hisp/dhis/mock/MockCurrentUserService.java
  dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/AbstractCrudController.java
  dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/AppController.java
  dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/DataSetController.java
  dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/MaintenanceController.java
  dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/SmsConfigurationController.java
  dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/organisationunit/OrganisationUnitController.java
  dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/user/CurrentUserController.java
  dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/GetProgramMetaDataAction.java
  dhis-2/dhis-web/dhis-web-dataentry/src/main/java/org/hisp/dhis/de/action/GetMetaDataAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/category/ShowAddDataElementCategoryOptionAction.java
  dhis-2/dhis-web/dhis-web-ohie/src/main/java/org/hisp/dhis/web/ohie/csd/webapi/CsdController.java
  dhis-2/dhis-web/dhis-web-ohie/src/main/java/org/hisp/dhis/web/ohie/fred/webapi/v1/controller/FacilityAdvice.java
  dhis-2/dhis-web/dhis-web-ohie/src/main/java/org/hisp/dhis/web/ohie/fred/webapi/v1/controller/FacilityController.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/BaseAnalyticalObject.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/BaseAnalyticalObject.java	2015-08-18 06:24:56 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/BaseAnalyticalObject.java	2015-09-03 03:11:47 +0000
@@ -605,11 +605,11 @@
         }
         else if ( DATA_COLLAPSED_DIM_ID.contains( dimension ) )
         {
-            return new BaseDimensionalObject( dimension, DimensionType.DATA_COLLAPSED, new ArrayList<NameableObject>() );
+            return new BaseDimensionalObject( dimension, DimensionType.DATA_COLLAPSED, new ArrayList<>() );
         }
         else if ( STATIC_DIMS.contains( dimension ) )
         {
-            return new BaseDimensionalObject( dimension, DimensionType.STATIC, new ArrayList<NameableObject>() );
+            return new BaseDimensionalObject( dimension, DimensionType.STATIC, new ArrayList<>() );
         }
         else
         {
@@ -773,8 +773,8 @@
         List<String> ids = new ArrayList<>();
 
         List<NameableObject> dimensions = new ArrayList<>();
-        dimensions.addAll( column != null ? column : new ArrayList<NameableObject>() );
-        dimensions.addAll( row != null ? row : new ArrayList<NameableObject>() );
+        dimensions.addAll( column != null ? column : new ArrayList<>() );
+        dimensions.addAll( row != null ? row : new ArrayList<>() );
 
         for ( NameableObject item : dimensions )
         {

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/ListMap.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/ListMap.java	2015-01-17 07:41:26 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/ListMap.java	2015-09-03 03:11:47 +0000
@@ -57,7 +57,7 @@
     public List<V> putValue( T key, V value )
     {
         List<V> list = this.get( key );
-        list = list == null ? new ArrayList<V>() : list;        
+        list = list == null ? new ArrayList<>() : list;
         list.add( value );
         super.put( key, list );        
         return null;

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/MapMap.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/MapMap.java	2015-01-17 07:41:26 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/MapMap.java	2015-09-03 03:11:47 +0000
@@ -41,7 +41,7 @@
     public Map<U, V> putEntry( T key, U valueKey, V value )
     {
         Map<U, V> map = this.get( key );
-        map = map == null ? new HashMap<U, V>() : map;
+        map = map == null ? new HashMap<>() : map;
         map.put( valueKey, value );
         return this.put( key, map );
     }
@@ -49,7 +49,7 @@
     public void putEntries( T key, Map<U, V> m )
     {
         Map<U, V> map = this.get( key );
-        map = map == null ? new HashMap<U, V>() : map;
+        map = map == null ? new HashMap<>() : map;
         map.putAll( m );
         this.put( key, map );
     }

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/NameableObjectUtils.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/NameableObjectUtils.java	2015-07-04 13:26:05 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/NameableObjectUtils.java	2015-09-03 03:11:47 +0000
@@ -276,6 +276,6 @@
      */
     public static <T extends NameableObject> List<T> getCopyNullSafe( List<T> objects )
     {
-        return objects != null ? new ArrayList<>( objects ) : new ArrayList<T>();
+        return objects != null ? new ArrayList<>( objects ) : new ArrayList<>();
     }
 }

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/SetMap.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/SetMap.java	2015-01-17 07:41:26 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/SetMap.java	2015-09-03 03:11:47 +0000
@@ -51,7 +51,7 @@
     public Set<V> putValue( T key, V value )
     {
         Set<V> set = this.get( key );
-        set = set == null ? new HashSet<V>() : set;        
+        set = set == null ? new HashSet<>() : set;
         set.add( value );
         return super.put( key, set );
     }
@@ -59,7 +59,7 @@
     public Set<V> getSet( T key )
     {
         Set<V> set = this.get( key );
-        set = set == null ? new HashSet<V>() : set;
+        set = set == null ? new HashSet<>() : set;
         return super.put( key, set );
     }
 }

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/CategoryOptionGroupSet.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/CategoryOptionGroupSet.java	2015-08-19 11:13:46 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/CategoryOptionGroupSet.java	2015-09-03 03:11:47 +0000
@@ -112,7 +112,7 @@
     @JacksonXmlProperty( localName = "item", namespace = DxfNamespaces.DXF_2_0 )
     public List<NameableObject> getItems()
     {
-        return new ArrayList<NameableObject>( members );
+        return new ArrayList<>( members );
     }
 
     @Override

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElementCategory.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElementCategory.java	2015-08-18 22:46:02 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElementCategory.java	2015-09-03 03:11:47 +0000
@@ -151,7 +151,7 @@
     @JacksonXmlProperty( localName = "item", namespace = DxfNamespaces.DXF_2_0 )
     public List<NameableObject> getItems()
     {
-        return new ArrayList<NameableObject>( categoryOptions );
+        return new ArrayList<>( categoryOptions );
     }
 
     @Override

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElementGroupSet.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElementGroupSet.java	2015-07-15 16:04:35 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElementGroupSet.java	2015-09-03 03:11:47 +0000
@@ -200,7 +200,7 @@
     @JacksonXmlProperty( localName = "item", namespace = DxfNamespaces.DXF_2_0 )
     public List<NameableObject> getItems()
     {
-        return new ArrayList<NameableObject>( members );
+        return new ArrayList<>( members );
     }
 
     @Override

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/node/LinearNodePipeline.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/node/LinearNodePipeline.java	2015-01-17 07:41:26 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/node/LinearNodePipeline.java	2015-09-03 03:11:47 +0000
@@ -77,7 +77,7 @@
 
     public void addTransformer( NodeTransformer nodeTransformer )
     {
-        nodeTransformers.add( new NodeTransformerWithArgs( checkNotNull( nodeTransformer ), new ArrayList<String>() ) );
+        nodeTransformers.add( new NodeTransformerWithArgs( checkNotNull( nodeTransformer ), new ArrayList<>() ) );
     }
 
     public void addTransformer( NodeTransformer nodeTransformer, List<String> arguments )

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/organisationunit/OrganisationUnit.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/organisationunit/OrganisationUnit.java	2015-08-17 03:03:40 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/organisationunit/OrganisationUnit.java	2015-09-03 03:11:47 +0000
@@ -321,7 +321,7 @@
 
     public static List<OrganisationUnit> getSortedChildren( Collection<OrganisationUnit> units )
     {
-        List<OrganisationUnit> children = new ArrayList<OrganisationUnit>();
+        List<OrganisationUnit> children = new ArrayList<>();
         
         for ( OrganisationUnit unit : units )
         {
@@ -333,7 +333,7 @@
 
     public static List<OrganisationUnit> getSortedGrandChildren( Collection<OrganisationUnit> units )
     {
-        List<OrganisationUnit> children = new ArrayList<OrganisationUnit>();
+        List<OrganisationUnit> children = new ArrayList<>();
         
         for ( OrganisationUnit unit : units )
         {

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/organisationunit/OrganisationUnitGroupSet.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/organisationunit/OrganisationUnitGroupSet.java	2015-07-15 16:04:35 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/organisationunit/OrganisationUnitGroupSet.java	2015-09-03 03:11:47 +0000
@@ -190,7 +190,7 @@
     @JacksonXmlProperty( localName = "item", namespace = DxfNamespaces.DXF_2_0 )
     public List<NameableObject> getItems()
     {
-        return new ArrayList<NameableObject>( organisationUnitGroups );
+        return new ArrayList<>( organisationUnitGroups );
     }
 
     @Override

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/period/RelativePeriods.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/period/RelativePeriods.java	2015-04-08 22:57:51 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/period/RelativePeriods.java	2015-09-03 03:11:47 +0000
@@ -787,7 +787,7 @@
         map.put( RelativePeriodEnum.LAST_12_WEEKS, new RelativePeriods().setLast12Weeks( true ) );
         map.put( RelativePeriodEnum.LAST_52_WEEKS, new RelativePeriods().setLast52Weeks( true ) );
         
-        return map.containsKey( relativePeriod ) ? map.get( relativePeriod ).getRelativePeriods( date, format, dynamicNames ) : new ArrayList<Period>();
+        return map.containsKey( relativePeriod ) ? map.get( relativePeriod ).getRelativePeriods( date, format, dynamicNames ) : new ArrayList<>();
     }
     
     /**

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/validation/ValidationSummary.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/validation/ValidationSummary.java	2015-02-09 17:42:23 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/validation/ValidationSummary.java	2015-09-03 03:11:47 +0000
@@ -47,7 +47,7 @@
 {
     private List<ValidationResult> validationRuleViolations = new ArrayList<>();
     
-    private List<DataElementOperand> commentRequiredViolations = new ArrayList<DataElementOperand>();
+    private List<DataElementOperand> commentRequiredViolations = new ArrayList<>();
     
     public ValidationSummary()
     {

=== modified file 'dhis-2/dhis-api/src/test/java/org/hisp/dhis/common/BaseAnalyticalObjectTest.java'
--- dhis-2/dhis-api/src/test/java/org/hisp/dhis/common/BaseAnalyticalObjectTest.java	2015-07-13 12:34:39 +0000
+++ dhis-2/dhis-api/src/test/java/org/hisp/dhis/common/BaseAnalyticalObjectTest.java	2015-09-03 03:11:47 +0000
@@ -151,7 +151,7 @@
         row.add( oB );
         
         assertEquals( "a1-b1-c1", BaseAnalyticalObject.getIdentifier( column, row ) );
-        assertEquals( "b1", BaseAnalyticalObject.getIdentifier( new ArrayList<NameableObject>(), row ) );
+        assertEquals( "b1", BaseAnalyticalObject.getIdentifier( new ArrayList<>(), row ) );
         assertEquals( "b1", BaseAnalyticalObject.getIdentifier( null, row ) );
     }
     

=== modified file 'dhis-2/dhis-api/src/test/java/org/hisp/dhis/datavalue/DataValueTest.java'
--- dhis-2/dhis-api/src/test/java/org/hisp/dhis/datavalue/DataValueTest.java	2015-01-17 07:41:26 +0000
+++ dhis-2/dhis-api/src/test/java/org/hisp/dhis/datavalue/DataValueTest.java	2015-09-03 03:11:47 +0000
@@ -28,10 +28,12 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+import org.hisp.dhis.common.ValueType;
 import org.hisp.dhis.dataelement.DataElement;
 import org.junit.Test;
 
-import static org.junit.Assert.*;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
 
 /**
  * @author Lars Helge Overland
@@ -42,11 +44,11 @@
     public void testIsZero()
     {
         DataElement dataElement = new DataElement( "A" );
-        dataElement.setType( DataElement.VALUE_TYPE_INT );
-        
+        dataElement.setValueType( ValueType.NUMBER );
+
         DataValue dataValue = new DataValue();
         dataValue.setDataElement( dataElement );
-        
+
         dataValue.setValue( "5" );
         assertFalse( dataValue.isZero() );
 
@@ -55,16 +57,16 @@
 
         dataValue.setValue( "0.00001" );
         assertFalse( dataValue.isZero() );
-        
+
         dataValue.setValue( "String" );
-        assertFalse( dataValue.isZero() );        
+        assertFalse( dataValue.isZero() );
 
         dataValue.setValue( "0" );
         assertTrue( dataValue.isZero() );
-        
+
         dataValue.setValue( "0.0" );
         assertTrue( dataValue.isZero() );
-        
+
         dataValue.setValue( "0.0000" );
         assertTrue( dataValue.isZero() );
     }

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataapproval/hibernate/HibernateDataApprovalStore.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataapproval/hibernate/HibernateDataApprovalStore.java	2015-08-30 14:51:28 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataapproval/hibernate/HibernateDataApprovalStore.java	2015-09-03 03:11:47 +0000
@@ -198,7 +198,7 @@
         
         final User user = currentUserService.getCurrentUser();
 
-        Set<DataSet> validDataSets = new HashSet<DataSet>();
+        Set<DataSet> validDataSets = new HashSet<>();
         for ( DataSet set : dataSets )
         {
             if ( set.isApproveData() )

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataentryform/DefaultDataEntryFormService.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataentryform/DefaultDataEntryFormService.java	2015-09-02 05:26:25 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataentryform/DefaultDataEntryFormService.java	2015-09-03 03:11:47 +0000
@@ -204,7 +204,7 @@
         optionComboMap.putAll( IdentifiableObjectUtils.getUidObjectMap( dataSet.getDataElementOptionCombos() ) );
 
         IdentifiableObjectCallable<DataElementCategoryOptionCombo> optionComboCallabel =
-            new IdentifiableObjectCallable<DataElementCategoryOptionCombo>( idObjectManager, DataElementCategoryOptionCombo.class, null );
+            new IdentifiableObjectCallable<>( idObjectManager, DataElementCategoryOptionCombo.class, null );
 
         StringBuffer sb = new StringBuffer();
 

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/organisationunit/DefaultOrganisationUnitService.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/organisationunit/DefaultOrganisationUnitService.java	2015-08-25 10:17:01 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/organisationunit/DefaultOrganisationUnitService.java	2015-09-03 03:11:47 +0000
@@ -635,12 +635,12 @@
 
         if ( parent == null )
         {
-            return new ArrayList<OrganisationUnit>( result );
+            return new ArrayList<>( result );
         }
 
         final Set<OrganisationUnit> subTree = new HashSet<>( getOrganisationUnitWithChildren( parent.getId() ) );
 
-        List<OrganisationUnit> intersection = new ArrayList<OrganisationUnit>( Sets.intersection( subTree,
+        List<OrganisationUnit> intersection = new ArrayList<>( Sets.intersection( subTree,
             result ) );
 
         return limit && intersection.size() > MAX_LIMIT ? intersection.subList( 0, MAX_LIMIT )

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/trackedentity/DefaultTrackedEntityInstanceReminderService.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/trackedentity/DefaultTrackedEntityInstanceReminderService.java	2015-06-23 15:59:19 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/trackedentity/DefaultTrackedEntityInstanceReminderService.java	2015-09-03 03:11:47 +0000
@@ -192,7 +192,7 @@
     @Override
     public List<String> getAttributeUids( String message )
     {
-        List<String> atttributeUids = new ArrayList<String>();
+        List<String> atttributeUids = new ArrayList<>();
 
         Matcher matcher = ATTRIBUTE_PATTERN.matcher( message );
 

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/user/DefaultCurrentUserService.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/user/DefaultCurrentUserService.java	2015-06-22 15:17:36 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/user/DefaultCurrentUserService.java	2015-09-03 03:11:47 +0000
@@ -112,7 +112,7 @@
     {
         User user = getCurrentUser();
         
-        return user != null ? new HashSet<OrganisationUnit>( user.getOrganisationUnits() ) : new HashSet<OrganisationUnit>();
+        return user != null ? new HashSet<>( user.getOrganisationUnits() ) : new HashSet<>();
     }
     
     @Override

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/program/ProgramDataEntryServiceTest.java'
--- dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/program/ProgramDataEntryServiceTest.java	2015-06-23 15:59:19 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/program/ProgramDataEntryServiceTest.java	2015-09-03 03:11:47 +0000
@@ -88,7 +88,7 @@
         DataEntryForm dataEntryFormA = new DataEntryForm( "DataEntryForm-A" );
         dataEntryFormService.addDataEntryForm( dataEntryFormA );
 
-        Program program = createProgram( 'A', new HashSet<ProgramStage>(), organisationUnit );
+        Program program = createProgram( 'A', new HashSet<>(), organisationUnit );
         programService.addProgram( program );
 
         stageA = new ProgramStage( "A", program );

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/program/ProgramExpressionServiceTest.java'
--- dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/program/ProgramExpressionServiceTest.java	2015-06-23 15:59:19 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/program/ProgramExpressionServiceTest.java	2015-09-03 03:11:47 +0000
@@ -110,7 +110,7 @@
         OrganisationUnit organisationUnit = createOrganisationUnit( 'A' );
         organisationUnitService.addOrganisationUnit( organisationUnit );
 
-        Program program = createProgram( 'A', new HashSet<ProgramStage>(), organisationUnit );
+        Program program = createProgram( 'A', new HashSet<>(), organisationUnit );
         programService.addProgram( program );
 
         stageA = new ProgramStage( "StageA", program );

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/program/ProgramIndicatorServiceTest.java'
--- dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/program/ProgramIndicatorServiceTest.java	2015-08-28 09:33:57 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/program/ProgramIndicatorServiceTest.java	2015-09-03 03:11:47 +0000
@@ -166,7 +166,7 @@
         // Program
         // ---------------------------------------------------------------------
 
-        programA = createProgram( 'A', new HashSet<ProgramStage>(), organisationUnit );
+        programA = createProgram( 'A', new HashSet<>(), organisationUnit );
         programService.addProgram( programA );
 
         psA = new ProgramStage( "StageA", programA );
@@ -183,7 +183,7 @@
         programA.setProgramStages( programStages );
         programService.updateProgram( programA );
 
-        programB = createProgram( 'B', new HashSet<ProgramStage>(), organisationUnit );
+        programB = createProgram( 'B', new HashSet<>(), organisationUnit );
         programService.addProgram( programB );
 
         // ---------------------------------------------------------------------

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/program/ProgramInstanceServiceTest.java'
--- dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/program/ProgramInstanceServiceTest.java	2015-06-23 15:59:19 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/program/ProgramInstanceServiceTest.java	2015-09-03 03:11:47 +0000
@@ -126,7 +126,7 @@
         orgunitIds.add( idA );
         orgunitIds.add( idB );
 
-        programA = createProgram( 'A', new HashSet<ProgramStage>(), organisationUnitA );
+        programA = createProgram( 'A', new HashSet<>(), organisationUnitA );
 
         TrackedEntityInstanceReminder reminderA = new TrackedEntityInstanceReminder( "A", 0,
             "Test program message template", TrackedEntityInstanceReminder.ENROLLEMENT_DATE_TO_COMPARE,
@@ -158,10 +158,10 @@
         programA.setProgramStages( programStages );
         programService.updateProgram( programA );
 
-        programB = createProgram( 'B', new HashSet<ProgramStage>(), organisationUnitA );
+        programB = createProgram( 'B', new HashSet<>(), organisationUnitA );
         programService.addProgram( programB );
 
-        programC = createProgram( 'C', new HashSet<ProgramStage>(), organisationUnitA );
+        programC = createProgram( 'C', new HashSet<>(), organisationUnitA );
         programService.addProgram( programC );
 
         entityInstanceA = createTrackedEntityInstance( 'A', organisationUnitA );

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/program/ProgramInstanceStoreTest.java'
--- dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/program/ProgramInstanceStoreTest.java	2015-06-23 15:59:19 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/program/ProgramInstanceStoreTest.java	2015-09-03 03:11:47 +0000
@@ -112,7 +112,7 @@
         orgunitIds.add( idA );
         orgunitIds.add( idB );
 
-        programA = createProgram( 'A', new HashSet<ProgramStage>(), organisationUnitA );
+        programA = createProgram( 'A', new HashSet<>(), organisationUnitA );
 
         TrackedEntityInstanceReminder reminderA = new TrackedEntityInstanceReminder( "A", 0,
             "Test program message template", TrackedEntityInstanceReminder.ENROLLEMENT_DATE_TO_COMPARE,
@@ -144,10 +144,10 @@
         programA.setProgramStages( programStages );
         programService.updateProgram( programA );
 
-        programB = createProgram( 'B', new HashSet<ProgramStage>(), organisationUnitA );
+        programB = createProgram( 'B', new HashSet<>(), organisationUnitA );
         programService.addProgram( programB );
 
-        programC = createProgram( 'C', new HashSet<ProgramStage>(), organisationUnitA );
+        programC = createProgram( 'C', new HashSet<>(), organisationUnitA );
         programService.addProgram( programC );
 
         entityInstanceA = createTrackedEntityInstance( 'A', organisationUnitA );

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/program/ProgramServiceTest.java'
--- dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/program/ProgramServiceTest.java	2015-07-02 07:05:55 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/program/ProgramServiceTest.java	2015-09-03 03:11:47 +0000
@@ -78,13 +78,13 @@
         organisationUnitB = createOrganisationUnit( 'B' );
         organisationUnitService.addOrganisationUnit( organisationUnitB );
 
-        programA = createProgram( 'A', new HashSet<ProgramStage>(), organisationUnitA );
+        programA = createProgram( 'A', new HashSet<>(), organisationUnitA );
         programA.setUid( "UID-A" );
 
-        programB = createProgram( 'B', new HashSet<ProgramStage>(), organisationUnitA );
+        programB = createProgram( 'B', new HashSet<>(), organisationUnitA );
         programB.setUid( "UID-B" );
 
-        programC = createProgram( 'C', new HashSet<ProgramStage>(), organisationUnitB );
+        programC = createProgram( 'C', new HashSet<>(), organisationUnitB );
         programC.setUid( "UID-C" );
     }
 

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/program/ProgramStageDataElementServiceTest.java'
--- dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/program/ProgramStageDataElementServiceTest.java	2015-06-23 15:59:19 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/program/ProgramStageDataElementServiceTest.java	2015-09-03 03:11:47 +0000
@@ -85,7 +85,7 @@
         organisationUnit = createOrganisationUnit( 'A' );
         organisationUnitService.addOrganisationUnit( organisationUnit );
 
-        Program program = createProgram( 'A', new HashSet<ProgramStage>(), organisationUnit );
+        Program program = createProgram( 'A', new HashSet<>(), organisationUnit );
         programService.addProgram( program );
 
         stageA = new ProgramStage( "A", program );

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/program/ProgramStageDataElementStoreTest.java'
--- dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/program/ProgramStageDataElementStoreTest.java	2015-06-23 15:59:19 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/program/ProgramStageDataElementStoreTest.java	2015-09-03 03:11:47 +0000
@@ -85,7 +85,7 @@
         organisationUnit = createOrganisationUnit( 'A' );
         organisationUnitService.addOrganisationUnit( organisationUnit );
 
-        Program program = createProgram( 'A', new HashSet<ProgramStage>(), organisationUnit );
+        Program program = createProgram( 'A', new HashSet<>(), organisationUnit );
         programService.addProgram( program );
 
         stageA = new ProgramStage( "A", program );

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/program/ProgramStageInstanceServiceTest.java'
--- dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/program/ProgramStageInstanceServiceTest.java	2015-07-02 07:05:55 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/program/ProgramStageInstanceServiceTest.java	2015-09-03 03:11:47 +0000
@@ -180,7 +180,7 @@
         /**
          * Program A
          */
-        programA = createProgram( 'A', new HashSet<ProgramStage>(), organisationUnitA );
+        programA = createProgram( 'A', new HashSet<>(), organisationUnitA );
         programService.addProgram( programA );
 
         stageA = new ProgramStage( "A", programA );
@@ -240,7 +240,7 @@
          * Program B
          */
 
-        Program programB = createProgram( 'B', new HashSet<ProgramStage>(), organisationUnitB );
+        Program programB = createProgram( 'B', new HashSet<>(), organisationUnitB );
         programService.addProgram( programB );
 
         stageC = new ProgramStage( "C", programB );

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/program/ProgramStageInstanceStoreTest.java'
--- dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/program/ProgramStageInstanceStoreTest.java	2015-06-23 15:59:19 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/program/ProgramStageInstanceStoreTest.java	2015-09-03 03:11:47 +0000
@@ -152,7 +152,7 @@
         /**
          * Program A
          */
-        programA = createProgram( 'A', new HashSet<ProgramStage>(), organisationUnitA );
+        programA = createProgram( 'A', new HashSet<>(), organisationUnitA );
         programService.addProgram( programA );
 
         stageA = new ProgramStage( "A", programA );
@@ -208,7 +208,7 @@
          * Program B
          */
 
-        Program programB = createProgram( 'B', new HashSet<ProgramStage>(), organisationUnitB );
+        Program programB = createProgram( 'B', new HashSet<>(), organisationUnitB );
         programService.addProgram( programB );
 
         stageC = new ProgramStage( "C", programB );

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/program/ProgramStageSectionServiceTest.java'
--- dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/program/ProgramStageSectionServiceTest.java	2015-06-23 15:59:19 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/program/ProgramStageSectionServiceTest.java	2015-09-03 03:11:47 +0000
@@ -87,7 +87,7 @@
         organisationUnit = createOrganisationUnit( 'A' );
         organisationUnitService.addOrganisationUnit( organisationUnit );
 
-        Program program = createProgram( 'A', new HashSet<ProgramStage>(), organisationUnit );
+        Program program = createProgram( 'A', new HashSet<>(), organisationUnit );
         programService.addProgram( program );
 
         stageA = new ProgramStage( "A", program );

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/program/ProgramStageSectionStoreTest.java'
--- dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/program/ProgramStageSectionStoreTest.java	2015-06-23 15:59:19 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/program/ProgramStageSectionStoreTest.java	2015-09-03 03:11:47 +0000
@@ -86,7 +86,7 @@
         organisationUnit = createOrganisationUnit( 'A' );
         organisationUnitService.addOrganisationUnit( organisationUnit );
 
-        Program program = createProgram( 'A', new HashSet<ProgramStage>(), organisationUnit );
+        Program program = createProgram( 'A', new HashSet<>(), organisationUnit );
         programService.addProgram( program );
 
         stageA = new ProgramStage( "A", program );

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/program/ProgramStageServiceTest.java'
--- dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/program/ProgramStageServiceTest.java	2015-06-23 15:59:19 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/program/ProgramStageServiceTest.java	2015-09-03 03:11:47 +0000
@@ -67,7 +67,7 @@
         OrganisationUnit organisationUnit = createOrganisationUnit( 'A' );
         organisationUnitService.addOrganisationUnit( organisationUnit );
 
-        program = createProgram( 'A', new HashSet<ProgramStage>(), organisationUnit );
+        program = createProgram( 'A', new HashSet<>(), organisationUnit );
         programService.addProgram( program );
 
         stageA = new ProgramStage( "A", program );

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/program/ProgramStageStoreTest.java'
--- dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/program/ProgramStageStoreTest.java	2015-06-23 15:59:19 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/program/ProgramStageStoreTest.java	2015-09-03 03:11:47 +0000
@@ -66,7 +66,7 @@
         OrganisationUnit organisationUnit = createOrganisationUnit( 'A' );
         organisationUnitService.addOrganisationUnit( organisationUnit );
 
-        program = createProgram( 'A', new HashSet<ProgramStage>(), organisationUnit );
+        program = createProgram( 'A', new HashSet<>(), organisationUnit );
         programService.addProgram( program );
 
         stageA = new ProgramStage( "A", program );

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/program/ProgramStoreTest.java'
--- dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/program/ProgramStoreTest.java	2015-07-02 07:05:55 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/program/ProgramStoreTest.java	2015-09-03 03:11:47 +0000
@@ -74,13 +74,13 @@
         organisationUnitB = createOrganisationUnit( 'B' );
         organisationUnitService.addOrganisationUnit( organisationUnitB );
 
-        programA = createProgram( 'A', new HashSet<ProgramStage>(), organisationUnitA );
+        programA = createProgram( 'A', new HashSet<>(), organisationUnitA );
         programA.setUid( "UID-A" );
 
-        programB = createProgram( 'B', new HashSet<ProgramStage>(), organisationUnitA );
+        programB = createProgram( 'B', new HashSet<>(), organisationUnitA );
         programB.setUid( "UID-B" );
 
-        programC = createProgram( 'C', new HashSet<ProgramStage>(), organisationUnitB );
+        programC = createProgram( 'C', new HashSet<>(), organisationUnitB );
         programC.setUid( "UID-C" );
     }
 

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/program/ProgramValidationServiceTest.java'
--- dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/program/ProgramValidationServiceTest.java	2015-06-23 15:59:19 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/program/ProgramValidationServiceTest.java	2015-09-03 03:11:47 +0000
@@ -112,7 +112,7 @@
         OrganisationUnit organisationUnit = createOrganisationUnit( 'A' );
         organisationUnitService.addOrganisationUnit( organisationUnit );
 
-        program = createProgram( 'A', new HashSet<ProgramStage>(), organisationUnit );
+        program = createProgram( 'A', new HashSet<>(), organisationUnit );
         programService.addProgram( program );
 
         stageA = new ProgramStage( "A", program );

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/program/ProgramValidationStoreTest.java'
--- dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/program/ProgramValidationStoreTest.java	2015-06-23 15:59:19 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/program/ProgramValidationStoreTest.java	2015-09-03 03:11:47 +0000
@@ -85,7 +85,7 @@
         OrganisationUnit organisationUnit = createOrganisationUnit( 'A' );
         organisationUnitService.addOrganisationUnit( organisationUnit );
 
-        program = createProgram( 'A', new HashSet<ProgramStage>(), organisationUnit );
+        program = createProgram( 'A', new HashSet<>(), organisationUnit );
         programService.addProgram( program );
 
         stageA = new ProgramStage( "A", program );

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/programrule/ProgramRuleServiceTest.java'
--- dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/programrule/ProgramRuleServiceTest.java	2015-06-23 15:59:19 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/programrule/ProgramRuleServiceTest.java	2015-09-03 03:11:47 +0000
@@ -84,7 +84,7 @@
         
         programStageA = createProgramStage( 'A', 1 );
         programStageA.setProgram( programA );
-        Set<ProgramStage> stagesA = new HashSet<ProgramStage>();
+        Set<ProgramStage> stagesA = new HashSet<>();
         stagesA.add( programStageA );
         programA.setProgramStages( stagesA );
         

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/trackedentity/TrackedEntityInstanceReminderServiceTest.java'
--- dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/trackedentity/TrackedEntityInstanceReminderServiceTest.java	2015-06-23 15:59:19 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/trackedentity/TrackedEntityInstanceReminderServiceTest.java	2015-09-03 03:11:47 +0000
@@ -130,7 +130,7 @@
         entityInstance = createTrackedEntityInstance( 'A', organisationUnit );
         entityInstanceService.addTrackedEntityInstance( entityInstance );
 
-        Program program = createProgram( 'A', new HashSet<ProgramStage>(), organisationUnit );
+        Program program = createProgram( 'A', new HashSet<>(), organisationUnit );
         reminderA = new TrackedEntityInstanceReminder( "A", 0, "Test program message template",
             TrackedEntityInstanceReminder.ENROLLEMENT_DATE_TO_COMPARE,
             TrackedEntityInstanceReminder.SEND_TO_TRACKED_ENTITY_INSTANCE,

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/trackedentity/TrackedEntityInstanceServiceTest.java'
--- dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/trackedentity/TrackedEntityInstanceServiceTest.java	2015-06-23 15:59:19 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/trackedentity/TrackedEntityInstanceServiceTest.java	2015-09-03 03:11:47 +0000
@@ -214,8 +214,8 @@
         attributeValues.add( attributeValue );
 
         entityInstanceService.updateTrackedEntityInstance( entityInstanceA3, entityInstanceB1.getUid(),
-            relationshipTypeId, attributeValues, new ArrayList<TrackedEntityAttributeValue>(),
-            new ArrayList<TrackedEntityAttributeValue>() );
+            relationshipTypeId, attributeValues, new ArrayList<>(),
+            new ArrayList<>() );
         assertEquals( "B", entityInstanceService.getTrackedEntityInstance( idA ).getName() );
     }
 }

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/trackedentitydatavalue/TrackedEntityDataValueServiceTest.java'
--- dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/trackedentitydatavalue/TrackedEntityDataValueServiceTest.java	2015-06-23 15:59:19 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/trackedentitydatavalue/TrackedEntityDataValueServiceTest.java	2015-09-03 03:11:47 +0000
@@ -127,7 +127,7 @@
         entityInstance = createTrackedEntityInstance( 'A', organisationUnit );
         entityInstanceService.addTrackedEntityInstance( entityInstance );
 
-        Program program = createProgram( 'A', new HashSet<ProgramStage>(), organisationUnit );
+        Program program = createProgram( 'A', new HashSet<>(), organisationUnit );
         programService.addProgram( program );
 
         ProgramStage stageA = createProgramStage( 'A', 0 );

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/trackedentitydatavalue/TrackedEntityDataValueStoreTest.java'
--- dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/trackedentitydatavalue/TrackedEntityDataValueStoreTest.java	2015-06-23 15:59:19 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/trackedentitydatavalue/TrackedEntityDataValueStoreTest.java	2015-09-03 03:11:47 +0000
@@ -126,7 +126,7 @@
         entityInstance = createTrackedEntityInstance( 'A', organisationUnit );
         entityInstanceService.addTrackedEntityInstance( entityInstance );
 
-        Program program = createProgram( 'A', new HashSet<ProgramStage>(), organisationUnit );
+        Program program = createProgram( 'A', new HashSet<>(), organisationUnit );
         programService.addProgram( program );
 
         ProgramStage stageA = createProgramStage( 'A', 0 );

=== modified file 'dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/datavalueset/DefaultDataValueSetService.java'
--- dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/datavalueset/DefaultDataValueSetService.java	2015-09-02 13:01:24 +0000
+++ dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/datavalueset/DefaultDataValueSetService.java	2015-09-03 03:11:47 +0000
@@ -178,7 +178,7 @@
         
         if ( periods != null && !periods.isEmpty() )
         {
-            params.getPeriods().addAll( periodService.reloadIsoPeriods( new ArrayList<String>( periods ) ) );
+            params.getPeriods().addAll( periodService.reloadIsoPeriods( new ArrayList<>( periods ) ) );
         }
         else if ( startDate != null && endDate != null )
         {
@@ -193,7 +193,7 @@
             
             if ( includeChildren )
             {
-                params.getOrganisationUnits().addAll( new HashSet<OrganisationUnit>( 
+                params.getOrganisationUnits().addAll( new HashSet<>(
                     organisationUnitService.getOrganisationUnitsWithChildren( getUids( params.getOrganisationUnits() ) ) ) );
             }
         }

=== modified file 'dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/gml/DefaultGmlImportService.java'
--- dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/gml/DefaultGmlImportService.java	2015-08-30 17:07:42 +0000
+++ dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/gml/DefaultGmlImportService.java	2015-09-03 03:11:47 +0000
@@ -287,7 +287,7 @@
             idProperty == IdentifiableProperty.UID ? organisationUnitService.getOrganisationUnitsByUid( identifiers ) :
             idProperty == IdentifiableProperty.CODE ? organisationUnitService.getOrganisationUnitsByCodes( identifiers ) :
             idProperty == IdentifiableProperty.NAME ? organisationUnitService.getOrganisationUnitsByNames( identifiers ) :
-            new HashSet<OrganisationUnit>();
+                new HashSet<>();
 
         return Maps.uniqueIndex( orgUnits,
             new Function<OrganisationUnit, String>()

=== modified file 'dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/DefaultImportService.java'
--- dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/DefaultImportService.java	2015-08-30 17:07:42 +0000
+++ dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/DefaultImportService.java	2015-09-03 03:11:47 +0000
@@ -163,7 +163,7 @@
             {
                 if ( Collection.class.isAssignableFrom( value.getClass() ) )
                 {
-                    List<?> objects = new ArrayList<Object>( (Collection<?>) value );
+                    List<?> objects = new ArrayList<>( (Collection<?>) value );
 
                     if ( !objects.isEmpty() )
                     {

=== modified file 'dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/DefaultObjectBridge.java'
--- dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/DefaultObjectBridge.java	2015-05-28 18:21:56 +0000
+++ dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/DefaultObjectBridge.java	2015-09-03 03:11:47 +0000
@@ -247,7 +247,7 @@
                     else
                     {
                         // add an empty map here, since we could still have some auto-generated properties
-                        nameMap.put( (Class<? extends IdentifiableObject>) clazz, new HashMap<String, IdentifiableObject>() );
+                        nameMap.put( (Class<? extends IdentifiableObject>) clazz, new HashMap<>() );
 
                         // find all auto-generated props and add them
                         for ( Map.Entry<String, IdentifiableObject> entry : map.entrySet() )
@@ -652,7 +652,7 @@
         }
         else
         {
-            uuidMap.put( klass, new HashMap<String, IdentifiableObject>() );
+            uuidMap.put( klass, new HashMap<>() );
             map = uuidMap.get( klass );
         }
 
@@ -680,7 +680,7 @@
         }
         else
         {
-            uidMap.put( identifiableObject.getClass(), new HashMap<String, IdentifiableObject>() );
+            uidMap.put( identifiableObject.getClass(), new HashMap<>() );
             map = uidMap.get( identifiableObject.getClass() );
         }
 
@@ -708,7 +708,7 @@
         }
         else
         {
-            codeMap.put( identifiableObject.getClass(), new HashMap<String, IdentifiableObject>() );
+            codeMap.put( identifiableObject.getClass(), new HashMap<>() );
             map = codeMap.get( identifiableObject.getClass() );
         }
 
@@ -741,7 +741,7 @@
         }
         else
         {
-            nameMap.put( identifiableObject.getClass(), new HashMap<String, IdentifiableObject>() );
+            nameMap.put( identifiableObject.getClass(), new HashMap<>() );
             map = nameMap.get( identifiableObject.getClass() );
         }
 

=== modified file 'dhis-2/dhis-services/dhis-service-dxf2/src/test/java/org/hisp/dhis/dxf2/events/NoRegistrationSingleEventServiceTest.java'
--- dhis-2/dhis-services/dhis-service-dxf2/src/test/java/org/hisp/dhis/dxf2/events/NoRegistrationSingleEventServiceTest.java	2015-07-02 07:05:55 +0000
+++ dhis-2/dhis-services/dhis-service-dxf2/src/test/java/org/hisp/dhis/dxf2/events/NoRegistrationSingleEventServiceTest.java	2015-09-03 03:11:47 +0000
@@ -100,7 +100,7 @@
         programStageA = createProgramStage( 'A', 0 );
         identifiableObjectManager.save( programStageA );
 
-        programA = createProgram( 'A', new HashSet<ProgramStage>(), organisationUnitA );
+        programA = createProgram( 'A', new HashSet<>(), organisationUnitA );
         programA.setProgramType( ProgramType.WITHOUT_REGISTRATION );
         identifiableObjectManager.save( programA );
 

=== modified file 'dhis-2/dhis-services/dhis-service-dxf2/src/test/java/org/hisp/dhis/dxf2/events/RegistrationMultiEventsServiceTest.java'
--- dhis-2/dhis-services/dhis-service-dxf2/src/test/java/org/hisp/dhis/dxf2/events/RegistrationMultiEventsServiceTest.java	2015-07-02 07:05:55 +0000
+++ dhis-2/dhis-services/dhis-service-dxf2/src/test/java/org/hisp/dhis/dxf2/events/RegistrationMultiEventsServiceTest.java	2015-09-03 03:11:47 +0000
@@ -162,7 +162,7 @@
         identifiableObjectManager.save( programStageA );
         identifiableObjectManager.save( programStageB );
 
-        programA = createProgram( 'A', new HashSet<ProgramStage>(), organisationUnitA );
+        programA = createProgram( 'A', new HashSet<>(), organisationUnitA );
         programA.setProgramType( ProgramType.WITH_REGISTRATION );
         identifiableObjectManager.save( programA );
 

=== modified file 'dhis-2/dhis-services/dhis-service-dxf2/src/test/java/org/hisp/dhis/dxf2/events/RegistrationSingleEventServiceTest.java'
--- dhis-2/dhis-services/dhis-service-dxf2/src/test/java/org/hisp/dhis/dxf2/events/RegistrationSingleEventServiceTest.java	2015-08-18 21:26:15 +0000
+++ dhis-2/dhis-services/dhis-service-dxf2/src/test/java/org/hisp/dhis/dxf2/events/RegistrationSingleEventServiceTest.java	2015-09-03 03:11:47 +0000
@@ -138,7 +138,7 @@
         programStageA = createProgramStage( 'A', 0 );
         identifiableObjectManager.save( programStageA );
 
-        programA = createProgram( 'A', new HashSet<ProgramStage>(), organisationUnitA );        
+        programA = createProgram( 'A', new HashSet<>(), organisationUnitA );
         programA.setProgramType( ProgramType.WITH_REGISTRATION );
         identifiableObjectManager.save( programA );
 

=== modified file 'dhis-2/dhis-services/dhis-service-dxf2/src/test/java/org/hisp/dhis/dxf2/events/TrackedEntityInstanceServiceTest.java'
--- dhis-2/dhis-services/dhis-service-dxf2/src/test/java/org/hisp/dhis/dxf2/events/TrackedEntityInstanceServiceTest.java	2015-01-17 07:41:26 +0000
+++ dhis-2/dhis-services/dhis-service-dxf2/src/test/java/org/hisp/dhis/dxf2/events/TrackedEntityInstanceServiceTest.java	2015-09-03 03:11:47 +0000
@@ -100,7 +100,7 @@
         femaleA.setTrackedEntity( trackedEntity );
         femaleB.setTrackedEntity( trackedEntity );
 
-        programA = createProgram( 'A', new HashSet<ProgramStage>(), organisationUnitA );
+        programA = createProgram( 'A', new HashSet<>(), organisationUnitA );
         manager.save( organisationUnitA );
         manager.save( organisationUnitB );
         manager.save( maleA );

=== modified file 'dhis-2/dhis-services/dhis-service-dxf2/src/test/java/org/hisp/dhis/dxf2/metadata/DefaultExportServiceTest.java'
--- dhis-2/dhis-services/dhis-service-dxf2/src/test/java/org/hisp/dhis/dxf2/metadata/DefaultExportServiceTest.java	2015-02-17 06:00:52 +0000
+++ dhis-2/dhis-services/dhis-service-dxf2/src/test/java/org/hisp/dhis/dxf2/metadata/DefaultExportServiceTest.java	2015-09-03 03:11:47 +0000
@@ -143,7 +143,7 @@
     @Test
     public void exportMetaDataTest() throws IOException, XPathExpressionException
     {
-        Options options = new Options( new HashMap<String, String>() );
+        Options options = new Options( new HashMap<>() );
         MetaData metaData = exportService.getMetaData( options );
 
         String metaDataXml = JacksonUtils.toXmlAsString( metaData );

=== modified file 'dhis-2/dhis-services/dhis-service-eventreporting/src/main/java/org/hisp/dhis/caseaggregation/hibernate/HibernateCaseAggregationConditionStore.java'
--- dhis-2/dhis-services/dhis-service-eventreporting/src/main/java/org/hisp/dhis/caseaggregation/hibernate/HibernateCaseAggregationConditionStore.java	2015-09-01 06:14:53 +0000
+++ dhis-2/dhis-services/dhis-service-eventreporting/src/main/java/org/hisp/dhis/caseaggregation/hibernate/HibernateCaseAggregationConditionStore.java	2015-09-03 03:11:47 +0000
@@ -1328,7 +1328,7 @@
         Date endDate = calEndDate.getTime();
 
         CalendarPeriodType periodType = (CalendarPeriodType) PeriodType.getPeriodTypeByName( periodTypeName );
-        List<Period> periods = new ArrayList<Period>( periodType.generatePeriods( startDate, endDate ) );
+        List<Period> periods = new ArrayList<>( periodType.generatePeriods( startDate, endDate ) );
         periods = periodService.reloadPeriods( periods );
 
         return periods;

=== modified file 'dhis-2/dhis-services/dhis-service-eventreporting/src/test/java/org/hisp/dhis/caseaggregation/CaseAggregationConditionServiceTest.java'
--- dhis-2/dhis-services/dhis-service-eventreporting/src/test/java/org/hisp/dhis/caseaggregation/CaseAggregationConditionServiceTest.java	2015-05-18 17:05:23 +0000
+++ dhis-2/dhis-services/dhis-service-eventreporting/src/test/java/org/hisp/dhis/caseaggregation/CaseAggregationConditionServiceTest.java	2015-09-03 03:11:47 +0000
@@ -213,7 +213,7 @@
         // Program && Program stages
         // ---------------------------------------------------------------------
 
-        program = createProgram( 'A', new HashSet<ProgramStage>(), organisationUnit );
+        program = createProgram( 'A', new HashSet<>(), organisationUnit );
         int programId = programService.addProgram( program );
 
         ProgramStage stageA = new ProgramStage( "Stage-A", program );

=== modified file 'dhis-2/dhis-services/dhis-service-eventreporting/src/test/java/org/hisp/dhis/caseaggregation/CaseAggregationConditionStoreTest.java'
--- dhis-2/dhis-services/dhis-service-eventreporting/src/test/java/org/hisp/dhis/caseaggregation/CaseAggregationConditionStoreTest.java	2015-05-18 17:05:23 +0000
+++ dhis-2/dhis-services/dhis-service-eventreporting/src/test/java/org/hisp/dhis/caseaggregation/CaseAggregationConditionStoreTest.java	2015-09-03 03:11:47 +0000
@@ -227,7 +227,7 @@
         // Program && Program stages
         // ---------------------------------------------------------------------
 
-        program = createProgram( 'A', new HashSet<ProgramStage>(), organisationUnit );
+        program = createProgram( 'A', new HashSet<>(), organisationUnit );
         int programId = programService.addProgram( program );
 
         ProgramStage stageA = new ProgramStage( "Stage-A", program );

=== modified file 'dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/mapping/NameMappingUtil.java'
--- dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/mapping/NameMappingUtil.java	2015-06-15 13:44:20 +0000
+++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/mapping/NameMappingUtil.java	2015-09-03 03:11:47 +0000
@@ -109,7 +109,7 @@
      */
     public static Map<Object, String> getConceptMap()
     {
-        return conceptMap.get() != null ? new HashMap<>( conceptMap.get() ) : new HashMap<Object, String>();
+        return conceptMap.get() != null ? new HashMap<>( conceptMap.get() ) : new HashMap<>();
     }
 
     // -------------------------------------------------------------------------
@@ -129,7 +129,7 @@
      */
     public static Map<Object, String> getCategoryMap()
     {
-        return categoryMap.get() != null ? new HashMap<>( categoryMap.get() ) : new HashMap<Object, String>();
+        return categoryMap.get() != null ? new HashMap<>( categoryMap.get() ) : new HashMap<>();
     }
 
     // -------------------------------------------------------------------------
@@ -149,7 +149,7 @@
      */
     public static Map<Object, String> getCategoryOptionMap()
     {
-        return categoryOptionMap.get() != null ? new HashMap<>( categoryOptionMap.get() ) : new HashMap<Object, String>();
+        return categoryOptionMap.get() != null ? new HashMap<>( categoryOptionMap.get() ) : new HashMap<>();
     }
 
     // -------------------------------------------------------------------------
@@ -169,7 +169,7 @@
      */
     public static Map<Object, String> getCategoryComboMap()
     {
-        return categoryComboMap.get() != null ? new HashMap<>( categoryComboMap.get() ) : new HashMap<Object, String>();
+        return categoryComboMap.get() != null ? new HashMap<>( categoryComboMap.get() ) : new HashMap<>();
     }
 
     // -------------------------------------------------------------------------
@@ -203,7 +203,7 @@
      */
     public static Map<Object, DataElementCategoryOptionCombo> getCategoryOptionComboMap()
     {
-        return categoryOptionComboMap.get() != null ? new HashMap<>( categoryOptionComboMap.get() ) : new HashMap<Object, DataElementCategoryOptionCombo>();
+        return categoryOptionComboMap.get() != null ? new HashMap<>( categoryOptionComboMap.get() ) : new HashMap<>();
     }
 
     // -------------------------------------------------------------------------
@@ -223,7 +223,7 @@
      */
     public static Map<Object, String> getDataElementMap()
     {
-        return dataElementMap.get() != null ? new HashMap<>( dataElementMap.get() ) : new HashMap<Object, String>();
+        return dataElementMap.get() != null ? new HashMap<>( dataElementMap.get() ) : new HashMap<>();
     }
 
     // -------------------------------------------------------------------------
@@ -243,7 +243,7 @@
      */
     public static Map<Object, String> getDataElementGroupMap()
     {
-        return dataElementGroupMap.get() != null ? new HashMap<>( dataElementGroupMap.get() ) : new HashMap<Object, String>();
+        return dataElementGroupMap.get() != null ? new HashMap<>( dataElementGroupMap.get() ) : new HashMap<>();
     }
 
     // -------------------------------------------------------------------------
@@ -263,7 +263,7 @@
      */
     public static Map<Object, String> getDataElementGroupSetMap()
     {
-        return dataElementGroupSetMap.get() != null ? new HashMap<>( dataElementGroupSetMap.get() ) : new HashMap<Object, String>();
+        return dataElementGroupSetMap.get() != null ? new HashMap<>( dataElementGroupSetMap.get() ) : new HashMap<>();
     }
 
     // -------------------------------------------------------------------------
@@ -283,7 +283,7 @@
      */
     public static Map<Object, String> getIndicatorMap()
     {
-        return indicatorMap.get() != null ? new HashMap<>( indicatorMap.get() ) : new HashMap<Object, String>();
+        return indicatorMap.get() != null ? new HashMap<>( indicatorMap.get() ) : new HashMap<>();
     }
 
     // -------------------------------------------------------------------------
@@ -303,7 +303,7 @@
      */
     public static Map<Object, String> getIndicatorGroupMap()
     {
-        return indicatorGroupMap.get() != null ? new HashMap<>( indicatorGroupMap.get() ) : new HashMap<Object, String>();
+        return indicatorGroupMap.get() != null ? new HashMap<>( indicatorGroupMap.get() ) : new HashMap<>();
     }
 
     // -------------------------------------------------------------------------
@@ -323,7 +323,7 @@
      */
     public static Map<Object, String> getIndicatorGroupSetMap()
     {
-        return indicatorGroupSetMap.get() != null ? new HashMap<>( indicatorGroupSetMap.get() ) : new HashMap<Object, String>();
+        return indicatorGroupSetMap.get() != null ? new HashMap<>( indicatorGroupSetMap.get() ) : new HashMap<>();
     }
 
     // -------------------------------------------------------------------------
@@ -343,7 +343,7 @@
      */
     public static Map<Object, String> getIndicatorTypeMap()
     {
-        return indicatorTypeMap.get() != null ? new HashMap<>( indicatorTypeMap.get() ) : new HashMap<Object, String>();
+        return indicatorTypeMap.get() != null ? new HashMap<>( indicatorTypeMap.get() ) : new HashMap<>();
     }
     
     // -------------------------------------------------------------------------
@@ -372,7 +372,7 @@
      */
     public static Map<Object, Period> getPeriodMap()
     {
-        return periodMap.get() != null ? new HashMap<>( periodMap.get() ) : new HashMap<Object, Period>();
+        return periodMap.get() != null ? new HashMap<>( periodMap.get() ) : new HashMap<>();
     }
     
     // -------------------------------------------------------------------------
@@ -392,7 +392,7 @@
      */
     public static Map<Object, String> getDataSetMap()
     {
-        return dataSetMap.get() != null ? new HashMap<>( dataSetMap.get() ) : new HashMap<Object, String>();
+        return dataSetMap.get() != null ? new HashMap<>( dataSetMap.get() ) : new HashMap<>();
     }
     
     // -------------------------------------------------------------------------
@@ -412,7 +412,7 @@
      */
     public static Map<Object, String> getOrganisationUnitMap()
     {
-        return organisationUnitMap.get() != null ? new HashMap<>( organisationUnitMap.get() ) : new HashMap<Object, String>();
+        return organisationUnitMap.get() != null ? new HashMap<>( organisationUnitMap.get() ) : new HashMap<>();
     }
 
     // -------------------------------------------------------------------------
@@ -432,7 +432,7 @@
      */
     public static Map<Object, String> getOrganisationUnitGroupMap()
     {
-        return organisationUnitGroupMap.get() != null ? new HashMap<>( organisationUnitGroupMap.get() ) : new HashMap<Object, String>();
+        return organisationUnitGroupMap.get() != null ? new HashMap<>( organisationUnitGroupMap.get() ) : new HashMap<>();
     }
     
     // -------------------------------------------------------------------------
@@ -452,7 +452,7 @@
      */
     public static Map<Object, String> getGroupSetMap()
     {
-        return organisationUnitGroupSetMap.get() != null ? new HashMap<>( organisationUnitGroupSetMap.get() ) : new HashMap<Object, String>();
+        return organisationUnitGroupSetMap.get() != null ? new HashMap<>( organisationUnitGroupSetMap.get() ) : new HashMap<>();
     }
 
     // -------------------------------------------------------------------------
@@ -472,7 +472,7 @@
      */
     public static Map<Object, String> getReportTableMap()
     {
-        return reportTableMap.get() != null ? new HashMap<>( reportTableMap.get() ) : new HashMap<Object, String>();
+        return reportTableMap.get() != null ? new HashMap<>( reportTableMap.get() ) : new HashMap<>();
     }
 
     // -------------------------------------------------------------------------
@@ -486,7 +486,7 @@
     
     public static Map<Object, String> getDataElementAggregationOperatorMap()
     {
-        return dataElementAggregationOperatorMap.get() != null ? new LoggingHashMap<>( dataElementAggregationOperatorMap.get() ) : new HashMap<Object, String>();
+        return dataElementAggregationOperatorMap.get() != null ? new LoggingHashMap<>( dataElementAggregationOperatorMap.get() ) : new HashMap<>();
     }
 
     // -------------------------------------------------------------------------
@@ -507,7 +507,7 @@
 
     public static Map<Object, String> getDataEntryFormMap()
     {
-        return dataEntryFormMap.get() != null ? new HashMap<>( dataEntryFormMap.get() ) : new HashMap<Object, String>();
+        return dataEntryFormMap.get() != null ? new HashMap<>( dataEntryFormMap.get() ) : new HashMap<>();
     }
     
 
@@ -529,7 +529,7 @@
 
     public static Map<Object, String> getConstantMap()
     {
-        return constantMap.get() != null ? new HashMap<>( constantMap.get() ) : new HashMap<Object, String>();
+        return constantMap.get() != null ? new HashMap<>( constantMap.get() ) : new HashMap<>();
     }
     
     // -------------------------------------------------------------------------

=== modified file 'dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/mobile/service/ActivityReportingServiceImpl.java'
--- dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/mobile/service/ActivityReportingServiceImpl.java	2015-09-02 05:31:37 +0000
+++ dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/mobile/service/ActivityReportingServiceImpl.java	2015-09-03 03:11:47 +0000
@@ -875,9 +875,9 @@
             // get relative's name
             TrackedEntityInstance relative = entityInstanceService.getTrackedEntityInstance( relationshipMobile
                 .getPersonBId() );
-            List<TrackedEntityAttributeValue> attributes = new ArrayList<TrackedEntityAttributeValue>(
+            List<TrackedEntityAttributeValue> attributes = new ArrayList<>(
                 relative.getAttributeValues() );
-            List<TrackedEntityAttributeValue> attributesInList = new ArrayList<TrackedEntityAttributeValue>();
+            List<TrackedEntityAttributeValue> attributesInList = new ArrayList<>();
 
             for ( TrackedEntityAttributeValue value : attributes )
             {
@@ -926,7 +926,7 @@
         ProgramInstance programInstance )
     {
         List<org.hisp.dhis.api.mobile.model.LWUITmodel.ProgramStage> mobileProgramStages = new ArrayList<>();
-        List<ProgramStageInstance> proStageInstanceList = new ArrayList<ProgramStageInstance>(
+        List<ProgramStageInstance> proStageInstanceList = new ArrayList<>(
             programInstance.getProgramStageInstances() );
 
         Collections.sort( proStageInstanceList, new ProgramStageInstanceVisitDateComparator() );
@@ -1283,7 +1283,7 @@
             mobileProgramStage.setCompleted( false );
             mobileProgramStage.setRepeatable( false );
             mobileProgramStage.setSingleEvent( true );
-            mobileProgramStage.setSections( new ArrayList<Section>() );
+            mobileProgramStage.setSections( new ArrayList<>() );
 
             // get report date
             mobileProgramStage.setReportDate( PeriodUtil.dateToString( new Date() ) );
@@ -1561,8 +1561,8 @@
         // get attributes to be saved/updated/deleted
         Collection<TrackedEntityAttribute> attributes = attributeService.getAllTrackedEntityAttributes();
 
-        List<TrackedEntityAttributeValue> valuesForSave = new ArrayList<TrackedEntityAttributeValue>();
-        List<TrackedEntityAttributeValue> valuesForUpdate = new ArrayList<TrackedEntityAttributeValue>();
+        List<TrackedEntityAttributeValue> valuesForSave = new ArrayList<>();
+        List<TrackedEntityAttributeValue> valuesForUpdate = new ArrayList<>();
         Collection<TrackedEntityAttributeValue> valuesForDelete = null;
 
         TrackedEntityAttributeValue attributeValue = null;
@@ -1684,7 +1684,7 @@
         throws NotAllowedException
     {
         TrackedEntityInstanceQueryParams param = new TrackedEntityInstanceQueryParams();
-        List<TrackedEntityAttribute> displayAttributes = new ArrayList<TrackedEntityAttribute>(
+        List<TrackedEntityAttribute> displayAttributes = new ArrayList<>(
             attributeService.getTrackedEntityAttributesDisplayInList() );
 
         for ( TrackedEntityAttribute trackedEntityAttribute : displayAttributes )
@@ -1753,7 +1753,7 @@
          */
         int instanceIndex = 0;
         int teIndex = 4;
-        List<Integer> attributesIndex = new ArrayList<Integer>();
+        List<Integer> attributesIndex = new ArrayList<>();
         List<GridHeader> headers = trackedEntityInstanceGrid.getHeaders();
         int index = 0;
         for ( GridHeader header : headers )
@@ -2501,8 +2501,8 @@
         TrackedEntityInstance patientWeb = new TrackedEntityInstance();
         patientWeb.setOrganisationUnit( organisationUnitService.getOrganisationUnit( orgUnitId ) );
 
-        Set<TrackedEntityAttribute> patientAttributeSet = new HashSet<TrackedEntityAttribute>();
-        Set<TrackedEntityAttributeValue> patientAttributeValues = new HashSet<TrackedEntityAttributeValue>();
+        Set<TrackedEntityAttribute> patientAttributeSet = new HashSet<>();
+        Set<TrackedEntityAttributeValue> patientAttributeValues = new HashSet<>();
 
         Collection<org.hisp.dhis.api.mobile.model.PatientAttribute> attributesMobile = patient.getAttributes();
 

=== modified file 'dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/mobile/service/DefaultProgramService.java'
--- dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/mobile/service/DefaultProgramService.java	2015-09-02 05:31:37 +0000
+++ dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/mobile/service/DefaultProgramService.java	2015-09-03 03:11:47 +0000
@@ -356,10 +356,10 @@
     {
         try
         {
-            List<RelationshipType> relationshipTypes = new ArrayList<RelationshipType>(
+            List<RelationshipType> relationshipTypes = new ArrayList<>(
                 relationshipTypeService.getAllRelationshipTypes() );
 
-            List<org.hisp.dhis.api.mobile.model.LWUITmodel.RelationshipType> mobileRelationshipTypes = new ArrayList<org.hisp.dhis.api.mobile.model.LWUITmodel.RelationshipType>();
+            List<org.hisp.dhis.api.mobile.model.LWUITmodel.RelationshipType> mobileRelationshipTypes = new ArrayList<>();
             for ( RelationshipType relType : relationshipTypes )
             {
                 org.hisp.dhis.api.mobile.model.LWUITmodel.RelationshipType mobileRelType = new org.hisp.dhis.api.mobile.model.LWUITmodel.RelationshipType();

=== modified file 'dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/mobile/service/FacilityReportingServiceImpl.java'
--- dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/mobile/service/FacilityReportingServiceImpl.java	2015-08-31 08:17:08 +0000
+++ dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/mobile/service/FacilityReportingServiceImpl.java	2015-09-03 03:11:47 +0000
@@ -163,7 +163,7 @@
             if ( !currentDataSets.contains( dataSet ) )
             {
                 if ( updatedDataSetList.getAddedDataSets() == null )
-                    updatedDataSetList.setAddedDataSets( new ArrayList<DataSet>() );
+                    updatedDataSetList.setAddedDataSets( new ArrayList<>() );
                 updatedDataSetList.getAddedDataSets().add( dataSet );
                 currentDataSets.add( dataSet );
             }
@@ -175,7 +175,7 @@
             if ( !dataSets.contains( dataSet ) )
             {
                 if ( updatedDataSetList.getDeletedDataSets() == null )
-                    updatedDataSetList.setDeletedDataSets( new ArrayList<DataSet>() );
+                    updatedDataSetList.setDeletedDataSets( new ArrayList<>() );
                 updatedDataSetList.getDeletedDataSets().add( new DataSet( dataSet ) );
             }
         }
@@ -196,7 +196,7 @@
             if ( dataSets.get( i ).getVersion() != currentDataSets.get( i ).getVersion() )
             {
                 if ( updatedDataSetList.getModifiedDataSets() == null )
-                    updatedDataSetList.setModifiedDataSets( new ArrayList<DataSet>() );
+                    updatedDataSetList.setModifiedDataSets( new ArrayList<>() );
                 updatedDataSetList.getModifiedDataSets().add( dataSets.get( i ) );
             }
         }
@@ -292,7 +292,7 @@
                 for ( int i = 0; i < dataElementList.size(); i++ )
                 {
                 	List<Model> categoryOptionCombos = dataElementList.get( i ).getCategoryOptionCombos().getModels();
-                    List<Model> newCategoryOptionCombos = new ArrayList<Model>();
+                    List<Model> newCategoryOptionCombos = new ArrayList<>();
 
                     for ( int j = 0; j < categoryOptionCombos.size(); j++ )
                     {

=== modified file 'dhis-2/dhis-services/dhis-service-reporting/src/test/java/org/hisp/dhis/reporttable/ReportTableStoreTest.java'
--- dhis-2/dhis-services/dhis-service-reporting/src/test/java/org/hisp/dhis/reporttable/ReportTableStoreTest.java	2015-06-23 14:16:25 +0000
+++ dhis-2/dhis-services/dhis-service-reporting/src/test/java/org/hisp/dhis/reporttable/ReportTableStoreTest.java	2015-09-03 03:11:47 +0000
@@ -189,13 +189,13 @@
     public void testSaveGetReportTable()
     {
         ReportTable reportTableA = new ReportTable( "Immunization",
-            new ArrayList<DataElement>(), indicators, new ArrayList<DataSet>(), periods, units, 
+            new ArrayList<>(), indicators, new ArrayList<>(), periods, units,
             true, true, false, relativesA, null, "january_2000" );        
         ReportTable reportTableB = new ReportTable( "Prescriptions",
-            dataElements, new ArrayList<Indicator>(), new ArrayList<DataSet>(), periods, units, 
+            dataElements, new ArrayList<>(), new ArrayList<>(), periods, units,
             false, false, true, relativesB, null, "january_2000" );
         ReportTable reportTableC = new ReportTable( "Assualt",
-            new ArrayList<DataElement>(), new ArrayList<Indicator>(), dataSets, periods, units, 
+            new ArrayList<>(), new ArrayList<>(), dataSets, periods, units,
             false, false, true, relativesC, null, "january_2000" );
         
         int idA = reportTableStore.save( reportTableA );
@@ -237,10 +237,10 @@
     public void testDeleteReportTable()
     {
         ReportTable reportTableA = new ReportTable( "Immunization",
-            new ArrayList<DataElement>(), indicators, new ArrayList<DataSet>(), periods, units, 
+            new ArrayList<>(), indicators, new ArrayList<>(), periods, units,
             true, true, false, relativesA, null, "january_2000" );        
         ReportTable reportTableB = new ReportTable( "Prescriptions",
-            dataElements, new ArrayList<Indicator>(), new ArrayList<DataSet>(), periods, units, 
+            dataElements, new ArrayList<>(), new ArrayList<>(), periods, units,
             false, false, true, relativesB, null, "january_2000" );
         
         int idA = reportTableStore.save( reportTableA );
@@ -264,10 +264,10 @@
     public void testGetAllReportTables()
     {
         ReportTable reportTableA = new ReportTable( "Immunization",
-            new ArrayList<DataElement>(), indicators, new ArrayList<DataSet>(), periods, units, 
+            new ArrayList<>(), indicators, new ArrayList<>(), periods, units,
             true, true, false, relativesA, null, "january_2000" );        
         ReportTable reportTableB = new ReportTable( "Prescriptions",
-            dataElements, new ArrayList<Indicator>(), new ArrayList<DataSet>(), periods, units, 
+            dataElements, new ArrayList<>(), new ArrayList<>(), periods, units,
             false, false, true, relativesB, null, "january_2000" );
         
         reportTableStore.save( reportTableA );
@@ -283,10 +283,10 @@
     public void testGetReportTableByName()
     {
         ReportTable reportTableA = new ReportTable( "Immunization",
-            new ArrayList<DataElement>(), indicators, new ArrayList<DataSet>(), periods, units, 
+            new ArrayList<>(), indicators, new ArrayList<>(), periods, units,
             true, true, false, relativesA, null, "january_2000" );        
         ReportTable reportTableB = new ReportTable( "Prescriptions",
-            dataElements, new ArrayList<Indicator>(), new ArrayList<DataSet>(), periods, units, 
+            dataElements, new ArrayList<>(), new ArrayList<>(), periods, units,
             false, false, true, relativesB, null, "january_2000" );
         
         reportTableStore.save( reportTableA );

=== modified file 'dhis-2/dhis-services/dhis-service-reporting/src/test/java/org/hisp/dhis/reporttable/ReportTableTest.java'
--- dhis-2/dhis-services/dhis-service-reporting/src/test/java/org/hisp/dhis/reporttable/ReportTableTest.java	2015-03-31 15:22:00 +0000
+++ dhis-2/dhis-services/dhis-service-reporting/src/test/java/org/hisp/dhis/reporttable/ReportTableTest.java	2015-09-03 03:11:47 +0000
@@ -259,7 +259,7 @@
     public void testIndicatorReportTableA()
     {
         ReportTable reportTable = new ReportTable( "Embezzlement",
-            new ArrayList<DataElement>(), indicators, new ArrayList<DataSet>(), periods, units, 
+            new ArrayList<>(), indicators, new ArrayList<>(), periods, units,
             true, true, false, relatives, null, "january_2000" );
 
         reportTable.init( null, null, null, null, null, i18nFormat );
@@ -311,7 +311,7 @@
     public void testIndicatorReportTableB()
     {
         ReportTable reportTable = new ReportTable( "Embezzlement",
-            new ArrayList<DataElement>(), indicators, new ArrayList<DataSet>(), periods, units, 
+            new ArrayList<>(), indicators, new ArrayList<>(), periods, units,
             false, false, true, relatives, null, "january_2000" );
 
         reportTable.init( null, null, null, null,  null, i18nFormat );
@@ -361,7 +361,7 @@
     public void testIndicatorReportTableC()
     {        
         ReportTable reportTable = new ReportTable( "Embezzlement",
-            new ArrayList<DataElement>(), indicators, new ArrayList<DataSet>(), periods, units, 
+            new ArrayList<>(), indicators, new ArrayList<>(), periods, units,
             true, false, true, relatives, null, "january_2000" );
 
         reportTable.init( null, null, null,  null, null, i18nFormat );
@@ -411,7 +411,7 @@
     public void testIndicatorReportTableColumnsOnly()
     {
         ReportTable reportTable = new ReportTable( "Embezzlement",
-            new ArrayList<DataElement>(), indicators, new ArrayList<DataSet>(), periods, units, 
+            new ArrayList<>(), indicators, new ArrayList<>(), periods, units,
             true, true, true, relatives, null, "january_2000" );
 
         reportTable.init( null, null, null,  null, null, i18nFormat );
@@ -441,7 +441,7 @@
     public void testIndicatorReportTableRowsOnly()
     {
         ReportTable reportTable = new ReportTable( "Embezzlement",
-            new ArrayList<DataElement>(), indicators, new ArrayList<DataSet>(), periods, units, 
+            new ArrayList<>(), indicators, new ArrayList<>(), periods, units,
             false, false, false, relatives, null, "january_2000" );
 
         reportTable.init( null, null, null,  null, null, i18nFormat );
@@ -471,7 +471,7 @@
     public void testDataElementReportTableA()
     {
         ReportTable reportTable = new ReportTable( "Embezzlement",
-            dataElements, new ArrayList<Indicator>(), new ArrayList<DataSet>(), periods, units, 
+            dataElements, new ArrayList<>(), new ArrayList<>(), periods, units,
             true, true, false, relatives, null, "january_2000" );
 
         reportTable.init( null, null, null,  null, null, i18nFormat );
@@ -511,7 +511,7 @@
     public void testDataElementReportTableB()
     {
         ReportTable reportTable = new ReportTable( "Embezzlement",
-            dataElements, new ArrayList<Indicator>(), new ArrayList<DataSet>(), periods, units, 
+            dataElements, new ArrayList<>(), new ArrayList<>(), periods, units,
             false, false, true, relatives, null, "january_2000" );
 
         reportTable.init( null, null, null,  null, null, i18nFormat );
@@ -549,7 +549,7 @@
     public void testDataElementReportTableC()
     {
         ReportTable reportTable = new ReportTable( "Embezzlement",
-            dataElements, new ArrayList<Indicator>(), new ArrayList<DataSet>(), periods, units, 
+            dataElements, new ArrayList<>(), new ArrayList<>(), periods, units,
             true, false, true, relatives, null, "january_2000" );
 
         reportTable.init( null, null, null,  null, null, i18nFormat );
@@ -589,7 +589,7 @@
     public void testDataSetReportTableA()
     {
         ReportTable reportTable = new ReportTable( "Embezzlement",
-            new ArrayList<DataElement>(), new ArrayList<Indicator>(), dataSets, periods, units, 
+            new ArrayList<>(), new ArrayList<>(), dataSets, periods, units,
             true, true, false, relatives, null, "january_2000" );
 
         reportTable.init( null, null, null,  null, null, i18nFormat );
@@ -629,7 +629,7 @@
     public void testDataSetReportTableB()
     {
         ReportTable reportTable = new ReportTable( "Embezzlement",
-            new ArrayList<DataElement>(), new ArrayList<Indicator>(), dataSets, periods, units, 
+            new ArrayList<>(), new ArrayList<>(), dataSets, periods, units,
             false, false, true, relatives, null, "january_2000" );
 
         reportTable.init( null, null, null,  null, null, i18nFormat );
@@ -667,7 +667,7 @@
     public void testDataSetReportTableC()
     {        
         ReportTable reportTable = new ReportTable( "Embezzlement",
-            new ArrayList<DataElement>(), new ArrayList<Indicator>(), dataSets, periods, units, 
+            new ArrayList<>(), new ArrayList<>(), dataSets, periods, units,
             true, false, true, relatives, null, "january_2000" );
 
         reportTable.init( null, null, null,  null, null, i18nFormat );

=== modified file 'dhis-2/dhis-support/dhis-support-commons/src/main/java/org/hisp/dhis/commons/collection/ListUtils.java'
--- dhis-2/dhis-support/dhis-support-commons/src/main/java/org/hisp/dhis/commons/collection/ListUtils.java	2015-08-30 14:51:28 +0000
+++ dhis-2/dhis-support/dhis-support-commons/src/main/java/org/hisp/dhis/commons/collection/ListUtils.java	2015-09-03 03:11:47 +0000
@@ -254,7 +254,7 @@
      */
     public static List<Integer> getClosedOpenList( int a, int b )
     {
-        List<Integer> list = new ArrayList<Integer>();
+        List<Integer> list = new ArrayList<>();
         
         for ( int i = a; i < b; i++ )
         {
@@ -314,7 +314,7 @@
      */
     public static <T> List<T> sort( List<T> list, Comparator<? super T> comparator )
     {
-        List<T> copy = new ArrayList<T>( list );
+        List<T> copy = new ArrayList<>( list );
         Collections.sort( copy, comparator );
         return copy;
     }

=== modified file 'dhis-2/dhis-support/dhis-support-commons/src/main/java/org/hisp/dhis/commons/util/TextUtils.java'
--- dhis-2/dhis-support/dhis-support-commons/src/main/java/org/hisp/dhis/commons/util/TextUtils.java	2015-08-27 22:22:39 +0000
+++ dhis-2/dhis-support/dhis-support-commons/src/main/java/org/hisp/dhis/commons/util/TextUtils.java	2015-09-03 03:11:47 +0000
@@ -295,7 +295,7 @@
             return null;
         }
         
-        List<T> objects = new ArrayList<T>( list );
+        List<T> objects = new ArrayList<>( list );
         
         if ( nullReplacement != null )
         {

=== modified file 'dhis-2/dhis-support/dhis-support-system/src/test/java/org/hisp/dhis/system/util/ExpressionUtilsTest.java'
--- dhis-2/dhis-support/dhis-support-system/src/test/java/org/hisp/dhis/system/util/ExpressionUtilsTest.java	2015-08-27 22:22:39 +0000
+++ dhis-2/dhis-support/dhis-support-system/src/test/java/org/hisp/dhis/system/util/ExpressionUtilsTest.java	2015-09-03 03:11:47 +0000
@@ -66,7 +66,7 @@
     @Test
     public void testEvaluateToDoubleWithVars()
     {
-        Map<String, Object> vars = new HashMap<String, Object>();
+        Map<String, Object> vars = new HashMap<>();
         
         vars.put( "v1", 4d );
         vars.put( "v2", -5d );
@@ -107,7 +107,7 @@
     @Test
     public void testIsTrueWithVars()
     {
-        Map<String, Object> vars = new HashMap<String, Object>();
+        Map<String, Object> vars = new HashMap<>();
         
         vars.put( "v1", "4" );
         vars.put( "v2", "12" );
@@ -132,7 +132,7 @@
     @Test
     public void testIsBoolean()
     {
-        Map<String, Object> vars = new HashMap<String, Object>();
+        Map<String, Object> vars = new HashMap<>();
         
         vars.put( "uA2hsh8j26j", "FEMALE" );
         vars.put( "v2", "12" );
@@ -161,7 +161,7 @@
     @Test
     public void testIsValid()
     {
-        Map<String, Object> vars = new HashMap<String, Object>();
+        Map<String, Object> vars = new HashMap<>();
         
         vars.put( "v1", "12" );
         

=== modified file 'dhis-2/dhis-support/dhis-support-test/src/main/java/org/hisp/dhis/DhisConvenienceTest.java'
--- dhis-2/dhis-support/dhis-support-test/src/main/java/org/hisp/dhis/DhisConvenienceTest.java	2015-08-30 19:18:52 +0000
+++ dhis-2/dhis-support/dhis-support-test/src/main/java/org/hisp/dhis/DhisConvenienceTest.java	2015-09-03 03:11:47 +0000
@@ -28,31 +28,12 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-import java.io.File;
-import java.io.PrintWriter;
-import java.io.StringReader;
-import java.io.StringWriter;
-import java.lang.reflect.Method;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Date;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Set;
-
-import javax.xml.XMLConstants;
-import javax.xml.namespace.NamespaceContext;
-import javax.xml.xpath.XPath;
-import javax.xml.xpath.XPathExpressionException;
-import javax.xml.xpath.XPathFactory;
-
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.hisp.dhis.chart.Chart;
 import org.hisp.dhis.common.CodeGenerator;
 import org.hisp.dhis.common.DimensionalObject;
+import org.hisp.dhis.common.ValueType;
 import org.hisp.dhis.common.cache.CacheStrategy;
 import org.hisp.dhis.constant.Constant;
 import org.hisp.dhis.dataelement.CategoryOptionGroup;
@@ -124,6 +105,25 @@
 import org.springframework.util.Assert;
 import org.xml.sax.InputSource;
 
+import javax.xml.XMLConstants;
+import javax.xml.namespace.NamespaceContext;
+import javax.xml.xpath.XPath;
+import javax.xml.xpath.XPathExpressionException;
+import javax.xml.xpath.XPathFactory;
+import java.io.File;
+import java.io.PrintWriter;
+import java.io.StringReader;
+import java.io.StringWriter;
+import java.lang.reflect.Method;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Date;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Set;
+
 /**
  * @author Lars Helge Overland
  * @version $Id$
@@ -153,7 +153,7 @@
     // -------------------------------------------------------------------------
 
     protected UserService userService;
-    
+
     static
     {
         DateTime dateTime = new DateTime( 1970, 1, 1, 0, 0 );
@@ -163,7 +163,7 @@
     // -------------------------------------------------------------------------
     // Convenience methods
     // -------------------------------------------------------------------------
-    
+
     /**
      * Creates a date.
      *
@@ -174,7 +174,7 @@
      */
     public static Date getDate( int year, int month, int day )
     {
-        DateTime dateTime = new DateTime(year, month, day, 0, 0);
+        DateTime dateTime = new DateTime( year, month, day, 0, 0 );
         return dateTime.toDate();
     }
 
@@ -187,7 +187,7 @@
     public Date getDay( int day )
     {
         DateTime dataTime = DateTime.now();
-        dataTime = dataTime.withTimeAtStartOfDay() ;
+        dataTime = dataTime.withTimeAtStartOfDay();
         dataTime = dataTime.withDayOfYear( day );
 
         return dataTime.toDate();
@@ -323,7 +323,7 @@
      *
      * @param object the object.
      */
-    @SuppressWarnings("unchecked")
+    @SuppressWarnings( "unchecked" )
     private <T> T getRealObject( T object )
         throws Exception
     {
@@ -353,6 +353,7 @@
         dataElement.setCode( "DataElementCode" + uniqueCharacter );
         dataElement.setDescription( "DataElementDescription" + uniqueCharacter );
         dataElement.setType( DataElement.VALUE_TYPE_INT );
+        dataElement.setValueType( ValueType.NUMBER );
         dataElement.setDomainType( DataElementDomain.AGGREGATE );
         dataElement.setAggregationOperator( DataElement.AGGREGATION_OPERATOR_SUM );
 
@@ -416,8 +417,7 @@
     public static DataElementCategoryCombo createCategoryCombo( char categoryComboUniqueIdentifier,
         DataElementCategory... categories )
     {
-        DataElementCategoryCombo categoryCombo = new DataElementCategoryCombo( "CategoryCombo" + categoryComboUniqueIdentifier,
-            new ArrayList<DataElementCategory>() );
+        DataElementCategoryCombo categoryCombo = new DataElementCategoryCombo( "CategoryCombo" + categoryComboUniqueIdentifier, new ArrayList<>() );
         categoryCombo.setAutoFields();
 
         for ( DataElementCategory category : categories )
@@ -511,7 +511,7 @@
         DataElementCategoryOption... categoryOptions )
     {
         DataElementCategory dataElementCategory = new DataElementCategory( "DataElementCategory" + categoryUniqueIdentifier,
-            new ArrayList<DataElementCategoryOption>() );
+            new ArrayList<>() );
         dataElementCategory.setAutoFields();
 
         for ( DataElementCategoryOption categoryOption : categoryOptions )
@@ -532,8 +532,8 @@
 
     /**
      * @param uniqueIdentifier A unique character to identify the
-     *                                      category option group.
-     * @param categoryOptions               the category options.
+     *                         category option group.
+     * @param categoryOptions  the category options.
      * @return CategoryOptionGroup
      */
     public static CategoryOptionGroup createCategoryOptionGroup( char uniqueIdentifier,
@@ -543,7 +543,7 @@
         categoryOptionGroup.setShortName( "ShortName" + uniqueIdentifier );
         categoryOptionGroup.setAutoFields();
 
-        categoryOptionGroup.setMembers( new HashSet<DataElementCategoryOption>() );
+        categoryOptionGroup.setMembers( new HashSet<>() );
 
         for ( DataElementCategoryOption categoryOption : categoryOptions )
         {
@@ -1100,10 +1100,10 @@
         credentials.setPassword( "Password" + uniqueCharacter );
         credentials.setUser( user );
         user.setUserCredentials( credentials );
-        
+
         return credentials;
     }
-    
+
     public static UserGroup createUserGroup( char uniqueCharacter, Set<User> users )
     {
         UserGroup userGroup = new UserGroup();
@@ -1114,7 +1114,7 @@
 
         return userGroup;
     }
-    
+
     public static UserAuthorityGroup createUserAuthorityGroup( char uniqueCharacter )
     {
         UserAuthorityGroup role = new UserAuthorityGroup();
@@ -1122,7 +1122,7 @@
 
         role.setUid( BASE_UID + uniqueCharacter );
         role.setName( "UserAuthorityGroup" + uniqueCharacter );
-        
+
         return role;
     }
 
@@ -1130,20 +1130,20 @@
         OrganisationUnit unit )
     {
         Set<OrganisationUnit> units = new HashSet<>();
-        
+
         if ( unit != null )
         {
             units.add( unit );
         }
-        
+
         return createProgram( uniqueCharacter, programStages, null, units );
     }
-    
+
     public static Program createProgram( char uniqueCharacter, Set<ProgramStage> programStages,
         Set<TrackedEntityAttribute> attributes, Set<OrganisationUnit> organisationUnits )
     {
         Program program = new Program();
-        
+
         program.setName( "Program" + uniqueCharacter );
         program.setDescription( "Description" + uniqueCharacter );
         program.setDateOfEnrollmentDescription( "DateOfEnrollmentDescription" );
@@ -1159,11 +1159,11 @@
                 program.getProgramStages().add( programStage );
             }
         }
-        
+
         if ( attributes != null )
         {
             int i = 0;
-            
+
             for ( TrackedEntityAttribute attribute : attributes )
             {
                 program.getProgramAttributes().add( new ProgramTrackedEntityAttribute( attribute, i++, false ) );
@@ -1171,47 +1171,47 @@
         }
 
         if ( organisationUnits != null )
-        {            
+        {
             program.getOrganisationUnits().addAll( organisationUnits );
         }
-        
+
         return program;
     }
-        
-    public static ProgramRule createProgramRule ( char uniqueCharacter, Program parentProgram )
+
+    public static ProgramRule createProgramRule( char uniqueCharacter, Program parentProgram )
     {
         ProgramRule programRule = new ProgramRule();
         programRule.setName( "ProgramRule" + uniqueCharacter );
         programRule.setProgram( parentProgram );
-        programRule.setCondition("true");
-    
+        programRule.setCondition( "true" );
+
         return programRule;
     }
-    
-    public static ProgramRuleAction createProgramRuleAction ( char uniqueCharacter )
+
+    public static ProgramRuleAction createProgramRuleAction( char uniqueCharacter )
     {
         ProgramRuleAction programRuleAction = new ProgramRuleAction();
         programRuleAction.setName( "ProgramRuleAction" + uniqueCharacter );
         programRuleAction.setProgramRuleActionType( ProgramRuleActionType.HIDEFIELD );
-    
+
         return programRuleAction;
     }
-    
-    public static ProgramRuleAction createProgramRuleAction ( char uniqueCharacter, ProgramRule parentRule )
+
+    public static ProgramRuleAction createProgramRuleAction( char uniqueCharacter, ProgramRule parentRule )
     {
         ProgramRuleAction programRuleAction = createProgramRuleAction( uniqueCharacter );
         programRuleAction.setProgramRule( parentRule );
-    
+
         return programRuleAction;
     }
-    
-    public static ProgramRuleVariable createProgramRuleVariable ( char uniqueCharacter, Program parentProgram )
+
+    public static ProgramRuleVariable createProgramRuleVariable( char uniqueCharacter, Program parentProgram )
     {
         ProgramRuleVariable programRuleVariable = new ProgramRuleVariable();
         programRuleVariable.setName( "ProgramRuleVariable" + uniqueCharacter );
         programRuleVariable.setProgram( parentProgram );
         programRuleVariable.setSourceType( ProgramRuleVariableSourceType.DATAELEMENT_CURRENT_EVENT );
-        
+
         return programRuleVariable;
     }
 
@@ -1231,11 +1231,11 @@
 
         return programStage;
     }
-    
+
     public static ProgramStage createProgramStage( char uniqueCharacter, Set<DataElement> dataElements )
     {
         ProgramStage programStage = createProgramStage( uniqueCharacter, 0 );
-        
+
         if ( dataElements != null )
         {
             for ( DataElement dataElement : dataElements )
@@ -1244,7 +1244,7 @@
                 programStage.getProgramStageDataElements().add( psd );
             }
         }
-        
+
         return programStage;
     }
 
@@ -1253,18 +1253,18 @@
         ProgramIndicator indicator = new ProgramIndicator();
         indicator.setAutoFields();
         indicator.setName( "Indicator" + uniqueCharacter );
-        indicator.setShortName( "IndicatorShort" + uniqueCharacter  );
-        indicator.setCode( "IndicatorCode" + uniqueCharacter  );
+        indicator.setShortName( "IndicatorShort" + uniqueCharacter );
+        indicator.setCode( "IndicatorCode" + uniqueCharacter );
         indicator.setDescription( "IndicatorDescription" + uniqueCharacter );
         indicator.setProgram( program );
         indicator.setValueType( ProgramIndicator.VALUE_TYPE_INT );
         indicator.setExpression( expression );
         indicator.setFilter( filter );
         indicator.setRootDate( ProgramIndicator.VAR_INCIDENT_DATE );
-        
+
         return indicator;
     }
-    
+
     public static TrackedEntity createTrackedEntity( char uniqueChar )
     {
         TrackedEntity trackedEntity = new TrackedEntity();
@@ -1283,7 +1283,7 @@
 
         return entityInstance;
     }
-    
+
     public static ProgramStageInstance createProgramStageInstance()
     {
         ProgramStageInstance programStageInstance = new ProgramStageInstance();
@@ -1530,7 +1530,7 @@
             return null;
         }
     }
-    
+
     /**
      * Creates a user and injects into the security context with username
      * "username". Requires <code>identifiableObjectManager</code> and
@@ -1628,7 +1628,7 @@
         t.printStackTrace( pw );
         pw.flush();
         sw.flush();
-        
+
         return sw.toString();
     }
 }

=== modified file 'dhis-2/dhis-support/dhis-support-test/src/main/java/org/hisp/dhis/mock/MockCurrentUserService.java'
--- dhis-2/dhis-support/dhis-support-test/src/main/java/org/hisp/dhis/mock/MockCurrentUserService.java	2015-06-22 16:08:25 +0000
+++ dhis-2/dhis-support/dhis-support-test/src/main/java/org/hisp/dhis/mock/MockCurrentUserService.java	2015-09-03 03:11:47 +0000
@@ -96,7 +96,7 @@
     @Override
     public Set<OrganisationUnit> getCurrentUserOrganisationUnits()
     {
-        return currentUser != null ? currentUser.getOrganisationUnits() : new HashSet<OrganisationUnit>();
+        return currentUser != null ? currentUser.getOrganisationUnits() : new HashSet<>();
     }
 
     @Override

=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/AbstractCrudController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/AbstractCrudController.java	2015-07-15 09:45:45 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/AbstractCrudController.java	2015-09-03 03:11:47 +0000
@@ -916,7 +916,7 @@
      */
     protected final List<T> getEntity( String uid )
     {
-        return getEntity( uid, new WebOptions( new HashMap<String, String>() ) );
+        return getEntity( uid, new WebOptions( new HashMap<>() ) );
     }
 
     protected List<T> getEntity( String uid, WebOptions options )

=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/AppController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/AppController.java	2015-08-18 21:24:18 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/AppController.java	2015-09-03 03:11:47 +0000
@@ -93,7 +93,7 @@
     public void getApps( @RequestParam(required=false) String key, HttpServletResponse response )
         throws IOException
     {
-        List<App> apps = new ArrayList<App>();
+        List<App> apps = new ArrayList<>();
         
         if ( key != null )
         {

=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/DataSetController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/DataSetController.java	2015-07-09 06:44:02 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/DataSetController.java	2015-09-03 03:11:47 +0000
@@ -281,7 +281,7 @@
      */
     private WebOptions filterMetadataOptions()
     {
-        WebOptions options = new WebOptions( new HashMap<String, String>() );
+        WebOptions options = new WebOptions( new HashMap<>() );
         options.setAssumeTrue( false );
         options.addOption( "categoryOptionCombos", "true" );
         options.addOption( "dataElements", "true" );

=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/MaintenanceController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/MaintenanceController.java	2015-07-08 05:42:56 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/MaintenanceController.java	2015-09-03 03:11:47 +0000
@@ -167,7 +167,7 @@
                 continue;
             }
 
-            output.put( property.getName(), new HashMap<String, List<ValidationViolation>>() );
+            output.put( property.getName(), new HashMap<>() );
 
             Collection<?> collection = (Collection<?>) property.getGetterMethod().invoke( metaData );
 

=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/SmsConfigurationController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/SmsConfigurationController.java	2015-07-08 05:42:56 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/SmsConfigurationController.java	2015-09-03 03:11:47 +0000
@@ -80,7 +80,7 @@
 
         SmsConfiguration smsConfiguration = new SmsConfiguration();
 
-        SmsGatewayConfig gatewayConfig = new GenericHttpGatewayConfig( "http://storset.org/";, new HashMap<String, String>() );
+        SmsGatewayConfig gatewayConfig = new GenericHttpGatewayConfig( "http://storset.org/";, new HashMap<>() );
         smsConfiguration.setGateways( Collections.singletonList( gatewayConfig ) );
 
         model.addAttribute( "model", smsConfiguration );

=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/organisationunit/OrganisationUnitController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/organisationunit/OrganisationUnitController.java	2015-07-13 09:52:25 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/organisationunit/OrganisationUnitController.java	2015-09-03 03:11:47 +0000
@@ -261,8 +261,8 @@
         @RequestParam( value = "properties", required = false, defaultValue = "true" ) boolean rpProperties,
         HttpServletResponse response ) throws IOException
     {
-        rpLevels = rpLevels != null ? rpLevels : new ArrayList<Integer>();
-        rpParents = rpParents != null ? rpParents : new ArrayList<String>();
+        rpLevels = rpLevels != null ? rpLevels : new ArrayList<>();
+        rpParents = rpParents != null ? rpParents : new ArrayList<>();
 
         List<OrganisationUnit> parents = new ArrayList<>( manager.getByUid( OrganisationUnit.class, rpParents ) );
 

=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/user/CurrentUserController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/user/CurrentUserController.java	2015-07-15 15:49:39 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/user/CurrentUserController.java	2015-09-03 03:11:47 +0000
@@ -573,7 +573,7 @@
 
                         if ( programAssociations.get( organisationUnit.getUid() ) == null )
                         {
-                            programAssociations.put( organisationUnit.getUid(), new ArrayList<Program>() );
+                            programAssociations.put( organisationUnit.getUid(), new ArrayList<>() );
                         }
 
                         programAssociations.get( organisationUnit.getUid() ).add( program );

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/GetProgramMetaDataAction.java'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/GetProgramMetaDataAction.java	2015-07-02 07:05:55 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/GetProgramMetaDataAction.java	2015-09-03 03:11:47 +0000
@@ -117,7 +117,7 @@
         for ( Program program : programs )
         {
             Set<OrganisationUnit> organisationUnits = program.getOrganisationUnits();
-            programAssociations.put( program.getUid(), new HashSet<String>() );
+            programAssociations.put( program.getUid(), new HashSet<>() );
 
             for ( OrganisationUnit organisationUnit : organisationUnits )
             {

=== modified file 'dhis-2/dhis-web/dhis-web-dataentry/src/main/java/org/hisp/dhis/de/action/GetMetaDataAction.java'
--- dhis-2/dhis-web/dhis-web-dataentry/src/main/java/org/hisp/dhis/de/action/GetMetaDataAction.java	2015-08-25 07:19:18 +0000
+++ dhis-2/dhis-web/dhis-web-dataentry/src/main/java/org/hisp/dhis/de/action/GetMetaDataAction.java	2015-09-03 03:11:47 +0000
@@ -177,7 +177,7 @@
         return defaultCategoryCombo;
     }
 
-    private Map<String, List<DataElementCategoryOption>> categoryOptionMap = new HashMap<String, List<DataElementCategoryOption>>();
+    private Map<String, List<DataElementCategoryOption>> categoryOptionMap = new HashMap<>();
 
     public Map<String, List<DataElementCategoryOption>> getCategoryOptionMap()
     {

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/category/ShowAddDataElementCategoryOptionAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/category/ShowAddDataElementCategoryOptionAction.java	2015-08-19 05:26:31 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/category/ShowAddDataElementCategoryOptionAction.java	2015-09-03 03:11:47 +0000
@@ -74,7 +74,7 @@
     public String execute()
         throws Exception
     {
-        selectionManager.setSelectedOrganisationUnits( new ArrayList<OrganisationUnit>() );
+        selectionManager.setSelectedOrganisationUnits( new ArrayList<>() );
 
         attributes = new ArrayList<>( attributeService.getCategoryOptionAttributes() );
 

=== modified file 'dhis-2/dhis-web/dhis-web-ohie/src/main/java/org/hisp/dhis/web/ohie/csd/webapi/CsdController.java'
--- dhis-2/dhis-web/dhis-web-ohie/src/main/java/org/hisp/dhis/web/ohie/csd/webapi/CsdController.java	2015-06-22 10:11:42 +0000
+++ dhis-2/dhis-web/dhis-web-ohie/src/main/java/org/hisp/dhis/web/ohie/csd/webapi/CsdController.java	2015-09-03 03:11:47 +0000
@@ -233,7 +233,7 @@
     private Csd createCsd( Iterable<OrganisationUnit> organisationUnits )
     {
         Csd csd = new Csd();
-        csd.getFacilityDirectory().setFacilities( new ArrayList<Facility>() );
+        csd.getFacilityDirectory().setFacilities( new ArrayList<>() );
 
         for ( OrganisationUnit organisationUnit : organisationUnits )
         {

=== modified file 'dhis-2/dhis-web/dhis-web-ohie/src/main/java/org/hisp/dhis/web/ohie/fred/webapi/v1/controller/FacilityAdvice.java'
--- dhis-2/dhis-web/dhis-web-ohie/src/main/java/org/hisp/dhis/web/ohie/fred/webapi/v1/controller/FacilityAdvice.java	2015-01-17 07:41:26 +0000
+++ dhis-2/dhis-web/dhis-web-ohie/src/main/java/org/hisp/dhis/web/ohie/fred/webapi/v1/controller/FacilityAdvice.java	2015-09-03 03:11:47 +0000
@@ -127,7 +127,7 @@
     {
         headers.add( "Content-Type", MediaType.APPLICATION_JSON_VALUE );
 
-        return new ResponseEntity<Object>( MessageUtils.jsonMessage(
+        return new ResponseEntity<>( MessageUtils.jsonMessage(
             Integer.toString( status.value() ), ex.getMessage() ), status );
     }
 
@@ -136,7 +136,7 @@
     {
         headers.add( "Content-Type", MediaType.APPLICATION_JSON_VALUE );
 
-        return new ResponseEntity<Object>( MessageUtils.jsonMessage(
+        return new ResponseEntity<>( MessageUtils.jsonMessage(
             Integer.toString( status.value() ), ex.getMessage() ), status );
     }
 
@@ -145,7 +145,7 @@
     {
         headers.add( "Content-Type", MediaType.APPLICATION_JSON_VALUE );
 
-        return new ResponseEntity<Object>( MessageUtils.jsonMessage(
+        return new ResponseEntity<>( MessageUtils.jsonMessage(
             Integer.toString( status.value() ), ex.getMessage() ), status );
     }
 
@@ -154,7 +154,7 @@
     {
         headers.add( "Content-Type", MediaType.APPLICATION_JSON_VALUE );
 
-        return new ResponseEntity<Object>( MessageUtils.jsonMessage(
+        return new ResponseEntity<>( MessageUtils.jsonMessage(
             Integer.toString( status.value() ), ex.getMessage() ), status );
     }
 
@@ -163,7 +163,7 @@
     {
         headers.add( "Content-Type", MediaType.APPLICATION_JSON_VALUE );
 
-        return new ResponseEntity<Object>( MessageUtils.jsonMessage(
+        return new ResponseEntity<>( MessageUtils.jsonMessage(
             Integer.toString( status.value() ), ex.getMessage() ), status );
     }
 
@@ -172,7 +172,7 @@
     {
         headers.add( "Content-Type", MediaType.APPLICATION_JSON_VALUE );
 
-        return new ResponseEntity<Object>( MessageUtils.jsonMessage(
+        return new ResponseEntity<>( MessageUtils.jsonMessage(
             Integer.toString( status.value() ), ex.getMessage() ), status );
     }
 
@@ -181,7 +181,7 @@
     {
         headers.add( "Content-Type", MediaType.APPLICATION_JSON_VALUE );
 
-        return new ResponseEntity<Object>( MessageUtils.jsonMessage(
+        return new ResponseEntity<>( MessageUtils.jsonMessage(
             Integer.toString( status.value() ), ex.getMessage() ), status );
     }
 
@@ -190,7 +190,7 @@
     {
         headers.add( "Content-Type", MediaType.APPLICATION_JSON_VALUE );
 
-        return new ResponseEntity<Object>( MessageUtils.jsonMessage(
+        return new ResponseEntity<>( MessageUtils.jsonMessage(
             Integer.toString( status.value() ), ex.getMessage() ), status );
     }
 
@@ -199,7 +199,7 @@
     {
         headers.add( "Content-Type", MediaType.APPLICATION_JSON_VALUE );
 
-        return new ResponseEntity<Object>( MessageUtils.jsonMessage(
+        return new ResponseEntity<>( MessageUtils.jsonMessage(
             Integer.toString( status.value() ), ex.getMessage() ), status );
     }
 
@@ -208,7 +208,7 @@
     {
         headers.add( "Content-Type", MediaType.APPLICATION_JSON_VALUE );
 
-        return new ResponseEntity<Object>( MessageUtils.jsonMessage(
+        return new ResponseEntity<>( MessageUtils.jsonMessage(
             Integer.toString( status.value() ), ex.getMessage() ), status );
     }
 
@@ -217,7 +217,7 @@
     {
         headers.add( "Content-Type", MediaType.APPLICATION_JSON_VALUE );
 
-        return new ResponseEntity<Object>( MessageUtils.jsonMessage(
+        return new ResponseEntity<>( MessageUtils.jsonMessage(
             Integer.toString( status.value() ), ex.getMessage() ), status );
     }
 
@@ -226,7 +226,7 @@
     {
         headers.add( "Content-Type", MediaType.APPLICATION_JSON_VALUE );
 
-        return new ResponseEntity<Object>( MessageUtils.jsonMessage(
+        return new ResponseEntity<>( MessageUtils.jsonMessage(
             Integer.toString( status.value() ), ex.getMessage() ), status );
     }
 
@@ -235,7 +235,7 @@
     {
         headers.add( "Content-Type", MediaType.APPLICATION_JSON_VALUE );
 
-        return new ResponseEntity<Object>( MessageUtils.jsonMessage(
+        return new ResponseEntity<>( MessageUtils.jsonMessage(
             Integer.toString( status.value() ), ex.getMessage() ), status );
     }
 
@@ -244,7 +244,7 @@
     {
         headers.add( "Content-Type", MediaType.APPLICATION_JSON_VALUE );
 
-        return new ResponseEntity<Object>( MessageUtils.jsonMessage(
+        return new ResponseEntity<>( MessageUtils.jsonMessage(
             Integer.toString( status.value() ), ex.getMessage() ), status );
     }
 }

=== modified file 'dhis-2/dhis-web/dhis-web-ohie/src/main/java/org/hisp/dhis/web/ohie/fred/webapi/v1/controller/FacilityController.java'
--- dhis-2/dhis-web/dhis-web-ohie/src/main/java/org/hisp/dhis/web/ohie/fred/webapi/v1/controller/FacilityController.java	2015-01-17 07:41:26 +0000
+++ dhis-2/dhis-web/dhis-web-ohie/src/main/java/org/hisp/dhis/web/ohie/fred/webapi/v1/controller/FacilityController.java	2015-09-03 03:11:47 +0000
@@ -221,7 +221,7 @@
         if ( fields.indexOf( ':' ) >= 0 )
         {
             Map<String, Object> properties = facility.getProperties();
-            facility.setProperties( new HashMap<String, Object>() );
+            facility.setProperties( new HashMap<>() );
 
             for ( String s : strings )
             {