Skip to main content

All Questions

Tagged with
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 = ...
cidra's user avatar
  • 363
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 ...
patstuart's user avatar
  • 653