Uploaded image for project: 'Commons Sandbox'
  1. Commons Sandbox
  2. SANDBOX-462

Refactoring of AccessibleObjectsRegistry

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • None
    • None
    • BeanUtils2
    • None

    Description

      Summary:
      The AccessibleObjectsRegistry class provides two get methods, while one is a convenient method for the other.

      Both methods take one conditional parameter, boolean exact, and the actual get method is very long, which makes it somehow complex to understand.

      Suggestion:
      What could be improved IMHO:

      • Instead of using conditional methods, like get(boolean doSomethingSpecialIfTrue, ...), it is more convenient to provide dedicated methods like getSomething() and getAnotherThing().
      • In this regard the difference between an exact or, let's call it, matching descriptor should be expressed through inheritance rather than object allocation (= expressing it by a field boolean exact).
      • The very long get method should be refined
      • Another very minor issue is the naming of the paramTypes field within the inner AccessibleObjectDescriptor class, which I would suggest to rename to parameterTypes to fit the naming of the other occurrences.

      Attachments

        1. Commons-BeanUtils2-462#1.patch
          2 kB
          Andre Diermann

        Activity

          People

            Unassigned Unassigned
            andd Andre Diermann
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: