Merge pull request #213 from vran-dev/fix/diff
fix: diff result is error
This commit is contained in:
commit
a3a8fd7154
|
@ -274,9 +274,9 @@ public class DocumentService {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
result.sort(Comparator.comparing(DatabaseDocumentSimpleResponse.TableData::getName));
|
result.sort(Comparator.comparing(DatabaseDocumentSimpleResponse.TableData::getName));
|
||||||
boolean allAdded = result.stream()
|
var notNoneDiffs = result.stream().filter(item -> !item.getDiffType().isNone());
|
||||||
.filter(item -> !item.getDiffType().isNone())
|
boolean allAdded = notNoneDiffs.count() > 0
|
||||||
.allMatch(item -> item.getDiffType().isAdded());
|
&& notNoneDiffs.allMatch(item -> item.getDiffType().isAdded());
|
||||||
DiffType diffType;
|
DiffType diffType;
|
||||||
if (allAdded) {
|
if (allAdded) {
|
||||||
diffType = DiffType.ADDED;
|
diffType = DiffType.ADDED;
|
||||||
|
|
Loading…
Reference in New Issue