Author: xor
Date: 2009-04-06 06:49:39 +0000 (Mon, 06 Apr 2009)
New Revision: 26556
Modified:
trunk/freenet/src/freenet/support/DoublyLinkedList.java
trunk/freenet/src/freenet/support/DoublyLinkedListImpl.java
Log:
Add FIXME, deprecate DoublyLinkedList until it is resolved.
Modified: trunk/freenet/src/freenet/support/DoublyLinkedList.java
===================================================================
--- trunk/freenet/src/freenet/support/DoublyLinkedList.java 2009-04-06
06:33:09 UTC (rev 26555)
+++ trunk/freenet/src/freenet/support/DoublyLinkedList.java 2009-04-06
06:49:39 UTC (rev 26556)
@@ -6,6 +6,20 @@
* Framework for managing a doubly linked list.
* @author tavin
*/
+/* FIXME sdiz said:
+"but I really *hate* the idea of using DoublyLinkedList and its friends.
+
+It is a ugly hack for quick iteration of list in the early days, and can be
replaced LinkList using ListIternator in most cases.
+
+- The performance benefit is marginal.
+- Custom code like these make casual contributor less likely.
+- The class was created in 2005 era, and I can still find bugs in recent
months.
+
+Keep it out from the new code if you can.
+
+IF you REALLY HAVE to use it, PLEASE add a junit test for all new method you
created."
+ */
+...@deprecated
public interface DoublyLinkedList<T extends DoublyLinkedList.Item<?>> extends
Iterable<T> {
// public abstract DoublyLinkedList<T> clone();
Modified: trunk/freenet/src/freenet/support/DoublyLinkedListImpl.java
===================================================================
--- trunk/freenet/src/freenet/support/DoublyLinkedListImpl.java 2009-04-06
06:33:09 UTC (rev 26555)
+++ trunk/freenet/src/freenet/support/DoublyLinkedListImpl.java 2009-04-06
06:49:39 UTC (rev 26556)
@@ -11,6 +11,7 @@
* TODO: there are still some unimplemented methods
* -- it remains to be seen if they are needed at all
*/
+...@deprecated
public class DoublyLinkedListImpl<T extends DoublyLinkedList.Item<? extends
T>> implements DoublyLinkedList<T> {
protected int size;
_______________________________________________
cvs mailing list
[email protected]
http://emu.freenetproject.org/cgi-bin/mailman/listinfo/cvs