struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <>
Subject [jira] [Commented] (WW-4827) Not fully initialized ObjectFactory tries to create beans
Date Tue, 01 Aug 2017 14:32:00 GMT


ASF GitHub Bot commented on WW-4827:

GitHub user lukaszlenart opened a pull request:

    WW-4827: post init

    Resolves [WW-4827](

You can merge this pull request into a Git repository by running:

    $ git pull post-init

Alternatively you can review and apply these changes as the patch at:

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #155
commit 14d7a6672ca8fadf7d09ee932933326e8db9597b
Author: Lukasz Lenart <>
Date:   2017-08-01T14:29:00Z

    Defines an interface to allow init an object after constructing it

commit 8549f446306187d187e94de86422cb0ad5a2d96f
Author: Lukasz Lenart <>
Date:   2017-08-01T14:30:16Z

    Implements PostInit logic

commit 32fed918c33961e42f29982c00cb4c5b9a178895
Author: Lukasz Lenart <>
Date:   2017-08-01T14:30:38Z

    Uses post init logic to delay initialisation of resources


> Not fully initialized ObjectFactory tries to create beans
> ---------------------------------------------------------
>                 Key: WW-4827
>                 URL:
>             Project: Struts 2
>          Issue Type: Bug
>    Affects Versions: 2.5.12
>            Reporter: Aleksandr Mashchenko
>            Priority: Critical
>             Fix For: 2.5.13
> This leads to issues when properties aren't injected in some cases, for example in custom
type converters.
> The problem happens when {{ObjectFactory}} tries to create a bean in the same time not
being fully initialized itself (e.g. {{ConverterFactory}} injected before {{Container}}).
> The issue happens more often under linux (all the time basically) than under windows,
so it cannot be reproduced 100%. This behavior boils down to the fact that {{clazz.getDeclaredMethods()}}
is used to get methods which needs to be injected and {{clazz.getDeclaredMethods()}} returned
elements are - _The elements in the array returned are not sorted and are not in any particular
> Proposed solution moves Container injection from method to constructor in ObjectFactory
> The downside is it isn't backward-compatible, custom object factories must be updated.

This message was sent by Atlassian JIRA

View raw message