r26563 - trunk/freenet/src/freenet/client/async

[email protected]
Newsgroups gmane.network.freenet.cvs
Message-ID <[email protected]>
Author: toad
Date: 2009-04-06 15:07:37 +0000 (Mon, 06 Apr 2009)
New Revision: 26563

Modified:
   trunk/freenet/src/freenet/client/async/ClientRequestSchedulerCore.java
Log:
Clarify, thanks sdiz(?) for NPE fix


Modified: trunk/freenet/src/freenet/client/async/ClientRequestSchedulerCore.java
===================================================================
--- trunk/freenet/src/freenet/client/async/ClientRequestSchedulerCore.java	2009-04-06 14:41:13 UTC (rev 26562)
+++ trunk/freenet/src/freenet/client/async/ClientRequestSchedulerCore.java	2009-04-06 15:07:37 UTC (rev 26563)
@@ -510,8 +510,7 @@
 					}
 					if (altReq != null) {
 					int prio = altReq.getPriorityClass(container);
-					if( 
-							(prio < choosenPriorityClass || (prio == choosenPriorityClass && fixRetryCount(altReq.getRetryCount()) <= chosenTracker.getNumber()))
+					if((prio < choosenPriorityClass || (prio == choosenPriorityClass && fixRetryCount(altReq.getRetryCount()) <= chosenTracker.getNumber()))
 									&& !altReq.isEmpty(container) && altReq != req) {
 						// Use the recent one instead
 						if(logMINOR)
@@ -538,11 +537,10 @@
 						if(logMINOR)
 							Logger.minor(this, "Maybe using recently succeeded item from "+altRGA);
 						SendableRequest altReq = (SendableRequest) altRGA.removeRandom(starter, container, context);
-						container.activate(altReq, 1);
 						if(altReq != null) {
+							container.activate(altReq, 1);
 							int prio = altReq.getPriorityClass(container);
-							if(altReq != null && 
-									(prio < choosenPriorityClass || (prio == choosenPriorityClass && fixRetryCount(altReq.getRetryCount()) <= chosenTracker.getNumber()))
+							if((prio < choosenPriorityClass || (prio == choosenPriorityClass && fixRetryCount(altReq.getRetryCount()) <= chosenTracker.getNumber()))
 											&& !altReq.isEmpty(container) && altReq != req) {
 								// Use the recent one instead
 								if(logMINOR)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.