[#2053] Do not allow < 1 on AppendableCharSequence init.

This commit is contained in:
Norman Maurer 2013-12-11 10:18:26 +01:00
parent 81fa70c98d
commit bddfc38c64

View File

@ -23,6 +23,9 @@ public final class AppendableCharSequence implements CharSequence, Appendable {
private int pos;
public AppendableCharSequence(int length) {
if (length < 1) {
throw new IllegalArgumentException("length: " + length + " (length: >= 1)");
}
chars = new char[length];
}