Hmm, that doesn't look right to me - in that case I would need to compare the date with an (arbitrary) fixed value. I see the point for the null check So what about adding a boolean method, hasTimedOut() instead and always return a correct date?
Carsten 2014/1/14 Bertrand Delacretaz <bdelacre...@apache.org> > Hi, > > On Fri, Jan 10, 2014 at 3:57 PM, Carsten Ziegeler <cziege...@apache.org> > wrote: > > ...the interesting case still is b) - I see the point that we return WARN > > in that case - I would assume that getElapsedTimeInMs returns -1 and > > getFinishedAt() returns null. So both could be used as an indicator for > > this situation.... > > Turns out that I had an unsent draft on this, sorry...I agree in > principle, WARN is ok to indicate "no result available". > > I'd return the epoch (new Date(1L) ?) for getFinishedAt() instead of > null which requires you to check for null everywhere you use that. > > Returning > -- Carsten Ziegeler cziege...@apache.org