branch feature/3762 updated (f1712e9 -> 16d34b5)
This is an automated email from the git hooks/post-receive script. New change to branch feature/3762 in repository eugene. See http://git.nuiton.org/eugene.git discards f1712e9 Be able to detect complex tag value (See #3762) new 16d34b5 Be able to detect complex tag value (See #3762) 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 (f1712e9) \ N -- N -- N refs/heads/feature/3762 (16d34b5) 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 16d34b50332d9758423002ef032866488fb7c122 Author: Tony CHEMIT <chemit@codelutin.com> Date: Fri Aug 21 15:10:38 2015 +0200 Be able to detect complex tag value (See #3762) Summary of changes: .../java/org/nuiton/eugene/models/tagvalue/TagValues.java | 6 +++--- .../org/nuiton/eugene/models/tagvalue/TagValuesTest.java | 12 +++++++++--- 2 files changed, 12 insertions(+), 6 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 feature/3762 in repository eugene. See http://git.nuiton.org/eugene.git commit 16d34b50332d9758423002ef032866488fb7c122 Author: Tony CHEMIT <chemit@codelutin.com> Date: Fri Aug 21 15:10:38 2015 +0200 Be able to detect complex tag value (See #3762) --- .../nuiton/eugene/models/tagvalue/TagValues.java | 8 ++++---- .../eugene/models/tagvalue/TagValuesTest.java | 24 ++++++++++++++++++++++ 2 files changed, 28 insertions(+), 4 deletions(-) diff --git a/eugene/src/main/java/org/nuiton/eugene/models/tagvalue/TagValues.java b/eugene/src/main/java/org/nuiton/eugene/models/tagvalue/TagValues.java index dde2457..c64af9c 100644 --- a/eugene/src/main/java/org/nuiton/eugene/models/tagvalue/TagValues.java +++ b/eugene/src/main/java/org/nuiton/eugene/models/tagvalue/TagValues.java @@ -53,22 +53,22 @@ public class TagValues { * fr.isisfish.entities.Population.operation.getRegion.stereotype=... * fr.isisfish.entities.Population.operation.getRegion.tagvalue.pk=... */ - protected static final Pattern TAG_VALUE_PATTERN = Pattern - .compile("^((?:[_a-zA-Z0-9]+\\.)+(?:_?[A-Z][_a-zA-Z0-9]*\\.)+)(?:(class|attribute|operation))\\.(?:([_a-zA-Z0-9]+)\\.)?(?:(tagvalue|tagValue)?)\\.([_a-z0-9][_a-zA-Z0-9]*)?$"); + protected static final Pattern TAG_VALUE_PATTERN = + Pattern.compile("^((?:[_a-zA-Z0-9]+\\.)+(?:_?[A-Z][_a-zA-Z0-9]*\\.)+)(?:(class|attribute|operation))\\.(?:([_a-zA-Z0-9]+)\\.)?(?:(tagvalue|tagValue)?)\\.((?:[_a-zA-Z0-9]+)+(?:\\.?[_a-zA-Z0-9]+)*)?$"); /** * Pattern to define tag values authorized at model level in the model * properties file. */ protected static final Pattern MODEL_TAG_VALUE_PATTERN = Pattern.compile( - "^model\\.(?:(tagvalue|tagValue)?)\\.((?:.+))$"); + "^model\\.(?:(tagvalue|tagValue)?)\\.((?:[_a-zA-Z0-9]+)+(?:\\.?[_a-zA-Z0-9]+)*)$"); /** * Pattern to define tag values authorized at model level in the model * properties file. */ protected static final Pattern PACKAGE_TAG_VALUE_PATTERN = Pattern.compile( - "^package\\.((?:[_a-zA-Z0-9]+\\.)+)(?:(tagvalue|tagValue)?)\\.((?:.+))$"); + "^package\\.((?:[_a-zA-Z0-9]+\\.)+)(?:(tagvalue|tagValue)?)\\.((?:[_a-zA-Z0-9]+)+(?:\\.?[_a-zA-Z0-9]+)*)$"); public static Matcher getModelMatcher(String key) throws InvalidTagValueSyntaxException { Matcher matcher = MODEL_TAG_VALUE_PATTERN.matcher(key); diff --git a/eugene/src/test/java/org/nuiton/eugene/models/tagvalue/TagValuesTest.java b/eugene/src/test/java/org/nuiton/eugene/models/tagvalue/TagValuesTest.java index 300b958..c0a4b84 100644 --- a/eugene/src/test/java/org/nuiton/eugene/models/tagvalue/TagValuesTest.java +++ b/eugene/src/test/java/org/nuiton/eugene/models/tagvalue/TagValuesTest.java @@ -34,4 +34,28 @@ public class TagValuesTest { Assert.assertEquals(defaultValue, value); } + @Test + public void testGetModelMatcher() throws Exception { + TagValues.getModelMatcher("model.tagvalue.hibernateAttributeType"); + TagValues.getModelMatcher("model.tagValue.hibernateAttributeType"); + TagValues.getModelMatcher("model.tagValue.hibernateAttributeType.String"); + TagValues.getModelMatcher("model.tagValue.hibernateAttributeType.java.lang.String"); + } + + @Test + public void testPackageModelMatcher() throws Exception { + TagValues.getPackageMatcher("package.fr.ird.observe.tagvalue.hibernateAttributeType"); + TagValues.getPackageMatcher("package.fr.ird.observe.tagValue.hibernateAttributeType"); + TagValues.getPackageMatcher("package.fr.ird.observe.tagValue.hibernateAttributeType.String"); + TagValues.getPackageMatcher("package.fr.ird.observe.tagValue.hibernateAttributeType.java.lang.String"); + } + + @Test + public void testGetMatcher() throws Exception { + TagValues.getMatcher("fr.ird.observe.entities.CommentableEntity.attribute.comment.tagvalue.hibernateAttributeType"); + TagValues.getMatcher("fr.ird.observe.entities.CommentableEntity.attribute.comment.tagValue.hibernateAttributeType"); + TagValues.getMatcher("fr.ird.observe.entities.CommentableEntity.attribute.comment.tagValue.hibernateAttributeType.String"); + TagValues.getMatcher("fr.ird.observe.entities.CommentableEntity.attribute.comment.tagValue.hibernateAttributeType.java.lang.String"); + } + } -- To stop receiving notification emails like this one, please contact nuiton.org SCM administrator <admin+scm@nuiton.org>.
participants (1)
-
nuiton.org scm