You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Oliver Heger (JIRA)" <ji...@apache.org> on 2010/10/03 22:16:33 UTC

[jira] Created: (LANG-653) Provide a very basic ConcurrentInitializer implementation

Provide a very basic ConcurrentInitializer implementation
---------------------------------------------------------

                 Key: LANG-653
                 URL: https://issues.apache.org/jira/browse/LANG-653
             Project: Commons Lang
          Issue Type: New Feature
          Components: lang.concurrent.*
            Reporter: Oliver Heger


It might be useful - for instance in unit tests - to have a simple implementation of {{ConcurrentInitializer}} which just returns an object that was passed to the constructor. The object is stored in a final field, so no synchronization is needed. In contrast to {{LazyInitializer}} this class could be named {{EagerInitializer}} because the object must already exist.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (LANG-653) Provide a very basic ConcurrentInitializer implementation

Posted by "Henri Yandell (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LANG-653?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12920820#action_12920820 ] 

Henri Yandell commented on LANG-653:
------------------------------------

Looks good; +1.

> Provide a very basic ConcurrentInitializer implementation
> ---------------------------------------------------------
>
>                 Key: LANG-653
>                 URL: https://issues.apache.org/jira/browse/LANG-653
>             Project: Commons Lang
>          Issue Type: New Feature
>          Components: lang.concurrent.*
>            Reporter: Oliver Heger
>         Attachments: lang-653.patch
>
>
> It might be useful - for instance in unit tests - to have a simple implementation of {{ConcurrentInitializer}} which just returns an object that was passed to the constructor. The object is stored in a final field, so no synchronization is needed. In contrast to {{LazyInitializer}} this class could be named {{EagerInitializer}} because the object must already exist.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (LANG-653) Provide a very basic ConcurrentInitializer implementation

Posted by "Oliver Heger (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LANG-653?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Oliver Heger closed LANG-653.
-----------------------------

       Resolution: Fixed
    Fix Version/s: 3.0

Patch applied in revision 1026487. The user guide was updated, too.

> Provide a very basic ConcurrentInitializer implementation
> ---------------------------------------------------------
>
>                 Key: LANG-653
>                 URL: https://issues.apache.org/jira/browse/LANG-653
>             Project: Commons Lang
>          Issue Type: New Feature
>          Components: lang.concurrent.*
>            Reporter: Oliver Heger
>             Fix For: 3.0
>
>         Attachments: lang-653.patch
>
>
> It might be useful - for instance in unit tests - to have a simple implementation of {{ConcurrentInitializer}} which just returns an object that was passed to the constructor. The object is stored in a final field, so no synchronization is needed. In contrast to {{LazyInitializer}} this class could be named {{EagerInitializer}} because the object must already exist.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (LANG-653) Provide a very basic ConcurrentInitializer implementation

Posted by "Oliver Heger (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LANG-653?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Oliver Heger updated LANG-653:
------------------------------

    Attachment: lang-653.patch

Proposed patch. I settled for the name {{ConstantInitializer}}.

> Provide a very basic ConcurrentInitializer implementation
> ---------------------------------------------------------
>
>                 Key: LANG-653
>                 URL: https://issues.apache.org/jira/browse/LANG-653
>             Project: Commons Lang
>          Issue Type: New Feature
>          Components: lang.concurrent.*
>            Reporter: Oliver Heger
>         Attachments: lang-653.patch
>
>
> It might be useful - for instance in unit tests - to have a simple implementation of {{ConcurrentInitializer}} which just returns an object that was passed to the constructor. The object is stored in a final field, so no synchronization is needed. In contrast to {{LazyInitializer}} this class could be named {{EagerInitializer}} because the object must already exist.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.