# | Line 797 | Line 797 | public class ThreadPoolExecutor implemen | |
---|---|---|
797 | * @throws RejectedExecutionException at discretion of | |
798 | * <tt>RejectedExecutionHandler</tt>, if task cannot be accepted | |
799 | * for execution | |
800 | + | * @throws NullPointerException if command is null |
801 | */ | |
802 | public void execute(Runnable command) { | |
803 | + | if (command == null) |
804 | + | throw new NullPointerException(); |
805 | for (;;) { | |
806 | if (runState != RUNNING) { | |
807 | reject(command); |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |