commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ohe...@apache.org
Subject svn commit: r930693 - in /commons/proper/configuration/trunk: src/java/org/apache/commons/configuration/SubsetConfiguration.java src/test/org/apache/commons/configuration/event/TestSubsetConfigurationEvents.java xdocs/changes.xml
Date Sun, 04 Apr 2010 14:02:59 GMT
Author: oheger
Date: Sun Apr  4 14:02:59 2010
New Revision: 930693

URL: http://svn.apache.org/viewvc?rev=930693&view=rev
Log:
CONFIGURATION-413: SubsetConfiguration now generates correct events. Thanks to Alexander Prishchepov
for the patch.

Added:
    commons/proper/configuration/trunk/src/test/org/apache/commons/configuration/event/TestSubsetConfigurationEvents.java
  (with props)
Modified:
    commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/SubsetConfiguration.java
    commons/proper/configuration/trunk/xdocs/changes.xml

Modified: commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/SubsetConfiguration.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/SubsetConfiguration.java?rev=930693&r1=930692&r2=930693&view=diff
==============================================================================
--- commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/SubsetConfiguration.java
(original)
+++ commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/SubsetConfiguration.java
Sun Apr  4 14:02:59 2010
@@ -170,12 +170,7 @@ public class SubsetConfiguration extends
         parent.addProperty(getParentKey(key), value);
     }
 
-    public void setProperty(String key, Object value)
-    {
-        parent.setProperty(getParentKey(key), value);
-    }
-
-    public void clearProperty(String key)
+    protected void clearPropertyDirect(String key)
     {
         parent.clearProperty(getParentKey(key));
     }

Added: commons/proper/configuration/trunk/src/test/org/apache/commons/configuration/event/TestSubsetConfigurationEvents.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/trunk/src/test/org/apache/commons/configuration/event/TestSubsetConfigurationEvents.java?rev=930693&view=auto
==============================================================================
--- commons/proper/configuration/trunk/src/test/org/apache/commons/configuration/event/TestSubsetConfigurationEvents.java
(added)
+++ commons/proper/configuration/trunk/src/test/org/apache/commons/configuration/event/TestSubsetConfigurationEvents.java
Sun Apr  4 14:02:59 2010
@@ -0,0 +1,36 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.configuration.event;
+
+import java.util.HashMap;
+
+import org.apache.commons.configuration.AbstractConfiguration;
+import org.apache.commons.configuration.MapConfiguration;
+import org.apache.commons.configuration.SubsetConfiguration;
+
+/**
+ * Test class for the events generated by SubsetConfiguration.
+ *
+ * @version $Id$
+ */
+public class TestSubsetConfigurationEvents extends AbstractTestConfigurationEvents
+{
+	protected AbstractConfiguration createConfiguration()
+	{
+		return (SubsetConfiguration)new MapConfiguration(new HashMap()).subset("test");
+	}
+}

Propchange: commons/proper/configuration/trunk/src/test/org/apache/commons/configuration/event/TestSubsetConfigurationEvents.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: commons/proper/configuration/trunk/src/test/org/apache/commons/configuration/event/TestSubsetConfigurationEvents.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: commons/proper/configuration/trunk/src/test/org/apache/commons/configuration/event/TestSubsetConfigurationEvents.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: commons/proper/configuration/trunk/xdocs/changes.xml
URL: http://svn.apache.org/viewvc/commons/proper/configuration/trunk/xdocs/changes.xml?rev=930693&r1=930692&r2=930693&view=diff
==============================================================================
--- commons/proper/configuration/trunk/xdocs/changes.xml (original)
+++ commons/proper/configuration/trunk/xdocs/changes.xml Sun Apr  4 14:02:59 2010
@@ -23,6 +23,9 @@
 
   <body>
     <release version="1.7" date="in SVN" description="">
+      <action dev="oheger" type="fix" issue="CONFIGURATION-413" due-to="Alexander Prishchepov">
+        SubsetConfiguration now produces correct events.
+      </action>
       <action dev="oheger" type="fix" issue="CONFIGURATION-409">
         HierarchicalINIConfiguration now correctly saves sections whose name
         contains delimiter characters.



Mime
View raw message