Bug 719307

Summary: java.lang.IndexOutOfBoundsException when de-selecting a cluster
Product: [Retired] oVirt Reporter: Asaf Shakarchi <asaf>
Component: ovirt-engine-webadminAssignee: Asaf Shakarchi <asaf>
Status: CLOSED WORKSFORME QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: ecohen, iheim, vszocs, ykaul
Target Milestone: m1   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-07-31 14:43:00 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 719977    

Description Asaf Shakarchi 2011-07-06 12:38:23 UTC
0:11:13.912 [ERROR] Uncaught exception escaped
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 	at java.util.ArrayList.rangeCheck(ArrayList.java:571) 	at java.util.ArrayList.get(ArrayList.java:349) 	at org.nogah.webadmin.section.main.presenter.tab.cluster.SubTabClusterGeneralPresenter.onClusterSelectionChange(SubTabClusterGeneralPresenter.java:61) 	at org.nogah.webadmin.section.main.presenter.tab.cluster.SubTabClusterGeneralPresenterProxyDefImpl$1$1.execute(SubTabClusterGeneralPresenterProxyDefImpl.java:79) 	at com.google.gwt.core.client.impl.SchedulerImpl$Task$.executeScheduled$(SchedulerImpl.java:50) 	at com.google.gwt.core.client.impl.SchedulerImpl.runScheduledTasks(SchedulerImpl.java:229) 	at com.google.gwt.core.client.impl.SchedulerImpl.flushPostEventPumpCommands(SchedulerImpl.java:389) 	at com.google.gwt.core.client.impl.SchedulerImpl$Flusher.execute(SchedulerImpl.java:78)

Comment 1 Vojtech Szocs 2011-07-29 13:52:40 UTC
I did some quick investigation on this one. I wasn't able to reproduce this bug.

According to the stack trace, this bug means that the presenter attempts to retrieve the first item (index 0) from selected item list, while the selected item list is empty (size 0).

The current AbstractSubTabPresenter.updateMainTabSelection() implementation is prepared for the case that the selected item list is empty, in this case the getMainTabSelectedItem() method returns null.

I guess this bug can be closed after confirmation.

Comment 2 Asaf Shakarchi 2011-07-31 14:43:00 UTC
Yes indeed, 

I verified that, probably it was discovered before we pushed some new code into AbstractSubTabPresenter.updateMainTabSelection() method, 


Verified, closing.