Code example for MalformedURLException

0
		return imageRegistry;
	} 
 
	private static URL makeIconFileURL(String prefix, String name) throws MalformedURLException {
		if (baseURL == null) {
			throw new MalformedURLException();
		} 
 
		StringBuffer buffer = new StringBuffer(prefix);
		buffer.append('/');
		buffer.append(name);
		return new URL(baseURL, buffer.toString());
	} 
 
	private static ImageDescriptor scale(ImageDescriptor descriptor, double scale) {
		String key = "" + descriptor.hashCode(); //$NON-NLS-1$
		key += new Double(scale).hashCode();
		ImageDescriptor cache = getImageRegistry().getDescriptor(key);
		if (cache == null) {
			cache = new ScaledImageDescriptor(descriptor, scale);
			getImageRegistry().put(key, cache);