Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 320124 - ArrayIndexOutOfBoundsException can occur when using bundle command in the console
Summary: ArrayIndexOutOfBoundsException can occur when using bundle command in the con...
Status: RESOLVED FIXED
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: Framework (show other bugs)
Version: unspecified   Edit
Hardware: PC Mac OS X - Carbon (unsup.)
: P3 normal (vote)
Target Milestone: 3.6.1   Edit
Assignee: Thomas Watson CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-16 12:18 EDT by Alasdair Nottingham CLA
Modified: 2010-07-16 17:57 EDT (History)
2 users (show)

See Also:


Attachments
patch + test (5.85 KB, patch)
2010-07-16 17:51 EDT, Thomas Watson CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alasdair Nottingham CLA 2010-07-16 12:18:29 EDT
Build Identifier: 3.6.0.v20100517

java.lang.ArrayIndexOutOfBoundsException: Array index out of range: 3
        at org.eclipse.osgi.internal.resolver.RequiresHolder.determineRequiresVisibility(StateHelperImpl.java:562)
        at org.eclipse.osgi.internal.resolver.RequiresHolder.<init>(StateHelperImpl.java:509)
        at org.eclipse.osgi.internal.resolver.StateHelperImpl.getPackages(StateHelperImpl.java:400)
        at org.eclipse.osgi.internal.resolver.StateHelperImpl.getVisiblePackages(StateHelperImpl.java:343)
        at org.eclipse.osgi.framework.internal.core.FrameworkCommandProvider._bundle(FrameworkCommandProvider.java:847)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:48)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:600)
        at org.eclipse.osgi.framework.internal.core.FrameworkCommandInterpreter.execute(FrameworkCommandInterpreter.java:155)
        at org.eclipse.osgi.framework.internal.core.FrameworkConsole.docommand(FrameworkConsole.java:156)
        at org.eclipse.osgi.framework.internal.core.FrameworkConsole.runConsole(FrameworkConsole.java:141)
        at org.eclipse.osgi.framework.internal.core.FrameworkConsole.run(FrameworkConsole.java:105)
        at java.lang.Thread.run(Thread.java:736)

Reproducible: Sometimes

Steps to Reproduce:
1.Install some bundles into a framework
2.use the bundle command to view them.
3.
Comment 1 Thomas Watson CLA 2010-07-16 12:20:05 EDT
This is caused by the typical i vs. j bug when iterating over two nested for loops.
Comment 2 Thomas Watson CLA 2010-07-16 16:17:14 EDT
For reference, this was introduced by the fix to bug 282966.
Comment 3 Thomas Watson CLA 2010-07-16 17:51:23 EDT
Created attachment 174541 [details]
patch + test

fix + testcase.
Comment 4 Thomas Watson CLA 2010-07-16 17:57:25 EDT
Fixed for 3.6.1 and HEAD.