Skip to content

Commit 207f94a

Browse files
committed
Fix hasMetadata logic
It was broken after renaming here b0d5358#r1149084554
1 parent d9ca853 commit 207f94a

File tree

4 files changed

+9
-5
lines changed

4 files changed

+9
-5
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
## [Unreleased]
44

5+
## [0.11.1] - 2023-04-24
6+
### Bugfixes
7+
- Fix hasMetadata logic
8+
59
## [0.11.0] - 2023-04-12
610

711
### Internal and API changes

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ If you use this code in another project don't forget to add `cartridge-driver` d
3939
<dependency>
4040
<groupId>io.tarantool</groupId>
4141
<artifactId>cartridge-driver</artifactId>
42-
<version>0.11.0</version>
42+
<version>0.11.1</version>
4343
</dependency>
4444
```
4545
## Advanced usage

src/main/java/io/tarantool/driver/core/tuple/TarantoolTupleImpl.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,8 @@ public TarantoolTupleImpl(ArrayValue value, MessagePackMapper mapper, TarantoolS
139139

140140
@Override
141141
public boolean hasMetadata() {
142-
return spaceMetadata == null || spaceMetadata.getSpaceFormatMetadata() == null ||
143-
spaceMetadata.getSpaceFormatMetadata().isEmpty();
142+
return spaceMetadata != null && spaceMetadata.getSpaceFormatMetadata() != null &&
143+
!spaceMetadata.getSpaceFormatMetadata().isEmpty();
144144
}
145145

146146
@Override

src/test/java/io/tarantool/driver/integration/ClusterTarantoolTupleClientIT.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,7 @@ public void callForTarantoolResultTest() throws Exception {
380380

381381
assertTrue(result.size() >= 3);
382382
TarantoolTuple tuple = result.get(0);
383-
assertFalse(tuple.hasMetadata());
383+
assertTrue(tuple.hasMetadata());
384384
assertEquals(1605, tuple.getInteger("year"));
385385

386386
result = client.call(
@@ -391,7 +391,7 @@ public void callForTarantoolResultTest() throws Exception {
391391
).get();
392392
assertTrue(result.size() >= 3);
393393
tuple = result.get(0);
394-
assertTrue(tuple.hasMetadata());
394+
assertFalse(tuple.hasMetadata());
395395
}
396396

397397
@Test

0 commit comments

Comments
 (0)