Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
- Split retrying into more detailed modules ([#341](https://github.com/tarantool/cartridge-java/issues/341))
- Add deep copy instead of shallow copy in default message pack mapper
- Add a factory builder for constructing mapper hierarchies
- Add "can convert value" check to TupleResultConverter

## [0.10.1] - 2023-01-13

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,9 @@ public ArrayValueToTarantoolTupleResultConverter(
public TarantoolResult<TarantoolTuple> fromValue(ArrayValue value) {
return tarantoolResultFactory.createTarantoolTupleResultImpl(value, tupleConverter);
}

@Override
public boolean canConvertValue(ArrayValue value) {
return value.size() == 0 || value.get(0).isArrayValue();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ void testDefaultTarantoolTupleResponse_singleResultShouldThrowException() {
ArrayValue testTuples = ValueFactory.newArray(tupleOne.toMessagePackValue(defaultMapper));

// Another corner case, tuple result mapper should not be used for this result format
assertThrows(TarantoolTupleConversionException.class, () -> defaultResultMapper.fromValue(testTuples));
assertThrows(MessagePackValueMapperException.class, () -> defaultResultMapper.fromValue(testTuples));
}

@Test
Expand Down