Author: toad
Date: 2006-05-29 16:52:50 +0000 (Mon, 29 May 2006)
New Revision: 8924

Modified:
   trunk/freenet/src/freenet/node/Version.java
   trunk/freenet/src/freenet/support/DoublyLinkedListImpl.java
Log:
748: Allow removing of an item which has already been removed. Fixes an error 
when accessing archives.

Modified: trunk/freenet/src/freenet/node/Version.java
===================================================================
--- trunk/freenet/src/freenet/node/Version.java 2006-05-29 16:43:25 UTC (rev 
8923)
+++ trunk/freenet/src/freenet/node/Version.java 2006-05-29 16:52:50 UTC (rev 
8924)
@@ -18,7 +18,7 @@
        public static final String protocolVersion = "1.0";

        /** The build number of the current revision */
-       private static final int buildNumber = 747;
+       private static final int buildNumber = 748;

        /** Oldest build of Fred we will talk to */
        private static final int lastGoodBuild = 732;

Modified: trunk/freenet/src/freenet/support/DoublyLinkedListImpl.java
===================================================================
--- trunk/freenet/src/freenet/support/DoublyLinkedListImpl.java 2006-05-29 
16:43:25 UTC (rev 8923)
+++ trunk/freenet/src/freenet/support/DoublyLinkedListImpl.java 2006-05-29 
16:52:50 UTC (rev 8924)
@@ -242,6 +242,7 @@
                Logger.error(this, "Illegal ERROR: Removing from an empty 
list!!");
                throw new IllegalStateException("Illegal ERROR: Removing from 
an empty list!!");
        }
+       if (i.getParent() == null) return null; // not in list
        if (i.getParent() != this)
                throw new PromiscuousItemException(i, i.getParent());
         DoublyLinkedList.Item next = i.getNext(), prev = i.getPrev();


Reply via email to