dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #30862
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 15695: Nullpointer check
------------------------------------------------------------
revno: 15695
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2014-06-16 12:45:17 +0200
message:
Nullpointer check
modified:
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataelement/DefaultDataElementCategoryService.java
--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk
Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataelement/DefaultDataElementCategoryService.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataelement/DefaultDataElementCategoryService.java 2014-04-28 15:43:02 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataelement/DefaultDataElementCategoryService.java 2014-06-16 10:45:17 +0000
@@ -639,7 +639,7 @@
for ( DataElement dataElement : dataElements )
{
- if ( dataElement.getCategoryCombo() != null )
+ if ( dataElement != null && dataElement.getCategoryCombo() != null )
{
if ( !dataElement.getCategoryCombo().isDefault() && includeTotals )
{
@@ -675,7 +675,7 @@
for ( DataElement dataElement : dataElements )
{
- if ( dataElement.getCategoryCombo() != null )
+ if ( dataElement != null && dataElement.getCategoryCombo() != null )
{
for ( DataElementCategoryOptionCombo categoryOptionCombo : dataElement.getCategoryCombo().getOptionCombos() )
{