Bug 212225 - Unresolvable types may throw ArrayOutOfBoundException's due to JDT bug
Summary: Unresolvable types may throw ArrayOutOfBoundException's due to JDT bug
Status: RESOLVED FIXED
Alias: None
Product: Java Server Faces
Classification: WebTools
Component: Core (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows XP
: P3 major (vote)
Target Milestone: 3.0.2   Edit
Assignee: Cameron Bateman CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 212224
Blocks:
  Show dependency tree
 
Reported: 2007-12-06 21:38 EST by Cameron Bateman CLA
Modified: 2008-09-04 16:53 EDT (History)
1 user (show)

See Also:


Attachments
Eliminates an unnecessary execution path that caused the immediate problem and suppresses the array exception in the general case. (2.13 KB, patch)
2007-12-06 21:45 EST, Cameron Bateman CLA
no flags Details | Diff
Removes the workaround try-catch as the root bug is fixed. (2.14 KB, patch)
2008-09-04 16:50 EDT, Cameron Bateman CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Cameron Bateman CLA 2007-12-06 21:38:20 EST
The exception below was caused by a new JDT issue listed in the Depends On field. Possible loss functionality could occur when try to derive type information for EL variables and properties that are based on JavaBeans.

java.lang.ArrayIndexOutOfBoundsException
at org.eclipse.jdt.internal.core.BinaryTypeConverter.convert(BinaryTypeConverter.java:158)
at org.eclipse.jdt.internal.core.BinaryTypeConverter.convert(BinaryTypeConverter.java:244)
at org.eclipse.jdt.internal.core.BinaryTypeConverter.convert(BinaryTypeConverter.java:210)
at org.eclipse.jdt.internal.core.BinaryTypeConverter.buildTypeDeclaration(BinaryTypeConverter.java:98)
at org.eclipse.jdt.internal.codeassist.SelectionEngine.selectType(SelectionEngine.java:1135)
at org.eclipse.jdt.internal.core.NamedMember.resolveType(NamedMember.java:292)
at org.eclipse.jdt.internal.core.NamedMember.resolveType(NamedMember.java:245)
at org.eclipse.jst.jsf.common.util.TypeUtil.resolveInParents(TypeUtil.java:368)
at org.eclipse.jst.jsf.common.util.TypeUtil.resolveTypeRelative(TypeUtil.java:293)
at org.eclipse.jst.jsf.common.util.TypeUtil.resolveType(TypeUtil.java:62)
at org.eclipse.jst.jsf.common.util.JDTBeanProperty.getType(JDTBeanProperty.java:115)
at org.eclipse.jst.jsf.common.util.JDTBeanProperty.isEnumType(JDTBeanProperty.java:132)
at org.eclipse.jst.jsf.context.symbol.internal.impl.IJavaTypeDescriptor2Impl.getPropertiesInternal(IJavaTypeDescriptor2Impl.java:595)
at org.eclipse.jst.jsf.context.symbol.internal.impl.IJavaTypeDescriptor2Impl.getBeanProperties(IJavaTypeDescriptor2Impl.java:268)
at org.eclipse.jst.jsf.context.symbol.internal.impl.IBeanInstanceSymbolImpl.getProperties(IBeanInstanceSymbolImpl.java:84)
at org.eclipse.jst.jsf.context.symbol.tests.ModelBaseTestCase.populatePropertyMap(ModelBaseTestCase.java:108)
at org.eclipse.jst.jsf.context.symbol.tests.ModelBaseTestCase.setupBeanProperty(ModelBaseTestCase.java:102)
at org.eclipse.jst.jsf.context.symbol.tests.TestTypeCoercion.setUp(TestTypeCoercion.java:58)
at org.eclipse.test.EclipseTestRunner.run(EclipseTestRunner.java:354)
at org.eclipse.test.EclipseTestRunner.run(EclipseTestRunner.java:206)
at org.eclipse.test.UITestApplication$3.run(UITestApplication.java:195)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:130)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3312)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2985)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2381)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2345)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2211)
at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:473)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:288)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:468)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:106)
at org.eclipse.test.UITestApplication.runApplication(UITestApplication.java:138)
at org.eclipse.test.UITestApplication.run(UITestApplication.java:60)
at org.eclipse.test.UITestApplication.start(UITestApplication.java:210)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:193)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:106)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:76)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:362)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:175)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:561)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:501)
at org.eclipse.equinox.launcher.Main.run(Main.java:1239)
at org.eclipse.equinox.launcher.Main.main(Main.java:1215)
Comment 1 Cameron Bateman CLA 2007-12-06 21:45:01 EST
Created attachment 84699 [details]
Eliminates an unnecessary execution path that caused the immediate problem and suppresses the array exception in the general case.
Comment 2 Cameron Bateman CLA 2007-12-06 23:39:20 EST
Patch applied to HEAD.  This should eliminate the currently build breakage and minimize the impact of https://bugs.eclipse.org/bugs/show_bug.cgi?id=212224 until it is fixed.

Note that manifestations of https://bugs.eclipse.org/bugs/show_bug.cgi?id=21224 will be logged.
Comment 3 Cameron Bateman CLA 2008-06-30 20:28:14 EDT
I am re-opening this bug in 3.0.1 to investigate whether the workaround code is still needed now that 212224 is closed.
Comment 4 Raghunathan Srinivasan CLA 2008-07-24 00:43:34 EDT
We can investigate this for 3.0.2
Comment 5 Cameron Bateman CLA 2008-09-04 16:50:06 EDT
Created attachment 111720 [details]
Removes the workaround try-catch as the root bug is fixed.

Rolls back the original change.
Comment 6 Cameron Bateman CLA 2008-09-04 16:53:48 EDT
Workaround rolled back due fix to original bug.  Test coverage confirms the problem reproduces without the workaround in place.