OSDN Git Service
(root)
/
pf3gnuchains
/
gcc-fork.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
2006-08-14 Mark Wielaard <mark@klomp.org>
[pf3gnuchains/gcc-fork.git]
/
libjava
/
classpath
/
javax
/
swing
/
Timer.java
diff --git
a/libjava/classpath/javax/swing/Timer.java
b/libjava/classpath/javax/swing/Timer.java
index
231b71d
..
acd2262
100644
(file)
--- a/
libjava/classpath/javax/swing/Timer.java
+++ b/
libjava/classpath/javax/swing/Timer.java
@@
-1,5
+1,5
@@
/* Timer.java --
/* Timer.java --
- Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2004, 2005
, 2006,
Free Software Foundation, Inc.
This file is part of GNU Classpath.
This file is part of GNU Classpath.
@@
-264,9
+264,13
@@
public class Timer
* firing the first event.
*
* @param d The time gap between the subsequent events, in milliseconds
* firing the first event.
*
* @param d The time gap between the subsequent events, in milliseconds
+ *
+ * @throws IllegalArgumentException if <code>d</code> is less than zero.
*/
public void setDelay(int d)
{
*/
public void setDelay(int d)
{
+ if (d < 0)
+ throw new IllegalArgumentException("Invalid delay: " + d);
delay = d;
}
delay = d;
}
@@
-287,9
+291,13
@@
public class Timer
* subsequent events.
*
* @param i the initial delay, in milliseconds
* subsequent events.
*
* @param i the initial delay, in milliseconds
+ *
+ * @throws IllegalArgumentException if <code>i</code> is less than zero.
*/
public void setInitialDelay(int i)
{
*/
public void setInitialDelay(int i)
{
+ if (i < 0)
+ throw new IllegalArgumentException("Invalid initial delay: " + i);
initialDelay = i;
}
initialDelay = i;
}