[#2053] Do not allow < 1 on AppendableCharSequence init.
This commit is contained in:
parent
81fa70c98d
commit
bddfc38c64
@ -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];
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user