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

Avoid code duplication in GenericConglomerateController.fetch()

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Won't Fix
    • 10.7.1.1
    • None
    • Store
    • 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. fetch.diff
          2 kB
          Knut Anders Hatlen
        3. derby-4678-1a.diff
          3 kB
          Knut Anders Hatlen

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: