← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 2623: Fixed potential nullpointerexception for save datamart operation

 

------------------------------------------------------------
revno: 2623
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2011-01-18 16:24:46 +0100
message:
  Fixed potential nullpointerexception for save datamart operation
modified:
  dhis-2/dhis-web/dhis-web-datamart/src/main/java/org/hisp/dhis/datamart/action/SaveDataMartExportAction.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-web/dhis-web-datamart/src/main/java/org/hisp/dhis/datamart/action/SaveDataMartExportAction.java'
--- dhis-2/dhis-web/dhis-web-datamart/src/main/java/org/hisp/dhis/datamart/action/SaveDataMartExportAction.java	2011-01-06 09:03:29 +0000
+++ dhis-2/dhis-web/dhis-web-datamart/src/main/java/org/hisp/dhis/datamart/action/SaveDataMartExportAction.java	2011-01-18 15:24:46 +0000
@@ -30,6 +30,7 @@
 import static org.hisp.dhis.system.util.ConversionUtils.getIntegerCollection;
 import static org.hisp.dhis.system.util.ConversionUtils.getSet;
 
+import java.util.ArrayList;
 import java.util.Collection;
 
 import org.hisp.dhis.dataelement.DataElementService;
@@ -106,28 +107,28 @@
         this.name = name;
     }
     
-    private Collection<String> selectedDataElements;
+    private Collection<String> selectedDataElements = new ArrayList<String>();
     
     public void setSelectedDataElements( Collection<String> selectedDataElements )
     {
         this.selectedDataElements = selectedDataElements;
     }
 
-    private Collection<String> selectedIndicators;
+    private Collection<String> selectedIndicators = new ArrayList<String>();
 
     public void setSelectedIndicators( Collection<String> selectedIndicators )
     {
         this.selectedIndicators = selectedIndicators;
     }
 
-    private Collection<String> selectedPeriods; 
+    private Collection<String> selectedPeriods = new ArrayList<String>(); 
     
     public void setSelectedPeriods( Collection<String> selectedPeriods )
     {
         this.selectedPeriods = selectedPeriods;
     }
 
-    private Collection<String> selectedOrganisationUnits;
+    private Collection<String> selectedOrganisationUnits = new ArrayList<String>();
     
     public void setSelectedOrganisationUnits( Collection<String> selectedOrganisationUnits )
     {