eclipse-instasearch
eclipse-instasearch copied to clipboard
java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Boolean
Automatic setup via oomph doesn't work 100% ...
oomph installation.setup:
<setupTask
xsi:type="setup:CompoundTask"
name="it.unibz.instasearch">
<setupTask
xsi:type="setup:PreferenceTask"
key="/instance/it.unibz.instasearch/indexArchives"
value="TRUE"/>
<setupTask
xsi:type="setup:PreferenceTask"
key="/instance/it.unibz.instasearch/indexUpdateEnabled"
value="FALSE"/>
</setupTask>
Exception during eclipse workspace creation:
java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Boolean at it.unibz.instasearch.jobs.IndexUpdateJob.propertyChange(IndexUpdateJob.java:259) at org.eclipse.ui.preferences.ScopedPreferenceStore$3.run(ScopedPreferenceStore.java:350) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.ui.preferences.ScopedPreferenceStore.firePropertyChangeEvent(ScopedPreferenceStore.java:346) at org.eclipse.ui.preferences.ScopedPreferenceStore$2.preferenceChange(ScopedPreferenceStore.java:181) at org.eclipse.core.internal.preferences.EclipsePreferences$2.run(EclipsePreferences.java:848) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.core.internal.preferences.EclipsePreferences.firePreferenceEvent(EclipsePreferences.java:851) at org.eclipse.core.internal.preferences.EclipsePreferences.put(EclipsePreferences.java:863) at org.eclipse.oomph.preferences.util.PreferencesUtil$PreferenceProperty.set(PreferencesUtil.java:866) at org.eclipse.oomph.setup.impl.PreferenceTaskImpl$1.run(PreferenceTaskImpl.java:394) at org.eclipse.oomph.setup.impl.SetupTaskImpl$1.run(SetupTaskImpl.java:929) at org.eclipse.oomph.ui.UIUtil$7.run(UIUtil.java:630) at org.eclipse.ui.internal.UILockListener.doPendingWork(UILockListener.java:162)
I guess the hardcoded Boolean Cast in "IndexUpdateJob.propertyChange" is the "problem":
https://github.com/ajermakovics/eclipse-instasearch/blob/464f252ae450c404bcef0f1446773c90e79e44f1/instasearch/src/it/unibz/instasearch/jobs/IndexUpdateJob.java#L261