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

    XMLWordPrintable

Details

    • Enhancement
    • Status: Closed
    • Could
    • Resolution: Fixed
    • 0.1.0
    • 0.2.0
    • None
    • 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());

      Gliffy Diagrams

        Attachments

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: