public class TestCase {
publicstatic void main(String[] args) {
MyService myService = new MyServiceImpl();
myService.setGreeting("Hello");
Validator validator = Validation.buildDefaultValidatorFactory().getValidator();
validator.validate(myService); // throws IllegalArgumentException - wrong number of arguments
}
}
does not even compile, because there is no setGreeting on MyService. If I change the code like seen below it works as expected.
public class TestCase {
publicstatic void main(String[] args) {
MyServiceImpl myService = new MyServiceImpl();
myService.setGreeting("Hello");
Validator validator = Validation.buildDefaultValidatorFactory().getValidator();
validator.validate(myService); // throws IllegalArgumentException - wrong number of arguments
}
}
Could you please refine your example?
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
Btw, your example seems wrong as well.
does not even compile, because there is no setGreeting on MyService. If I change the code like seen below it works as expected.
Could you please refine your example?