DESCRIPTION

Bug 468796 - ClassCastException in Theme$1.propertyChange (127)

The string representation of FontData array is to be used to fire a property change event

Signed-off-by: vrubezhny xxx@xxx.xxx


COMMENTS

author: Brenden Conley
date: 2015-06-04 18:41:06.000000000

Patch Set 2:

Build Started https://hudson.eclipse.org/platform/job/eclipse.platform.ui-Gerrit/5848/

-------------------------------------
author: Brenden Conley
date: 2015-06-04 18:54:11.000000000

Patch Set 2: Verified+1

Build Successful 

https://hudson.eclipse.org/platform/job/eclipse.platform.ui-Gerrit/5848/ : SUCCESS

-------------------------------------
author: Sebastian Porter
date: 2015-06-05 09:07:55.000000000

Patch Set 2: Code-Review-2

The event must contain the real values, hence the fix is wrong. The propertyChange code in Theme is wrong.

-------------------------------------
author: Sawyer Richmond
date: 2015-06-05 11:07:36.000000000

Patch Set 2:

> The event must contain the real values, hence the fix is wrong. The
 > propertyChange code in Theme is wrong.

Yes, that was my first thought, but then I was confused by the fact that String to FontData[] conversion in Theme's propertyChange() was there for a years (it wasn't changed since 2010).

Thanks for the clue.

-------------------------------------
author: Sawyer Richmond
date: 2015-06-05 11:32:52.000000000

Patch Set 2:

Dani,

and it looks like there is another possible ClassCastException in line 128 then:
RGB rgb = StringConverter.asRGB((String) event.getNewValue());

As colour value in event is to be of type RGB, not String. At least PreferenceConverter.setValue() puts RGB-value into the event (see PreferenceConverter line 552).

Am I correct?

-------------------------------------
author: Gerrit Code Review
date: 2015-10-12 08:30:58.000000000

Change has been successfully merged into the git repository by Sebastian Porter

-------------------------------------
