I have web application written in Java. Im using BeanUtils.copyProperties method. If a date field is null, it throws an error. I solved it by using ConvertUtils.register method.
ConvertUtils.register(new DateConverter(null), Date.class);
It works now, but what is the correct way of using ConvertUtils.register. Where should it be placed?