In some situations it would be helpful to use a reference to an object, e.g. for parameters by reference
or for anonymous methods
Additionally it is sometimes useful to keep the reference in other places than in shared memory, e.g. in a ThreadLocal or in case of a web application in a scoped reference or even in combination with some other persistence mechanism. Basically I am proposing the interface ObjectReference:
and the two implementations MemoryReference and ThreadLocalReference in the new package org.apache.commons.lang3.reference. I've seen such or similar types in various libraries.
Unit test will be provided also.
|Fix Version/s||3.1 [ 12313371 ]|
|Fix Version/s||3.0 [ 12311714 ]|
|Workflow||jira [ 12485485 ]||Default workflow, editable Closed status [ 12602230 ]|
|Fix Version/s||Review Patch [ 12325281 ]|
|Fix Version/s||3.x [ 12313371 ]|