mirror of
https://github.com/DSheirer/sdrtrunk.git
synced 2026-11-20 12:36:07 -05:00
Merge pull request #185 from DSheirer/183-alias-list-throws-npe-on-empty-name
Resolves #183 - alias list throws NPE when created with a null or emp…
This commit is contained in:
@@ -631,11 +631,21 @@ public class AliasList implements Listener<AliasEvent>
|
||||
return mName;
|
||||
}
|
||||
|
||||
/**
|
||||
* Indicates if this alias list has a non-null, non-empty name
|
||||
*/
|
||||
private boolean hasName()
|
||||
{
|
||||
return mName != null && !mName.isEmpty();
|
||||
}
|
||||
|
||||
/**
|
||||
* Receive alias change event notifications and modify this list accordingly
|
||||
*/
|
||||
@Override
|
||||
public void receive(AliasEvent event)
|
||||
{
|
||||
if(hasName())
|
||||
{
|
||||
Alias alias = event.getAlias();
|
||||
|
||||
@@ -663,4 +673,5 @@ public class AliasList implements Listener<AliasEvent>
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user