commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ohe...@apache.org
Subject svn commit: r1463686 - in /commons/proper/configuration/trunk/src: main/java/org/apache/commons/configuration/builder/ test/java/org/apache/commons/configuration/builder/
Date Tue, 02 Apr 2013 19:05:18 GMT
Author: oheger
Date: Tue Apr  2 19:05:17 2013
New Revision: 1463686

URL: http://svn.apache.org/r1463686
Log:
FileBasedBuilderParametersImpl.reloadingRefreshDelay is now of type Long.

The property can be undefined, therefore the value null makes sense.

Modified:
    commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/builder/FileBasedBuilderParametersImpl.java
    commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/builder/FileBasedBuilderProperties.java
    commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/builder/TestFileBasedBuilderParameters.java

Modified: commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/builder/FileBasedBuilderParametersImpl.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/builder/FileBasedBuilderParametersImpl.java?rev=1463686&r1=1463685&r2=1463686&view=diff
==============================================================================
--- commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/builder/FileBasedBuilderParametersImpl.java
(original)
+++ commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/builder/FileBasedBuilderParametersImpl.java
Tue Apr  2 19:05:17 2013
@@ -61,7 +61,7 @@ public class FileBasedBuilderParametersI
     private ReloadingDetectorFactory reloadingDetectorFactory;
 
     /** The refresh delay for reloading support. */
-    private long reloadingRefreshDelay;
+    private Long reloadingRefreshDelay;
 
     /**
      * Creates a new instance of {@code FileBasedBuilderParametersImpl} with an
@@ -135,17 +135,18 @@ public class FileBasedBuilderParametersI
     }
 
     /**
-     * Returns the refresh delay for reload operations.
+     * Returns the refresh delay for reload operations. Result may be
+     * <b>null</b> if this value has not been set.
      *
      * @return the reloading refresh delay
      */
-    public long getReloadingRefreshDelay()
+    public Long getReloadingRefreshDelay()
     {
         return reloadingRefreshDelay;
     }
 
     public FileBasedBuilderParametersImpl setReloadingRefreshDelay(
-            long reloadingRefreshDelay)
+            Long reloadingRefreshDelay)
     {
         this.reloadingRefreshDelay = reloadingRefreshDelay;
         return this;

Modified: commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/builder/FileBasedBuilderProperties.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/builder/FileBasedBuilderProperties.java?rev=1463686&r1=1463685&r2=1463686&view=diff
==============================================================================
--- commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/builder/FileBasedBuilderProperties.java
(original)
+++ commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/builder/FileBasedBuilderProperties.java
Tue Apr  2 19:05:17 2013
@@ -41,7 +41,7 @@ public interface FileBasedBuilderPropert
      * @param reloadingRefreshDelay the refresh delay (in milliseconds)
      * @return a reference to this object for method chaining
      */
-    T setReloadingRefreshDelay(long reloadingRefreshDelay);
+    T setReloadingRefreshDelay(Long reloadingRefreshDelay);
 
     /**
      * Sets the factory for creating {@code ReloadingDetector} objects. With

Modified: commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/builder/TestFileBasedBuilderParameters.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/builder/TestFileBasedBuilderParameters.java?rev=1463686&r1=1463685&r2=1463686&view=diff
==============================================================================
--- commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/builder/TestFileBasedBuilderParameters.java
(original)
+++ commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/builder/TestFileBasedBuilderParameters.java
Tue Apr  2 19:05:17 2013
@@ -52,8 +52,7 @@ public class TestFileBasedBuilderParamet
         FileBasedBuilderParametersImpl params = new FileBasedBuilderParametersImpl();
         assertFalse("Got a location", params.getFileHandler()
                 .isLocationDefined());
-        assertEquals("Got a refresh delay", 0,
-                params.getReloadingRefreshDelay());
+        assertNull("Got a refresh delay", params.getReloadingRefreshDelay());
     }
 
     /**
@@ -75,7 +74,7 @@ public class TestFileBasedBuilderParamet
     public void testSetReloadingRefreshDelay()
     {
         FileBasedBuilderParametersImpl params = new FileBasedBuilderParametersImpl();
-        final int delay = 10000;
+        final Long delay = 10000L;
         assertSame("Wrong result", params,
                 params.setReloadingRefreshDelay(delay));
         assertEquals("Wrong delay", delay, params.getReloadingRefreshDelay());
@@ -200,7 +199,7 @@ public class TestFileBasedBuilderParamet
     {
         FileBasedBuilderParametersImpl params =
                 new FileBasedBuilderParametersImpl()
-                        .setReloadingRefreshDelay(1000);
+                        .setReloadingRefreshDelay(1000L);
         params.setListDelimiter('*');
         Map<String, Object> map = params.getParameters();
         assertTrue("Object not stored", map.values().contains(params));



Mime
View raw message