Commit 87831f15 authored by Ryo Hashimoto's avatar Ryo Hashimoto Committed by Commit Bot

mojo: Fix Java binding generator for array<enum>

Values should be validated by iterating with i{{level+1}}.

BUG=1148220

Change-Id: Iaa837dd73091c0f938bb2461569f3b46d04920b8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2532547Reviewed-by: default avatarOksana Zhuravlova <oksamyt@chromium.org>
Commit-Queue: Ryo Hashimoto <hashimoto@chromium.org>
Cr-Commit-Position: refs/heads/master@{#827115}
parent e4ba174d
...@@ -100,8 +100,8 @@ if ({{variable}} != null) { ...@@ -100,8 +100,8 @@ if ({{variable}} != null) {
{%- else %} {%- else %}
{ {
{%- endif %} {%- endif %}
for (int i{{level}} = 0; i{{level}} < {{variable}}.length; ++i{{level}}) { for (int i{{level+1}} = 0; i{{level+1}} < {{variable}}.length; ++i{{level+1}}) {
{{kind.kind|java_class_for_enum}}.validate({{variable}}[i{{level}}]); {{kind.kind|java_class_for_enum}}.validate({{variable}}[i{{level+1}}]);
} }
} }
{%- elif kind|is_enum_kind %} {%- elif kind|is_enum_kind %}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment