Uploaded image for project: 'Derby'
  1. Derby
  2. DERBY-4678

Avoid code duplication in GenericConglomerateController.fetch()

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Won't Fix
    • Affects Version/s: 10.7.1.1
    • Fix Version/s: None
    • Component/s: Store
    • Labels:
      None

      Description

      GenericConglomerateController has two methods named fetch(). One of these methods has a parameter called waitForLock, whereas the other one doesn't have such a parameter. When I diffed the two methods, the only difference I found, apart from a couple of whitespace diffs, was that the method with the waitForLock parameter called lockPosititionForRead/lockPositionForWrite using the parameter value, and the other method called them with a hard-coded value of true.

      To avoid duplication of code, fetch(RowLocation,DataValueDescriptor[],FormatableBitSet) should forward calls to fetch(RowLocation,DataValueDescriptor[],FormatableBitSet,boolean).

        Attachments

        1. FetchTest.java
          2 kB
          Knut Anders Hatlen
        2. derby-4678-1a.diff
          3 kB
          Knut Anders Hatlen
        3. fetch.diff
          2 kB
          Knut Anders Hatlen

          Issue Links

            Activity

              People

              • Assignee:
                knutanders Knut Anders Hatlen
                Reporter:
                knutanders Knut Anders Hatlen
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: