Skip to content

Commit 6f380c4

Browse files
authored
Removed compact read_XXX_default methods [API-1324] [API-1313] (#550)
Removed read_XXX_or_default methods from CompactReader, added get_field_kind
1 parent bb2692c commit 6f380c4

File tree

6 files changed

+52
-714
lines changed

6 files changed

+52
-714
lines changed

hazelcast/proxy/map.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ def add_entry_listener(
187187
LOADED=loaded_func,
188188
)
189189

190-
if key is not None and predicate:
190+
if key is not None and predicate is not None:
191191
try:
192192
key_data = self._to_data(key)
193193
predicate_data = self._to_data(predicate)
@@ -215,7 +215,7 @@ def add_entry_listener(
215215
)
216216
response_decoder = with_key_and_predicate_codec.decode_response
217217
event_message_handler = with_key_and_predicate_codec.handle
218-
elif key is not None and not predicate:
218+
elif key is not None and predicate is None:
219219
try:
220220
key_data = self._to_data(key)
221221
except SchemaNotReplicatedError as e:
@@ -242,7 +242,7 @@ def add_entry_listener(
242242
)
243243
response_decoder = with_key_codec.decode_response
244244
event_message_handler = with_key_codec.handle
245-
elif key is None and predicate:
245+
elif key is None and predicate is not None:
246246
try:
247247
predicate = self._to_data(predicate)
248248
except SchemaNotReplicatedError as e:

hazelcast/proxy/replicated_map.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ def add_entry_listener(
7878
Returns:
7979
A registration id which is used as a key to remove the listener.
8080
"""
81-
if key is not None and predicate:
81+
if key is not None and predicate is not None:
8282
try:
8383
key_data = self._to_data(key)
8484
predicate_data = self._to_data(predicate)
@@ -103,7 +103,7 @@ def add_entry_listener(
103103
)
104104
response_decoder = with_key_and_predicate_codec.decode_response
105105
event_message_handler = with_key_and_predicate_codec.handle
106-
elif key is not None and not predicate:
106+
elif key is not None and predicate is None:
107107
try:
108108
key_data = self._to_data(key)
109109
except SchemaNotReplicatedError as e:
@@ -123,7 +123,7 @@ def add_entry_listener(
123123
request = with_key_codec.encode_request(self.name, key_data, self._is_smart)
124124
response_decoder = with_key_codec.decode_response
125125
event_message_handler = with_key_codec.handle
126-
elif key is None and predicate:
126+
elif key is None and predicate is not None:
127127
try:
128128
predicate = self._to_data(predicate)
129129
except SchemaNotReplicatedError as e:

0 commit comments

Comments
 (0)