Skip to content

Commit

Permalink
Fix hasMetadata logic
Browse files Browse the repository at this point in the history
It was broken after renaming here b0d5358#r1149084554
  • Loading branch information
ArtDu committed Apr 24, 2023
1 parent d9ca853 commit 207f94a
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## [Unreleased]

## [0.11.1] - 2023-04-24
### Bugfixes
- Fix hasMetadata logic

## [0.11.0] - 2023-04-12

### Internal and API changes
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ If you use this code in another project don't forget to add `cartridge-driver` d
<dependency>
<groupId>io.tarantool</groupId>
<artifactId>cartridge-driver</artifactId>
<version>0.11.0</version>
<version>0.11.1</version>
</dependency>
```
## Advanced usage
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,8 @@ public TarantoolTupleImpl(ArrayValue value, MessagePackMapper mapper, TarantoolS

@Override
public boolean hasMetadata() {
return spaceMetadata == null || spaceMetadata.getSpaceFormatMetadata() == null ||
spaceMetadata.getSpaceFormatMetadata().isEmpty();
return spaceMetadata != null && spaceMetadata.getSpaceFormatMetadata() != null &&
!spaceMetadata.getSpaceFormatMetadata().isEmpty();
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ public void callForTarantoolResultTest() throws Exception {

assertTrue(result.size() >= 3);
TarantoolTuple tuple = result.get(0);
assertFalse(tuple.hasMetadata());
assertTrue(tuple.hasMetadata());
assertEquals(1605, tuple.getInteger("year"));

result = client.call(
Expand All @@ -391,7 +391,7 @@ public void callForTarantoolResultTest() throws Exception {
).get();
assertTrue(result.size() >= 3);
tuple = result.get(0);
assertTrue(tuple.hasMetadata());
assertFalse(tuple.hasMetadata());
}

@Test
Expand Down

0 comments on commit 207f94a

Please sign in to comment.