| Summary: | [common types] StringIndexOutOfBoundsException if JvmDeclaredType has no package | ||
|---|---|---|---|
| Product: | [Modeling] TMF | Reporter: | Moritz Eysholdt <moritz.eysholdt> |
| Component: | Xtext | Assignee: | Project Inbox <tmf.xtext-inbox> |
| Status: | CLOSED INVALID | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | sven.efftinge |
| Version: | 2.3.0 | Flags: | sven.efftinge:
juno+
|
| Target Milestone: | M5 | ||
| Hardware: | PC | ||
| OS: | Mac OS X - Carbon (unsup.) | ||
| Whiteboard: | |||
|
Description
Moritz Eysholdt
The fix should be synchronous to org.eclipse.xtext.common.types.access.impl.AbstractClassMirror... however, AbstractClassMirror seems to assume that the JvmType is always in resource.getContents().get(0). This isn't true for JvmTypes created by a JvmModelInferrer. There, resource.getContents().get(0) is the "original" models and JvmTYpes are at resource.getContents().get(n) with n in [1..n] The latest code in the repository already has an explicit check for this exception. Furthermore, as it turn out, the original cause for this exception was bogus contents of the xtext index so that org.eclipse.xtext.common.types.access.impl.IndexedJvmTypeAccess.resolveJavaObject(JvmType, String) was called this the wrong JvmType. I'm closing this one as invalid until other evidence shows up. |