-
Enhancement
-
Resolution: Done
-
Minor
-
None
TimerHandleImpl constructor first checks for null values with the parameters (id, timedObjectId, timerService), and throws IllegalArgumentException if any of them is null.
This constructor is only called from TimerImpl class, and these params are known to be non-null. So we should be able to remove these null checks, and associated methods in EjbLogger class.
public TimerHandleImpl(final String id, final String timedObjectId, final TimerServiceImpl service) throws IllegalArgumentException { if (id == null) { throw EjbLogger.EJB3_TIMER_LOGGER.idIsNull(); } if (timedObjectId == null) { throw EjbLogger.EJB3_TIMER_LOGGER.timedObjectNull(); } if (service == null) { throw EjbLogger.EJB3_TIMER_LOGGER.timerServiceIsNull(); } this.timedObjectId = timedObjectId; this.id = id; this.service = service; this.serviceName = service.getServiceName().getCanonicalName(); }