← Back to team overview

dhis2-devs team mailing list archive

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

 

------------------------------------------------------------
revno: 17070
committer: Halvdan Hoem Grelland <halvdanhg@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2014-10-13 12:59:46 +0200
message:
  minor
modified:
  dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/gml/DefaultGmlImportService.java
  dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/gml/GmlConversionUtils.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/gml/DefaultGmlImportService.java'
--- dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/gml/DefaultGmlImportService.java	2014-10-10 14:07:30 +0000
+++ dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/gml/DefaultGmlImportService.java	2014-10-13 10:59:46 +0000
@@ -38,7 +38,7 @@
 import org.hisp.dhis.organisationunit.OrganisationUnitService;
 import org.hisp.dhis.scheduling.TaskId;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.core.io.DefaultResourceLoader;
+import org.springframework.core.io.ClassPathResource;
 import org.springframework.transaction.annotation.Transactional;
 
 import javax.xml.transform.TransformerException;
@@ -59,7 +59,6 @@
     implements GmlImportService
 {
     private static final String GML_TO_DXF_TRANSFORM = "gml/gml2dxf2.xsl";
-    private static final ClassLoader CL = new DefaultResourceLoader().getClassLoader();
 
     // -------------------------------------------------------------------------
     // Dependencies
@@ -145,7 +144,7 @@
         throws IOException, TransformerException
     {
         StreamSource gml = new StreamSource( input );
-        StreamSource xsl = new StreamSource( CL.getResourceAsStream( GML_TO_DXF_TRANSFORM ) );
+        StreamSource xsl = new StreamSource( new ClassPathResource( GML_TO_DXF_TRANSFORM ).getInputStream() );
 
         ByteArrayOutputStream output = new ByteArrayOutputStream();
 
@@ -156,5 +155,4 @@
 
         return new ByteArrayInputStream( output.toByteArray() );
     }
-
 }

=== modified file 'dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/gml/GmlConversionUtils.java'
--- dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/gml/GmlConversionUtils.java	2014-10-10 11:19:52 +0000
+++ dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/gml/GmlConversionUtils.java	2014-10-13 10:59:46 +0000
@@ -35,7 +35,7 @@
 import java.util.Locale;
 
 /**
- * Methods to parse various GML coordinate formats and output the DHIS 2 internal representation
+ * Methods to parse various GML coordinate formats and output the DHIS 2 internal representation.
  * @author Halvdan Hoem Grelland
  */
 public class GmlConversionUtils