You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm experimenting with AWS CDK in Java and have to build some Property beans for cloud constructs. Usually it is a mix of mostly predefined options and some options that are later resolved (e.g. IDs of dependent constructs). Therefore I thought it might be worth a try to mix immutable.io with lightbend config and except of one small issue everything works out fine.
When I annotate a property in an immutable bean class with @optional the generated bean class doesn't have the annotation because @optional isn't marked as inheritable. In my mind it should be and I haven't found a reason in the lightbend config discussions why not. (Maybe to harsh but in my mind whenever you override a field in an inherited bean and don't want it to inherit the parent annotations, you already have a code smell.)
the second point belongs to #570 where the @optional at getters is only evaluated if the field does not exist. Even if the field exists and doesn't have the annotation, the corresponding getter should also be evaluated for the annotation.
I will try to deliver a PR as a discussion base.
The text was updated successfully, but these errors were encountered:
I'm experimenting with AWS CDK in Java and have to build some Property beans for cloud constructs. Usually it is a mix of mostly predefined options and some options that are later resolved (e.g. IDs of dependent constructs). Therefore I thought it might be worth a try to mix immutable.io with lightbend config and except of one small issue everything works out fine.
When I annotate a property in an immutable bean class with @optional the generated bean class doesn't have the annotation because @optional isn't marked as inheritable. In my mind it should be and I haven't found a reason in the lightbend config discussions why not. (Maybe to harsh but in my mind whenever you override a field in an inherited bean and don't want it to inherit the parent annotations, you already have a code smell.)
the second point belongs to #570 where the @optional at getters is only evaluated if the field does not exist. Even if the field exists and doesn't have the annotation, the corresponding getter should also be evaluated for the annotation.
I will try to deliver a PR as a discussion base.
The text was updated successfully, but these errors were encountered: