Improve NeutronVpnUtils.getIsExternal()
[netvirt.git] / neutronvpn / impl / src / main / java / org / opendaylight / netvirt / neutronvpn / NeutronvpnUtils.java
index 626d0614eccdfc3eebc924d95555c2f6b3d1f607..f1228b1617fc98b3d62a9ace232be43d78bac52f 100644 (file)
@@ -1014,8 +1014,8 @@ public class NeutronvpnUtils {
     }
 
     static Boolean getIsExternal(Network network) {
-        return network.augmentation(NetworkL3Extension.class) != null
-                && network.augmentation(NetworkL3Extension.class).isExternal();
+        NetworkL3Extension ext = network.augmentation(NetworkL3Extension.class);
+        return ext != null && ext.isExternal();
     }
 
     static InstanceIdentifier<NetworkMap> buildNetworkMapIdentifier(Uuid networkId) {