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

ch.qos.logback.core.ContextBase.setStatusManager

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.0.13
    • Fix Version/s: 1.1.0
    • Component/s: logback-core
    • Labels:
      None

      Description

      the code is wrong(ch.qos.logback.core.ContextBase.setStatusManager)?
      /**

      • Set the {@link StatusManager}

        for this context. Note that by default this

      • context is initialized with a {@link BasicStatusManager}

        . A null value for

      • the 'statusManager' argument is not allowed.
      • <p/>
      • <p> A malicious attacker can set the status manager to a dummy instance,
      • disabling internal error reporting.
        *
      • @param statusManager the new status manager
        */
        public void setStatusManager(StatusManager statusManager) {
        // this method was added in response to http://jira.qos.ch/browse/LBCORE-35
        if (sm == null) { throw new IllegalArgumentException("null StatusManager not allowed"); }
        this.sm = statusManager;
        }


        following right?

        public void setStatusManager(StatusManager statusManager) {
        // this method was added in response to http://jira.qos.ch/browse/LBCORE-35
        if (statusManager == null) { throw new IllegalArgumentException("null StatusManager not allowed"); }

        this.sm = statusManager;
        }

        Attachments

          Activity

            People

            • Assignee:
              tony19 Tony Trinh
              Reporter:
              fhdragon F.H Dragon
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: