Take my first example. For instance, if I run the program 10 times is it supposed to output two different results?
I would expect though, yes. However, I also seen now that the result can differ. TBH, I am not sure what's going on here.
In the first example I have @NotNull only in Service.sayHello. If I put @NotNull in both Service.sayHello and ServiceImpl.sayHello i'm always getting the same output. I mean the validator recognises the name of the parameter, in this case "world" instead of "arg0".
Ok. Normally, you cannot add constraints into the impl class. It "works" here, since its in both cased @NotNull.
After debugging, it seems the validator picks the "world" parameter name for Service.sayHello and "arg0" for ServiceImpl.sayHello, and then in the end uses only one. Sometimes is the first and other is de second.
Thanks for the hint.
In the second example I did a test with MyrParameterNameProvider and NameAnnotationParanamer to assure there was no problem with the paranamer library specially with debug symbols and byecode.
Ok.
Got you now and I also saw the different outcomes. We'll look into it. Thanks for reporting the issue.
|