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

This commit is contained in:
Norman Maurer 2013-12-11 10:18:26 +01:00
parent b6874fcaa5
commit ee17139a03

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];
}