protected boolean sameFile(URL url1, URL url2) { // do a hashcode test to allow each handler to check the adaptor first if (url1.hashCode() != url2.hashCode()) return false; String p1 = url1.getProtocol(); String p2 = url2.getProtocol(); if (!((p1 == p2) || (p1 != null && p1.equalsIgnoreCase(p2)))) return false; if (!hostsEqual(url1, url2)) return false; if (url1.getPort() != url2.getPort()) return false; String path1 = url1.getPath(); String path2 = url2.getPath(); if (!((path1 == path2) || (path1 != null && path1.equals(path2)))) return false; return true; // note that the authority is not checked here because it can be different for two // URLs depending on how they were constructed. }
protected boolean sameFile(URL url1, URL url2) { // do a hashcode test to allow each handler to check the adaptor first if (url1.hashCode() != url2.hashCode()) return false; String p1 = url1.getProtocol(); String p2 = url2.getProtocol(); if (!((p1 == p2) || (p1 != null && p1.equalsIgnoreCase(p2)))) return false; if (!hostsEqual(url1, url2)) return false; if (url1.getPort() != url2.getPort()) return false; String path1 = url1.getPath(); String path2 = url2.getPath(); if (!((path1 == path2) || (path1 != null && path1.equals(path2)))) return false; return true; // note that the authority is not checked here because it can be different for two // URLs depending on how they were constructed. }
protected boolean sameFile(URL url1, URL url2) { // do a hashcode test to allow each handler to check the adaptor first if (url1.hashCode() != url2.hashCode()) return false; String p1 = url1.getProtocol(); String p2 = url2.getProtocol(); if (!((p1 == p2) || (p1 != null && p1.equalsIgnoreCase(p2)))) return false; if (!hostsEqual(url1, url2)) return false; if (url1.getPort() != url2.getPort()) return false; String path1 = url1.getPath(); String path2 = url2.getPath(); if (!((path1 == path2) || (path1 != null && path1.equals(path2)))) return false; return true; // note that the authority is not checked here because it can be different for two // URLs depending on how they were constructed. }
protected boolean sameFile(URL url1, URL url2) { // do a hashcode test to allow each handler to check the adaptor first if (url1.hashCode() != url2.hashCode()) return false; String p1 = url1.getProtocol(); String p2 = url2.getProtocol(); if (!((p1 == p2) || (p1 != null && p1.equalsIgnoreCase(p2)))) return false; if (!hostsEqual(url1, url2)) return false; if (url1.getPort() != url2.getPort()) return false; String path1 = url1.getPath(); String path2 = url2.getPath(); if (!((path1 == path2) || (path1 != null && path1.equals(path2)))) return false; return true; // note that the authority is not checked here because it can be different for two // URLs depending on how they were constructed. }
protected boolean sameFile(URL url1, URL url2) { // do a hashcode test to allow each handler to check the adaptor first if (url1.hashCode() != url2.hashCode()) return false; String p1 = url1.getProtocol(); String p2 = url2.getProtocol(); if (!((p1 == p2) || (p1 != null && p1.equalsIgnoreCase(p2)))) return false; if (!hostsEqual(url1, url2)) return false; if (url1.getPort() != url2.getPort()) return false; String path1 = url1.getPath(); String path2 = url2.getPath(); if (!((path1 == path2) || (path1 != null && path1.equals(path2)))) return false; return true; // note that the authority is not checked here because it can be different for two // URLs depending on how they were constructed. }
protected boolean sameFile(URL url1, URL url2) { // do a hashcode test to allow each handler to check the adaptor first if (url1.hashCode() != url2.hashCode()) return false; String p1 = url1.getProtocol(); String p2 = url2.getProtocol(); if (!((p1 == p2) || (p1 != null && p1.equalsIgnoreCase(p2)))) return false; if (!hostsEqual(url1, url2)) return false; if (url1.getPort() != url2.getPort()) return false; String path1 = url1.getPath(); String path2 = url2.getPath(); if (!((path1 == path2) || (path1 != null && path1.equals(path2)))) return false; return true; // note that the authority is not checked here because it can be different for two // URLs depending on how they were constructed. }