← Back to team overview

dhis2-devs team mailing list archive

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

 

------------------------------------------------------------
revno: 6737
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2012-04-25 13:33:50 +0200
message:
  Codestyle
modified:
  dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/startup/StartupListener.java
  dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/velocity/VelocityManager.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/startup/StartupListener.java'
--- dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/startup/StartupListener.java	2012-04-08 11:35:58 +0000
+++ dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/startup/StartupListener.java	2012-04-25 11:33:50 +0000
@@ -46,12 +46,13 @@
 public class StartupListener
     implements ServletContextListener
 {
-    
     private static final Log LOG = LogFactory.getLog( StartupListener.class );
+
     // -------------------------------------------------------------------------
     // ServletContextListener implementation
     // -------------------------------------------------------------------------
 
+    @Override
     public void contextInitialized( ServletContextEvent event )
     {
         WebApplicationContext applicationContext = WebApplicationContextUtils.getWebApplicationContext( event
@@ -70,19 +71,23 @@
         }
     }
 
+    @Override
     public void contextDestroyed( ServletContextEvent event )
     {
-        // cleanup jdbc drivers
         Enumeration<Driver> drivers = DriverManager.getDrivers();
-        while (drivers.hasMoreElements()) {
+        
+        while ( drivers.hasMoreElements() )
+        {
             Driver driver = drivers.nextElement();
-            try {
-                DriverManager.deregisterDriver(driver);
-                LOG.info("deregistering jdbc driver: " + driver);
-            } catch (SQLException e) {
-                LOG.info("Error deregistering driver " + driver + " :" + e.getMessage());
+            try
+            {
+                DriverManager.deregisterDriver( driver );
+                LOG.info( "De-registering jdbc driver: " + driver );
+            }
+            catch ( SQLException e )
+            {
+                LOG.info( "Error de-registering driver " + driver + " :" + e.getMessage() );
             }
         }
-        
     }
 }

=== modified file 'dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/velocity/VelocityManager.java'
--- dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/velocity/VelocityManager.java	2012-01-06 09:25:10 +0000
+++ dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/velocity/VelocityManager.java	2012-04-25 11:33:50 +0000
@@ -80,7 +80,8 @@
             return writer.toString();
 
             // TODO include encoder in context
-        } catch ( Exception ex )
+        } 
+        catch ( Exception ex )
         {
             throw new RuntimeException( "Failed to merge velocity template", ex );
         }