Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephan Herrmann2014-09-09 14:48:19 +0000
committerStephan Herrmann2014-09-09 14:48:19 +0000
commit59156b407b8f9de605f8533667694cef7d87ae33 (patch)
treea79e21952fcc3834f5bc76b55fbe81e3836389fd
parent2380d1ed2342dc63114cf29a8a14effe66750360 (diff)
downloadorg.eclipse.objectteams-59156b407b8f9de605f8533667694cef7d87ae33.tar.gz
org.eclipse.objectteams-59156b407b8f9de605f8533667694cef7d87ae33.tar.xz
org.eclipse.objectteams-59156b407b8f9de605f8533667694cef7d87ae33.zip
Safety: I saw IOOBE, assume concurrency reasons
-rw-r--r--plugins/org.eclipse.objectteams.otdt.debug.ui/src/org/eclipse/objectteams/otdt/debug/ui/internal/model/OTDebugElementsContainerContentProvider.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/plugins/org.eclipse.objectteams.otdt.debug.ui/src/org/eclipse/objectteams/otdt/debug/ui/internal/model/OTDebugElementsContainerContentProvider.java b/plugins/org.eclipse.objectteams.otdt.debug.ui/src/org/eclipse/objectteams/otdt/debug/ui/internal/model/OTDebugElementsContainerContentProvider.java
index 3438bc00b..7394e85ce 100644
--- a/plugins/org.eclipse.objectteams.otdt.debug.ui/src/org/eclipse/objectteams/otdt/debug/ui/internal/model/OTDebugElementsContainerContentProvider.java
+++ b/plugins/org.eclipse.objectteams.otdt.debug.ui/src/org/eclipse/objectteams/otdt/debug/ui/internal/model/OTDebugElementsContainerContentProvider.java
@@ -62,7 +62,8 @@ public class OTDebugElementsContainerContentProvider extends ElementContentProvi
OTDebugElementsContainer container = (OTDebugElementsContainer) parent;
if(container.hasTeamInstances())
{
- ArrayList<TeamInstance> teamInstances = container.getTeamInstances();
+ ArrayList<TeamInstance> teamInstances = new ArrayList<>(container.getTeamInstances());
+ length = Math.min(length, teamInstances.size()-index);
Object[] result= new Object[length];
for (int i=0; i<length; i++)
result[i]= teamInstances.get(index+i);

Back to the top