[MDSAL-224] Binding DTOs unvalidated _value constructor Created: 20/Jan/17 Updated: 16/Mar/19 |
|
| Status: | Confirmed |
| Project: | mdsal |
| Component/s: | Binding codegen |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | ||
| Reporter: | Robert Varga | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Operating System: All |
||
| External issue ID: | 7604 |
| Description |
|
StringValueObjectFactory should not need be necessary to instantiate DTOs which have an already-validated value. That method needs to require a marker singleton object, whose use needs to carry same warnings as StringValueObjectFactory. We need to eliminate StringValueObjectFactory in general the use of Field.setAccessible() overrides. |
| Comments |
| Comment by Robert Varga [ 20/Jan/17 ] |
|
an example API would be: package mdsal.binding.javav2.spec; And a typedef DTO would look like: public class FooLeaf { static FooLeaf createUnsafe(UsageProof proof, String unsafe) { Verify.verify(proof == UsageProof.UNSAFE); return new FooLeaf(unsafe); }} |