[BZ-1072629] fix compilation issue when using a class extending java.util.Date