Uploaded image for project: 'Hippo Plugins'
  1. Hippo Plugins
  2. HIPPLUG-413

Poll component is not thread safe

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: High
    • Resolution: Won't Fix
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Poll
    • Labels:
      None
    • Similar issues:

      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

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

              Dates

              • Created:
                Updated:
                Resolved: