← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 5095: Fixed problem with catoptcombo code

 

------------------------------------------------------------
revno: 5095
committer: Bob Jolliffe bobjolliffe@xxxxxxxxx
branch nick: dhis2
timestamp: Thu 2011-11-03 10:48:44 +0000
message:
  Fixed problem with catoptcombo code
  Minor change to logging to conform to dhis norm.
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElementCategoryOptionCombo.java
  dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/common/IdentityPopulator.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/dataelement/DataElementCategoryOptionCombo.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElementCategoryOptionCombo.java	2011-09-27 17:15:00 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElementCategoryOptionCombo.java	2011-11-03 10:48:44 +0000
@@ -278,18 +278,6 @@
     }
 
     @Override
-    public String getCode()
-    {
-        return getName();
-    }
-
-    @Override
-    public void setCode( String code )
-    {
-        throw new UnsupportedOperationException( "Cannot set code on DataElementCategoryOptionCombo: " + code );
-    }
-
-    @Override
     public String getAlternativeName()
     {
         return getName();

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/common/IdentityPopulator.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/common/IdentityPopulator.java	2011-11-03 10:11:33 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/common/IdentityPopulator.java	2011-11-03 10:48:44 +0000
@@ -125,33 +125,30 @@
                     {
                         log.info( count + " uuids updated on " + table );
                     }
-                    
-                    Timestamp now = new Timestamp (new Date().getTime());
-                    
+
+                    Timestamp now = new Timestamp( new Date().getTime() );
+
                     resultSet = statement.executeQuery( "SELECT * from " + table + " WHERE lastUpdated IS NULL" );
                     while ( resultSet.next() )
                     {
                         ++count;
-                        resultSet.updateTimestamp( "lastUpdated", now);
+                        resultSet.updateTimestamp( "lastUpdated", now );
                         resultSet.updateRow();
                     }
                     if ( count > 0 )
                     {
                         log.info( count + " timestamps updated on " + table );
                     }
-                    
+
                 } catch ( SQLException ex )
                 {
-                    Logger.getLogger( IdentityPopulator.class.getName() ).log( Level.SEVERE, null, ex );
+                    log.info( "Problem updating " + table + ": ", ex );
                 }
             }
-        } catch ( SQLException ex )
-        {
-            Logger.getLogger( IdentityPopulator.class.getName() ).log( Level.SEVERE, null, ex );
-            return;
         } finally
         {
-            if (statement !=null) {
+            if ( statement != null )
+            {
                 statement.close();
             }
         }