Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 286951

Summary: UpdateManagerUtils#sameURL(URL, URL) should not call URL#equals(Object)
Product: [Eclipse Project] Platform Reporter: Markus Keller <markus.kell.r>
Component: Update (deprecated - use Eclipse>Equinox>p2)Assignee: Platform-Update-Inbox <platform-update-inbox>
Status: RESOLVED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: rvaughan, yuri.schimke
Version: 3.6   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard: obsolete

Description Markus Keller CLA 2009-08-18 10:56:08 EDT
I20090811-0800

org.eclipse.update.internal.core.UpdateManagerUtils.sameURL(URL, URL) calls URL#equals(Object), but the latter resolves the host of the URLs via DNS lookups, which is most of the time not what you want.

I don't know if the org.eclipse.update.core plug-in is still in use, but if it is, you should change it to compare the strings from URL#toExternalForm().
Comment 1 Markus Keller CLA 2009-08-18 10:58:31 EDT
Same problem in org.eclipse.update.internal.configurator.PlatformConfiguration.initializeCurrent(Location):

	if (!sharedConfigFileURL.equals(configFileURL)) ...
Comment 2 DJ Houghton CLA 2009-08-18 11:25:37 EDT
We had similar problems in p2 but they were addressed in bug 121201.
Comment 3 John Arthorne CLA 2009-08-18 16:15:54 EDT
*** Bug 117708 has been marked as a duplicate of this bug. ***
Comment 4 John Arthorne CLA 2009-08-18 16:16:08 EDT
*** Bug 205001 has been marked as a duplicate of this bug. ***
Comment 5 John Arthorne CLA 2012-07-24 10:15:11 EDT
The Eclipse Update component is no longer under development, and no longer exists in the Eclipse Platform 4.x stream. If this problem still occurs in Eclipse Platform 4.2 or later, please enter a new bug report against Equinox p2.