Skip to content

Commit 52d1339

Browse files
committed
Fixed JavaPrimitive transformer
1 parent 6d94904 commit 52d1339

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

javaobj/v2/transformers.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,11 @@ def load_from_instance(self, instance, indent=0):
8989
"""
9090
Load content from a parsed instance object
9191
"""
92-
for field, value in instance.field_data.items():
93-
if field.name == "value":
94-
self.value = value
95-
return True
92+
for fields in instance.field_data.values():
93+
for field, value in fields.items():
94+
if field.name == "value":
95+
self.value = value
96+
return True
9697

9798
return False
9899

@@ -106,7 +107,7 @@ def __bool__(self):
106107

107108
class JavaInt(JavaPrimitiveClass):
108109

109-
HANDLED_CLASSES = ("java.util.Integer", "java.util.Long")
110+
HANDLED_CLASSES = ("java.lang.Integer", "java.lang.Long")
110111

111112
def __int__(self):
112113
return self.value

0 commit comments

Comments
 (0)