← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 1099: Minor fixes.

 

------------------------------------------------------------
revno: 1099
committer: Lars Helge Oeverland larshelge@xxxxxxxxx
branch nick: trunk
timestamp: Tue 2009-11-24 08:55:36 +0100
message:
  Minor fixes.
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/completeness/DataSetCompletenessConfiguration.java
  dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/reporttable/jdbc/JDBCReportTableManager.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/completeness/DataSetCompletenessConfiguration.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/completeness/DataSetCompletenessConfiguration.java	2009-11-23 13:53:28 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/completeness/DataSetCompletenessConfiguration.java	2009-11-24 07:55:36 +0000
@@ -38,12 +38,7 @@
 {
     private Integer days;
     
-    private static transient Calendar cal;
-    
-    static
-    {
-        cal = Calendar.getInstance();
-    }
+    private Calendar cal = Calendar.getInstance();
     
     // -------------------------------------------------------------------------
     // Constructors
@@ -68,7 +63,7 @@
         
         if ( period != null )
         {
-            if ( days != null )
+            if ( days != null && cal != null )
             {
                 cal.clear();                
                 cal.setTime( period.getEndDate() );                                       

=== modified file 'dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/reporttable/jdbc/JDBCReportTableManager.java'
--- dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/reporttable/jdbc/JDBCReportTableManager.java	2009-11-23 17:27:52 +0000
+++ dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/reporttable/jdbc/JDBCReportTableManager.java	2009-11-24 07:55:36 +0000
@@ -94,13 +94,11 @@
         
         ReportTableStatement statement = new CreateReportTableStatement( reportTable, statementBuilder );
         
-        final String sql = statement.getStatement();
-        
-        log.debug( "Creating report table with SQL statement: '" + sql + "'" );
+        log.debug( "Creating report table with SQL statement: '" + statement.getStatement() + "'" );
         
         try
         {
-            holder.getStatement().executeUpdate( sql );
+            holder.getStatement().executeUpdate( statement.getStatement() );
         }
         catch ( Exception ex )
         {
@@ -118,11 +116,9 @@
         
         ReportTableStatement statement = new RemoveReportTableStatement( reportTable );
 
-        final String sql = statement.getStatement();
-        
         try
         {
-            holder.getStatement().executeUpdate( sql );
+            holder.getStatement().executeUpdate( statement.getStatement() );
         }
         catch ( Exception ex )
         {