Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 286229 - Bad usages of URL#equals(Object)
Summary: Bad usages of URL#equals(Object)
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 3.6   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.6 M2   Edit
Assignee: JDT-Debug-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-08-11 08:25 EDT by Markus Keller CLA
Modified: 2009-09-15 15:30 EDT (History)
2 users (show)

See Also:


Attachments
Fix (2.47 KB, patch)
2009-08-11 08:25 EDT, Markus Keller CLA
no flags Details | Diff
Fix 2 (1.21 KB, patch)
2009-08-19 05:35 EDT, Markus Keller CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Markus Keller CLA 2009-08-11 08:25:02 EDT
Created attachment 144026 [details]
Fix

HEAD

While fixing bug 285854, I also found two bad usages of URL#equals(Object) in JDT/Debug. That method resolves the host of the URLs via DNS lookups, which is most of the time not what you want.

A scenario that e.g. fails is when you edit a JRE definition and then replace the host part of the default Javadoc path
http://java.sun.com/javase/6/docs/api/
with
http://72.5.124.55/javase/6/docs/api/ .

When you then click "Restore Default", the UI is not updated, but the preference is.
Comment 1 Darin Wright CLA 2009-08-18 10:55:58 EDT
Applied patch to HEAD
Comment 2 Markus Keller CLA 2009-08-19 05:35:33 EDT
Created attachment 144933 [details]
Fix 2

Oops, I also wanted to fix the same problem in AbstractVMInstall, but apparently, I forgot to add the second file when I created the patch.
Comment 3 Markus Keller CLA 2009-08-19 05:36:14 EDT
.
Comment 4 Darin Wright CLA 2009-08-19 09:26:06 EDT
Applied second patch.
Comment 5 Darin Wright CLA 2009-09-15 15:30:20 EDT
Verified.