Details
-
Bug
-
Status: Closed
-
High
-
Resolution: Won't Fix
-
None
-
None
-
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