Details
-
Type:
Sub-task
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 2.4-M3
-
Fix Version/s: 2.4-M4
-
Component/s: referencing
-
Labels:None
Description
WeakHashSet is currently pulling double duty:
- It functions as a normal set that happens to store its entries using WeakReferences
- it has additional methods (ie canonicalize) in order to function in a manner similar to String.intern
We should seperate these two concerns - primarily so what is going on can be understood.
- WeakHashSet - remains as set of weak references, methods providing additional functionality will be deprecated
- CanonicalSet cerated as an extension to WeakHashSet and proivdes a unique method
This bug report is done when we have updated the code and provided user docs on the result.
Sample use:
class FooFactory {
public Foo create(String definition) {
Foo created = new Foo(definition);
return (Foo) canionicalSet.unique(created);
}
}
Issue Links
- is related to
-
GEOT-1301
GeoToolsFactory renamed to ReferencingObjectFactory
-