Lucene.Net
  1. Lucene.Net
  2. LUCENENET-434

Remove AnonymousXXXX classes to increase readablity

    Details

    • Type: Improvement Improvement
    • Status: In Progress
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: Lucene.Net 2.9.4g, Lucene.Net 3.0.3
    • Fix Version/s: Lucene.Net 3.6
    • Component/s: Lucene.Net Core
    • Labels:
      None

      Description

      Replace AnonymousXXXX classes inhereted from JLCA which make the code impossible to read.
      Follow Digy's template to replace the single abstract method with Func<> or Action<>

      like in FilterCache<T> from:
      protected abstract object MergeDeletes(IndexReader reader, object value);
      to:
      Func<IndexReader, object, object> MergeDeletes;

      Determine a solution to the classes with more than 1 abstract method without diverging much from Java.

        Activity

        Hide
        Scott Lombard added a comment -

        I replaced the abstract method with a Func<>. Then used a anonymous constructor when creating a new instance.

        Show
        Scott Lombard added a comment - I replaced the abstract method with a Func<>. Then used a anonymous constructor when creating a new instance.
        Hide
        Digy added a comment -

        very nice.

        Show
        Digy added a comment - very nice.
        Hide
        Scott Lombard added a comment -

        This does not affect the function of the core it provides better readablity. The classes were created as part of the automated porting tool used in the orginal conversion. Removing them is a process that can happen over time.

        Show
        Scott Lombard added a comment - This does not affect the function of the core it provides better readablity. The classes were created as part of the automated porting tool used in the orginal conversion. Removing them is a process that can happen over time.
        Hide
        Christopher Currens added a comment -

        Moving to 3.5. As ugly as they are, they don't hurt anything except our eyes leaving them in there. As we port to 3.5, we can remove these as much as we can.

        Show
        Christopher Currens added a comment - Moving to 3.5. As ugly as they are, they don't hurt anything except our eyes leaving them in there. As we port to 3.5, we can remove these as much as we can.

          People

          • Assignee:
            Scott Lombard
            Reporter:
            Scott Lombard
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Due:
              Created:
              Updated:

              Time Tracking

              Estimated:
              Original Estimate - 168h
              168h
              Remaining:
              Time Spent - 13h Remaining Estimate - 155h
              155h
              Logged:
              Time Spent - 13h Remaining Estimate - 155h
              13h

                Development