Author: bombe
Date: 2008-08-20 18:40:15 +0000 (Wed, 20 Aug 2008)
New Revision: 22060

Modified:
   trunk/freenet/
   trunk/freenet/.classpath
   trunk/freenet/src/freenet/client/async/BackgroundBlockEncoder.java
Log:
revert r22059


Property changes on: trunk/freenet
___________________________________________________________________
Name: svn:ignore
   - freenet-*
build
bin
lib
build-test
docs

   + 
freenet-*
build
bin
lib
build-test


Modified: trunk/freenet/.classpath
===================================================================
--- trunk/freenet/.classpath    2008-08-20 18:35:58 UTC (rev 22059)
+++ trunk/freenet/.classpath    2008-08-20 18:40:15 UTC (rev 22060)
@@ -4,6 +4,6 @@
        <classpathentry including="freenet/|org/" kind="src" path="test"/>
        <classpathentry exported="true" kind="lib" path="lib/freenet-ext.jar"/>
        <classpathentry kind="con" 
path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
-       <classpathentry kind="con" 
path="org.eclipse.jdt.junit.JUNIT_CONTAINER/3"/>
+       <classpathentry kind="lib" path="/usr/share/java/junit.jar"/>
        <classpathentry kind="output" path="bin"/>
 </classpath>

Modified: trunk/freenet/src/freenet/client/async/BackgroundBlockEncoder.java
===================================================================
--- trunk/freenet/src/freenet/client/async/BackgroundBlockEncoder.java  
2008-08-20 18:35:58 UTC (rev 22059)
+++ trunk/freenet/src/freenet/client/async/BackgroundBlockEncoder.java  
2008-08-20 18:40:15 UTC (rev 22060)
@@ -14,16 +14,16 @@
 public class BackgroundBlockEncoder implements PrioRunnable {

        // Minimize memory usage at the cost of having to encode from the end
-       private final ArrayList<SoftReference<SingleBlockInserter>> queue;
+       private final ArrayList queue;

        public BackgroundBlockEncoder() {
-               queue = new ArrayList<SoftReference<SingleBlockInserter>>();
+               queue = new ArrayList();
        }

        public void queue(SingleBlockInserter sbi) {
                if(sbi.isCancelled()) return;
                if(sbi.resultingURI != null) return;
-               SoftReference<SingleBlockInserter> ref = new 
SoftReference<SingleBlockInserter>(sbi);
+               SoftReference ref = new SoftReference(sbi);
                synchronized(this) {
                        queue.add(ref);
                        Logger.minor(this, "Queueing encode of "+sbi);
@@ -39,7 +39,7 @@
                                if(inserter.isCancelled()) continue;
                                if(inserter.resultingURI != null) continue;
                                Logger.minor(this, "Queueing encode of 
"+inserter);
-                               SoftReference<SingleBlockInserter> ref = new 
SoftReference<SingleBlockInserter>(inserter);
+                               SoftReference ref = new SoftReference(inserter);
                                queue.add(ref);
                        }
                        notifyAll();
@@ -59,8 +59,8 @@
                                        }
                                }
                                while(!queue.isEmpty()) {
-                                       SoftReference<SingleBlockInserter> ref 
= queue.remove(queue.size()-1);
-                                       sbi = ref.get();
+                                       SoftReference ref = (SoftReference) 
queue.remove(queue.size()-1);
+                                       sbi = (SingleBlockInserter) ref.get();
                                        if(sbi != null) break;
                                }
                        }


Reply via email to