Bug 17892 - Should not assume type of PropertyChangeEvent values
Summary: Should not assume type of PropertyChangeEvent values
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P1 critical (vote)
Target Milestone: ---   Edit
Assignee: Nick Edgar CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-05-26 22:03 EDT by Nick Edgar CLA
Modified: 2002-05-26 23: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 Nick Edgar CLA 2002-05-26 22:03:08 EDT
Build 20020521

The following code should not make assumptions about the type of 
PropertyChangeEvent values.  
Property change listeners must be prepared to handle String values as well as 
wrapped objects in the event.
See bug 16970 for more details.

org.eclipse.ui.internal.WorkbenchActionBuilder.propertyChange
(PropertyChangeEvent)

There may be other places that need to be changed.
Should check all senders of getNewValue() and getOldValue().
Comment 1 Nick Edgar CLA 2002-05-26 22:06:44 EDT
This case is not actually hit because restoring the defaults does not affect 
the autobuild preference.  This should be fixed too.
Comment 2 Nick Edgar CLA 2002-05-26 23:22:25 EDT
This case was not a problem because autobuild is handled specially, and was 
always passing a Boolean in the event.
Changed to get current value from the workspace anyway.
The other cases here all get the new value from the store, not the event.