Open xibz opened 7 months ago
Currently all objects in the SDK are mutable. If a new event or object is needed, it should be recreated, instead of using setters to set things.
https://github.com/cdevents/sdk-java/blob/5d17b750fda57fd4a9d7ad2c5baec2bb4b9e2143/sdk/src/main/java/dev/cdevents/models/build/started/Subject.java#L113-L115
Instead we should utilize the builder pattern, imo. Look at lombok, https://projectlombok.org/features/Builder. This will make it a lot easier to generate these and make them properly immutable
Duplicate of #66
Currently all objects in the SDK are mutable. If a new event or object is needed, it should be recreated, instead of using setters to set things.
https://github.com/cdevents/sdk-java/blob/5d17b750fda57fd4a9d7ad2c5baec2bb4b9e2143/sdk/src/main/java/dev/cdevents/models/build/started/Subject.java#L113-L115
Instead we should utilize the builder pattern, imo. Look at lombok, https://projectlombok.org/features/Builder. This will make it a lot easier to generate these and make them properly immutable