commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ohe...@apache.org
Subject svn commit: r1434383 - /commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/builder/JndiBuilderParametersImpl.java
Date Wed, 16 Jan 2013 20:52:09 GMT
Author: oheger
Date: Wed Jan 16 20:52:08 2013
New Revision: 1434383

URL: http://svn.apache.org/viewvc?rev=1434383&view=rev
Log:
Simplified implementation of JndiBuilderParametersImpl.

Modified:
    commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/builder/JndiBuilderParametersImpl.java

Modified: commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/builder/JndiBuilderParametersImpl.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/builder/JndiBuilderParametersImpl.java?rev=1434383&r1=1434382&r2=1434383&view=diff
==============================================================================
--- commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/builder/JndiBuilderParametersImpl.java
(original)
+++ commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/builder/JndiBuilderParametersImpl.java
Wed Jan 16 20:52:08 2013
@@ -16,9 +16,6 @@
  */
 package org.apache.commons.configuration.builder;
 
-import java.util.HashMap;
-import java.util.Map;
-
 import javax.naming.Context;
 
 /**
@@ -51,38 +48,15 @@ public class JndiBuilderParametersImpl e
     /** Constant for the name of the prefix property. */
     private static final String PROP_PREFIX = "prefix";
 
-    /** A map for storing the properties. */
-    private final Map<String, Object> properties;
-
-    /**
-     * Creates a new instance of {@code JndiBuilderParametersImpl}.
-     */
-    public JndiBuilderParametersImpl()
-    {
-        properties = new HashMap<String, Object>();
-    }
-
     public JndiBuilderParametersImpl setContext(Context ctx)
     {
-        properties.put(PROP_CONTEXT, ctx);
+        storeProperty(PROP_CONTEXT, ctx);
         return this;
     }
 
     public JndiBuilderParametersImpl setPrefix(String p)
     {
-        properties.put(PROP_PREFIX, p);
+        storeProperty(PROP_PREFIX, p);
         return this;
     }
-
-    /**
-     * {@inheritDoc} This implementation adds this object's own properties to
-     * the map returned by the base class.
-     */
-    @Override
-    public Map<String, Object> getParameters()
-    {
-        Map<String, Object> result = super.getParameters();
-        result.putAll(properties);
-        return result;
-    }
 }



Mime
View raw message