← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 832: Fixed bug in DeletionHandler.

 

------------------------------------------------------------
revno: 832
committer: Lars Helge Oeverland larshelge@xxxxxxxxx
branch nick: trunk
timestamp: Wed 2009-10-07 18:27:57 +0200
message:
  Fixed bug in DeletionHandler.
modified:
  dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/deletion/DefaultDeletionManager.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-support/dhis-support-system/src/main/java/org/hisp/dhis/system/deletion/DefaultDeletionManager.java'
--- dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/deletion/DefaultDeletionManager.java	2009-03-03 16:46:36 +0000
+++ dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/deletion/DefaultDeletionManager.java	2009-10-07 16:27:57 +0000
@@ -36,6 +36,7 @@
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.hisp.dhis.common.DeleteNotAllowedException;
+import org.hisp.dhis.source.Source;
 
 /**
  * @author Lars Helge Overland
@@ -70,9 +71,9 @@
     {
         Class clazz = object.getClass();
         
-        if ( !clazz.getSuperclass().equals( Object.class ) )
+        if ( clazz.getSuperclass().equals( Source.class ) )
         {
-            clazz = clazz.getSuperclass();
+            clazz = clazz.getSuperclass(); // Set class of Source implementations to Source 
         }
         
         String className = clazz.getSimpleName();