Resolve "Исправить ошибку" #52

Merged
BarminaA merged 1 commits from 25-fixing-bug into master 2021-04-22 13:06:43 +04:00
Showing only changes of commit 751e4d264d - Show all commits

View File

@ -301,32 +301,4 @@ public class GitRepositoryService {
} }
return Optional.empty(); return Optional.empty();
} }
private Optional<String> getLineTo(String commitString) {
String startString = "+";
String startPlus = "+++";
if (commitString.startsWith(startString)) {
String lineTo = commitString.substring(commitString.indexOf(startString) + startString.length());
if (commitString.startsWith(startPlus)) {
return Optional.empty();
} else {
return Optional.of(lineTo);
}
}
return Optional.empty();
}
private Optional<String> getLineFrom(String commitString) {
String startString = "-";
String startMinus = "---";
if (commitString.startsWith(startString)) {
String lineFrom = commitString.substring(commitString.indexOf(startString) + startString.length());
if (commitString.startsWith(startMinus)) {
return Optional.empty();
} else {
return Optional.of(lineFrom);
}
}
return Optional.empty();
}
} }