← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 15768: minor fixes

 

------------------------------------------------------------
revno: 15768
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2014-06-19 15:15:50 +0200
message:
  minor fixes
modified:
  dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/filter/DefaultFieldFilterService.java
  dhis-2/dhis-services/dhis-service-importexport/src/test/resources/transforms.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/filter/DefaultFieldFilterService.java'
--- dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/filter/DefaultFieldFilterService.java	2014-06-19 12:20:10 +0000
+++ dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/filter/DefaultFieldFilterService.java	2014-06-19 13:15:50 +0000
@@ -33,8 +33,8 @@
 import com.google.common.collect.Lists;
 import com.google.common.collect.Sets;
 import org.hisp.dhis.common.IdentifiableObject;
+import org.hisp.dhis.common.PresetProvider;
 import org.hisp.dhis.node.NodeTransformer;
-import org.hisp.dhis.common.PresetProvider;
 import org.hisp.dhis.node.types.CollectionNode;
 import org.hisp.dhis.node.types.ComplexNode;
 import org.hisp.dhis.node.types.SimpleNode;
@@ -66,21 +66,21 @@
     @Autowired( required = false )
     private Set<NodeTransformer> nodeTransformers = Sets.newHashSet();
 
-    private ImmutableMap<String, PresetProvider> presets;
+    private ImmutableMap<String, PresetProvider> presets = ImmutableMap.of();
 
-    private ImmutableMap<String, NodeTransformer> transformers;
+    private ImmutableMap<String, NodeTransformer> transformers = ImmutableMap.of();
 
     @PostConstruct
     public void init()
     {
-        ImmutableMap.Builder<String, PresetProvider> presetProviderBuilder = ImmutableMap.builder();
+        ImmutableMap.Builder<String, PresetProvider> presetBuilder = ImmutableMap.builder();
 
         for ( PresetProvider presetProvider : presetProviders )
         {
-            presetProviderBuilder.put( presetProvider.name(), presetProvider );
+            presetBuilder.put( presetProvider.name(), presetProvider );
         }
 
-        presets = presetProviderBuilder.build();
+        presets = presetBuilder.build();
 
         ImmutableMap.Builder<String, NodeTransformer> transformerBuilder = ImmutableMap.builder();
 
@@ -172,7 +172,7 @@
             {
                 NodeTransformer transformer = fieldValue.getNodeTransformer();
 
-                if ( transformer != null && transformer.canTransform( property, returnValue ) )
+                if ( transformer.canTransform( property, returnValue ) )
                 {
                     complexNode.addChild( transformer.transform( property, returnValue ) );
                 }

=== modified file 'dhis-2/dhis-services/dhis-service-importexport/src/test/resources/transforms.xml'
--- dhis-2/dhis-services/dhis-service-importexport/src/test/resources/transforms.xml	2014-06-19 12:20:10 +0000
+++ dhis-2/dhis-services/dhis-service-importexport/src/test/resources/transforms.xml	2014-06-19 13:15:50 +0000
@@ -2,7 +2,7 @@
 <transforms>
     <transform tag="change">
         <xslt>changeroot.xsl</xslt>
-        <description>Simple test nodeTransformer</description>
+        <description>Simple test transformer</description>
     </transform>
     <transform tag="excel_0.1alpha">
         <xslt>xl2dxf.xsl</xslt>