Uploaded image for project: 'WildFly Core'
  1. WildFly Core
  2. WFCORE-839

Don't store state in InMemoryAuditLogHandlerResourceDefinition

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Minor Minor
    • 2.0.0.Beta3
    • 2.0.0.Alpha11
    • Management
    • None

      https://github.com/wildfly/wildfly-core/pull/890#discussion_r35354989

      private static final Map<String, InMemoryAuditLogHander> histories = Collections.synchronizedMap(new HashMap<String, InMemoryAuditLogHander>());

      We don't want to delay merging this PR for this, but once it's merged please send up a PR to make this a non-static field and have the InMemoryAuditLogHandlerResourceDefinition pass a ref to it to the handlers when it constructs them.

      Having this be static is no big deal in this case, but I don't want anyone looking at kernel code and thinking that using static fields to store state is a good practice.

              ehugonne1@redhat.com Emmanuel Hugonnet
              ehugonne1@redhat.com Emmanuel Hugonnet
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: