General clean-ups
[netvirt.git] / vpnservice / ipv6service / impl / src / main / java / org / opendaylight / netvirt / ipv6service / VirtualSubnet.java
index 3624ed57f4acac58a641482c395acc4d0a71a576..84ec72caeed1d6dc861041e79c572d60a2d8b217 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015 Dell Inc. and others.  All rights reserved.
+ * Copyright © 2015, 2017 Dell Inc. and others.  All rights reserved.
  *
  * This program and the accompanying materials are made available under the
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
@@ -8,9 +8,7 @@
 
 package org.opendaylight.netvirt.ipv6service;
 
-import java.util.Collection;
 import java.util.HashMap;
-import java.util.Iterator;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpPrefix;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.Uuid;
@@ -138,11 +136,7 @@ public class VirtualSubnet  {
     }
 
     public void removeSelf() {
-        Collection<VirtualPort> intfs = interfaces.values();
-
-        Iterator itr = intfs.iterator();
-        while (itr.hasNext()) {
-            VirtualPort intf = (VirtualPort) itr.next();
+        for (VirtualPort intf : interfaces.values()) {
             if (intf != null) {
                 intf.removeSubnetInfo(subnetUUID);
             }
@@ -151,6 +145,5 @@ public class VirtualSubnet  {
         if (router != null) {
             router.removeSubnet(this);
         }
-        return;
     }
 }