Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
msbarry committed Jan 11, 2024
1 parent 11541ec commit c6b3895
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public T next() {
}

private boolean lessThan(long ak, long bk, T a, T b) {
return ak < bk || (ak == bk && a != null && b != null && tieBreaker.compare(a, b) < 0);
return ak < bk || (ak == bk && lessThanCmp(a, b, tieBreaker));
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ private void compareLayer(VectorTileProto.Tile.Layer layer1, VectorTileProto.Til
compareList(name, "values list", layer1.getValuesList(), layer2.getValuesList());
if (compareValues(name, "features count", layer1.getFeaturesCount(), layer2.getFeaturesCount())) {
var ids1 = layer1.getFeaturesList().stream().map(f -> f.getId()).toList();
var ids2 = layer1.getFeaturesList().stream().map(f -> f.getId()).toList();
var ids2 = layer2.getFeaturesList().stream().map(f -> f.getId()).toList();
if (compareValues(name, "feature ids", Set.of(ids1), Set.of(ids2)) &&
compareValues(name, "feature order", ids1, ids2)) {
for (int i = 0; i < layer1.getFeaturesCount() && i < layer2.getFeaturesCount(); i++) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ void testCompareArchives() throws IOException {
), Map.of(
"layer1", Map.of(
"values list unique values", 1L,
"feature id", 1L
"feature ids", 1L
)
)
), result);
Expand Down

0 comments on commit c6b3895

Please sign in to comment.