guacamole-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mjum...@apache.org
Subject [09/13] incubator-guacamole-client git commit: GUACAMOLE-47: Remove unnecessary checks of getRemoteHost/getRemoteAddr.
Date Sat, 28 Jan 2017 18:52:20 GMT
GUACAMOLE-47: Remove unnecessary checks of getRemoteHost/getRemoteAddr.


Project: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/commit/20a61fc8
Tree: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/tree/20a61fc8
Diff: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/diff/20a61fc8

Branch: refs/heads/master
Commit: 20a61fc84589f0dc4a2f3e8e37ed026f8fe40d8c
Parents: 3fadac6
Author: Nick Couchman <nick.couchman@yahoo.com>
Authored: Sat Jan 28 13:10:49 2017 -0500
Committer: Nick Couchman <nick.couchman@yahoo.com>
Committed: Sat Jan 28 13:40:09 2017 -0500

----------------------------------------------------------------------
 .../main/java/org/apache/guacamole/rest/APIRequest.java   | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/blob/20a61fc8/guacamole/src/main/java/org/apache/guacamole/rest/APIRequest.java
----------------------------------------------------------------------
diff --git a/guacamole/src/main/java/org/apache/guacamole/rest/APIRequest.java b/guacamole/src/main/java/org/apache/guacamole/rest/APIRequest.java
index bdef6f4..ec977cc 100644
--- a/guacamole/src/main/java/org/apache/guacamole/rest/APIRequest.java
+++ b/guacamole/src/main/java/org/apache/guacamole/rest/APIRequest.java
@@ -69,16 +69,10 @@ public class APIRequest extends HttpServletRequestWrapper {
         super(request);
 
         // Grab the remote host info.
-        if (request.getRemoteHost() != null && !request.getRemoteHost().isEmpty())
-            this.remoteHost = request.getRemoteHost();
-        else
-            this.remoteHost = null;
+        this.remoteHost = request.getRemoteHost();
 
 	// Grab the remote ip info.
-        if(request.getRemoteHost() != null && !request.getRemoteAddr().isEmpty())
-            this.remoteAddr = request.getRemoteAddr();
-        else
-            this.remoteAddr = null;
+        this.remoteAddr = request.getRemoteAddr();
 
         // Copy parameters from given MultivaluedMap 
         this.parameters = new HashMap<String, String[]>(parameters.size());


Mime
View raw message