← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 22171: minor

 

------------------------------------------------------------
revno: 22171
committer: Morten Olav Hansen <morten@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2016-03-08 12:30:26 +0700
message:
  minor
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/preheat/Preheat.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/preheat/Preheat.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/preheat/Preheat.java	2016-03-03 03:10:04 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/preheat/Preheat.java	2016-03-08 05:30:26 +0000
@@ -250,8 +250,13 @@
 
     public static boolean isDefaultClass( IdentifiableObject object )
     {
-        return (DataElementCategory.class.isInstance( object ) || DataElementCategoryOption.class.isInstance( object )
-            || DataElementCategoryCombo.class.isInstance( object ));
+        return object != null && isDefaultClass( object.getClass() );
+    }
+
+    public static boolean isDefaultClass( Class<?> klass )
+    {
+        return (DataElementCategory.class.isAssignableFrom( klass ) || DataElementCategoryOption.class.isInstance( klass )
+            || DataElementCategoryCombo.class.isInstance( klass ));
     }
 
     public static boolean isDefault( IdentifiableObject object )