← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 4365: Reduced code.

 

------------------------------------------------------------
revno: 4365
committer: Hieu <hieu.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2011-08-19 15:29:01 +0700
message:
  Reduced code.
modified:
  dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/commons/action/GetPingAction.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-commons/src/main/java/org/hisp/dhis/commons/action/GetPingAction.java'
--- dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/commons/action/GetPingAction.java	2011-08-16 12:16:33 +0000
+++ dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/commons/action/GetPingAction.java	2011-08-19 08:29:01 +0000
@@ -28,7 +28,6 @@
  */
 
 import org.hisp.dhis.user.CurrentUserService;
-import org.hisp.dhis.user.User;
 
 import com.opensymphony.xwork2.Action;
 
@@ -66,16 +65,7 @@
 
     public String execute()
     {
-        User user = currentUserService.getCurrentUser();
-
-        if ( user == null )
-        {
-            loggedIn = false;
-        }
-        else
-        {
-            loggedIn = true;
-        }
+        loggedIn = !(currentUserService.getCurrentUser() == null);
 
         return SUCCESS;
     }