1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-04 14:55:41 +02:00

[fix] getHostNames() return String[] containing invalid null values

This commit is contained in:
Uwe Stieber 2007-04-04 15:23:16 +00:00
parent efa8873ec5
commit aefb17b2fb

View file

@ -1946,7 +1946,11 @@ public class SystemRegistry implements ISystemRegistryUI, ISystemModelChangeEven
IHost[] conns = getHosts();
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))
v.addElement(conns[idx].getHostName());