Fix possible NPE reported by FindBugs.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1495269 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
93a07b9b8f
commit
530b038269
|
@ -86,7 +86,13 @@ final class CSVLexer extends Lexer {
|
|||
}
|
||||
|
||||
if (isStartOfLine(lastChar) && isCommentStart(c)) {
|
||||
final String comment = in.readLine().trim();
|
||||
String line = in.readLine();
|
||||
if (line == null) {
|
||||
token.type = EOF;
|
||||
// don't set token.isReady here because no content
|
||||
return token;
|
||||
}
|
||||
final String comment = line.trim();
|
||||
token.content.append(comment);
|
||||
token.type = COMMENT;
|
||||
return token;
|
||||
|
|
Loading…
Reference in New Issue