You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@jmeter.apache.org by bu...@apache.org on 2016/01/06 13:13:55 UTC

[Bug 58790] Issue in CheckDirty and its relation to ActionRouter

https://bz.apache.org/bugzilla/show_bug.cgi?id=58790

--- Comment #1 from Sebb <se...@apache.org> ---
(In reply to Philippe Mouawad from comment #0)
> Currently there is an issue in ActionRouter#getInstance()
> It returns a partially initialized object so a fix would be to use a local
> object and affect it :
>     public static ActionRouter getInstance() {
>         if (router == null) {
>             synchronized (LOCK) {
>                 if(router == null) {
>                     ActionRouter router = new ActionRouter();
>                     router.populateCommandMap();
>                     ActionRouter.router = router;
>                 }
>             }
>         }
>         return router;
>     }

Alternatively one could use the IODH idiom.

> 
> But due to CheckDirty using getInstance() in its constructor to register
> itself as a PreAction to ExitCommand, it leads to a StackoverflowError.

Not sure I follow this.

> Even without fixing this issue, it reveals an issue that could occur if a
> Constructor of an AbstractCommand subclass uses ActionRouter.getInstance()

-- 
You are receiving this mail because:
You are the assignee for the bug.