← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 18031: Codestyle

 

------------------------------------------------------------
revno: 18031
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2015-01-16 18:29:56 +0100
message:
  Codestyle
modified:
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-appmanager/src/main/java/org/hisp/dhis/appmanager/action/AppListAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-appmanager/src/main/java/org/hisp/dhis/appmanager/action/AppSettingsAction.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-web/dhis-web-maintenance/dhis-web-maintenance-appmanager/src/main/java/org/hisp/dhis/appmanager/action/AppListAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-appmanager/src/main/java/org/hisp/dhis/appmanager/action/AppListAction.java	2014-08-15 07:40:20 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-appmanager/src/main/java/org/hisp/dhis/appmanager/action/AppListAction.java	2015-01-16 17:29:56 +0000
@@ -61,9 +61,6 @@
         return appList;
     }
 
-    //TODO create settings to set for external server like Apache2/nginx
-    //TODO Should be a per-app setting
-    
     private String appBaseUrl;
 
     public String getAppBaseUrl()

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-appmanager/src/main/java/org/hisp/dhis/appmanager/action/AppSettingsAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-appmanager/src/main/java/org/hisp/dhis/appmanager/action/AppSettingsAction.java	2014-07-08 16:54:08 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-appmanager/src/main/java/org/hisp/dhis/appmanager/action/AppSettingsAction.java	2015-01-16 17:29:56 +0000
@@ -67,9 +67,10 @@
     {
         appFolderPath = appManager.getAppFolderPath();
 
-        if ( null == appFolderPath || appFolderPath.isEmpty() )
+        if ( appFolderPath == null || appFolderPath.isEmpty() )
         {
             String realPath = ServletActionContext.getServletContext().getRealPath( "/" );
+            
             if ( realPath.endsWith( "/" ) || realPath.endsWith( "\\" ) )
             {
                 appFolderPath = realPath + "apps";
@@ -97,7 +98,7 @@
     {
         appBaseUrl = appManager.getAppBaseUrl();
 
-        if ( null == appBaseUrl || appBaseUrl.isEmpty() )
+        if ( appBaseUrl == null || appBaseUrl.isEmpty() )
         {
             HttpServletRequest request = ServletActionContext.getRequest();
             String realPath = ServletActionContext.getServletContext().getRealPath( "/" );
@@ -108,12 +109,12 @@
             if ( !contextPath.isEmpty() )
             {
                 appBaseUrl = baseUrl.substring( 0, baseUrl.length() - 1 ) + request.getContextPath() + "/"
-                    + ((appsPath.replace( "//", "/" )).replace( realPath, "" )).replace( '\\', '/' );
+                    + ( ( appsPath.replace( "//", "/" ) ).replace( realPath, "" ) ).replace( '\\', '/' );
             }
             else
             {
                 appBaseUrl = baseUrl.substring( 0, baseUrl.length() - 1 )
-                    + ((appsPath.replace( "//", "/" )).replace( realPath, "" )).replace( '\\', '/' );
+                    + ( ( appsPath.replace( "//", "/" ) ).replace( realPath, "" ) ).replace( '\\', '/' );
             }
 
             appManager.setAppBaseUrl( appBaseUrl );