[MDSAL-5] InstanceIdentifierBuilder needs to be a copy-based builder Created: 13/Feb/14 Updated: 04/Aug/18 Resolved: 04/Aug/18 |
|
| Status: | Resolved |
| Project: | mdsal |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | ||
| Reporter: | Robert Varga | Assignee: | Unassigned |
| Resolution: | Won't Do | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Operating System: All |
||
| Description |
|
The default InstanceIdentifierBuilder needs to be a copy builder, such that it has stable state and the following code is valid (seen in the wild): InstanceIdentifierBuilder<Foo> foob = InstanceIdentfier.builder(Foo.class); dataProviderService.removeOperationalData(foob.augmentation(Bar.class).build)); Once it is stable, also add hashCode()/equals() so it can be kept around safely. The current mutable version may be retained as an explicit MutableInstanceIdentifierBuilder or something of that kind. |
| Comments |
| Comment by Robert Varga [ 04/Aug/18 ] |
|
I don't this is worth doing. |