← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 7465: Codestyle

 

------------------------------------------------------------
revno: 7465
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Sat 2012-06-30 18:01:32 +0200
message:
  Codestyle
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	2012-06-26 09:27:57 +0000
+++ dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/deletion/DefaultDeletionManager.java	2012-06-30 16:01:32 +0000
@@ -86,6 +86,8 @@
 
             for ( DeletionHandler handler : handlers )
             {
+                log.debug( "Check if allowed using " + currentHandler + " for class " + className );
+                
                 currentHandler = handler.getClass().getSimpleName();
 
                 Object allow = allowMethod.invoke( handler, object );
@@ -99,15 +101,18 @@
                     throw new DeleteNotAllowedException( DeleteNotAllowedException.ERROR_ASSOCIATED_BY_OTHER_OBJECTS, message );
                 }
             }
-        } catch ( NoSuchMethodException e )
+        }
+        catch ( NoSuchMethodException e )
         {
             log.error( "Method '" + allowMethodName + "' does not exist on class '" + clazz + "'", e );
             return;
-        } catch ( IllegalAccessException ex )
+        }
+        catch ( IllegalAccessException ex )
         {
-            log.error( "Method '" + allowMethodName + "' could not be invoked on DeletionHandler '" + currentHandler + "'", ex );
+            log.error( "Method '" + allowMethodName + "' can not be invoked on DeletionHandler '" + currentHandler + "'", ex );
             return;
-        } catch ( InvocationTargetException ex )
+        }
+        catch ( InvocationTargetException ex )
         {
             log.error( "Method '" + allowMethodName + "' threw exception on DeletionHandler '" + currentHandler + "'", ex );
             return;
@@ -127,9 +132,12 @@
             {
                 currentHandler = handler.getClass().getSimpleName();
 
+                log.debug( "Deleting object using " + currentHandler + " for class " + className );
+                
                 deleteMethod.invoke( handler, object );
             }
-        } catch ( Exception ex )
+        } 
+        catch ( Exception ex )
         {
             log.error( "Failed to invoke method " + deleteMethodName + " on DeletionHandler '" + currentHandler + "'", ex );
             return;