← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 18799: App installation, null checks

 

------------------------------------------------------------
revno: 18799
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2015-04-03 09:01:36 +0200
message:
  App installation, null checks
modified:
  dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/appmanager/DefaultAppManager.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-core/src/main/java/org/hisp/dhis/appmanager/DefaultAppManager.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/appmanager/DefaultAppManager.java	2015-02-19 09:18:17 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/appmanager/DefaultAppManager.java	2015-04-03 07:01:36 +0000
@@ -149,10 +149,13 @@
         File updateManifest = new File( dest + File.separator + "manifest.webapp" );
         App installedApp = mapper.readValue( updateManifest, App.class );
 
-        if ( installedApp.getActivities().getDhis().getHref().equals( "*" ) )
+        if ( installedApp.getActivities() != null && installedApp.getActivities().getDhis() != null )
         {
-            installedApp.getActivities().getDhis().setHref( rootPath );
-            mapper.writeValue( updateManifest, installedApp );
+            if ( "*".equals( installedApp.getActivities().getDhis().getHref() ) )
+            {
+                installedApp.getActivities().getDhis().setHref( rootPath );
+                mapper.writeValue( updateManifest, installedApp );
+            }
         }
 
         zip.close();