Details
-
Bug
-
Status: Resolved
-
Resolution: Done
-
None
-
None
-
None
-
None
-
Operating System: Mac OS
Platform: PC
-
1407
Description
When creating a builder for a given object, i.e. "NodeConnectorBuilder ncBuilder = new NodeConnectorBuilder(nc)"
The ncBuilder will initialize its "augmentation" HashMap variable to be a SingletonMap when nc only has 1 augmentation.
However, I want to add augmentations onto ncBuilder using the "addAugmentation" method. Using the "addAugmentation" method will throw an UnsupportedOperationException because SingletonMap does not override AbstractMap's "put" method.
Here is an example of the NodeConnectorBuilder
if (base instanceof NodeConnectorImpl) {
NodeConnectorImpl _impl = (NodeConnectorImpl) base;
switch (_impl.augmentation.size())
}
The relevant file is BuilderTemplate.xtend