Uploaded image for project: '[Read Only] - Hippo Plugins'
  1. [Read Only] - Hippo Plugins
  2. HIPPLUG-413

Poll component is not thread safe

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • High
    • Resolution: Won't Fix
    • None
    • None
    • plugins-poll
    • None

    Description

      The PollComponent class (org.onehippo.forge.poll.component.PollComponent) is not thread safe.
      It declares a shared instance variable called pollProvider, which is created by passing the component as a parameter (the same object that defines this variable). Like this:

      public class PollComponent extends BaseHstComponent {
      private final PollProvider pollProvider = new PollProvider(this);
      .....
      }

      Since hst components are pooled, this means that for many requests, the same pollProvider variable will be used. And since this variable holds the current hst component as an instance variable as well, concurrency issues will most probably arise

      Attachments

        Activity

          People

            jsheriff Junaidh Kadhar Sheriff
            mchatzidakis Minos Chatzidakis
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: