#26-Removing null from lineChange
This commit is contained in:
parent
4629562e0f
commit
fb04c3bb1d
@ -250,22 +250,32 @@ public class GitRepositoryService {
|
||||
while ((i < stringsLength) && strings[i].startsWith("-")) {
|
||||
if (strings[i].startsWith("---")) {
|
||||
i++;
|
||||
} else {
|
||||
if (lineChange.getLineFrom() == null) {
|
||||
lineChange.setLineFrom(strings[i]);
|
||||
i++;
|
||||
} else {
|
||||
lineChange.setLineFrom(lineChange.getLineFrom() + "\n" + strings[i]);
|
||||
i++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (strings[i].startsWith("+")) {
|
||||
while ((i < stringsLength) && strings[i].startsWith("+")) {
|
||||
if (strings[i].startsWith("+++")) {
|
||||
i++;
|
||||
} else {
|
||||
if (lineChange.getLineTo() == null) {
|
||||
lineChange.setLineTo(strings[i]);
|
||||
i++;
|
||||
} else {
|
||||
lineChange.setLineTo(lineChange.getLineTo() + "\n" + strings[i]);
|
||||
i++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if ((lineChange.getLineTo() != null) || (lineChange.getLineFrom() != null)
|
||||
|| ((lineChange.getLineTo() != null) && (lineChange.getLineFrom() != null))) {
|
||||
fileChange.getLineChanges().add(lineChange);
|
||||
|
Loading…
Reference in New Issue
Block a user