commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ebo...@apache.org
Subject cvs commit: jakarta-commons/configuration/src/test/org/apache/commons/configuration TestCompositeConfigurationNonStringProperties.java TestConfigurationFactory.java
Date Wed, 02 Jun 2004 16:42:25 GMT
ebourg      2004/06/02 09:42:25

  Modified:    configuration/src/java/org/apache/commons/configuration
                        BasePropertiesConfiguration.java
                        ClassPropertiesConfiguration.java
                        ConfigurationConverter.java
                        ConfigurationException.java
                        ConfigurationFactory.java DOM4JConfiguration.java
                        HierarchicalDOM4JConfiguration.java
                        PropertiesConfiguration.java
               configuration/src/test/org/apache/commons/configuration
                        TestCompositeConfigurationNonStringProperties.java
                        TestConfigurationFactory.java
  Log:
  javadoc fixes & minor code cleaning
  
  Revision  Changes    Path
  1.7       +4 -4      jakarta-commons/configuration/src/java/org/apache/commons/configuration/BasePropertiesConfiguration.java
  
  Index: BasePropertiesConfiguration.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/configuration/src/java/org/apache/commons/configuration/BasePropertiesConfiguration.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- BasePropertiesConfiguration.java	28 Mar 2004 14:43:04 -0000	1.6
  +++ BasePropertiesConfiguration.java	2 Jun 2004 16:42:24 -0000	1.7
  @@ -137,7 +137,7 @@
        * Load the properties from the given input stream.
        *
        * @param input An InputStream.
  -     * @throws IOException
  +     * @throws ConfigurationException
        */
       public void load(InputStream input)
           throws ConfigurationException
  @@ -151,7 +151,7 @@
        *
        * @param input An InputStream.
        * @param enc An encoding.
  -     * @exception IOException
  +     * @exception ConfigurationException
        */
       public synchronized void load(InputStream input, String enc)
           throws ConfigurationException
  @@ -224,7 +224,7 @@
        * properties with multiple values are saved comma seperated.
        *
        * @param filename name of the properties file
  -     * @throws IOException
  +     * @throws ConfigurationException
        */
       public void save(String filename)
           throws ConfigurationException
  
  
  
  1.6       +2 -2      jakarta-commons/configuration/src/java/org/apache/commons/configuration/ClassPropertiesConfiguration.java
  
  Index: ClassPropertiesConfiguration.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/configuration/src/java/org/apache/commons/configuration/ClassPropertiesConfiguration.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- ClassPropertiesConfiguration.java	13 Mar 2004 17:31:40 -0000	1.5
  +++ ClassPropertiesConfiguration.java	2 Jun 2004 16:42:24 -0000	1.6
  @@ -49,7 +49,7 @@
        *
        * @param baseClass The class providing the FileStream.
        * @param resource The name of the Resource.
  -     * @throws IOException Error while loading the properties file
  +     * @throws ConfigurationException Error while loading the properties file
        */
       public ClassPropertiesConfiguration(Class baseClass, String resource)
           throws ConfigurationException
  
  
  
  1.4       +3 -3      jakarta-commons/configuration/src/java/org/apache/commons/configuration/ConfigurationConverter.java
  
  Index: ConfigurationConverter.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/configuration/src/java/org/apache/commons/configuration/ConfigurationConverter.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ConfigurationConverter.java	27 Feb 2004 17:41:35 -0000	1.3
  +++ ConfigurationConverter.java	2 Jun 2004 16:42:24 -0000	1.4
  @@ -42,7 +42,7 @@
        */
       public static Configuration getConfiguration(ExtendedProperties ep)
       {
  -        Configuration config = (Configuration) new BaseConfiguration();
  +        Configuration config = new BaseConfiguration();
           for (Iterator i = ep.getKeys(); i.hasNext();)
           {
               String key = (String) i.next();
  @@ -59,7 +59,7 @@
        */
       public static Configuration getConfiguration(Properties p)
       {
  -        Configuration config = (Configuration) new BaseConfiguration();
  +        Configuration config = new BaseConfiguration();
           for (Enumeration e = p.keys(); e.hasMoreElements();)
           {
               String key = (String) e.nextElement();
  
  
  
  1.3       +2 -2      jakarta-commons/configuration/src/java/org/apache/commons/configuration/ConfigurationException.java
  
  Index: ConfigurationException.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/configuration/src/java/org/apache/commons/configuration/ConfigurationException.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ConfigurationException.java	27 Feb 2004 17:41:35 -0000	1.2
  +++ ConfigurationException.java	2 Jun 2004 16:42:24 -0000	1.3
  @@ -16,7 +16,7 @@
    * limitations under the License.
    */
   
  -import org.apache.commons.lang.exception.NestableException;;
  +import org.apache.commons.lang.exception.NestableException;
   
   /**
    * Any exception that occurs while initializing a Configuration
  
  
  
  1.10      +2 -2      jakarta-commons/configuration/src/java/org/apache/commons/configuration/ConfigurationFactory.java
  
  Index: ConfigurationFactory.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/configuration/src/java/org/apache/commons/configuration/ConfigurationFactory.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- ConfigurationFactory.java	8 Mar 2004 23:27:09 -0000	1.9
  +++ ConfigurationFactory.java	2 Jun 2004 16:42:24 -0000	1.10
  @@ -101,7 +101,7 @@
        * different types of configuration, currently Properties, XML and JNDI.
        *
        * @return A Configuration object
  -     * @throws Exception A generic exception that we had trouble during the
  +     * @throws ConfigurationException A generic exception that we had trouble during the
        * loading of the configuration data.
        */
       public Configuration getConfiguration() throws ConfigurationException
  
  
  
  1.4       +2 -2      jakarta-commons/configuration/src/java/org/apache/commons/configuration/DOM4JConfiguration.java
  
  Index: DOM4JConfiguration.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/configuration/src/java/org/apache/commons/configuration/DOM4JConfiguration.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- DOM4JConfiguration.java	27 Feb 2004 17:41:35 -0000	1.3
  +++ DOM4JConfiguration.java	2 Jun 2004 16:42:24 -0000	1.4
  @@ -91,7 +91,7 @@
        * classpath.
        *
        * @param resource Name of the resource
  -     * @exception Exception If error reading data source.
  +     * @exception ConfigurationException If error reading data source.
        * @see DOM4JConfiguration(File)
        */
       public DOM4JConfiguration(String resource) throws ConfigurationException
  @@ -104,7 +104,7 @@
        * Attempts to load the XML file.
        *
        * @param file File object representing the XML file.
  -     * @exception Exception If error reading data source.
  +     * @exception ConfigurationException If error reading data source.
        */
       public DOM4JConfiguration(File file) throws ConfigurationException
       {
  
  
  
  1.5       +12 -3     jakarta-commons/configuration/src/java/org/apache/commons/configuration/HierarchicalDOM4JConfiguration.java
  
  Index: HierarchicalDOM4JConfiguration.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/configuration/src/java/org/apache/commons/configuration/HierarchicalDOM4JConfiguration.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- HierarchicalDOM4JConfiguration.java	27 Feb 2004 17:41:35 -0000	1.4
  +++ HierarchicalDOM4JConfiguration.java	2 Jun 2004 16:42:24 -0000	1.5
  @@ -55,6 +55,7 @@
   
       /**
        * Returns the name of the file to be parsed by this object.
  +     *
        * @return the file to be parsed
        */
       public String getFileName()
  @@ -64,6 +65,7 @@
   
       /**
        * Sets the name of the file to be parsed by this object.
  +     *
        * @param file the file to be parsed
        */
       public void setFileName(String file)
  @@ -73,6 +75,7 @@
   
       /**
        * Returns the base path.
  +     * 
        * @return the base path
        */
       public String getBasePath()
  @@ -83,6 +86,7 @@
       /**
        * Allows to set a base path. Relative file names are resolved based on
        * this path.
  +     *
        * @param path the base path; this can be a URL or a file path
        */
       public void setBasePath(String path)
  @@ -93,7 +97,8 @@
       /**
        * Loads and parses an XML document. The file to be loaded must have
        * been specified before.
  -     * @throws Exception if an error occurs
  +     *
  +     * @throws ConfigurationException if an error occurs
        */
       public void load() throws ConfigurationException
       {
  @@ -107,8 +112,9 @@
   
       /**
        * Loads and parses the specified XML document.
  +     *
        * @param url the URL to the XML document
  -     * @throws Exception if an error occurs
  +     * @throws ConfigurationException if an error occurs
        */
       public void load(URL url) throws ConfigurationException
       {
  @@ -122,6 +128,7 @@
   
       /**
        * Initializes this configuration from an XML document.
  +     *
        * @param document the document to be parsed
        */
       public void initProperties(Document document)
  @@ -132,6 +139,7 @@
       /**
        * Helper method for building the internal storage hierarchy. The XML
        * elements are transformed into node objects.
  +     *
        * @param node the actual node
        * @param element the actual XML element
        */
  @@ -155,6 +163,7 @@
       /**
        * Helper method for constructing node objects for the attributes of the
        * given XML element.
  +     *
        * @param node the actual node
        * @param element the actual XML element
        */
  
  
  
  1.8       +4 -4      jakarta-commons/configuration/src/java/org/apache/commons/configuration/PropertiesConfiguration.java
  
  Index: PropertiesConfiguration.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/configuration/src/java/org/apache/commons/configuration/PropertiesConfiguration.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- PropertiesConfiguration.java	1 Apr 2004 18:43:04 -0000	1.7
  +++ PropertiesConfiguration.java	2 Jun 2004 16:42:24 -0000	1.8
  @@ -72,7 +72,7 @@
        * are loaded and merged into the properties.
        *
        * @param fileName The name of the Properties File to load.
  -     * @throws IOException Error while loading the properties file
  +     * @throws ConfigurationException Error while loading the properties file
        */
       public PropertiesConfiguration(String fileName) throws ConfigurationException
       {
  @@ -83,7 +83,7 @@
       /**
        * Load the properties from the fileName set by setFileName 
        *
  -     * @throws IOException
  +     * @throws ConfigurationException
        */
       public void load() throws ConfigurationException
       {
  @@ -94,7 +94,7 @@
        * Load the properties from the given fileName
        *
        * @param fileName A properties file to load
  -     * @throws IOException
  +     * @throws ConfigurationException
        */
       public void load(String fileName) throws ConfigurationException
       {
  
  
  
  1.4       +2 -2      jakarta-commons/configuration/src/test/org/apache/commons/configuration/TestCompositeConfigurationNonStringProperties.java
  
  Index: TestCompositeConfigurationNonStringProperties.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/configuration/src/test/org/apache/commons/configuration/TestCompositeConfigurationNonStringProperties.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- TestCompositeConfigurationNonStringProperties.java	27 Feb 2004 17:41:34 -0000	1.3
  +++ TestCompositeConfigurationNonStringProperties.java	2 Jun 2004 16:42:24 -0000	1.4
  @@ -34,7 +34,7 @@
   			new PropertiesConfiguration(testProperties);
   		CompositeConfiguration cc = new CompositeConfiguration();
   		cc.addConfiguration(pc);
  -		conf = (Configuration) cc;
  +		conf = cc;
   		nonStringTestHolder.setConfiguration(conf);
   	}
   
  
  
  
  1.11      +3 -3      jakarta-commons/configuration/src/test/org/apache/commons/configuration/TestConfigurationFactory.java
  
  Index: TestConfigurationFactory.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/configuration/src/test/org/apache/commons/configuration/TestConfigurationFactory.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- TestConfigurationFactory.java	4 May 2004 22:14:29 -0000	1.10
  +++ TestConfigurationFactory.java	2 Jun 2004 16:42:25 -0000	1.11
  @@ -101,7 +101,7 @@
               compositeConfiguration.getProperty(
                   "element2.subelement.subsubelement"));
   
  -        configuration = (Configuration) compositeConfiguration;
  +        configuration = compositeConfiguration;
           assertEquals(
               "I'm complex!",
               configuration.getProperty("element2.subelement.subsubelement"));
  @@ -160,7 +160,7 @@
               compositeConfiguration.getProperty(
                   "element2.subelement.subsubelement"));
   
  -        configuration = (Configuration) compositeConfiguration;
  +        configuration = compositeConfiguration;
           assertEquals(
               "I'm complex!",
               configuration.getProperty("element2.subelement.subsubelement"));
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message