Skip to content

Commit b0e9bac

Browse files
committed
Fixed HashMap loading from instance
1 parent c4eef48 commit b0e9bac

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

javaobj/transformers.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -108,9 +108,9 @@ def load_from_instance(self, instance, indent=0):
108108
"""
109109
# Lists have their content in there annotations
110110
for cd, annotations in instance.annotations.items():
111-
if cd.name in self.HANDLED_CLASSES:
111+
if cd.name in JavaMap.HANDLED_CLASSES:
112112
# Group annotation elements 2 by 2
113-
args = [x.data for x in annotations[1:]] * 2
113+
args = [iter(annotations[1:])] * 2
114114
for key, value in zip(*args):
115115
self[key] = value
116116

@@ -156,12 +156,6 @@ def load_from_blockdata(self, parser, reader, indent=0):
156156

157157
return True
158158

159-
def load_from_instance(self, instance, indent=0):
160-
"""
161-
Do nothing when called
162-
"""
163-
return True
164-
165159

166160
class JavaSet(set, JavaInstance):
167161
"""

0 commit comments

Comments
 (0)