Details
-
Improvement
-
Status: Resolved
-
Resolution: Won't Do
-
None
-
None
-
None
-
None
-
Operating System: All
Platform: 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));
dataProviderService.removeOperationalData(foob.augmentation(Baz.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.