#26-Add true and false

This commit is contained in:
BarminaA 2021-04-26 11:54:34 +04:00
parent fb04c3bb1d
commit 0f14b1acd6
2 changed files with 4 additions and 3 deletions

View File

@ -10,9 +10,8 @@ import javax.persistence.Entity;
@Entity @Entity
public class LineChange extends BaseEntity { public class LineChange extends BaseEntity {
private Boolean added; private Boolean added = false;
private Boolean removed = false;
private Boolean removed;
private String lineFrom; private String lineFrom;
private String lineTo; private String lineTo;

View File

@ -260,6 +260,7 @@ public class GitRepositoryService {
} }
} }
} }
lineChange.setRemoved(true);
} }
if (strings[i].startsWith("+")) { if (strings[i].startsWith("+")) {
while ((i < stringsLength) && strings[i].startsWith("+")) { while ((i < stringsLength) && strings[i].startsWith("+")) {
@ -275,6 +276,7 @@ public class GitRepositoryService {
} }
} }
} }
lineChange.setAdded(true);
} }
if ((lineChange.getLineTo() != null) || (lineChange.getLineFrom() != null) if ((lineChange.getLineTo() != null) || (lineChange.getLineFrom() != null)
|| ((lineChange.getLineTo() != null) && (lineChange.getLineFrom() != null))) { || ((lineChange.getLineTo() != null) && (lineChange.getLineFrom() != null))) {