Uploaded image for project: 'logback'
  1. logback
  2. LOGBACK-236

Small refactoring of ch.qos.logback.core.joran.action.PropertyAction#stringToScope

    XMLWordPrintable

Details

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • None
    • logback-core
    • None

    Description

      private Scope stringToScope(String scopeStr) {
      for (Scope scope : Scope.values())

      { if (scope.name().equalsIgnoreCase(scopeStr)) return scope; }

      return Scope.LOCAL;
      }

      /////

      If you introduce further scopes down the road you do not have to modify this code again – the current switch statement would have to be modified.

      Attachments

        Activity

          People

            logback-dev Logback dev list
            sdavids Sebastian Davids
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: