Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Emit warnings for precision loss #5
This follows up on #1; If built-in conversion causes a possible precision loss (e.g. from
It might be a good idea to make it configurable either globally and or via an attribute in
I am wondering here, what are the options for the developer once an error or a warning was raised?
Either the developer is ok with the precision-loss, then how does she get rid of the warning/error?
I don't know MapStruct all that well so I might be missing an obvious answer.
Hi @lesaint, we haven't thought about it in detail, but I could envision the following
They'd have to change the type of the target property to accept the source property without loss.
We didn't go with any mapping technology for now.. we're still writing what we call "translators" to convert from one type to another.
It's still a tedious process but we're slowly removing intermediary objects. We realize that this increases coupling but we feel like the pros outweigh the cons.
pushed a commit
Nov 26, 2017
There are actually 2 interesting things, which are not the same.
I think we need to distinguish these cases.
Note: although not orthogonal, I would propose to only apply the