Story #4654: Independent review of d1_common_java
- Regarding the style: The types are fully mutable with no field validations or constraints.
- Regarding the style: The types are fully mutable with no filed validations or constraints. This leads to very fragile code by unwitting developers.
- Suggest adding JSR 303 annotations to fields (@Null, @NotNull, @Email, @Size etc)
- Suggest adding constructors / static factories to assist in correct usage
- Consider making them all interfaces and provide immutable implementations
- probably the overhead of this is too large, and means implementators have to register factories in e.g. Jixb
- this one is debatable, as these are probably used only for unmarshalling from XML which is known to be valid
- although on the response, it allows people to easily produce bad XML
- hmmmmmm, tricky one - will come back to this
#2 Updated by Rob Nahf over 9 years ago
see also BeanValidation JCP project (unless it is what is being suggested by JSR 303)