Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 326371 - StringIndexOutOfBoundsException in "Initializing Java Tooling" while opening RTC work item editor
Summary: StringIndexOutOfBoundsException in "Initializing Java Tooling" while opening...
Status: RESOLVED FIXED
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: p2 (show other bugs)
Version: 3.5.2   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: 3.7 M3   Edit
Assignee: P2 Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-28 00:47 EDT by Eric Jodet CLA
Modified: 2010-09-28 10:04 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Jodet CLA 2010-09-28 00:47:33 EDT
using Version: 3.0 Build id: RTC-I20100604-1245
OS - Win7 64bit
java.fullversion=JRE 1.6.0 IBM J9 2.4 Windows 7 x86-32 jvmwi3260sr7-20091214_49398 (JIT enabled, AOT enabled)
J9VM - 20091214_049398
JIT  - r9_20091123_13891

- start the Eclipse Client
- connect to repos
- try and open a work item.
--> StringIndexOutOfBoundsException in  "Initializing Java Tooling" while opening work item editor

Notes:
1 - the editor opens and I can work OK
2 - this happens only once - the first time the editor is opened.
3 - might be related to the VM I use.
4 - RTC Dev is thinking about an Eclipse bug.
5 - this issue might not be reproducible
Comment 1 Eric Jodet CLA 2010-09-28 00:48:37 EDT
See also - https://jazz.net/jazz/resource/itemName/com.ibm.team.workitem.WorkItem/118563

for full details / stack traces
Comment 2 Thomas Watson CLA 2010-09-28 08:27:14 EDT
From the rtc workitem:

java.lang.StringIndexOutOfBoundsException
    at java.lang.String.charAt(String.java:418)
    at org.eclipse.equinox.internal.frameworkadmin.equinox.ParserUtils.getValueForArgument(ParserUtils.java:124)
    at org.eclipse.equinox.internal.frameworkadmin.equinox.EclipseLauncherParser.getVM(EclipseLauncherParser.java:94)
    at org.eclipse.equinox.internal.frameworkadmin.equinox.EclipseLauncherParser.read(EclipseLauncherParser.java:72)
    at org.eclipse.equinox.internal.frameworkadmin.equinox.EquinoxManipulatorImpl.loadWithoutFwPersistentData(EquinoxManipulatorImpl.java:358)
    at org.eclipse.equinox.internal.frameworkadmin.equinox.EquinoxManipulatorImpl.load(EquinoxManipulatorImpl.java:331)
    at org.eclipse.pde.internal.core.target.AbstractBundleContainer.getVMArguments(AbstractBundleContainer.java:722)
    at org.eclipse.pde.internal.core.target.TargetPlatformService.newDefaultTargetDefinition(TargetPlatformService.java:493)
    at org.eclipse.pde.internal.core.PluginModelManager.initDefaultTargetPlatformDefinition(PluginModelManager.java:458)
    at org.eclipse.pde.internal.core.PluginModelManager.initializeTable(PluginModelManager.java:428)
    at org.eclipse.pde.internal.core.PluginModelManager.findModel(PluginModelManager.java:753)
    at org.eclipse.pde.core.plugin.PluginRegistry.findModel(PluginRegistry.java:77)
    at org.eclipse.pde.internal.core.RequiredPluginsInitializer.initialize(RequiredPluginsInitializer.java:31)
    at org.eclipse.jdt.internal.core.JavaModelManager.initializeContainer(JavaModelManager.java:2642)
    at org.eclipse.jdt.internal.core.JavaModelManager$11.run(JavaModelManager.java:2548)
    at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1800)
    at org.eclipse.jdt.internal.core.JavaModelManager.initializeAllContainers(JavaModelManager.java:2588)
    at org.eclipse.jdt.internal.core.JavaModelManager.getClasspathContainer(JavaModelManager.java:1808)
    at org.eclipse.jdt.core.JavaCore.initializeAfterLoad(JavaCore.java:3410)
    at org.eclipse.jdt.internal.ui.InitializeAfterLoadJob$RealJob.run(InitializeAfterLoadJob.java:35)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)



It looks like org.eclipse.equinox.internal.frameworkadmin.equinox.ParserUtils.getValueForArgument(String, List) has a call to String#charAt(0) without checking to make sure the String is not the empty string.
Comment 3 DJ Houghton CLA 2010-09-28 10:04:45 EDT
Fixed in HEAD.