code: @Pure
  	public static URL removeExtension(URL filename) {
  		if (filename == null) {
  			return null;
  		}
  		final String path = filename.getPath().replaceFirst(Pattern.quote(URL_PATH_SEPARATOR)
  				+ "+$", ""); //$NON-NLS-1$ //$NON-NLS-2$
  		int idx = path.lastIndexOf(URL_PATH_SEPARATOR);
  		final StringBuilder buf = new StringBuilder((idx < 0) ? "" : //$NON-NLS-1$
  				decodeHTMLEntities(path.substring(0, idx + 1)));
  		final String largeBasename = decodeHTMLEntities(path.substring(idx + 1));
  		idx = largeBasename.lastIndexOf(getFileExtensionCharacter());
  		if (idx < 0) {
  			return filename;
  		}
  		buf.append(largeBasename.substring(0, idx));
  		try {
  			if (isJarURL(filename)) {
  				return new URL(
  						filename.getProtocol(),
  						filename.getHost(),
  						filename.getPort(),
  						buf.toString());
  			}
  			return new URI(
  					filename.getProtocol(),
  					filename.getUserInfo(),
  					filename.getHost(),
  					filename.getPort(),
  					buf.toString(),
  					decodeHTMLEntities(filename.getQuery()),
  					filename.getRef()).toURL();
  		} catch (AssertionError e) {
  			throw e;
  		} catch (Throwable exception) {
  			//
  		}
  		try {
  			return new URL(
  					filename.getProtocol(),
  					filename.getHost(),
  					buf.toString());
  		} catch (AssertionError e) {
  			throw e;
  		} catch (Throwable exception) {
  			return null;
  		}
  	}
docs: Remove the extension from the specified filename.
  
  @param filename is the filename to parse.
  @return the filename without the extension.