Uploaded image for project: 'Commons Lang'
  1. Commons Lang
  2. LANG-653

Provide a very basic ConcurrentInitializer implementation

    XMLWordPrintableJSON

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.0
    • Component/s: lang.concurrent.*
    • Labels:
      None

      Description

      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.

        Attachments

        1. lang-653.patch
          10 kB
          Oliver Heger

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              oheger Oliver Heger
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: