Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUwe Stieber2012-09-27 08:21:21 +0000
committerUwe Stieber2012-09-27 08:21:21 +0000
commit6186134c136c6d8fcad43ee38352548fd7eb5034 (patch)
tree24d8aa31f72570bed0226a97b16bea018c095c70 /target_explorer
parent6962b611b6cb641a1364285391a2b3dfb300f465 (diff)
downloadorg.eclipse.tcf-6186134c136c6d8fcad43ee38352548fd7eb5034.tar.gz
org.eclipse.tcf-6186134c136c6d8fcad43ee38352548fd7eb5034.tar.xz
org.eclipse.tcf-6186134c136c6d8fcad43ee38352548fd7eb5034.zip
Target Explorer: Fix SIOOB exception
Diffstat (limited to 'target_explorer')
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/ScannerRunnable.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/ScannerRunnable.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/ScannerRunnable.java
index a6bd109ce..ffe413c25 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/ScannerRunnable.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/ScannerRunnable.java
@@ -203,7 +203,7 @@ public class ScannerRunnable implements Runnable, IChannel.IChannelListener {
// Don't ask for discovered peers on the same host or in the same network
if (ip != null && !"".equals(ip) && !IPAddressUtil.getInstance().isLocalHost(ip)) { //$NON-NLS-1$
boolean sameNet = false;
- String net = ip.substring(0, ip.lastIndexOf('.'));
+ String net = ip.lastIndexOf('.') != -1 ? ip.substring(0, ip.lastIndexOf('.')) : ip;
String[] addresses = IPAddressUtil.getInstance().getLocalHostAddresses(IPAddressUtil.HOSTMAP_ANY_UNICAST
| IPAddressUtil.HOSTMAP_CANONICALADDR
| IPAddressUtil.HOSTMAP_LOOPBACK

Back to the top