[freenet-cvs] r12126 - trunk/freenet/src/freenet/support/io

nextgens at freenetproject.org nextgens at freenetproject.org
Thu Mar 15 18:19:43 UTC 2007


Author: nextgens
Date: 2007-03-15 18:19:42 +0000 (Thu, 15 Mar 2007)
New Revision: 12126

Modified:
   trunk/freenet/src/freenet/support/io/BucketTools.java
Log:
That method isn't doing what it pretends to do ... and anyway, it's dead code.

Modified: trunk/freenet/src/freenet/support/io/BucketTools.java
===================================================================
--- trunk/freenet/src/freenet/support/io/BucketTools.java	2007-03-15 18:14:13 UTC (rev 12125)
+++ trunk/freenet/src/freenet/support/io/BucketTools.java	2007-03-15 18:19:42 UTC (rev 12126)
@@ -139,41 +139,6 @@
 		return ret;
 	}
 
-	/**
-	 * Free buckets. Get yer free buckets here! No charge! All you can carry
-	 * free buckets!
-	 * <p>
-	 * If an exception happens the method will attempt to free the remaining
-	 * buckets then retun the first exception. Buckets successfully freed are
-	 * made <code>null</code> in the array.
-	 * </p>
-	 * 
-	 * @param bf
-	 * @param buckets
-	 * @throws IOException
-	 *             the first exception The <code>buckets</code> array will
-	 */
-	public static void freeBuckets(BucketFactory bf, Bucket[] buckets)
-		throws IOException {
-		if (buckets == null) {
-			return;
-		}
-
-		IOException firstIoe = null;
-
-		for (int i = 0; i < buckets.length; i++) {
-			// Make sure we free any temp buckets on exception
-			if (buckets[i] != null) {
-				buckets[i].free();
-			}
-			buckets[i] = null;
-		}
-
-		if (firstIoe != null) {
-			throw firstIoe;
-		}
-	}
-
 	public final static int[] nullIndices(Bucket[] array) {
 		List list = new ArrayList();
 		for (int i = 0; i < array.length; i++) {




More information about the cvs mailing list