mirror of https://github.com/apache/cloudstack.git
Check for null just in case
This code was recently switched from using HashMap to ConcurrentHashMap. ConcurrentHashMap does not accept null keys and will through a NPE. Adding a null check just in case somebody passes null.
This commit is contained in:
parent
f8976a41ce
commit
b3c178480b
|
|
@ -57,6 +57,10 @@ public class HypervisorGuruManagerImpl extends ManagerBase implements Hypervisor
|
|||
|
||||
@Override
|
||||
public HypervisorGuru getGuru(HypervisorType hypervisorType) {
|
||||
if (hypervisorType == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
HypervisorGuru result = _hvGurus.get(hypervisorType);
|
||||
|
||||
if ( result == null ) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue