This commit is contained in:
Alexey Kudravtsev
2012-04-04 12:24:25 +04:00
parent 7e695b3f0d
commit 61f40b93ef
@@ -281,7 +281,7 @@ public class CompositeElement extends TreeElement {
}
if (endOffset != len) {
@NonNls String msg = "len=" + len + ";\n endOffset=" + endOffset;
msg += diagnoseTextInconsistency(new String(buffer, 0, endOffset), startStamp);
msg += diagnoseTextInconsistency(new String(buffer, 0, Math.min(len, endOffset)), startStamp);
throw new AssertionError(msg);
}
return buffer;