Bug 283359 [Browser] WebBrowserEditorInput#equals(Object) is wrong
Build ID: 3.2.201.v20080708_34x Steps To Reproduce: Looking at the WebBrowserEditorInput#equals(Object) method in 3.2.201.v20080708_34x version of the org.eclipse.ui.browser (similarly in the head), there are few issues: 1) The javadoc is wrong, and it doesn't make sense. 2) The line: if (url != null && !url.equals(obj)) should be if (url != null && !url.equals(other.url)) For reference, I'm pasting the contents of the equals method: /** * Indicates whether some other object is "equal to" this one. In this case * it means that the underlying IFolders are equal. */ public boolean equals(Object obj) { if (this == obj) return true; if (!(obj instanceof WebBrowserEditorInput)) return false; WebBrowserEditorInput other = (WebBrowserEditorInput) obj; if (url != null && !url.equals(obj)) return false; return canReplaceInput(other); } More information:
bundles/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/WebBrowserEditorInput.java
}
	public ImageDescriptor getImageDescriptor() {
		return ImageResource
				.getImageDescriptor(ImageResource.IMG_INTERNAL_BROWSER);
	}
	
	/**
	 * Returns true if the name is locked and cannot be changed.
	 * 
	 * @return <code>true</code> if the name of the browser should not change
	 */
	protected boolean isNameLocked() {
		return (name != null);
	}
	/**
	 * Returns the name of this editor input for display purposes.
	 * <p>
	 * For instance, if the fully qualified input name is
	 * <code>"a\b\MyFile.gif"</code>, the return value would be just
	 * <code>"MyFile.gif"</code>.
	 * 
	 * @return the file name string
	 */
	public String getName() {
		if (name != null)
			return name;
		return Messages.viewWebBrowserTitle;
	}
	/*
	 * Returns an object that can be used to save the state of this editor