dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #31023
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 15777: Minor fix
------------------------------------------------------------
revno: 15777
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2014-06-20 11:09:40 +0200
message:
Minor fix
modified:
dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/filter/DefaultFieldFilterService.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/filter/DefaultFieldFilterService.java'
--- dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/filter/DefaultFieldFilterService.java 2014-06-19 13:15:50 +0000
+++ dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/filter/DefaultFieldFilterService.java 2014-06-20 09:09:40 +0000
@@ -60,10 +60,10 @@
@Autowired
private SchemaService schemaService;
- @Autowired( required = false )
+ @Autowired(required = false)
private Set<PresetProvider> presetProviders = Sets.newHashSet();
- @Autowired( required = false )
+ @Autowired(required = false)
private Set<NodeTransformer> nodeTransformers = Sets.newHashSet();
private ImmutableMap<String, PresetProvider> presets = ImmutableMap.of();
@@ -95,7 +95,7 @@
@Override
public <T extends IdentifiableObject> CollectionNode filter( Class<?> klass, List<T> objects, List<String> fieldList )
{
- if ( objects == null )
+ if ( objects == null || objects.isEmpty() )
{
return null;
}
@@ -130,7 +130,7 @@
return collectionNode;
}
- @SuppressWarnings( "unchecked" )
+ @SuppressWarnings("unchecked")
private ComplexNode buildComplexNode( FieldMap fieldMap, Class<?> klass, Object object )
{
Schema schema = schemaService.getDynamicSchema( klass );