tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rmannibu...@apache.org
Subject svn commit: r1292189 - /openejb/trunk/maven-plugins/dd-maven-plugin/src/main/java/org/apache/openejb/maven/plugin/dd/merger/ValidationMerger.java
Date Wed, 22 Feb 2012 08:46:42 GMT
Author: rmannibucau
Date: Wed Feb 22 08:46:42 2012
New Revision: 1292189

URL: http://svn.apache.org/viewvc?rev=1292189&view=rev
Log:
check property key when merging validation.xml

Modified:
    openejb/trunk/maven-plugins/dd-maven-plugin/src/main/java/org/apache/openejb/maven/plugin/dd/merger/ValidationMerger.java

Modified: openejb/trunk/maven-plugins/dd-maven-plugin/src/main/java/org/apache/openejb/maven/plugin/dd/merger/ValidationMerger.java
URL: http://svn.apache.org/viewvc/openejb/trunk/maven-plugins/dd-maven-plugin/src/main/java/org/apache/openejb/maven/plugin/dd/merger/ValidationMerger.java?rev=1292189&r1=1292188&r2=1292189&view=diff
==============================================================================
--- openejb/trunk/maven-plugins/dd-maven-plugin/src/main/java/org/apache/openejb/maven/plugin/dd/merger/ValidationMerger.java
(original)
+++ openejb/trunk/maven-plugins/dd-maven-plugin/src/main/java/org/apache/openejb/maven/plugin/dd/merger/ValidationMerger.java
Wed Feb 22 08:46:42 2012
@@ -21,7 +21,14 @@ public class ValidationMerger extends Me
     @Override
     public ValidationConfigType merge(final ValidationConfigType reference, final ValidationConfigType
toMerge) {
         for (PropertyType property : toMerge.getProperty()) {
-            if (reference.getProperty().contains(property)) {
+            boolean found = false;
+            for (PropertyType refProperty : reference.getProperty()) {
+                if (refProperty.getName().contains(property.getName())) {
+                    found = true;
+                    break;
+                }
+            }
+            if (found) {
                 log.warn("property " + property.getName() + " already present");
             } else {
                 reference.getProperty().add(property);



Mime
View raw message