Author: toad
Date: 2006-07-12 00:27:09 +0000 (Wed, 12 Jul 2006)
New Revision: 9571
Modified:
trunk/freenet/src/freenet/client/ArchiveStoreContext.java
trunk/freenet/src/freenet/node/Version.java
Log:
875: Fix rare NPE.
Modified: trunk/freenet/src/freenet/client/ArchiveStoreContext.java
===================================================================
--- trunk/freenet/src/freenet/client/ArchiveStoreContext.java 2006-07-11
23:13:44 UTC (rev 9570)
+++ trunk/freenet/src/freenet/client/ArchiveStoreContext.java 2006-07-12
00:27:09 UTC (rev 9571)
@@ -95,15 +95,15 @@
* Remove all ArchiveStoreItems with this key from the cache.
*/
public void removeAllCachedItems() {
- ArchiveStoreItem item;
- do{
+ ArchiveStoreItem item = null;
+ while(true) {
synchronized (myItems) {
item = (ArchiveStoreItem) myItems.pop();
}
+ if(item == null) break;
manager.removeCachedItem(item);
item.finalize();
}
- while(item != null);
}
/** Notify that a new archive store item with this key has been added
to the cache. */
Modified: trunk/freenet/src/freenet/node/Version.java
===================================================================
--- trunk/freenet/src/freenet/node/Version.java 2006-07-11 23:13:44 UTC (rev
9570)
+++ trunk/freenet/src/freenet/node/Version.java 2006-07-12 00:27:09 UTC (rev
9571)
@@ -18,7 +18,7 @@
public static final String protocolVersion = "1.0";
/** The build number of the current revision */
- private static final int buildNumber = 874;
+ private static final int buildNumber = 875;
/** Oldest build of Fred we will talk to */
private static final int oldLastGoodBuild = 844;