The class you had inherited is only 1 step removed from being fully open to the outside (it would require making the fields public
) which is potentially bad as few bugs could hide in uses of this class. Even if the class is being consumed in sane way, you cannot guarantee it into the future unless you close it off a bit.
You can construct it with no values, with all values, you can build it with only some values and you can mutate it through setters.
This most likely breaks the equals
and hashcode
contract too (those should be calculated using the same set of immutable fields - a very rough rule of thumb which makes sense when using lombok, but obviously there is more).
I would first identify the uses of this class and find out whether it can be refactored to something closer to immutable.