Details
-
Bug
-
Status: Resolved
-
Resolution: Done
-
unspecified
-
None
-
None
-
Operating System: All
Platform: All
-
2239
Description
FindBugs detected bugs in manager.neutron bundle.
1. OVSDBPluginEventHandler.getSwitchIdFromInterface() may cause NPE because it
dereferences Port instance before null check.
Port port = ovsdbConfigService.getTypedRow(node, Port.class, ovsdbConfigService.getRow(node, "Port", portId.toString()));
LOG.trace(" Node or Port getRow ={} ", port.getRow());
2. The following fields in OVSDBPluginEventHandler class should not be static
because they are handled by instance methods only.
- integrationBridgeName
- failmode
- protocols
- portname
3. OVSDBPluginEventHandler.getSystemProperties() should close FileInputStream.
try
{ File f = new File("configuration/vtn.ini"); String filepath = f.getAbsolutePath(); FileInputStream in = new FileInputStream(filepath); configProp.load(in); LOG.trace("loaded Integration bridge Configuartion details from vtn.ini"); } catch (Exception e) {
LOG.trace("Exception {} occured while reading SystemProperties ", e);
}
4. PortHandler.canModifyInterface() uses "==" operator to compare Boolean
instances. Naturally it should be done by equals(Object) method.
Boolean portAdminState = port.getAdminStateUp();
if ((portAdminState != null) && (portAdminState != vIf.getEnabled()))