All Questions
2 questions
0
votes
1
answer
404
views
Should i specify that my methods "throws ConstraintViolationException" if the exception is actually thrown by a CDI interceptor?
Here is a sample method:
@ApplicationScoped
public class MyClass{
public void getUser(@Min(1) int id){
//get User logic
}
}
I'm in a CDI environment with @ValidateOnExecution(type = ...
2
votes
1
answer
424
views
Use of validators for simple validations
I've been working in Liferay code, and I've come across this construct a few times:
List<?> list;
...
if (Validator.isNotNull(list)) {
//do stuff
}}
The source code for Validator.java looks ...