dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #26784
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 13248: Null checks in identifiable object manager
------------------------------------------------------------
revno: 13248
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2013-12-16 12:09:13 +0100
message:
Null checks in identifiable object manager
modified:
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/common/DefaultIdentifiableObjectManager.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/common/DefaultIdentifiableObjectManager.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/common/DefaultIdentifiableObjectManager.java 2013-10-30 12:51:03 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/common/DefaultIdentifiableObjectManager.java 2013-12-16 11:09:13 +0000
@@ -73,14 +73,20 @@
for ( GenericIdentifiableObjectStore<IdentifiableObject> store : identifiableObjectStores )
{
- identifiableObjectStoreMap.put( store.getClazz(), store );
+ if ( store != null && store.getClass() != null )
+ {
+ identifiableObjectStoreMap.put( store.getClazz(), store );
+ }
}
nameableObjectStoreMap = new HashMap<Class<NameableObject>, GenericNameableObjectStore<NameableObject>>();
for ( GenericNameableObjectStore<NameableObject> store : nameableObjectStores )
{
- nameableObjectStoreMap.put( store.getClazz(), store );
+ if ( store != null && store.getClass() != null )
+ {
+ nameableObjectStoreMap.put( store.getClazz(), store );
+ }
}
}