Skip to content

Commit fe24274

Browse files
committed
Make it more compatible to change from void union type to non-void union type
1 parent 90e6e6f commit fe24274

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

generator/java.stoneg.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3960,11 +3960,11 @@ def generate_union_deserialize(self, data_type):
39603960
with w.block('else'):
39613961
if data_type.catch_all_field:
39623962
w.out('value = %s.%s;', j.java_class(data_type), j.field_static_instance(data_type.catch_all_field))
3963-
w.out('skipFields(p);')
39643963
else:
39653964
w.out('throw new JsonParseException(p, "Unknown tag: " + tag);')
39663965

39673966
with w.block('if (!collapsed)'):
3967+
w.out('skipFields(p);')
39683968
w.out('expectEndObject(p);')
39693969

39703970
w.out('return value;')

0 commit comments

Comments
 (0)