commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ebo...@apache.org
Subject svn commit: r788057 - in /commons/proper/configuration/branches/configuration2_experimental/src: main/java/org/apache/commons/configuration2/ main/java/org/apache/commons/configuration2/reloading/ test/java/org/apache/commons/configuration2/ test/java/...
Date Wed, 24 Jun 2009 15:44:51 GMT
Author: ebourg
Date: Wed Jun 24 15:44:50 2009
New Revision: 788057

URL: http://svn.apache.org/viewvc?rev=788057&view=rev
Log:
Removed AbstractFileConfiguration

Removed:
    commons/proper/configuration/branches/configuration2_experimental/src/main/java/org/apache/commons/configuration2/AbstractFileConfiguration.java
Modified:
    commons/proper/configuration/branches/configuration2_experimental/src/main/java/org/apache/commons/configuration2/CombinedConfiguration.java
    commons/proper/configuration/branches/configuration2_experimental/src/main/java/org/apache/commons/configuration2/PropertiesConfigurationLayout.java
    commons/proper/configuration/branches/configuration2_experimental/src/main/java/org/apache/commons/configuration2/reloading/VFSFileMonitorReloadingStrategy.java
    commons/proper/configuration/branches/configuration2_experimental/src/test/java/org/apache/commons/configuration2/TestPropertiesConfigurationLayout.java
    commons/proper/configuration/branches/configuration2_experimental/src/test/java/org/apache/commons/configuration2/TestVFSConfigurationBuilder.java
    commons/proper/configuration/branches/configuration2_experimental/src/test/java/org/apache/commons/configuration2/TestWebdavConfigurationBuilder.java
    commons/proper/configuration/branches/configuration2_experimental/src/test/java/org/apache/commons/configuration2/event/AbstractTestFileConfigurationEvents.java
    commons/proper/configuration/branches/configuration2_experimental/src/test/java/org/apache/commons/configuration2/reloading/TestVFSFileMonitorReloadingStrategy.java

Modified: commons/proper/configuration/branches/configuration2_experimental/src/main/java/org/apache/commons/configuration2/CombinedConfiguration.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/branches/configuration2_experimental/src/main/java/org/apache/commons/configuration2/CombinedConfiguration.java?rev=788057&r1=788056&r2=788057&view=diff
==============================================================================
--- commons/proper/configuration/branches/configuration2_experimental/src/main/java/org/apache/commons/configuration2/CombinedConfiguration.java
(original)
+++ commons/proper/configuration/branches/configuration2_experimental/src/main/java/org/apache/commons/configuration2/CombinedConfiguration.java
Wed Jun 24 15:44:50 2009
@@ -522,7 +522,7 @@
      */
     public void configurationChanged(ConfigurationEvent event)
     {
-        if (event.getType() == AbstractFileConfiguration.EVENT_CONFIG_CHANGED)
+        if (event.getType() == AbstractHierarchicalFileConfiguration.EVENT_CONFIG_CHANGED)
         {
             fireEvent(event.getType(), event.getPropertyName(), event.getPropertyValue(),
event.isBeforeUpdate());
         }

Modified: commons/proper/configuration/branches/configuration2_experimental/src/main/java/org/apache/commons/configuration2/PropertiesConfigurationLayout.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/branches/configuration2_experimental/src/main/java/org/apache/commons/configuration2/PropertiesConfigurationLayout.java?rev=788057&r1=788056&r2=788057&view=diff
==============================================================================
--- commons/proper/configuration/branches/configuration2_experimental/src/main/java/org/apache/commons/configuration2/PropertiesConfigurationLayout.java
(original)
+++ commons/proper/configuration/branches/configuration2_experimental/src/main/java/org/apache/commons/configuration2/PropertiesConfigurationLayout.java
Wed Jun 24 15:44:50 2009
@@ -593,7 +593,7 @@
     {
         if (event.isBeforeUpdate())
         {
-            if (AbstractFileConfiguration.EVENT_RELOAD == event.getType())
+            if (AbstractHierarchicalFileConfiguration.EVENT_RELOAD == event.getType())
             {
                 clear();
             }

Modified: commons/proper/configuration/branches/configuration2_experimental/src/main/java/org/apache/commons/configuration2/reloading/VFSFileMonitorReloadingStrategy.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/branches/configuration2_experimental/src/main/java/org/apache/commons/configuration2/reloading/VFSFileMonitorReloadingStrategy.java?rev=788057&r1=788056&r2=788057&view=diff
==============================================================================
--- commons/proper/configuration/branches/configuration2_experimental/src/main/java/org/apache/commons/configuration2/reloading/VFSFileMonitorReloadingStrategy.java
(original)
+++ commons/proper/configuration/branches/configuration2_experimental/src/main/java/org/apache/commons/configuration2/reloading/VFSFileMonitorReloadingStrategy.java
Wed Jun 24 15:44:50 2009
@@ -16,21 +16,21 @@
  */
 package org.apache.commons.configuration2.reloading;
 
-import org.apache.commons.configuration2.FileConfiguration;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.apache.commons.configuration2.AbstractHierarchicalFileConfiguration;
 import org.apache.commons.configuration2.ConfigurationRuntimeException;
+import org.apache.commons.configuration2.FileConfiguration;
 import org.apache.commons.configuration2.FileSystem;
 import org.apache.commons.configuration2.FileSystemBased;
-import org.apache.commons.configuration2.AbstractFileConfiguration;
-import org.apache.commons.vfs.impl.DefaultFileMonitor;
-import org.apache.commons.vfs.FileListener;
 import org.apache.commons.vfs.FileChangeEvent;
+import org.apache.commons.vfs.FileListener;
 import org.apache.commons.vfs.FileObject;
-import org.apache.commons.vfs.VFS;
-import org.apache.commons.vfs.FileSystemManager;
 import org.apache.commons.vfs.FileSystemException;
-
-import java.util.Map;
-import java.util.HashMap;
+import org.apache.commons.vfs.FileSystemManager;
+import org.apache.commons.vfs.VFS;
+import org.apache.commons.vfs.impl.DefaultFileMonitor;
 
 
 /**
@@ -232,9 +232,9 @@
 
     private void fireEvent()
     {
-        if (configuration instanceof AbstractFileConfiguration)
+        if (configuration instanceof AbstractHierarchicalFileConfiguration)
         {
-            ((AbstractFileConfiguration) configuration).configurationChanged();
+            ((AbstractHierarchicalFileConfiguration) configuration).configurationChanged();
         }
     }
 }

Modified: commons/proper/configuration/branches/configuration2_experimental/src/test/java/org/apache/commons/configuration2/TestPropertiesConfigurationLayout.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/branches/configuration2_experimental/src/test/java/org/apache/commons/configuration2/TestPropertiesConfigurationLayout.java?rev=788057&r1=788056&r2=788057&view=diff
==============================================================================
--- commons/proper/configuration/branches/configuration2_experimental/src/test/java/org/apache/commons/configuration2/TestPropertiesConfigurationLayout.java
(original)
+++ commons/proper/configuration/branches/configuration2_experimental/src/test/java/org/apache/commons/configuration2/TestPropertiesConfigurationLayout.java
Wed Jun 24 15:44:50 2009
@@ -378,7 +378,7 @@
     {
         fillLayout();
         ConfigurationEvent event = new ConfigurationEvent(this,
-                AbstractFileConfiguration.EVENT_RELOAD, null, null, true);
+                AbstractHierarchicalFileConfiguration.EVENT_RELOAD, null, null, true);
         layout.configurationChanged(event);
         assertTrue("Keys not empty", layout.getKeys().isEmpty());
         assertNull("Header comment was not reset", layout.getHeaderComment());
@@ -392,7 +392,7 @@
     {
         fillLayout();
         ConfigurationEvent event = new ConfigurationEvent(this,
-                AbstractFileConfiguration.EVENT_RELOAD, null, null, false);
+                AbstractHierarchicalFileConfiguration.EVENT_RELOAD, null, null, false);
         layout.configurationChanged(event);
         assertFalse("Keys are empty", layout.getKeys().isEmpty());
         assertNotNull("Header comment was reset", layout.getHeaderComment());

Modified: commons/proper/configuration/branches/configuration2_experimental/src/test/java/org/apache/commons/configuration2/TestVFSConfigurationBuilder.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/branches/configuration2_experimental/src/test/java/org/apache/commons/configuration2/TestVFSConfigurationBuilder.java?rev=788057&r1=788056&r2=788057&view=diff
==============================================================================
--- commons/proper/configuration/branches/configuration2_experimental/src/test/java/org/apache/commons/configuration2/TestVFSConfigurationBuilder.java
(original)
+++ commons/proper/configuration/branches/configuration2_experimental/src/test/java/org/apache/commons/configuration2/TestVFSConfigurationBuilder.java
Wed Jun 24 15:44:50 2009
@@ -17,28 +17,24 @@
 package org.apache.commons.configuration2;
 
 import java.io.File;
-import java.io.IOException;
 import java.io.FileReader;
-import java.io.Reader;
 import java.io.FileWriter;
+import java.io.IOException;
+import java.io.Reader;
 import java.io.Writer;
 import java.net.URL;
 import java.util.Collection;
-import java.util.Set;
 import java.util.List;
-import java.util.logging.ConsoleHandler;
-import java.util.logging.Logger;
-import java.util.logging.Level;
+import java.util.Set;
 
 import junit.framework.TestCase;
-
 import org.apache.commons.configuration2.beanutils.BeanHelper;
+import org.apache.commons.configuration2.event.ConfigurationEvent;
+import org.apache.commons.configuration2.event.ConfigurationListener;
 import org.apache.commons.configuration2.reloading.FileChangedReloadingStrategy;
 import org.apache.commons.configuration2.reloading.VFSFileMonitorReloadingStrategy;
 import org.apache.commons.configuration2.tree.DefaultConfigurationNode;
 import org.apache.commons.configuration2.tree.xpath.XPathExpressionEngine;
-import org.apache.commons.configuration2.event.ConfigurationListener;
-import org.apache.commons.configuration2.event.ConfigurationEvent;
 
 /**
  * Test class for DefaultConfigurationBuilder.
@@ -1167,7 +1163,7 @@
 
     public void configurationChanged(ConfigurationEvent event)
     {
-        if (event.getType() == AbstractFileConfiguration.EVENT_CONFIG_CHANGED)
+        if (event.getType() == AbstractHierarchicalFileConfiguration.EVENT_CONFIG_CHANGED)
         {
             synchronized(this)
             {

Modified: commons/proper/configuration/branches/configuration2_experimental/src/test/java/org/apache/commons/configuration2/TestWebdavConfigurationBuilder.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/branches/configuration2_experimental/src/test/java/org/apache/commons/configuration2/TestWebdavConfigurationBuilder.java?rev=788057&r1=788056&r2=788057&view=diff
==============================================================================
--- commons/proper/configuration/branches/configuration2_experimental/src/test/java/org/apache/commons/configuration2/TestWebdavConfigurationBuilder.java
(original)
+++ commons/proper/configuration/branches/configuration2_experimental/src/test/java/org/apache/commons/configuration2/TestWebdavConfigurationBuilder.java
Wed Jun 24 15:44:50 2009
@@ -1014,7 +1014,7 @@
 
     public void configurationChanged(ConfigurationEvent event)
     {
-        if (event.getType() == AbstractFileConfiguration.EVENT_CONFIG_CHANGED)
+        if (event.getType() == AbstractHierarchicalFileConfiguration.EVENT_CONFIG_CHANGED)
         {
             synchronized(this)
             {

Modified: commons/proper/configuration/branches/configuration2_experimental/src/test/java/org/apache/commons/configuration2/event/AbstractTestFileConfigurationEvents.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/branches/configuration2_experimental/src/test/java/org/apache/commons/configuration2/event/AbstractTestFileConfigurationEvents.java?rev=788057&r1=788056&r2=788057&view=diff
==============================================================================
--- commons/proper/configuration/branches/configuration2_experimental/src/test/java/org/apache/commons/configuration2/event/AbstractTestFileConfigurationEvents.java
(original)
+++ commons/proper/configuration/branches/configuration2_experimental/src/test/java/org/apache/commons/configuration2/event/AbstractTestFileConfigurationEvents.java
Wed Jun 24 15:44:50 2009
@@ -19,11 +19,9 @@
 import java.io.IOException;
 import java.net.URL;
 
-import org.apache.commons.configuration2.AbstractFileConfiguration;
+import org.apache.commons.configuration2.AbstractHierarchicalFileConfiguration;
 import org.apache.commons.configuration2.ConfigurationException;
 import org.apache.commons.configuration2.FileConfiguration;
-import org.apache.commons.configuration2.event.ConfigurationEvent;
-import org.apache.commons.configuration2.event.ConfigurationListener;
 import org.apache.commons.configuration2.reloading.ReloadingStrategy;
 
 /**
@@ -70,9 +68,9 @@
     {
         setUpFileConfiguration();
         config.isEmpty(); // This should cause a reload
-        l.checkEvent(AbstractFileConfiguration.EVENT_RELOAD, null,
+        l.checkEvent(AbstractHierarchicalFileConfiguration.EVENT_RELOAD, null,
                 getSourceURL(), true);
-        l.checkEvent(AbstractFileConfiguration.EVENT_RELOAD, null,
+        l.checkEvent(AbstractHierarchicalFileConfiguration.EVENT_RELOAD, null,
                 getSourceURL(), false);
         l.done();
     }
@@ -88,10 +86,10 @@
         config.setDetailEvents(true);
         config.isEmpty(); // This should cause a reload
         l.checkEventCount(2);
-        l.checkEvent(AbstractFileConfiguration.EVENT_RELOAD, null,
+        l.checkEvent(AbstractHierarchicalFileConfiguration.EVENT_RELOAD, null,
                 getSourceURL(), true);
-        l.skipToLast(AbstractFileConfiguration.EVENT_RELOAD);
-        l.checkEvent(AbstractFileConfiguration.EVENT_RELOAD, null,
+        l.skipToLast(AbstractHierarchicalFileConfiguration.EVENT_RELOAD);
+        l.checkEvent(AbstractHierarchicalFileConfiguration.EVENT_RELOAD, null,
                 getSourceURL(), false);
         l.done();
     }
@@ -112,9 +110,9 @@
             }
         });
         config.isEmpty();
-        l.checkEvent(AbstractFileConfiguration.EVENT_RELOAD, null,
+        l.checkEvent(AbstractHierarchicalFileConfiguration.EVENT_RELOAD, null,
                 getSourceURL(), true);
-        l.checkEvent(AbstractFileConfiguration.EVENT_RELOAD, null,
+        l.checkEvent(AbstractHierarchicalFileConfiguration.EVENT_RELOAD, null,
                 getSourceURL(), false);
         l.done();
     }

Modified: commons/proper/configuration/branches/configuration2_experimental/src/test/java/org/apache/commons/configuration2/reloading/TestVFSFileMonitorReloadingStrategy.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/branches/configuration2_experimental/src/test/java/org/apache/commons/configuration2/reloading/TestVFSFileMonitorReloadingStrategy.java?rev=788057&r1=788056&r2=788057&view=diff
==============================================================================
--- commons/proper/configuration/branches/configuration2_experimental/src/test/java/org/apache/commons/configuration2/reloading/TestVFSFileMonitorReloadingStrategy.java
(original)
+++ commons/proper/configuration/branches/configuration2_experimental/src/test/java/org/apache/commons/configuration2/reloading/TestVFSFileMonitorReloadingStrategy.java
Wed Jun 24 15:44:50 2009
@@ -19,18 +19,14 @@
 
 import java.io.File;
 import java.io.FileWriter;
-import java.net.URL;
 
 import junit.framework.TestCase;
-
-import org.apache.commons.configuration2.ConfigurationException;
-import org.apache.commons.configuration2.PropertiesConfiguration;
-import org.apache.commons.configuration2.XMLConfiguration;
+import org.apache.commons.configuration2.AbstractHierarchicalFileConfiguration;
 import org.apache.commons.configuration2.FileSystem;
+import org.apache.commons.configuration2.PropertiesConfiguration;
 import org.apache.commons.configuration2.VFSFileSystem;
-import org.apache.commons.configuration2.AbstractFileConfiguration;
-import org.apache.commons.configuration2.event.ConfigurationListener;
 import org.apache.commons.configuration2.event.ConfigurationEvent;
+import org.apache.commons.configuration2.event.ConfigurationListener;
 
 /**
  * Test case for the VFSFileMonitorReloadingStrategy class.
@@ -215,7 +211,7 @@
 
     public void configurationChanged(ConfigurationEvent event)
     {
-        if (event.getType() == AbstractFileConfiguration.EVENT_CONFIG_CHANGED)
+        if (event.getType() == AbstractHierarchicalFileConfiguration.EVENT_CONFIG_CHANGED)
         {
             synchronized(this)
             {



Mime
View raw message