[jira] Created: (LANG-545) Add ability to create a Future for a constant

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[jira] Created: (LANG-545) Add ability to create a Future for a constant

JIRA jira@apache.org
Add ability to create a Future for a constant
---------------------------------------------

                 Key: LANG-545
                 URL: https://issues.apache.org/jira/browse/LANG-545
             Project: Commons Lang
          Issue Type: New Feature
            Reporter: Stephen Colebourne
            Assignee: Stephen Colebourne
            Priority: Minor
             Fix For: 3.0


The concurrent Future interface is a nice way to gain access to an object at some future point in time. However, sometimes you need an implementation that isn't used for concurrency, but is used to avoid a null check or for testing.

Add a ConstantFuture class that implements the Future interface and returns the constant value.

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

Reply | Threaded
Open this post in threaded view
|

[jira] Updated: (LANG-545) Add ability to create a Future for a constant

JIRA jira@apache.org

     [ https://issues.apache.org/jira/browse/LANG-545?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Stephen Colebourne updated LANG-545:
------------------------------------

    Attachment: ConstantFuture.patch

> Add ability to create a Future for a constant
> ---------------------------------------------
>
>                 Key: LANG-545
>                 URL: https://issues.apache.org/jira/browse/LANG-545
>             Project: Commons Lang
>          Issue Type: New Feature
>            Reporter: Stephen Colebourne
>            Assignee: Stephen Colebourne
>            Priority: Minor
>             Fix For: 3.0
>
>         Attachments: ConstantFuture.patch
>
>
> The concurrent Future interface is a nice way to gain access to an object at some future point in time. However, sometimes you need an implementation that isn't used for concurrency, but is used to avoid a null check or for testing.
> Add a ConstantFuture class that implements the Future interface and returns the constant value.

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

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (LANG-545) Add ability to create a Future for a constant

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

    [ https://issues.apache.org/jira/browse/LANG-545?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12774577#action_12774577 ]

Henri Yandell commented on LANG-545:
------------------------------------

Seems good.

> Add ability to create a Future for a constant
> ---------------------------------------------
>
>                 Key: LANG-545
>                 URL: https://issues.apache.org/jira/browse/LANG-545
>             Project: Commons Lang
>          Issue Type: New Feature
>            Reporter: Stephen Colebourne
>            Assignee: Stephen Colebourne
>            Priority: Minor
>             Fix For: 3.0
>
>         Attachments: ConstantFuture.patch
>
>
> The concurrent Future interface is a nice way to gain access to an object at some future point in time. However, sometimes you need an implementation that isn't used for concurrency, but is used to avoid a null check or for testing.
> Add a ConstantFuture class that implements the Future interface and returns the constant value.

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

Reply | Threaded
Open this post in threaded view
|

[jira] Resolved: (LANG-545) Add ability to create a Future for a constant

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

     [ https://issues.apache.org/jira/browse/LANG-545?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Oliver Heger resolved LANG-545.
-------------------------------

    Resolution: Fixed

Patch applied in revision 833709. Many thanks.

> Add ability to create a Future for a constant
> ---------------------------------------------
>
>                 Key: LANG-545
>                 URL: https://issues.apache.org/jira/browse/LANG-545
>             Project: Commons Lang
>          Issue Type: New Feature
>            Reporter: Stephen Colebourne
>            Assignee: Stephen Colebourne
>            Priority: Minor
>             Fix For: 3.0
>
>         Attachments: ConstantFuture.patch
>
>
> The concurrent Future interface is a nice way to gain access to an object at some future point in time. However, sometimes you need an implementation that isn't used for concurrency, but is used to avoid a null check or for testing.
> Add a ConstantFuture class that implements the Future interface and returns the constant value.

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