branch develop updated (fa3a030 -> 1528d76)
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 discards fa3a030 GenerateI18nHelper does not work if enum has abstract methods (Fixes {4014) new 1528d76 GenerateI18nHelper does not work if enum has abstract methods (Fixes #4014) This update added new revisions after undoing existing revisions. That is to say, some revisions that were in the old version of the branch are not in the new version. This situation occurs when a user --force pushes a change and generates a repository containing something like this: * -- * -- B -- O -- O -- O (fa3a030) \ N -- N -- N refs/heads/develop (1528d76) You should already have received notification emails for all of the O revisions, and so the following emails describe only the N revisions from the common base, B. Any revisions marked "omits" are not gone; other references still refer to them. Any revisions marked "discards" are gone forever. 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 1528d765f1aabbe42b99183b985cc27b15ef9a35 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: -- 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 1528d765f1aabbe42b99183b985cc27b15ef9a35 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