Example of a static factory for ResettableLazyReference that accepts a Supplier so we can use lambda magic there.
Sebastian Pawlak
Branch: sebastian_pawlak/atlassian-util-concurrent:static-factories-for-java8
Branch: atlassian/atlassian-util-concurrent:master
Merged
Merged pull request
Merged in sebastian_pawlak/atlassian-util-concurrent/static-factories-for-java8 (pull request #7)
I have created this PR on my fork because I have no write permissions for atlassian-util-concurrent project.
Basically the idea is to have static factories for LazyReference and its siblings so we can use lambda expressions to create instances of such. This is just an example of how we could achieve that and once approved could be applied to other classes. Note that this a similar approach as in Guava for example in CacheLoader class.
Also we would like this change to go in 2.6.x as this is the version we are using in JIRA.