Reuse constant instead of magic char.

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1743432 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Gary D. Gregory 2016-05-11 21:11:32 +00:00
parent 8a526c0ab5
commit 88d6162cde
1 changed files with 2 additions and 2 deletions

View File

@ -1164,10 +1164,10 @@ public final class CSVFormat implements Serializable {
int len = count;
int pos = 0;
while (pos < len && charSequence.charAt(pos) <= ' ') {
while (pos < len && charSequence.charAt(pos) <= Constants.SP) {
pos++;
}
while (pos < len && charSequence.charAt(len - 1) <= ' ') {
while (pos < len && charSequence.charAt(len - 1) <= Constants.SP) {
len--;
}
return pos > 0 || len < count ? charSequence.subSequence(pos, len) : charSequence;