vt-middleware / ldaptive

A simple, extensible Java API for interacting with LDAP servers
56 stars 26 forks source link

Propagate immutable flag into all config. #258

Closed dfish3r closed 5 months ago

dfish3r commented 6 months ago

Expand the use immutable into all configuration objects. Add Immutable and AbstractImmutable classes. Update immutable objects to check for immutable on mutation. For array type configuration objects, implement copy protection on both getters and setters. Return unmodifiable collections from getters where appropriate. Review use of the final keyword for various extension points.

serac commented 6 months ago

I think the use of an interface to distinguish "immutable after configuration" is a very useful and clarifying concept. My only concern is the use of the name Immutable for this type, and I took the liberty to propose an alternative, Freezable: https://github.com/vt-middleware/ldaptive/pull/259.