Return singleton empty collection instead of null in Read service code
[controller.git] / opendaylight / sal / implementation / src / main / java / org / opendaylight / controller / sal / implementation / internal / ReadService.java
index bdd546055c22ce29228d587b0a7cc266a7a700e6..12de35f53677492581412017e9c763de96a05c0b 100644 (file)
@@ -12,6 +12,7 @@ package org.opendaylight.controller.sal.implementation.internal;
 import java.net.InetAddress;
 import java.net.UnknownHostException;
 import java.util.ArrayList;
+import java.util.Collections;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
@@ -201,7 +202,7 @@ public class ReadService implements IReadService, CommandProvider, IPluginOutRea
             }
         }
         logger.warn("Plugin {} unavailable", node.getType());
-        return null;
+        return Collections.emptyList();
     }
 
     @Override
@@ -213,7 +214,7 @@ public class ReadService implements IReadService, CommandProvider, IPluginOutRea
             }
         }
         logger.warn("Plugin {} unavailable", node.getType());
-        return null;
+        return Collections.emptyList();
     }
 
     @Override
@@ -276,7 +277,7 @@ public class ReadService implements IReadService, CommandProvider, IPluginOutRea
             }
         }
         logger.warn("Plugin {} unavailable", node.getType());
-        return null;
+        return Collections.emptyList();
     }
 
     @Override
@@ -288,7 +289,7 @@ public class ReadService implements IReadService, CommandProvider, IPluginOutRea
             }
         }
         logger.warn("Plugin {} unavailable", node.getType());
-        return null;
+        return Collections.emptyList();
     }
 
 
@@ -327,7 +328,7 @@ public class ReadService implements IReadService, CommandProvider, IPluginOutRea
             }
         }
         logger.warn("Plugin {} unavailable", node.getType());
-        return null;
+        return Collections.emptyList();
     }
 
     @Override