← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 17706: Upgraded to quick 1.11. Fixed issue with incorrect number of imported values being reported when ...

 

------------------------------------------------------------
revno: 17706
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2014-12-16 11:10:23 +0100
message:
  Upgraded to quick 1.11. Fixed issue with incorrect number of imported values being reported when import contained duplicates.
modified:
  dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/datavalueset/DefaultDataValueSetService.java
  dhis-2/dhis-support/dhis-support-test/src/main/java/org/hisp/dhis/mock/batchhandler/MockBatchHandler.java
  dhis-2/pom.xml


--
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-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/datavalueset/DefaultDataValueSetService.java'
--- dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/datavalueset/DefaultDataValueSetService.java	2014-12-09 07:25:53 +0000
+++ dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/datavalueset/DefaultDataValueSetService.java	2014-12-16 10:10:23 +0000
@@ -856,10 +856,11 @@
                 {
                     if ( !dryRun && !internalValue.isNullValue() )
                     {
-                        batchHandler.addObject( internalValue );
+                        if ( batchHandler.addObject( internalValue ) )
+                        {
+                            importCount++;
+                        }
                     }
-
-                    importCount++;
                 }
             }
         }

=== modified file 'dhis-2/dhis-support/dhis-support-test/src/main/java/org/hisp/dhis/mock/batchhandler/MockBatchHandler.java'
--- dhis-2/dhis-support/dhis-support-test/src/main/java/org/hisp/dhis/mock/batchhandler/MockBatchHandler.java	2014-10-13 17:59:47 +0000
+++ dhis-2/dhis-support/dhis-support-test/src/main/java/org/hisp/dhis/mock/batchhandler/MockBatchHandler.java	2014-12-16 10:10:23 +0000
@@ -65,9 +65,9 @@
     }
 
     @Override
-    public void addObject( T object )
+    public boolean addObject( T object )
     {
-        inserts.add( object );
+        return inserts.add( object );
     }
 
     @Override

=== modified file 'dhis-2/pom.xml'
--- dhis-2/pom.xml	2014-12-16 09:11:08 +0000
+++ dhis-2/pom.xml	2014-12-16 10:10:23 +0000
@@ -552,7 +552,7 @@
       <dependency>
         <groupId>org.amplecode</groupId>
         <artifactId>quick</artifactId>
-        <version>1.10</version>
+        <version>1.11</version>
       </dependency>
 	  <dependency>
 	    <groupId>org.amplecode</groupId>