Project

General

Profile

Task #4670

Story #4654: Independent review of d1_common_java

- Regarding the style: The types are fully mutable with no field validations or constraints.

Added by Dave Vieglais over 7 years ago. Updated almost 7 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
-
Target version:
Start date:
2014-03-31
Due date:
% Done:

0%

Story Points:
Sprint:

Description

  • 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

History

#1 Updated by Rob Nahf over 7 years ago

  • Subject changed from - Regarding the style: The types are fully mutable with no filed validations or constraints. to - Regarding the style: The types are fully mutable with no field validations or constraints.

#2 Updated by Rob Nahf over 7 years ago

see also BeanValidation JCP project (unless it is what is being suggested by JSR 303)

http://beanvalidation.org/news/2013/05/02/bean-validation-1-1-is-a-spec/

#3 Updated by Dave Vieglais about 7 years ago

  • Target version set to Release Backlog

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 14.8 MB)