Author: ggregory
Date: Mon Apr 10 03:39:17 2017
New Revision: 1790771

URL: http://svn.apache.org/viewvc?rev=1790771&view=rev
Log:
Revert:
- [CONFIGURATION-659] Add API 
org.apache.commons.configuration2.ImmutableConfiguration.getURL(String).
- [CONFIGURATION-658] Add API 
org.apache.commons.configuration2.ImmutableConfiguration.getURI(String).

Modified:
    commons/proper/configuration/trunk/src/changes/changes.xml
    
commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration2/AbstractConfiguration.java
    
commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration2/DataConfiguration.java
    
commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration2/ImmutableConfiguration.java
    
commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration2/TestBaseConfiguration.java

Modified: commons/proper/configuration/trunk/src/changes/changes.xml
URL: 
http://svn.apache.org/viewvc/commons/proper/configuration/trunk/src/changes/changes.xml?rev=1790771&r1=1790770&r2=1790771&view=diff
==============================================================================
--- commons/proper/configuration/trunk/src/changes/changes.xml (original)
+++ commons/proper/configuration/trunk/src/changes/changes.xml Mon Apr 10 
03:39:17 2017
@@ -35,12 +35,6 @@
         INIConfiguration can now be configured to use a custom separator
         between properties and values when writing an ini file.
       </action>
-      <action dev="ggregory" type="add" issue="CONFIGURATION-658">
-        Add API 
org.apache.commons.configuration2.ImmutableConfiguration.getURI(String).
-      </action>
-      <action dev="ggregory" type="add" issue="CONFIGURATION-659">
-        Add API 
org.apache.commons.configuration2.ImmutableConfiguration.getURL(String).
-      </action>
       <action dev="ggregory" type="add" issue="CONFIGURATION-660">
         Add toString() methods here and there to help debugging.
       </action>

Modified: 
commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration2/AbstractConfiguration.java
URL: 
http://svn.apache.org/viewvc/commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration2/AbstractConfiguration.java?rev=1790771&r1=1790770&r2=1790771&view=diff
==============================================================================
--- 
commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration2/AbstractConfiguration.java
 (original)
+++ 
commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration2/AbstractConfiguration.java
 Mon Apr 10 03:39:17 2017
@@ -19,8 +19,6 @@ package org.apache.commons.configuration
 
 import java.math.BigDecimal;
 import java.math.BigInteger;
-import java.net.URI;
-import java.net.URL;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Collection;
@@ -1357,30 +1355,6 @@ public abstract class AbstractConfigurat
     }
 
     @Override
-    public URI getURI(String key)
-    {
-        return convert(URI.class, key, null, true);
-    }
-
-    @Override
-    public URI getURI(String key, URI defaultValue)
-    {
-        return convert(URI.class, key, defaultValue, false);
-    }
-
-    @Override
-    public URL getURL(String key)
-    {
-        return convert(URL.class, key, null, true);
-    }
-
-    @Override
-    public URL getURL(String key, URL defaultValue)
-    {
-        return convert(URL.class, key, defaultValue, false);
-    }
-
-    @Override
     public String getString(String key, String defaultValue)
     {
         String result = convert(String.class, key, null, false);

Modified: 
commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration2/DataConfiguration.java
URL: 
http://svn.apache.org/viewvc/commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration2/DataConfiguration.java?rev=1790771&r1=1790770&r2=1790771&view=diff
==============================================================================
--- 
commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration2/DataConfiguration.java
 (original)
+++ 
commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration2/DataConfiguration.java
 Mon Apr 10 03:39:17 2017
@@ -798,7 +798,6 @@ public class DataConfiguration extends A
      * @throws ConversionException is thrown if the key maps to an
      *         object that is not an URL.
      */
-    @Override
     public URL getURL(String key)
     {
         return get(URL.class, key);
@@ -816,7 +815,6 @@ public class DataConfiguration extends A
      * @throws ConversionException is thrown if the key maps to an
      *         object that is not an URL.
      */
-    @Override
     public URL getURL(String key, URL defaultValue)
     {
         return get(URL.class, key, defaultValue);

Modified: 
commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration2/ImmutableConfiguration.java
URL: 
http://svn.apache.org/viewvc/commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration2/ImmutableConfiguration.java?rev=1790771&r1=1790770&r2=1790771&view=diff
==============================================================================
--- 
commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration2/ImmutableConfiguration.java
 (original)
+++ 
commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration2/ImmutableConfiguration.java
 Mon Apr 10 03:39:17 2017
@@ -18,8 +18,6 @@ package org.apache.commons.configuration
 
 import java.math.BigDecimal;
 import java.math.BigInteger;
-import java.net.URI;
-import java.net.URL;
 import java.util.Collection;
 import java.util.Iterator;
 import java.util.List;
@@ -463,58 +461,6 @@ public interface ImmutableConfiguration
     String getString(String key, String defaultValue);
 
     /**
-     * Gets a URI associated with the given configuration key.
-     *
-     * @param key The configuration key.
-     * @return The associated string.
-     *
-     * @throws org.apache.commons.configuration2.ex.ConversionException is 
thrown if the key maps to an object that
-     *         is not a String.
-     */
-    URI getURI(String key);
-
-    /**
-     * Gets a URI associated with the given configuration key.
-     * If the key doesn't map to an existing object, the default value
-     * is returned.
-     *
-     * @param key The configuration key.
-     * @param defaultValue The default value.
-     * @return The associated URI if key is found and has valid
-     *         format, default value otherwise.
-     *
-     * @throws org.apache.commons.configuration2.ex.ConversionException is 
thrown if the key maps to an object that
-     *         is not a String.
-     */
-    URI getURI(String key, URI defaultValue);
-
-    /**
-     * Gets a URL associated with the given configuration key.
-     *
-     * @param key The configuration key.
-     * @return The associated string.
-     *
-     * @throws org.apache.commons.configuration2.ex.ConversionException is 
thrown if the key maps to an object that
-     *         is not a String.
-     */
-    URL getURL(String key);
-
-    /**
-     * Gets a URL associated with the given configuration key.
-     * If the key doesn't map to an existing object, the default value
-     * is returned.
-     *
-     * @param key The configuration key.
-     * @param defaultValue The default value.
-     * @return The associated URL if key is found and has valid
-     *         format, default value otherwise.
-     *
-     * @throws org.apache.commons.configuration2.ex.ConversionException is 
thrown if the key maps to an object that
-     *         is not a String.
-     */
-    URL getURL(String key, URL defaultValue);
-
-    /**
      * Get the value of a string property that is stored in encoded form in 
this
      * configuration. This method obtains the value of the string property
      * identified by the given key. This value is then passed to the provided

Modified: 
commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration2/TestBaseConfiguration.java
URL: 
http://svn.apache.org/viewvc/commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration2/TestBaseConfiguration.java?rev=1790771&r1=1790770&r2=1790771&view=diff
==============================================================================
--- 
commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration2/TestBaseConfiguration.java
 (original)
+++ 
commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration2/TestBaseConfiguration.java
 Mon Apr 10 03:39:17 2017
@@ -25,9 +25,6 @@ import static org.junit.Assert.assertTru
 
 import java.math.BigDecimal;
 import java.math.BigInteger;
-import java.net.MalformedURLException;
-import java.net.URI;
-import java.net.URL;
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.HashMap;
@@ -280,30 +277,6 @@ public class TestBaseConfiguration
         assertEquals("Missing key with default value", defaultValue, 
config.getString("stringNotInConfig", defaultValue));
     }
 
-    @Test
-    public void testGetURI()
-    {
-        config.setProperty("testURI", URI.create("http://example.com";));
-        URI uri = URI.create("http://example.com";);
-        URI defaultValue = URI.create("http://localhost";);
-
-        assertEquals("Existing key", uri, config.getURI("testURI"));
-        assertEquals("Existing key with default value", uri, 
config.getURI("testURI", defaultValue));
-        assertEquals("Missing key with default value", defaultValue, 
config.getURI("stringNotInConfig", defaultValue));
-    }
-
-    @Test
-    public void testGetURL() throws MalformedURLException
-    {
-        config.setProperty("testURL", new URL("http://example.com";));
-        URL uri = new URL("http://example.com";);
-        URL defaultValue = new URL("http://localhost";);
-
-        assertEquals("Existing key", uri, config.getURL("testURL"));
-        assertEquals("Existing key with default value", uri, 
config.getURL("testURL", defaultValue));
-        assertEquals("Missing key with default value", defaultValue, 
config.getURL("stringNotInConfig", defaultValue));
-    }
-
     @Test(expected = NoSuchElementException.class)
     public void testGetStringUnknown()
     {


Reply via email to