Bug 20534 - Plugin preference importer should intern strings
Summary: Plugin preference importer should intern strings
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Resources (show other bugs)
Version: 2.0   Edit
Hardware: PC All
: P2 normal (vote)
Target Milestone: 2.0 F4   Edit
Assignee: DJ Houghton CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-06-18 09:33 EDT by DJ Houghton CLA
Modified: 2002-06-21 15:22 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description DJ Houghton CLA 2002-06-18 09:33:22 EDT
build 2002-06-17

When we import preferences for a plug-in, we send out the appropriate property 
change event. There was a case where the property change event listner was 
using == instead of equals() to check and see if the property that was changed 
was one in which they were interested. Since the importer does not have access 
to the constants to which it is comparing, perhaps the importer should look at 
interning the property name strings that it is setting.
Comment 1 Nick Edgar CLA 2002-06-18 13:45:40 EDT
Please consider this as a candidate for F4.
Without this, the import feature will not work properly since several listeners 
assume they can use ==.  See bug 20471 for a list.
Comment 2 DJ Houghton CLA 2002-06-18 14:19:18 EDT
After discussions we have decided that interning strings is the wrong answer 
and that people should not be relying on String identity in their property 
change listeners.

Closing.
Comment 3 DJ Houghton CLA 2002-06-21 10:54:51 EDT
Re-opening bug report.
Comment 4 John Arthorne CLA 2002-06-21 15:22:58 EDT
Applied fix.  We now intern all strings on preference import.  Test case added.  
Released.