project, when we send object from the service to the dao (for example), everytime we have to check if the object Is not null. E.g., for some filters for a query: if(filter!=null && filter.dtMin!=null && filter.dtMax!=){
//Do something
}
How can we avoid those checks? With some custom validator maybe? Some best practices advice would be really appreciate
Are you using spring? And where the object is coming from?
Обсуждают сегодня