mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-04 23:05:47 +02:00
[fix] getHostNames() return String[] containing invalid null values
This commit is contained in:
parent
efa8873ec5
commit
aefb17b2fb
1 changed files with 5 additions and 1 deletions
|
@ -1946,7 +1946,11 @@ public class SystemRegistry implements ISystemRegistryUI, ISystemModelChangeEven
|
||||||
IHost[] conns = getHosts();
|
IHost[] conns = getHosts();
|
||||||
for (int idx = 0; idx < conns.length; idx++)
|
for (int idx = 0; idx < conns.length; idx++)
|
||||||
{
|
{
|
||||||
if (!v.contains(conns[idx].getHostName()))
|
// Note: IHost.getHostName() can return null if the connection is using
|
||||||
|
// any non-IP based connectivity (serial line, JTAG, ...). Adding
|
||||||
|
// null unchecked to the result list will trigger InvalidArgumentExceptions
|
||||||
|
// in SystemConnectionForm.
|
||||||
|
if (conns[idx].getHostName() != null && !v.contains(conns[idx].getHostName()))
|
||||||
{
|
{
|
||||||
if (conns[idx].getSystemType().getName().equals(systemType))
|
if (conns[idx].getSystemType().getName().equals(systemType))
|
||||||
v.addElement(conns[idx].getHostName());
|
v.addElement(conns[idx].getHostName());
|
||||||
|
|
Loading…
Add table
Reference in a new issue