Fix NPE in RebaseTodoFile#parseComments
Change-Id: I5487f3c2609eaf2a0ddf71ebb2f6c9701fb7600c Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
This commit is contained in:
parent
a4216e5382
commit
86a567f615
|
@ -137,11 +137,13 @@ private static void parseComments(byte[] buf, int tokenBegin,
|
|||
if (skip != -1) {
|
||||
// try to parse the line as non-comment
|
||||
line = parseLine(buf, skip, lineEnd);
|
||||
// successfully parsed as non-comment line
|
||||
// mark this line as a comment explicitly
|
||||
line.setAction(Action.COMMENT);
|
||||
// use the read line as comment string
|
||||
line.setComment(commentString);
|
||||
if (line != null) {
|
||||
// successfully parsed as non-comment line
|
||||
// mark this line as a comment explicitly
|
||||
line.setAction(Action.COMMENT);
|
||||
// use the read line as comment string
|
||||
line.setComment(commentString);
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
// parsing as non-comment line failed
|
||||
|
|
Loading…
Reference in New Issue