On 07 Jul 2009, at 13:54, Vincent Hennebert wrote:

Hi Vincent,

                        splitLength += element.getW();
                    } else {
                        // element is a penalty
- if (element.getP() < KnuthElement.INFINITE) { + //if (element.getP() < KnuthElement.INFINITE) {
                            // end of the sub-sequence
                            index = noteListIterator.previousIndex();
                            break;
-                        }
+                        //}

Why did you comment out the test? Unless I missed something that may
result into regressions with some test cases.

Aargh... Spent so much time sorting out which changes could already be committed and still... Checked, and this should actually be part of the column-keeps implementation. It was part of your original patch. I'll undo this change asap.


-        return bestActiveNode.line;
+        return (bestActiveNode == null) ? -1 : bestActiveNode.line;

Why did you add this test? Did you run into NPE with some test cases?

Not yet, but IntelliJ IDEA always marks dereferences that possibly lead to NPEs as a warning. Better safe than sorry, I guess...


Regards

Andreas


Andreas Delmelle
e-mail: andreas.delmelle.AT.telenet.be
Skype: adlm0608
Jabber: mandr...@jabber.org

Reply via email to