if (trailingSlash && !spec.endsWith("/")) spec += "/"; return new URL(spec);
if (isFile) return adjustTrailingSlash(new File(spec.substring(5)).toURL(), trailingSlash); else return new URL(spec);
	private static URL buildURL(String spec, boolean trailingSlash) {		if (spec == null)			return null;		// if the spec is a file: url then see if it is absolute.  If not, break it up		// and make it absolute.		if (spec.startsWith("file:")) {			File file = new File(spec.substring(5));			if (!file.isAbsolute())				// TODO should we ensure URL starts with a "/" (ie file:/c:/eclipse) defect 51165				spec = "file:" + file.getAbsolutePath();		}		try {			if (trailingSlash && !spec.endsWith("/"))				spec += "/";			return new URL(spec);		} catch (MalformedURLException e) {			if (spec.startsWith("file:"))				return null;			// TODO should we ensure URL starts with a "/" (ie file:/c:/eclipse) defect 51165			return buildURL("file:" + spec, trailingSlash);		}	}