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:
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();
|
||||
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());
|
||||
|
|
Loading…
Add table
Reference in a new issue