You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@oodt.apache.org by ma...@apache.org on 2015/10/10 08:54:35 UTC

[04/10] oodt git commit: OODT-887 remove URL network dependency

OODT-887 remove URL network dependency


Project: http://git-wip-us.apache.org/repos/asf/oodt/repo
Commit: http://git-wip-us.apache.org/repos/asf/oodt/commit/77cfebf7
Tree: http://git-wip-us.apache.org/repos/asf/oodt/tree/77cfebf7
Diff: http://git-wip-us.apache.org/repos/asf/oodt/diff/77cfebf7

Branch: refs/heads/master
Commit: 77cfebf7fd8d1f09f40d4894d0de22b70b8c220c
Parents: 5cad567
Author: Tom Barber <to...@analytical-labs.com>
Authored: Fri Oct 9 17:03:31 2015 +0100
Committer: Tom Barber <to...@analytical-labs.com>
Committed: Fri Oct 9 17:03:31 2015 +0100

----------------------------------------------------------------------
 .../oodt/cas/pushpull/protocol/RemoteSite.java   | 19 +++++++++++++++----
 1 file changed, 15 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/oodt/blob/77cfebf7/pushpull/src/main/java/org/apache/oodt/cas/pushpull/protocol/RemoteSite.java
----------------------------------------------------------------------
diff --git a/pushpull/src/main/java/org/apache/oodt/cas/pushpull/protocol/RemoteSite.java b/pushpull/src/main/java/org/apache/oodt/cas/pushpull/protocol/RemoteSite.java
index 1edee22..4275228 100644
--- a/pushpull/src/main/java/org/apache/oodt/cas/pushpull/protocol/RemoteSite.java
+++ b/pushpull/src/main/java/org/apache/oodt/cas/pushpull/protocol/RemoteSite.java
@@ -19,7 +19,10 @@
 package org.apache.oodt.cas.pushpull.protocol;
 
 //JDK imports
+import java.net.URISyntaxException;
 import java.net.URL;
+import java.util.logging.Level;
+import java.util.logging.Logger;
 
 /**
  * 
@@ -31,7 +34,11 @@ import java.net.URL;
  * </p>.
  */
 public class RemoteSite {
-    
+
+    /* our log stream */
+    private final static Logger LOG = Logger.getLogger(RemoteSite.class
+        .getName());
+
     private String alias, username, password, cdTestDir;
     private int maxConnections;
     private URL url;
@@ -90,9 +97,13 @@ public class RemoteSite {
     public boolean equals(Object obj) {
         if (obj instanceof RemoteSite) {
             RemoteSite rs = (RemoteSite) obj;
-            return (rs.alias.equals(this.alias) && rs.url.equals(this.url)
-                    && rs.username.equals(this.username) && rs.password
-                    .equals(this.password) && rs.maxConnections == this.maxConnections);
+            try {
+                return (rs.alias.equals(this.alias) && rs.url.toURI().equals(this.url.toURI())
+                        && rs.username.equals(this.username) && rs.password
+                        .equals(this.password) && rs.maxConnections == this.maxConnections);
+            } catch (URISyntaxException e) {
+                LOG.log(Level.SEVERE, "Could not convert URL to URL: Message: "+e.getMessage());
+            }
         } else
             return false;
     }