From f1ad71b8844cf62dacdc8b8ea570372ba745b932 Mon Sep 17 00:00:00 2001 From: Erwan Croze Date: Wed, 20 Dec 2017 15:02:37 +0100 Subject: [PATCH] Fixing java enum wrapper --- wrappers/java/java_enum.mustache | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wrappers/java/java_enum.mustache b/wrappers/java/java_enum.mustache index 6276d6dc0..460d47aaf 100644 --- a/wrappers/java/java_enum.mustache +++ b/wrappers/java/java_enum.mustache @@ -39,7 +39,7 @@ public enum {{className}} { {{/lines}} */ {{/doc}} - {{name}}({{value}}){{commarorsemicolon}} + {{name}}({{{value}}}){{commarorsemicolon}} {{/values}} protected final int mValue; @@ -51,7 +51,7 @@ public enum {{className}} { static public {{className}} fromInt(int value) throws RuntimeException { switch(value) { {{#values}} - case {{value}}: return {{name}}; + case {{{value}}}: return {{name}}; {{/values}} default: throw new RuntimeException("Unhandled enum value " + value + " for {{className}}");