[freenet-cvs] r17971 - trunk/freenet/src/freenet/support

nextgens at freenetproject.org nextgens at freenetproject.org
Sat Feb 16 02:06:52 UTC 2008


Author: nextgens
Date: 2008-02-16 02:06:52 +0000 (Sat, 16 Feb 2008)
New Revision: 17971

Modified:
   trunk/freenet/src/freenet/support/PooledExecutor.java
Log:
paranoia

Modified: trunk/freenet/src/freenet/support/PooledExecutor.java
===================================================================
--- trunk/freenet/src/freenet/support/PooledExecutor.java	2008-02-16 01:57:18 UTC (rev 17970)
+++ trunk/freenet/src/freenet/support/PooledExecutor.java	2008-02-16 02:06:52 UTC (rev 17971)
@@ -52,6 +52,8 @@
 	
 	public void execute(Runnable job, String jobName, int prio, boolean fromTicker) {
 		if(logMINOR) Logger.minor(this, "Executing "+job+" as "+jobName+" at prio "+prio);
+		if(prio < Thread.MIN_PRIORITY || prio > Thread.MAX_PRIORITY)
+			throw new IllegalArgumentException("Unreconized priority level : "+prio+'!');
 		while(true) {
 			MyThread t;
 			boolean mustStart = false;




More information about the cvs mailing list