dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #27510
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 13697: Cleanup
------------------------------------------------------------
revno: 13697
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2014-01-13 13:30:11 +0100
message:
Cleanup
modified:
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/appmanager/DefaultAppManager.java
dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/DefaultMetaDataDependencyService.java
dhis-2/dhis-services/dhis-service-dxf2/src/test/java/org/hisp/dhis/dxf2/events/RegistrationMultiEventsServiceTest.java
dhis-2/dhis-services/dhis-service-dxf2/src/test/java/org/hisp/dhis/dxf2/events/RegistrationSingleEventServiceTest.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-services/dhis-service-core/src/main/java/org/hisp/dhis/appmanager/DefaultAppManager.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/appmanager/DefaultAppManager.java 2014-01-07 12:49:31 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/appmanager/DefaultAppManager.java 2014-01-13 12:30:11 +0000
@@ -28,8 +28,16 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-import com.fasterxml.jackson.databind.DeserializationFeature;
-import com.fasterxml.jackson.databind.ObjectMapper;
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.zip.ZipEntry;
+import java.util.zip.ZipFile;
+
+import javax.annotation.PostConstruct;
+
import org.apache.ant.compress.taskdefs.Unzip;
import org.apache.commons.io.FileUtils;
import org.apache.commons.lang.StringUtils;
@@ -38,18 +46,9 @@
import org.hisp.dhis.datavalue.DefaultDataValueService;
import org.hisp.dhis.setting.SystemSettingManager;
import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.util.FileCopyUtils;
-import org.springframework.util.StreamUtils;
-import javax.annotation.PostConstruct;
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.zip.ZipEntry;
-import java.util.zip.ZipFile;
-import java.util.zip.ZipInputStream;
+import com.fasterxml.jackson.databind.DeserializationFeature;
+import com.fasterxml.jackson.databind.ObjectMapper;
/**
* @author Saptarshi Purkayastha
=== modified file 'dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/DefaultMetaDataDependencyService.java'
--- dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/DefaultMetaDataDependencyService.java 2013-12-19 08:23:37 +0000
+++ dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/DefaultMetaDataDependencyService.java 2014-01-13 12:30:11 +0000
@@ -69,7 +69,7 @@
{
private static final Log log = LogFactory.getLog( DefaultMetaDataDependencyService.class );
- private final Class[] specialCases = new Class[]{ DataElement.class, Indicator.class, OrganisationUnit.class, ValidationRule.class };
+ private final Class<?>[] specialCases = new Class<?>[]{ DataElement.class, Indicator.class, OrganisationUnit.class, ValidationRule.class };
//-------------------------------------------------------------------------------------------------------
// Dependencies
@@ -91,6 +91,7 @@
// Get MetaData dependency Map
//--------------------------------------------------------------------------
+ @SuppressWarnings("unchecked")
public Map<String, List<IdentifiableObject>> getIdentifiableObjectMap( Map<String, Object> identifiableObjectUidMap )
{
Map<String, List<IdentifiableObject>> identifiableObjectMap = new HashMap<String, List<IdentifiableObject>>();
@@ -101,7 +102,7 @@
for ( Map.Entry<Class<? extends IdentifiableObject>, String> entry : ExchangeClasses.getExportMap().entrySet() )
{
- if ( className.equals( (entry.getValue() + "_all") ) )
+ if ( className.equals( ( entry.getValue() + "_all" ) ) )
{
Boolean o = (Boolean) identifiableObjectUidMap.get( className );
@@ -289,7 +290,7 @@
private boolean isSpecialCase( IdentifiableObject identifiableObject )
{
- for ( Class specialCase : specialCases )
+ for ( Class<?> specialCase : specialCases )
{
if ( identifiableObject.getClass().equals( specialCase ) )
{
@@ -395,9 +396,9 @@
{
if ( method.isAnnotationPresent( JsonView.class ) )
{
- Class[] viewClasses = method.getAnnotation( JsonView.class ).value();
+ Class<?>[] viewClasses = method.getAnnotation( JsonView.class ).value();
- for ( Class viewClass : viewClasses )
+ for ( Class<?> viewClass : viewClasses )
{
if ( viewClass.equals( ExportView.class ) )
{
=== modified file 'dhis-2/dhis-services/dhis-service-dxf2/src/test/java/org/hisp/dhis/dxf2/events/RegistrationMultiEventsServiceTest.java'
--- dhis-2/dhis-services/dhis-service-dxf2/src/test/java/org/hisp/dhis/dxf2/events/RegistrationMultiEventsServiceTest.java 2013-12-30 11:47:50 +0000
+++ dhis-2/dhis-services/dhis-service-dxf2/src/test/java/org/hisp/dhis/dxf2/events/RegistrationMultiEventsServiceTest.java 2014-01-13 12:30:11 +0000
@@ -84,12 +84,6 @@
private Person personMaleA;
- private Person personMaleB;
-
- private Person personFemaleA;
-
- private Person personFemaleB;
-
private OrganisationUnit organisationUnitA;
private OrganisationUnit organisationUnitB;
@@ -127,9 +121,6 @@
identifiableObjectManager.save( femaleB );
personMaleA = personService.getPerson( maleA );
- personMaleB = personService.getPerson( maleB );
- personFemaleA = personService.getPerson( femaleA );
- personFemaleB = personService.getPerson( femaleB );
dataElementA = createDataElement( 'A' );
dataElementB = createDataElement( 'B' );
=== modified file 'dhis-2/dhis-services/dhis-service-dxf2/src/test/java/org/hisp/dhis/dxf2/events/RegistrationSingleEventServiceTest.java'
--- dhis-2/dhis-services/dhis-service-dxf2/src/test/java/org/hisp/dhis/dxf2/events/RegistrationSingleEventServiceTest.java 2013-12-30 11:47:50 +0000
+++ dhis-2/dhis-services/dhis-service-dxf2/src/test/java/org/hisp/dhis/dxf2/events/RegistrationSingleEventServiceTest.java 2014-01-13 12:30:11 +0000
@@ -82,9 +82,6 @@
private Patient femaleB;
private Person personMaleA;
- private Person personMaleB;
- private Person personFemaleA;
- private Person personFemaleB;
private OrganisationUnit organisationUnitA;
private OrganisationUnit organisationUnitB;
@@ -114,9 +111,6 @@
identifiableObjectManager.save( femaleB );
personMaleA = personService.getPerson( maleA );
- personMaleB = personService.getPerson( maleB );
- personFemaleA = personService.getPerson( femaleA );
- personFemaleB = personService.getPerson( femaleB );
dataElementA = createDataElement( 'A' );
dataElementA.setType( DataElement.VALUE_TYPE_INT );