This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] | |
On Fri, 2005-11-25 at 16:36 +0100, Martin Egholm Nielsen wrote:
> > Having said that, however, it's not clear to me that the line
> >
> > if (time < 0)
> > throw new IllegalArgumentException("negative time");
> >
> > serves any useful purpose.
>
> It's nice fact stated through an exception! :-)
> Without having studied the implemented, I reckon removing this would
> probably work with negative times, as well.
I wrote this code, but I cannot remember whether I needed this fact or
not. Looking at some documentation I see there are similar restrictions
on the start time, initial delay and repeat period to be positive. I
probably didn't think too hard about this and just made the decision to
check for positiveness of all arguments. If you could inspect and test
the code to see if it behaves sanely with negative time then that one
check and exception comment can be removed (mauve tests appreciated).
Cheers,
Mark
Attachment:
signature.asc
Description: This is a digitally signed message part
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |