commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From simonetrip...@apache.org
Subject svn commit: r1103468 - /commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/SetPropertiesRule.java
Date Sun, 15 May 2011 17:28:43 GMT
Author: simonetripodi
Date: Sun May 15 17:28:42 2011
New Revision: 1103468

URL: http://svn.apache.org/viewvc?rev=1103468&view=rev
Log:
updated attribute->property mapping Constructor

Modified:
    commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/SetPropertiesRule.java

Modified: commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/SetPropertiesRule.java
URL: http://svn.apache.org/viewvc/commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/SetPropertiesRule.java?rev=1103468&r1=1103467&r2=1103468&view=diff
==============================================================================
--- commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/SetPropertiesRule.java
(original)
+++ commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/SetPropertiesRule.java
Sun May 15 17:28:42 2011
@@ -119,6 +119,20 @@ public class SetPropertiesRule
         }
     }
 
+    /**
+     * Constructor allows attribute->property mapping to be overriden.
+     *
+     * @param aliases attribute->property mapping
+     * @since 3.0
+     */
+    public SetPropertiesRule( Map<String, String> aliases )
+    {
+        if ( aliases != null && !aliases.isEmpty() )
+        {
+            this.aliases.putAll( aliases );
+        }
+    }
+
     // ----------------------------------------------------- Instance Variables
 
     private final Map<String, String> aliases = new HashMap<String, String>();



Mime
View raw message