Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoraleherbau2011-07-12 08:58:26 +0000
committeraleherbau2011-07-12 08:58:26 +0000
commitbd25bbe7aee4ec10597957c7e8e6d7d7b62f329c (patch)
treec1bf53621f4168b45c55c137afc38c63cdb23541
parent4ee3fa46216b2950e514587568c8c1c730709369 (diff)
downloadorg.eclipse.tcf-bd25bbe7aee4ec10597957c7e8e6d7d7b62f329c.tar.gz
org.eclipse.tcf-bd25bbe7aee4ec10597957c7e8e6d7d7b62f329c.tar.xz
org.eclipse.tcf-bd25bbe7aee4ec10597957c7e8e6d7d7b62f329c.zip
TCF Debugger: Bug 351721 - AIOOBE in PeerListControl.updateItems
-rw-r--r--plugins/org.eclipse.tm.tcf.cdt.ui/src/org/eclipse/tm/internal/tcf/cdt/ui/launch/PeerListControl.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/org.eclipse.tm.tcf.cdt.ui/src/org/eclipse/tm/internal/tcf/cdt/ui/launch/PeerListControl.java b/plugins/org.eclipse.tm.tcf.cdt.ui/src/org/eclipse/tm/internal/tcf/cdt/ui/launch/PeerListControl.java
index 9590d5ec0..36d2bb8f5 100644
--- a/plugins/org.eclipse.tm.tcf.cdt.ui/src/org/eclipse/tm/internal/tcf/cdt/ui/launch/PeerListControl.java
+++ b/plugins/org.eclipse.tm.tcf.cdt.ui/src/org/eclipse/tm/internal/tcf/cdt/ui/launch/PeerListControl.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -387,7 +387,7 @@ public class PeerListControl implements ISelectionProvider {
filteredPeers.add(info);
}
}
- PeerInfo[] buf = (PeerInfo[]) filteredPeers.toArray(new PeerInfo[filteredPeers.size()]);
+ PeerInfo[] buf = filteredPeers.toArray(new PeerInfo[filteredPeers.size()]);
peer.listener = new LocatorListener(peer);
peer.locator.addListener(peer.listener);
return buf;
@@ -489,7 +489,7 @@ public class PeerListControl implements ISelectionProvider {
if (expanded) {
assert items.length == arr.length;
for (int i = 0; i < items.length; i++) fillItem(items[i], arr[i]);
- if (fInitialPeerId != null) {
+ if (fInitialPeerId != null && items.length > 0) {
if ("*".equals(fInitialPeerId)) {
fInitialPeerId = null;
peer_tree.setSelection(items[0]);

Back to the top