Uploaded image for project: 'vtn'
  1. vtn
  2. VTN-47

FindBugs detected bugs in manager.neutron bundle.

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Resolution: Done
    • unspecified
    • None
    • VTN Manager
    • 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()))

      { modify = true; }

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            Unassigned Unassigned
            yasuda Shigeru Yasuda
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: