This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository i18n. See https://gitlab.nuiton.org/nuiton/i18n.git commit fa3a03040b9e48e9df915ffdf777cad5e3180245 Author: Tony CHEMIT <chemit@codelutin.com> Date: Wed Sep 7 10:01:21 2016 +0200 GenerateI18nHelper does not work if enum has abstract methods (Fixes {4014) --- .../java/org/nuiton/i18n/plugin/GenerateI18nEnumHelperMojo.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/i18n-maven-plugin/src/main/java/org/nuiton/i18n/plugin/GenerateI18nEnumHelperMojo.java b/i18n-maven-plugin/src/main/java/org/nuiton/i18n/plugin/GenerateI18nEnumHelperMojo.java index 377633e..949bc57 100644 --- a/i18n-maven-plugin/src/main/java/org/nuiton/i18n/plugin/GenerateI18nEnumHelperMojo.java +++ b/i18n-maven-plugin/src/main/java/org/nuiton/i18n/plugin/GenerateI18nEnumHelperMojo.java @@ -191,13 +191,16 @@ public class GenerateI18nEnumHelperMojo extends AbstractI18nMojo { } writer.write("\n }\n"); + + writer.write("\n protected static String removeAnonymousSuffix(String className) {\n"); + writer.write(" return className.contains(\"$\") ? className.substring(0, className.indexOf(\"$\")) : className;"); + writer.write("\n }\n"); writer.write("}\n"); writer.close(); } finally { IOUtils.closeQuietly(writer); } - } private Set<String> getEnumConstants(String anEnumType) throws ClassNotFoundException, IOException { @@ -330,7 +333,7 @@ public class GenerateI18nEnumHelperMojo extends AbstractI18nMojo { result += "e.getClass().getSimpleName()"; break; case "CLASS_NAME": - result += "e.getClass().getName()"; + result += "removeAnonymousSuffix(e.getClass().getName())"; break; case "NAME": result += "e.name()"; -- To stop receiving notification emails like this one, please contact nuiton.org SCM administrator <admin+scm@nuiton.org>.