Skip to content

Commit 2b3a9c3

Browse files
committed
Fix java code generator emitting unkown None symbol
Quite similar to 6d85020 and fixing building the java code for gxformat2.
1 parent 71398c9 commit 2b3a9c3

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

schema_salad/java_codegen.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,9 @@ def type_loader(
471471
name=f"map_of_{i.name}",
472472
init="new MapLoader({}, {}, {})".format(
473473
i.name,
474-
f"'{container}'" if container is not None else None, # noqa: B907
474+
(
475+
f"'{container}'" if container is not None else self.to_java(None)
476+
), # noqa: B907
475477
self.to_java(no_link_check),
476478
),
477479
loader_type=f"Loader<java.util.Map<String, {i.instance_type}>>",
@@ -494,7 +496,9 @@ def type_loader(
494496
clazz=fqclass,
495497
ext="Impl" if not is_abstract else "",
496498
container=(
497-
f"'{container}'" if container is not None else None # noqa: B907
499+
f"'{container}'"
500+
if container is not None
501+
else self.to_java(None) # noqa: B907
498502
),
499503
no_link_check=self.to_java(no_link_check),
500504
),

0 commit comments

Comments
 (0)