--- a/jdk/src/java.base/share/classes/java/util/LinkedList.java Tue Jun 30 01:17:45 2015 +0300
+++ b/jdk/src/java.base/share/classes/java/util/LinkedList.java Mon Jun 29 14:59:20 2015 -0700
@@ -88,18 +88,22 @@
/**
* Pointer to first node.
- * Invariant: (first == null && last == null) ||
- * (first.prev == null && first.item != null)
*/
transient Node<E> first;
/**
* Pointer to last node.
- * Invariant: (first == null && last == null) ||
- * (last.next == null && last.item != null)
*/
transient Node<E> last;
+ /*
+ void dataStructureInvariants() {
+ assert (size == 0)
+ ? (first == null && last == null)
+ : (first.prev == null && last.next == null);
+ }
+ */
+
/**
* Constructs an empty list.
*/