Uploaded image for project: 'ovsdb'
  1. ovsdb
  2. OVSDB-495

Eliminate ControllerMdsalUtils et al.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: High High
    • unspecified
    • None
    • Commons
    • None

      With the MD-SAL migration done, there are now two almost identical classes, as reported by CPD:

      [INFO] --- maven-pmd-plugin:3.13.0:cpd-check (cpd) @ utils.mdsal-utils ---
      [INFO] PMD version: 6.21.0
      [INFO] CPD Failure: Found 159 lines of duplicated code at locations:
      [INFO]     /home/nite/odl/ovsdb/utils/mdsal-utils/src/main/java/org/opendaylight/ovsdb/utils/mdsal/utils/ControllerNotifyingDataChangeListener.java line 70
      [INFO]     /home/nite/odl/ovsdb/utils/mdsal-utils/src/main/java/org/opendaylight/ovsdb/utils/mdsal/utils/NotifyingDataChangeListener.java line 68
      [INFO] CPD Failure: Found 56 lines of duplicated code at locations:
      [INFO]     /home/nite/odl/ovsdb/utils/mdsal-utils/src/main/java/org/opendaylight/ovsdb/utils/mdsal/utils/ControllerMdsalUtils.java line 100
      [INFO]     /home/nite/odl/ovsdb/utils/mdsal-utils/src/main/java/org/opendaylight/ovsdb/utils/mdsal/utils/MdsalUtils.java line 98
      [INFO] CPD Failure: Found 83 lines of duplicated code at locations:
      [INFO]     /home/nite/odl/ovsdb/utils/mdsal-utils/src/main/java/org/opendaylight/ovsdb/utils/mdsal/utils/ControllerMdsalUtilsAsync.java line 131
      [INFO]     /home/nite/odl/ovsdb/utils/mdsal-utils/src/main/java/org/opendaylight/ovsdb/utils/mdsal/utils/MdsalUtilsAsync.java line 130
      [INFO] CPD Failure: Found 14 lines of duplicated code at locations:
      [INFO]     /home/nite/odl/ovsdb/utils/mdsal-utils/src/main/java/org/opendaylight/ovsdb/utils/mdsal/utils/ControllerNotifyingDataChangeListener.java line 34
      [INFO]     /home/nite/odl/ovsdb/utils/mdsal-utils/src/main/java/org/opendaylight/ovsdb/utils/mdsal/utils/NotifyingDataChangeListener.java line 33
      [INFO] You have 4 CPD duplications. For more details see: /home/nite/odl/ovsdb/utils/mdsal-utils/target/cpd.xml
      

      the intent was the have the ones not starting with Controller to supersede the Controller classes and remove them. This needs to be rectified, as it is a maintenance burden an confuses downstreams as to which class to use.

            xcheara Chetan Arakere Gowdru
            rovarga Robert Varga
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 day
                1d