Permalink
Browse files

Fix a bug with getLeft()/getRight() method in mixed list.

Signed-off-by: Jerome Dassonville <dassonville.jerome@gmail.com>
  • Loading branch information...
1 parent 1dfed2c commit 3456f0af3b8a21d5627fed4d03e9bf66ae076a8f @jdassonvil committed Apr 20, 2012
@@ -366,7 +366,7 @@ public class PairNodeList<TNodeLeft extends Node, TNodeRight extends Node>
NodeList<TNodeLeft> list = new NodeList<TNodeLeft>();
Iterator<TNodeLeft> leftIterator = this.leftIterator();
- while(this.leftIterator().hasNext()){
+ while(leftIterator.hasNext()){
list.add(leftIterator.next());
}
@@ -377,7 +377,7 @@ public class PairNodeList<TNodeLeft extends Node, TNodeRight extends Node>
NodeList<TNodeRight> list = new NodeList<TNodeRight>();
Iterator<TNodeRight> rightIterator = this.rightIterator();
- while(this.rightIterator().hasNext()){
+ while(rightIterator.hasNext()){
list.add(rightIterator.next());
}
@@ -659,7 +659,7 @@ public class SeparatedNodeList<TNodeLeft extends Node, TNodeRight extends Node>
NodeList<TNodeLeft> list = new NodeList<TNodeLeft>();
Iterator<TNodeLeft> leftIterator = this.iterator();
- while(this.iterator().hasNext()){
+ while(leftIterator.hasNext()){
list.add(leftIterator.next());
}
@@ -670,7 +670,7 @@ public class SeparatedNodeList<TNodeLeft extends Node, TNodeRight extends Node>
NodeList<TNodeRight> list = new NodeList<TNodeRight>();
Iterator<TNodeRight> rightIterator = this.separatorIterator();
- while(this.separatorIterator().hasNext()){
+ while(rightIterator.hasNext()){
list.add(rightIterator.next());
}
@@ -250,7 +250,7 @@ public String toString() {
sb.append(System.getProperty("line.separator"));
sb.append(" ");
sb.append(System.getProperty("line.separator"));
- sb.append(" while(this.leftIterator().hasNext()){");
+ sb.append(" while(leftIterator.hasNext()){");
sb.append(System.getProperty("line.separator"));
sb.append(" list.add(leftIterator.next());");
sb.append(System.getProperty("line.separator"));
@@ -272,7 +272,7 @@ public String toString() {
sb.append(System.getProperty("line.separator"));
sb.append(" ");
sb.append(System.getProperty("line.separator"));
- sb.append(" while(this.rightIterator().hasNext()){");
+ sb.append(" while(rightIterator.hasNext()){");
sb.append(System.getProperty("line.separator"));
sb.append(" list.add(rightIterator.next());");
sb.append(System.getProperty("line.separator"));
@@ -284,7 +284,7 @@ public String toString() {
sb.append(System.getProperty("line.separator"));
sb.append(" ");
sb.append(System.getProperty("line.separator"));
- sb.append(" while(this.iterator().hasNext()){");
+ sb.append(" while(leftIterator.hasNext()){");
sb.append(System.getProperty("line.separator"));
sb.append(" list.add(leftIterator.next());");
sb.append(System.getProperty("line.separator"));
@@ -306,7 +306,7 @@ public String toString() {
sb.append(System.getProperty("line.separator"));
sb.append(" ");
sb.append(System.getProperty("line.separator"));
- sb.append(" while(this.separatorIterator().hasNext()){");
+ sb.append(" while(rightIterator.hasNext()){");
sb.append(System.getProperty("line.separator"));
sb.append(" list.add(rightIterator.next());");
sb.append(System.getProperty("line.separator"));

0 comments on commit 3456f0a

Please sign in to comment.