MCPcopy Create free account
hub / github.com/apache/nutch / isSameDomainName

Method isSameDomainName

src/java/org/apache/nutch/util/URLUtil.java:140–142  ·  view source on GitHub ↗

Returns whether the given urls have the same domain name. As an example, isSameDomain(new URL("http://lucene.apache.org") , new URL("http://people.apache.org/")) will return true. @return true if the domain names are equal

(URL url1, URL url2)

Source from the content-addressed store, hash-verified

138 * @return true if the domain names are equal
139 */
140 public static boolean isSameDomainName(URL url1, URL url2) {
141 return getDomainName(url1).equalsIgnoreCase(getDomainName(url2));
142 }
143
144 /**
145 * Returns whether the given urls have the same domain name. As an example, <br>

Callers

nothing calls this directly

Calls 1

getDomainNameMethod · 0.95

Tested by

no test coverage detected