[freenet-cvs] r12181 - trunk/freenet/src/freenet/pluginmanager

nextgens at freenetproject.org nextgens at freenetproject.org
Sat Mar 17 14:06:43 UTC 2007


Author: nextgens
Date: 2007-03-17 14:06:42 +0000 (Sat, 17 Mar 2007)
New Revision: 12181

Modified:
   trunk/freenet/src/freenet/pluginmanager/TestPlugin.java
Log:
If Integer.MIN_VALUE is returned by nextInt, it's clashing ;)

Modified: trunk/freenet/src/freenet/pluginmanager/TestPlugin.java
===================================================================
--- trunk/freenet/src/freenet/pluginmanager/TestPlugin.java	2007-03-17 14:01:27 UTC (rev 12180)
+++ trunk/freenet/src/freenet/pluginmanager/TestPlugin.java	2007-03-17 14:06:42 UTC (rev 12181)
@@ -158,7 +158,7 @@
 				"freenet:CHK at aH73gnCP5BHrBllzjkMidAL9omoZhArbLx~E8ohfhXY,tFiT49y7VJycJggw9oITCP5LxPza~WnrmM3KY02V~3g,AAEA--8",
 				"freenet:CHK at EWWH3-KJevOv5bFRZunpJWZmKCY5UmtStpsRL~68U1A,opipVzjgGF4jKm~f9hTRY1fjrGhDfl2vQYs5IdabixE,AAEA--8"};
 
-		return strs[Math.abs(rnd.nextInt())%strs.length];
+		return strs[Math.abs(rnd.nextInt() + 1)%strs.length];
 	}
 
 }




More information about the cvs mailing list