#25-Cleaning cod

This commit is contained in:
Anton Romanov 2021-04-22 13:05:19 +04:00
parent c684d53b15
commit 751e4d264d

View File

@ -301,32 +301,4 @@ public class GitRepositoryService {
}
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();
}
}