wildfly / galleon

Galleon Provisioning Tool
https://docs.wildfly.org/galleon/
Apache License 2.0
27 stars 30 forks source link

[GAL-255] Remove getBuilder() methods from various xxxConfig classes #231

Closed aloubyansky closed 5 years ago

aloubyansky commented 5 years ago

https://issues.jboss.org/browse/GAL-255

aloubyansky commented 5 years ago

@jfdenise TBH, I never liked getBuilder(), it effectively makes the XXXConfig classes mutable and if that's what's desired there are simpler ways to do that (i.e. setters, add/remove, etc added directly to the XXXConfig classes). The actual reason I wanted to have them immutable is to not worry about them being changed during provisioning (e.g. by a plugin or something). I still like the idea of keeping them (or actually making them again) immutable. So, unless it creates a problem (e.g. a noticeable performance impact) I'd like to get rid of getBuilder() methods.

jfdenise commented 5 years ago

I am fine with your changes, calling into the copy constructor makes for simpler undo too.