[#2053] Do not allow < 1 on AppendableCharSequence init.
This commit is contained in:
parent
b6874fcaa5
commit
ee17139a03
@ -23,6 +23,9 @@ public final class AppendableCharSequence implements CharSequence, Appendable {
|
|||||||
private int pos;
|
private int pos;
|
||||||
|
|
||||||
public AppendableCharSequence(int length) {
|
public AppendableCharSequence(int length) {
|
||||||
|
if (length < 1) {
|
||||||
|
throw new IllegalArgumentException("length: " + length + " (length: >= 1)");
|
||||||
|
}
|
||||||
chars = new char[length];
|
chars = new char[length];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user