dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #40798
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 20756: minor fix
------------------------------------------------------------
revno: 20756
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2015-10-19 16:33:44 +0700
message:
minor fix
modified:
dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/importers/DefaultIdentifiableObjectImporter.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-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/importers/DefaultIdentifiableObjectImporter.java'
--- dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/importers/DefaultIdentifiableObjectImporter.java 2015-10-08 14:12:50 +0000
+++ dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/importers/DefaultIdentifiableObjectImporter.java 2015-10-19 09:33:44 +0000
@@ -1176,11 +1176,7 @@
if ( !Attribute.class.isAssignableFrom( object.getClass() ) )
{
Set<AttributeValue> attributeValues = extractAttributeValues( object );
-
- for ( AttributeValue attributeValue : attributeValues )
- {
- attributeService.deleteAttributeValue( attributeValue );
- }
+ attributeValues.forEach( attributeService::deleteAttributeValue );
}
}
@@ -1224,11 +1220,7 @@
private void deleteDataElementOperands( T object, String fieldName )
{
Collection<DataElementOperand> dataElementOperands = extractDataElementOperands( object, fieldName );
-
- for ( DataElementOperand dataElementOperand : dataElementOperands )
- {
- dataElementOperandService.deleteDataElementOperand( dataElementOperand );
- }
+ dataElementOperands.forEach( dataElementOperandService::deleteDataElementOperand );
}
private List<ProgramTrackedEntityAttribute> extractProgramTrackedEntityAttributes( T object )