← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 4560: Bug fix in code mapper

 

------------------------------------------------------------
revno: 4560
committer: Bob Jolliffe bobjolliffe@xxxxxxxxx
branch nick: dhis2
timestamp: Sun 2011-09-11 17:28:43 +0100
message:
  Bug fix in code mapper
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/AbstractNameableObject.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/AbstractNameableObject.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/AbstractNameableObject.java	2011-09-07 11:42:48 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/AbstractNameableObject.java	2011-09-11 16:28:43 +0000
@@ -135,6 +135,8 @@
             String code = object.getCode();
             int internalId = object.getId();
 
+            if (code == null) continue;
+            
             // NOTE: its really not good that duplicate codes are possible
             // Best we can do here is severe log and remove the item
             if ( map.containsKey( code ) )