Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(61)

Unified Diff: mojo/public/tools/bindings/generators/java_templates/enum_definition.tmpl

Issue 607933002: mojo: Fix java generator (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix findbugs and emptu package. Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: mojo/public/tools/bindings/generators/java_templates/enum_definition.tmpl
diff --git a/mojo/public/tools/bindings/generators/java_templates/enum_definition.tmpl b/mojo/public/tools/bindings/generators/java_templates/enum_definition.tmpl
index 7273287b6567a37e6652d120d030a0e07522957f..a16c178e67ee653ae2aed891f8123ce7114431f0 100644
--- a/mojo/public/tools/bindings/generators/java_templates/enum_definition.tmpl
+++ b/mojo/public/tools/bindings/generators/java_templates/enum_definition.tmpl
@@ -4,7 +4,7 @@
{%- elif index == 0 -%}
0
{%- else -%}
-{{enum.fields[index - 1].name}} + 1
+{{enum.fields[index - 1]|name}} + 1
{%- endif -%}
{%- endmacro -%}
@@ -12,7 +12,7 @@
public {{ 'static ' if not top_level }}final class {{enum|name}} {
{% for field in enum.fields %}
- public static final int {{field.name}} = {{enum_value(enum, field, loop.index0)}};
+ public static final int {{field|name}} = {{enum_value(enum, field, loop.index0)}};
{% endfor %}
private {{enum|name}}() {}

Powered by Google App Engine
This is Rietveld 408576698