← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 668: Minor fix.

 

------------------------------------------------------------
revno: 668
committer: Lars Helge Oeverland larshelge@xxxxxxxxx
branch nick: trunk
timestamp: Fri 2009-09-11 10:04:37 +0200
message:
  Minor fix.
modified:
  dhis-2/dhis-services/dhis-service-mapping/src/main/java/org/hisp/dhis/mapping/DefaultMappingService.java
  dhis-2/dhis-services/dhis-service-mapping/src/main/java/org/hisp/dhis/mapping/hibernate/HibernateMappingStore.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-mapping/src/main/java/org/hisp/dhis/mapping/DefaultMappingService.java'
--- dhis-2/dhis-services/dhis-service-mapping/src/main/java/org/hisp/dhis/mapping/DefaultMappingService.java	2009-09-11 07:09:25 +0000
+++ dhis-2/dhis-services/dhis-service-mapping/src/main/java/org/hisp/dhis/mapping/DefaultMappingService.java	2009-09-11 08:04:37 +0000
@@ -123,10 +123,8 @@
         OrganisationUnitLevel organisationUnitLevel = organisationUnitService
             .getOrganisationUnitLevel( organisationUnitLevelId );
 
-        Set<String> staticMapLayerPaths = null;
-
         Map map = new Map( name, mapLayerPath, type, organisationUnit, organisationUnitLevel, nameColumn,
-            longitude, latitude, zoom, staticMapLayerPaths );
+            longitude, latitude, zoom, null );
 
         return addMap( map );
     }
@@ -172,9 +170,7 @@
 
     public void deleteMapByMapLayerPath( String mapLayerPath )
     {
-        Map map = getMapByMapLayerPath( mapLayerPath );
-
-        deleteMap( map );
+        deleteMap( getMapByMapLayerPath( mapLayerPath ) );
     }
 
     public Map getMap( int id )
@@ -301,7 +297,7 @@
      */
     private String toString( String[] array )
     {
-        StringBuffer buffer = new StringBuffer( "{" );
+        final StringBuffer buffer = new StringBuffer( "{" );
         
         for ( int i = 0; i < array.length; i++ )
         {

=== modified file 'dhis-2/dhis-services/dhis-service-mapping/src/main/java/org/hisp/dhis/mapping/hibernate/HibernateMappingStore.java'
--- dhis-2/dhis-services/dhis-service-mapping/src/main/java/org/hisp/dhis/mapping/hibernate/HibernateMappingStore.java	2009-09-05 16:19:02 +0000
+++ dhis-2/dhis-services/dhis-service-mapping/src/main/java/org/hisp/dhis/mapping/hibernate/HibernateMappingStore.java	2009-09-11 08:04:37 +0000
@@ -170,7 +170,6 @@
         return (MapOrganisationUnitRelation) session.get( MapOrganisationUnitRelation.class, id );
     }
 
-    @SuppressWarnings("unchecked")
     public MapOrganisationUnitRelation getMapOrganisationUnitRelation( Map map, OrganisationUnit organisationUnit )
     {
         Session session = sessionFactory.getCurrentSession();