NeutronSubnet subnet = systemCRUD.getSubnet(ip.getSubnetUUID());\r
if (ip.getIpAddress() == null)\r
ip.setIpAddress(subnet.getLowAddr());\r
- if (!ip.getIpAddress().equals(subnet.getGatewayIP()))\r
+ if (!ip.getIpAddress().equals(subnet.getGatewayIP())) {\r
subnet.allocateIP(ip.getIpAddress());\r
- else\r
+ }\r
+ else {\r
subnet.setGatewayIPAllocated();\r
+ }\r
subnet.addPort(input);\r
}\r
INeutronNetworkCRUD networkIf = NeutronCRUDInterfaces.getINeutronNetworkCRUD(this);\r
while (fixedIPIterator.hasNext()) {\r
Neutron_IPs ip = fixedIPIterator.next();\r
NeutronSubnet subnet = systemCRUD.getSubnet(ip.getSubnetUUID());\r
- if (!ip.getIpAddress().equals(subnet.getGatewayIP()))\r
+ if (!ip.getIpAddress().equals(subnet.getGatewayIP())) {\r
subnet.releaseIP(ip.getIpAddress());\r
- else\r
+ }\r
+ else {\r
subnet.resetGatewayIPAllocated();\r
+ }\r
subnet.removePort(port);\r
}\r
return true;\r
Iterator<NeutronSubnet_IPAllocationPool> i = allocationPools.iterator();\r
while (i.hasNext()) {\r
NeutronSubnet_IPAllocationPool pool = i.next();\r
- if (ans == null)\r
+ if (ans == null) {\r
ans = pool.getPoolStart();\r
+ }\r
else\r
if (NeutronSubnet_IPAllocationPool.convert(pool.getPoolStart()) <\r
NeutronSubnet_IPAllocationPool.convert(ans))\r
if (r.length == 0) return "";\r
StringBuilder sb = new StringBuilder();\r
int i;\r
- for(i=0;i<r.length-1;i++)\r
+ for(i=0;i<r.length-1;i++) {\r
sb.append(r[i]+d);\r
+ }\r
return sb.toString()+r[i];\r
}\r
\r
V6FlowMod v6flowMod = (V6FlowMod) super.clone();
v6flowMod.setMatch(neoMatch);
List<OFAction> neoActions = new LinkedList<OFAction>();
- for (OFAction action : this.actions)
+ for (OFAction action : this.actions) {
neoActions.add((OFAction) action.clone());
+ }
v6flowMod.setActions(neoActions);
return v6flowMod;
} catch (CloneNotSupportedException e) {
* action list may be preceded by a padding of 0 to 7 bytes based upon this:
*/
short pad_size = (short) (((match_len + 7) / 8) * 8 - match_len);
- for (i = 0; i < pad_size; i++)
+ for (i = 0; i < pad_size; i++) {
data.get();
+ }
int action_len = this.length - MINIMUM_LENGTH - (match_len + pad_size);
if (action_len > 0)
this.actions = this.actionFactory.parseActions(data, action_len);
this.outPort = data.getShort();
this.match_len = data.getShort();
this.tableId = data.get();
- for (int i = 0; i < 3; i++)
+ for (int i = 0; i < 3; i++) {
data.get();//pad byte
+ }
}
data.putShort(this.outPort);
data.putShort(this.match_len);
data.put(this.tableId);
- for (int i = 0; i < 3; i++)
+ for (int i = 0; i < 3; i++) {
data.put((byte) 0x0);//pad byte
+ }
}
@Override
}
if (needQueue) {
- if (delay <= 0)
+ if (delay <= 0) {
ses.execute(stw);
- else
+ }
+ else {
ses.schedule(stw, delay, unit);
+ }
}
}
}
\ No newline at end of file