branch develop updated (bc21a33 -> fa3a030)
This is an automated email from the git hooks/post-receive script. New change to branch develop in repository i18n. See https://gitlab.nuiton.org/nuiton/i18n.git from bc21a33 [jgitflow-maven-plugin]Updating develop poms back to pre merge state new fa3a030 GenerateI18nHelper does not work if enum has abstract methods (Fixes {4014) The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Detailed log of new commits: 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) Summary of changes: .../java/org/nuiton/i18n/plugin/GenerateI18nEnumHelperMojo.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) -- To stop receiving notification emails like this one, please contact nuiton.org SCM administrator <admin+scm@nuiton.org>.
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>.
participants (1)
-
nuiton.org scm