All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.redfin.sitemapgenerator.UrlUtils Maven / Gradle / Ivy

There is a newer version: 1.1.2
Show newest version
package com.redfin.sitemapgenerator;

import java.net.URL;
import java.util.HashMap;

class UrlUtils {

	static void checkUrl(URL url, URL baseUrl) {
		// Is there a better test to use here?
		
		if (baseUrl.getHost() == null) {
			throw new RuntimeException("base URL is null");
		}
		
		if (!baseUrl.getHost().equalsIgnoreCase(url.getHost())) {
			throw new RuntimeException("Domain of URL " + url + " doesn't match base URL " + baseUrl);
		}
	}

	static  HashMap newHashMap() {
		return new HashMap();
	}
	
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy