Uploaded image for project: 'Location Based Access Control'
  1. Location Based Access Control
  2. LBAC-29

Refactor SearchAdvisers to increase readability and extensibility of these classes

    Details

    • Type: Enhancement
    • Status: Closed
    • Priority: Could
    • Resolution: Fixed
    • Affects Version/s: 0.1.0
    • Fix Version/s: 0.2.0
    • Labels:
      None
    • Complexity:
      Low

      Description

      Currently, all SearchAdvisers except LocationSearchAdviser have their matches methods implemented in very unaesthetic way. They are just a chain of unnecessary calls to method.getName(), ifs and elses, which is usually considered bad design.

      They could be refactored to look similiar how matches is implemented in LocationSearchAdviser. Use of Sets (which are made for purposes like this, performance-wise identical to current impl), will:

      • store the method names in a collection which could be reused in the future for other classes/methods
      • simplify the implementation of matches to a simple call, like return set.contains(method.getName());

        Attachments

          Activity

            People

            • Assignee:
              anuar2k Aleksander W
              Reporter:
              anuar2k Aleksander W
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: