tamaya-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anat...@apache.org
Subject [1/2] incubator-tamaya git commit: TAMAYA-134: Gitignore improvements and second batch of Javadoc fixes done by Philipp Ottlinger.
Date Tue, 19 Jan 2016 21:33:46 GMT
Repository: incubator-tamaya
Updated Branches:
  refs/heads/master 2e7933ab9 -> af2255afd


TAMAYA-134: Gitignore improvements and second batch of
Javadoc fixes done by Philipp Ottlinger.


Project: http://git-wip-us.apache.org/repos/asf/incubator-tamaya/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tamaya/commit/ddd2955d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tamaya/tree/ddd2955d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tamaya/diff/ddd2955d

Branch: refs/heads/master
Commit: ddd2955db8c81a4308ad65f28d7d60ce4b9835d6
Parents: bdb2918
Author: anatole <anatole@apache.org>
Authored: Tue Jan 19 01:11:27 2016 +0100
Committer: anatole <anatole@apache.org>
Committed: Tue Jan 19 01:11:27 2016 +0100

----------------------------------------------------------------------
 .gitignore                                      |  5 +-
 .../tamaya/builder/ConfigurationBuilder.java    | 11 ++-
 .../tamaya/events/ConfigEventManager.java       | 17 ++++-
 .../events/ConfigurationContextChange.java      |  4 +-
 .../ConfigurationContextChangeBuilder.java      | 19 ++---
 .../events/PropertySourceChangeBuilder.java     |  4 +-
 .../ObservingPropertySourceProvider.java        | 77 ++++++++++++--------
 .../events/spi/ConfigEventManagerSpi.java       | 19 +++--
 .../tamaya/format/ConfigurationDataBuilder.java |  4 +-
 .../tamaya/format/ConfigurationFormats.java     |  4 +-
 .../tamaya/format/InputStreamFactory.java       |  3 +-
 .../apache/tamaya/json/JSONPropertySource.java  |  3 +
 .../tamaya/resource/ResourceResolver.java       |  8 +-
 .../resource/internal/ClasspathCollector.java   |  3 +-
 .../tamaya/spisupport/MapPropertySource.java    | 16 ++--
 15 files changed, 127 insertions(+), 70 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/ddd2955d/.gitignore
----------------------------------------------------------------------
diff --git a/.gitignore b/.gitignore
index daa2f2c..3ce0d3c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -16,4 +16,7 @@ release.properties
 /data
 temp-properties-files-for-site/
 modules/integration/commons-config/commons-configuration.iml
-examples/simple-propertysource/tamaya-example-simple-propertysource.iml
\ No newline at end of file
+examples/simple-propertysource/tamaya-example-simple-propertysource.iml
+**/*.checkstyle
+**/*.fbExcludeFilterFile
+

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/ddd2955d/modules/builder/src/main/java/org/apache/tamaya/builder/ConfigurationBuilder.java
----------------------------------------------------------------------
diff --git a/modules/builder/src/main/java/org/apache/tamaya/builder/ConfigurationBuilder.java
b/modules/builder/src/main/java/org/apache/tamaya/builder/ConfigurationBuilder.java
index cd457a1..afdc121 100644
--- a/modules/builder/src/main/java/org/apache/tamaya/builder/ConfigurationBuilder.java
+++ b/modules/builder/src/main/java/org/apache/tamaya/builder/ConfigurationBuilder.java
@@ -331,7 +331,8 @@ public class ConfigurationBuilder {
 
 
     /**
-     * @return the builder instance currently used
+     * @param propertyValueCombinationPolicy combination policy to use for this builder.

+     * @return the builder instance currently in use.
      */
     public ConfigurationBuilder setPropertyValueCombinationPolicy(PropertyValueCombinationPolicy
propertyValueCombinationPolicy){
         contextBuilder.setPropertyValueCombinationPolicy(propertyValueCombinationPolicy);
@@ -347,6 +348,7 @@ public class ConfigurationBuilder {
      * builder.addPropertyConverter(MyType.class, converter}
      * </pre>
      *
+     * @param <T> the type of the configuration
      * @param type the required target type the converter should be applied to
      * @param converter the converter to be used to convert the string property
      *                  to the given target type.
@@ -364,6 +366,11 @@ public class ConfigurationBuilder {
     }
 
     /**
+     * Adds a propertyConverter of a given type.
+     *  
+     * @param <T> the type of the configuration
+     * @param type type literal of this converter.
+     * @param propertyConverter property converter.
      * @return the builder instance currently used
      */
     public <T> ConfigurationBuilder addPropertyConverter(TypeLiteral<T> type,
PropertyConverter<T> propertyConverter){
@@ -560,7 +567,7 @@ public class ConfigurationBuilder {
         return loadProvidedPropertySourceProviders;
     }
 
-    //X TODO think on a functonality/API for using the default PropertyConverters and use
the configured ones here
+    //X TODO think on a functionality/API for using the default PropertyConverters and use
the configured ones here
     //X TODO as overrides used first.
 
 

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/ddd2955d/modules/events/src/main/java/org/apache/tamaya/events/ConfigEventManager.java
----------------------------------------------------------------------
diff --git a/modules/events/src/main/java/org/apache/tamaya/events/ConfigEventManager.java
b/modules/events/src/main/java/org/apache/tamaya/events/ConfigEventManager.java
index 6b206c8..9989fbb 100644
--- a/modules/events/src/main/java/org/apache/tamaya/events/ConfigEventManager.java
+++ b/modules/events/src/main/java/org/apache/tamaya/events/ConfigEventManager.java
@@ -55,6 +55,7 @@ public final class ConfigEventManager {
 
     /**
      * Adds a Config listener that listens to all kind of {@link ConfigEvent}.
+     * @param <T> the type of the event.
      * @param l the listener not null.
      * @param eventType the event type to which this listener listens to.
      */
@@ -82,7 +83,8 @@ public final class ConfigEventManager {
     /**
      * Removes a listener registered for the given event type.
      *
-     * @param l the listener not null.
+     * @param <T> the type of the event.
+     * @param l the listener, not null.
      * @param eventType the event type to which this listener listens to.
      */
     public static <T extends ConfigEvent> void removeListener(ConfigEventListener l,
Class<T> eventType) {
@@ -106,6 +108,8 @@ public final class ConfigEventManager {
 
     /**
      * Access all registered ConfigEventListeners listening to a all kind of event types
globally.
+     * 
+     * @param <T> the type of the event.
      * @return a list with the listeners found, never null.
      */
     public static <T extends ConfigEvent>
@@ -115,7 +119,8 @@ public final class ConfigEventManager {
 
     /**
      * Publishes a {@link ConfigurationChange} synchronously to all interested listeners.
-     *
+     * 
+     * @param <T> the type of the event.
      * @param event the event, not null.
      */
     public static <T> void fireEvent(ConfigEvent<?> event) {
@@ -125,6 +130,7 @@ public final class ConfigEventManager {
     /**
      * Publishes a {@link ConfigurationChange} asynchronously/multithreaded to all interested
listeners.
      *
+     * @param <T> the type of the event.
      * @param event the event, not null.
      */
     public static <T> void fireEventAsynch(ConfigEvent<?> event) {
@@ -133,10 +139,13 @@ public final class ConfigEventManager {
 
     /**
      * Start/Stop the change monitoring service, which will observe/reevaluate the current
configuration regularly
-     * and triggers ConfigurationChange events is something changed. This is quite handy
for publishing
+     * and trigger ConfigurationChange events if something changed. This is quite handy for
publishing
      * configuration changes to whatever systems are interested in. Hereby the origin of
a configuration change
-     * can be on this machine, or also remotedly. FOr handling corresponding {@link ConfigEventListener}
have
+     * can be on this machine, or also remotely. For handling corresponding {@link ConfigEventListener}
have
      * to be registered, e.g. listening on {@link org.apache.tamaya.events.ConfigurationChange}
events.
+     * 
+     * @param enable whether to enable or disable the change monitoring.
+     * 
      * @see #isChangeMonitoring()
      * @see #getChangeMonitoringPeriod()
      */

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/ddd2955d/modules/events/src/main/java/org/apache/tamaya/events/ConfigurationContextChange.java
----------------------------------------------------------------------
diff --git a/modules/events/src/main/java/org/apache/tamaya/events/ConfigurationContextChange.java
b/modules/events/src/main/java/org/apache/tamaya/events/ConfigurationContextChange.java
index 8c9ceef..4e12d42 100644
--- a/modules/events/src/main/java/org/apache/tamaya/events/ConfigurationContextChange.java
+++ b/modules/events/src/main/java/org/apache/tamaya/events/ConfigurationContextChange.java
@@ -29,7 +29,7 @@ import java.util.List;
 import java.util.UUID;
 
 /**
- * Event that contains a set current changes that were applied or could be applied.
+ * Event that contains a set of current changes that were applied or can be applied.
  * This class is immutable and thread-safe. To create instances use
  * {@link PropertySourceChangeBuilder}.
  *
@@ -49,6 +49,8 @@ public final class ConfigurationContextChange implements ConfigEvent<Configurati
 
     /**
      * Get an empty change set for the given provider.
+     * 
+     * @param configurationContext context to use for creating changesets.
      * @return an empty ConfigurationContextChange instance.
      */
     public static ConfigurationContextChange emptyChangeSet(ConfigurationContext configurationContext){

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/ddd2955d/modules/events/src/main/java/org/apache/tamaya/events/ConfigurationContextChangeBuilder.java
----------------------------------------------------------------------
diff --git a/modules/events/src/main/java/org/apache/tamaya/events/ConfigurationContextChangeBuilder.java
b/modules/events/src/main/java/org/apache/tamaya/events/ConfigurationContextChangeBuilder.java
index a48107a..b586428 100644
--- a/modules/events/src/main/java/org/apache/tamaya/events/ConfigurationContextChangeBuilder.java
+++ b/modules/events/src/main/java/org/apache/tamaya/events/ConfigurationContextChangeBuilder.java
@@ -27,13 +27,13 @@ import java.util.List;
 import java.util.Objects;
 
 /**
- * Models a set current changes applied to a {@link org.apache.tamaya.spi.PropertySource}.
Consumers of these events
- * can observing changes to property sources and
+ * Models a set of current changes applied to a {@link org.apache.tamaya.spi.PropertySource}.
Consumers of these events
+ * can observe changes to property sources and
  * <ol>
- *     <li>Check if their current configuration instance ({@link org.apache.tamaya.spi.ConfigurationContext}
- *     contains the changed {@link org.apache.tamaya.spi.PropertySource} (Note: the reference
tova property source is never affected by a
- *     change, its only the data of the property source).</li>
- *     <li>If so corresponding action may be taken, such as reevaluating the configuration
values (depending on
+ *     <li>check if their current configuration instance ({@link org.apache.tamaya.spi.ConfigurationContext}
+ *     contains the changed {@link org.apache.tamaya.spi.PropertySource} (Note: the reference
to a property source is never affected by a
+ *     change, it is the data of the property source only).</li>
+ *     <li>if so, a corresponding action may be taken, such as reevaluating the configuration
values (depending on
  *     the update policy) or reevaluating the complete {@link org.apache.tamaya.Configuration}
to create a change
  *     event on configuration level.
  * </ol>
@@ -72,13 +72,14 @@ public final class ConfigurationContextChangeBuilder {
     /**
      * Creates a new instance current this builder.
      *
+     * @param context context to use for creating changesets.
      * @return the builder for chaining.
      */
     public static ConfigurationContextChangeBuilder of(ConfigurationContext context) {
         return new ConfigurationContextChangeBuilder(context);
     }
 
-    /*
+    /**
      * Apply a version/UUID to the set being built.
      * @param version the version to apply, or null, to let the system generate a version
for you.
      * @return the builder for chaining.
@@ -88,9 +89,9 @@ public final class ConfigurationContextChangeBuilder {
         return this;
     }
 
-    /*
+    /**
      * Apply given timestamp to the set being built.
-     * @param version the version to apply, or null, to let the system generate a version
for you.
+     * @param timestamp timestamp to set.
      * @return the builder for chaining.
      */
     public ConfigurationContextChangeBuilder setTimestamp(long timestamp) {

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/ddd2955d/modules/events/src/main/java/org/apache/tamaya/events/PropertySourceChangeBuilder.java
----------------------------------------------------------------------
diff --git a/modules/events/src/main/java/org/apache/tamaya/events/PropertySourceChangeBuilder.java
b/modules/events/src/main/java/org/apache/tamaya/events/PropertySourceChangeBuilder.java
index 009cb11..cefa4f4 100644
--- a/modules/events/src/main/java/org/apache/tamaya/events/PropertySourceChangeBuilder.java
+++ b/modules/events/src/main/java/org/apache/tamaya/events/PropertySourceChangeBuilder.java
@@ -66,6 +66,7 @@ public final class PropertySourceChangeBuilder {
      * Constructor.
      *
      * @param source the underlying configuration/provider, not null.
+     * @param changeType kind of change.
      */
     private PropertySourceChangeBuilder(PropertySource source, ChangeType changeType) {
         this.source = Objects.requireNonNull(source);
@@ -73,9 +74,10 @@ public final class PropertySourceChangeBuilder {
     }
 
     /**
-     * Creates a new instance current this builder.
+     * Creates a new instance of this builder.
      *
      * @param source the underlying property provider/configuration, not null.
+     * @param changeType kind of change.
      * @return the builder for chaining.
      */
     public static PropertySourceChangeBuilder of(PropertySource source, ChangeType changeType)
{

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/ddd2955d/modules/events/src/main/java/org/apache/tamaya/events/folderobserver/ObservingPropertySourceProvider.java
----------------------------------------------------------------------
diff --git a/modules/events/src/main/java/org/apache/tamaya/events/folderobserver/ObservingPropertySourceProvider.java
b/modules/events/src/main/java/org/apache/tamaya/events/folderobserver/ObservingPropertySourceProvider.java
index 6082dd0..347576f 100644
--- a/modules/events/src/main/java/org/apache/tamaya/events/folderobserver/ObservingPropertySourceProvider.java
+++ b/modules/events/src/main/java/org/apache/tamaya/events/folderobserver/ObservingPropertySourceProvider.java
@@ -18,14 +18,6 @@
  */
 package org.apache.tamaya.events.folderobserver;
 
-import org.apache.tamaya.ConfigException;
-import org.apache.tamaya.core.propertysource.BasePropertySource;
-import org.apache.tamaya.events.ConfigEventManager;
-import org.apache.tamaya.events.ConfigurationContextChange;
-import org.apache.tamaya.events.ConfigurationContextChangeBuilder;
-import org.apache.tamaya.spi.PropertySource;
-import org.apache.tamaya.spi.PropertySourceProvider;
-
 import java.io.IOException;
 import java.io.InputStream;
 import java.net.URISyntaxException;
@@ -33,18 +25,34 @@ import java.net.URL;
 import java.nio.file.Files;
 import java.nio.file.Path;
 import java.nio.file.Paths;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
 import java.util.concurrent.ExecutorService;
 import java.util.concurrent.Executors;
 import java.util.logging.Level;
 import java.util.logging.Logger;
 
+import org.apache.tamaya.ConfigException;
+import org.apache.tamaya.core.propertysource.BasePropertySource;
+import org.apache.tamaya.events.ConfigEventManager;
+import org.apache.tamaya.events.ConfigurationContextChange;
+import org.apache.tamaya.events.ConfigurationContextChangeBuilder;
+import org.apache.tamaya.spi.PropertySource;
+import org.apache.tamaya.spi.PropertySourceProvider;
+
 /**
- * This implementation run in a folder taking up all file compatible with the given
+ * This implementation runs in a folder taking up all files compatible with the given
  * ConfigurationFormats. When a file is added, deleted or modified the PropertySourceProvider
  * will adapt the changes automatically and trigger according
  * {@link org.apache.tamaya.events.PropertySourceChange} events.
- * The default folder is META-INF/config, but you can change using the absolute path in
+ * The default folder is META-INF/config, but you can change it via an absolute path in the
  * "-Dtamaya.configdir" parameter.
  */
 public class ObservingPropertySourceProvider implements PropertySourceProvider, FileChangeObserver
{
@@ -74,7 +82,7 @@ public class ObservingPropertySourceProvider implements PropertySourceProvider,
             synchronized (this.propertySources) {
                 this.propertySources.addAll(readConfiguration(directory));
             }
-            Runnable runnable = new FileChangeListener(directory, this);
+            final Runnable runnable = new FileChangeListener(directory, this);
             executor.execute(runnable);
         } else {
             executor.shutdown();
@@ -87,20 +95,26 @@ public class ObservingPropertySourceProvider implements PropertySourceProvider,
      * @param directory the target directory, not null.
      */
     private List<PropertySource> readConfiguration(Path directory) {
-        List<PropertySource> result = new ArrayList<>();
+        final List<PropertySource> result = new ArrayList<>();
         try {
             synchronized (propertySources) {
-                for (Path path : Files.newDirectoryStream(directory, "*")) {
+                for (final Path path : Files.newDirectoryStream(directory, "*")) {
                     result.addAll(getPropertySources(path));
                 }
                 return result;
             }
-        } catch (IOException e) {
+        } catch (final IOException e) {
             LOG.log(Level.WARNING, "Failed to read configuration from dir: " + directory,
e);
         }
         return result;
     }
 
+    /**
+     * Read property sources from the given file.
+     * 
+     * @param file source of the property sources.
+     * @return property sources from the given file.
+     */
     protected Collection<PropertySource> getPropertySources(final Path file) {
         return Arrays.asList(new PropertySource[]{new BasePropertySource() {
             private final Map<String,String> props = readProperties(file);
@@ -115,17 +129,18 @@ public class ObservingPropertySourceProvider implements PropertySourceProvider,
      * Load a single file.
      *
      * @param file the file, not null.
+     * @return properties as read from the given file.
      */
     protected static Map<String,String> readProperties(Path file) {
         try (InputStream is = file.toUri().toURL().openStream()){
-            Properties props = new Properties();
+            final Properties props = new Properties();
                 props.load(is);
-            Map<String,String> result = new HashMap<>();
-            for(Map.Entry en:props.entrySet()){
-                result.put(en.getKey().toString(), en.getValue().toString());
+            final Map<String,String> result = new HashMap<>();
+            for(final Map.Entry<Object,Object> en:props.entrySet()){
+                result.put(String.valueOf(en.getKey()), String.valueOf(en.getValue()));
             }
             return result;
-        } catch (Exception e) {
+        } catch (final Exception e) {
             LOG.log(Level.INFO, "Error reading file: " + file.toString() +
                     ", using format: properties", e);
         }
@@ -139,18 +154,18 @@ public class ObservingPropertySourceProvider implements PropertySourceProvider,
      * @return the directory to be read, or null.
      */
     private Path getDirectory() {
-        String absolutePath = System.getProperty("tamaya.configdir");
+        final String absolutePath = System.getProperty("tamaya.configdir");
         if (null!=absolutePath) {
-            Path path = Paths.get(absolutePath);
+            final Path path = Paths.get(absolutePath);
             if (Files.isDirectory(path)) {
                 return path;
             }
         }
-        URL resource = ObservingPropertySourceProvider.class.getResource("/META-INF/config/");
+        final URL resource = ObservingPropertySourceProvider.class.getResource("/META-INF/config/");
         if (null!=resource) {
             try {
                 return Paths.get(resource.toURI());
-            } catch (URISyntaxException e) {
+            } catch (final URISyntaxException e) {
                 throw new ConfigException("An error to find the directory to watch", e);
             }
         }
@@ -161,9 +176,9 @@ public class ObservingPropertySourceProvider implements PropertySourceProvider,
     @Override
     public void directoryChanged(Path directory) {
         synchronized (this.propertySources) {
-            List<PropertySource> existingPropertySources = new ArrayList<>(propertySources);
+            final List<PropertySource> existingPropertySources = new ArrayList<>(propertySources);
             propertySources.clear();
-            Collection<PropertySource> sourcesRead = readConfiguration(directory);
+            final Collection<PropertySource> sourcesRead = readConfiguration(directory);
             this.propertySources.addAll(sourcesRead);
             triggerConfigChange(existingPropertySources, propertySources);
         }
@@ -172,14 +187,14 @@ public class ObservingPropertySourceProvider implements PropertySourceProvider,
 
     private void triggerConfigChange(List<PropertySource> originalPropertySources,
                                      List<PropertySource> newPropertySources) {
-        ConfigurationContextChangeBuilder b = ConfigurationContextChangeBuilder.of();
-        for (PropertySource ps : originalPropertySources) {
+        final ConfigurationContextChangeBuilder b = ConfigurationContextChangeBuilder.of();
+        for (final PropertySource ps : originalPropertySources) {
             b.removedPropertySource(ps);
         }
-        for (PropertySource ps : newPropertySources) {
+        for (final PropertySource ps : newPropertySources) {
             b.newPropertySource(ps);
         }
-        ConfigurationContextChange changeEvent = b.build();
+        final ConfigurationContextChange changeEvent = b.build();
         LOG.fine("Trigger Config Context Change: " + changeEvent);
         ConfigEventManager.fireEvent(changeEvent);
     }
@@ -190,4 +205,4 @@ public class ObservingPropertySourceProvider implements PropertySourceProvider,
             return new ArrayList<>(this.propertySources);
         }
     }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/ddd2955d/modules/events/src/main/java/org/apache/tamaya/events/spi/ConfigEventManagerSpi.java
----------------------------------------------------------------------
diff --git a/modules/events/src/main/java/org/apache/tamaya/events/spi/ConfigEventManagerSpi.java
b/modules/events/src/main/java/org/apache/tamaya/events/spi/ConfigEventManagerSpi.java
index 93c813d..66a8f73 100644
--- a/modules/events/src/main/java/org/apache/tamaya/events/spi/ConfigEventManagerSpi.java
+++ b/modules/events/src/main/java/org/apache/tamaya/events/spi/ConfigEventManagerSpi.java
@@ -27,13 +27,14 @@ import java.util.Collection;
  * SPI interface to implement the {@link org.apache.tamaya.events.ConfigEventManager} singleton.
  * Implementations of this interface must be registered with the current {@link org.apache.tamaya.spi.ServiceContext},
  * by default this equals to registering it with {@link java.util.ServiceLoader}. Add {@link
javax.annotation.Priority}
- * annotations for overriding (higher values overriden lower values).
+ * annotations for overriding (higher values override lower values).
  */
 public interface ConfigEventManagerSpi {
     /**
-     * Add a listener for observing events. References of this
+     * Adds a listener for observing events. References of this
      * component to the listeners must be managed as weak references.
-     *
+     * 
+     * @param <T> the type of the events listened to.
      * @param l the listener not null.
      */
     <T> void addListener(ConfigEventListener l);
@@ -41,9 +42,10 @@ public interface ConfigEventManagerSpi {
     /**
      * Adds a listener for observing events of a given type.
      *
+     * @param <T> the type of the events listened to.
      * @param l the listener not null.
      * @param eventType the type of concrete configuration event this listeners should be
informed about. All other
-     *                  event types will never be delivered toe this listener instance.
+     *                  event types will never be delivered to this listener instance.
      */
     <T extends ConfigEvent> void addListener(ConfigEventListener l, Class<T>
eventType);
 
@@ -57,6 +59,7 @@ public interface ConfigEventManagerSpi {
     /**
      * Removes a listener for observing events of a certain type.
      *
+     * @param <T> the type of the events listened to.
      * @param l the listener not null.
      * @param eventType the type of concrete configuration event this listeners should be
informed about. All other
      *                  event types will never be delivered toe this listener instance.
@@ -111,11 +114,13 @@ public interface ConfigEventManagerSpi {
     boolean isChangeMonitorActive();
 
     /**
-     * Start/Stop the change monitoring service, which will observe/reevaluate the current
configuration regularly
-     * and triggers ConfigurationChange events is something changed. This is quite handy
for publishing
+     * Start/stop the change monitoring service, which will observe/reevaluate the current
configuration regularly
+     * and trigger ConfigurationChange events if something is changed. This is quite handy
for publishing
      * configuration changes to whatever systems are interested in. Hereby the origin of
a configuration change
-     * can be on this machine, or also remotedly. FOr handling corresponding {@link ConfigEventListener}
have
+     * can be on this machine, or also remotedly. For handling corresponding {@link ConfigEventListener}
have
      * to be registered, e.g. listening on {@link org.apache.tamaya.events.ConfigurationChange}
events.
+     * 
+     * @param enable whether to enable or disable the change monitoring.
      */
     void enableChangeMonitor(boolean enable);
 

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/ddd2955d/modules/formats/src/main/java/org/apache/tamaya/format/ConfigurationDataBuilder.java
----------------------------------------------------------------------
diff --git a/modules/formats/src/main/java/org/apache/tamaya/format/ConfigurationDataBuilder.java
b/modules/formats/src/main/java/org/apache/tamaya/format/ConfigurationDataBuilder.java
index 9c0e41c..da5fa35 100644
--- a/modules/formats/src/main/java/org/apache/tamaya/format/ConfigurationDataBuilder.java
+++ b/modules/formats/src/main/java/org/apache/tamaya/format/ConfigurationDataBuilder.java
@@ -57,6 +57,7 @@ public final class ConfigurationDataBuilder {
      * Creates a new instance.
      * @param resource the configuration resource URL, not null.
      * @param format the format that read this data, not null.
+     * @return new instance of this class.
      */
     public static ConfigurationDataBuilder of(String resource, ConfigurationFormat format){
         return new ConfigurationDataBuilder(resource, format);
@@ -64,7 +65,8 @@ public final class ConfigurationDataBuilder {
 
     /**
      * Creates a new instance.
-     * @param data an existing COnfigurationData instances used to initialize the builder.
+     * @param data an existing ConfigurationData instances used to initialize the builder.
+     * @return new instance of this class from the given configuration.
      */
     public static ConfigurationDataBuilder of(ConfigurationData data){
         ConfigurationDataBuilder b = new ConfigurationDataBuilder(data.getResource(), data.getFormat());

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/ddd2955d/modules/formats/src/main/java/org/apache/tamaya/format/ConfigurationFormats.java
----------------------------------------------------------------------
diff --git a/modules/formats/src/main/java/org/apache/tamaya/format/ConfigurationFormats.java
b/modules/formats/src/main/java/org/apache/tamaya/format/ConfigurationFormats.java
index f4117e3..201a0f5 100644
--- a/modules/formats/src/main/java/org/apache/tamaya/format/ConfigurationFormats.java
+++ b/modules/formats/src/main/java/org/apache/tamaya/format/ConfigurationFormats.java
@@ -61,6 +61,7 @@ public final class ConfigurationFormats {
     /**
      * Get all currently available formats, ordered by priority.
      *
+     * @param formatNames available formats to be ordered.
      * @return the currently available formats, never null.
      */
     public static List<ConfigurationFormat> getFormats(String... formatNames) {
@@ -93,9 +94,10 @@ public final class ConfigurationFormats {
     /**
      * Get all currently available formats, ordered by priority.
      *
+     * @param url source to read configuration from. 
      * @return the currently available formats, never null.
      */
-    public static List<ConfigurationFormat> getFormats(URL url) {
+    public static List<ConfigurationFormat> getFormats(final URL url) {
         List<ConfigurationFormat> formats = getFormats();
         List<ConfigurationFormat> result = new ArrayList<>();
         for (ConfigurationFormat f : formats) {

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/ddd2955d/modules/formats/src/main/java/org/apache/tamaya/format/InputStreamFactory.java
----------------------------------------------------------------------
diff --git a/modules/formats/src/main/java/org/apache/tamaya/format/InputStreamFactory.java
b/modules/formats/src/main/java/org/apache/tamaya/format/InputStreamFactory.java
index 3084db6..912dd08 100644
--- a/modules/formats/src/main/java/org/apache/tamaya/format/InputStreamFactory.java
+++ b/modules/formats/src/main/java/org/apache/tamaya/format/InputStreamFactory.java
@@ -43,7 +43,7 @@ public class InputStreamFactory implements Closeable {
     private byte[] data;
 
     /**
-     * Creates a bew InputStreamFactory.
+     * Creates a new InputStreamFactory.
      *
      * @param original the InputStream to be read for extract its data into memory.
      * @throws IOException if thrown by the original during read.
@@ -72,6 +72,7 @@ public class InputStreamFactory implements Closeable {
      * Creates a new InputStream with the same data as provided by the InputStream passed
on factory creation.
      *
      * @return a new InputStream , never null.
+     * @throws IOException if no data is available.
      */
     public InputStream createInputStream() throws IOException {
         byte[] bytes = this.data;

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/ddd2955d/modules/json/src/main/java/org/apache/tamaya/json/JSONPropertySource.java
----------------------------------------------------------------------
diff --git a/modules/json/src/main/java/org/apache/tamaya/json/JSONPropertySource.java b/modules/json/src/main/java/org/apache/tamaya/json/JSONPropertySource.java
index edeabbf..48c6521 100644
--- a/modules/json/src/main/java/org/apache/tamaya/json/JSONPropertySource.java
+++ b/modules/json/src/main/java/org/apache/tamaya/json/JSONPropertySource.java
@@ -118,6 +118,9 @@ public class JSONPropertySource implements PropertySource {
 
     /**
      * Reads the configuration.
+     * @param urlResource soure of the configuration.
+     * @return the configuration read from the given resource URL.
+     * @throws ConfigException if resource URL cannot be read.
      */
     protected Map<String, String> readConfig(URL urlResource) {
         try (InputStream is = urlResource.openStream()) {

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/ddd2955d/modules/resources/src/main/java/org/apache/tamaya/resource/ResourceResolver.java
----------------------------------------------------------------------
diff --git a/modules/resources/src/main/java/org/apache/tamaya/resource/ResourceResolver.java
b/modules/resources/src/main/java/org/apache/tamaya/resource/ResourceResolver.java
index 911bea3..7e9acc8 100644
--- a/modules/resources/src/main/java/org/apache/tamaya/resource/ResourceResolver.java
+++ b/modules/resources/src/main/java/org/apache/tamaya/resource/ResourceResolver.java
@@ -23,7 +23,7 @@ import java.util.Collection;
 
 /**
  * Interface to be implemented by modules. It supports loading of files or classpath resources
either directly or by
- * defining a Ant-styled resource pattern:
+ * defining an Ant-style resource pattern:
  * <ul>
  *     <li>'*' is a placeholder for any character (0..n)</li>
  *     <li>'**' is a placeholder for any number of subdirectories going down a directory
structure recursively.</li>
@@ -73,10 +73,9 @@ public interface ResourceResolver {
      * the ordering of format matches the input of the resolved expressions. Nevertheless
be aware that
      * there is no determined ordering of format located within a classloader.
      *
+     * @param classLoader classloader to use for resolving.
      * @param expressions the expressions to be resolved, not empty.
-     * @return the corresponding collection of current {@link URL}s found, never
-     * null.
-     * .
+     * @return the corresponding collection of current {@link URL}s found, never {@code null}.
      */
     Collection<URL> getResources(ClassLoader classLoader, String... expressions);
 
@@ -86,6 +85,7 @@ public interface ResourceResolver {
      * the ordering of format matches the input of the resolved expressions. Nevertheless
be aware that
      * there is no determined ordering of format located within a classloader.
      *
+     * @param classLoader classloader to use for resolving.
      * @param expressions the expressions to be resolved, not empty.
      * @return the corresponding collection of current {@link URL}s found,
      * never {@code null}.

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/ddd2955d/modules/resources/src/main/java/org/apache/tamaya/resource/internal/ClasspathCollector.java
----------------------------------------------------------------------
diff --git a/modules/resources/src/main/java/org/apache/tamaya/resource/internal/ClasspathCollector.java
b/modules/resources/src/main/java/org/apache/tamaya/resource/internal/ClasspathCollector.java
index bc4b6b3..a9cc1cc 100644
--- a/modules/resources/src/main/java/org/apache/tamaya/resource/internal/ClasspathCollector.java
+++ b/modules/resources/src/main/java/org/apache/tamaya/resource/internal/ClasspathCollector.java
@@ -39,7 +39,7 @@ import java.util.logging.Level;
 import java.util.logging.Logger;
 
 /**
- * Collector that searches files based on ant styled patterns. For example the following
patterns would be matched:
+ * Collector that searches files based on Ant styled patterns. For example the following
patterns would be matched:
  * <pre>
  *     classpath:javax/annotations/*
  *     javax?/annotations&#47;**&#47;*.class
@@ -149,6 +149,7 @@ public class ClasspathCollector {
      * @param subPattern      the sub pattern to match (below the root directory)
      * @return the Set of matching Resource instances
      * @throws java.io.IOException in case of I/O errors
+     * @throws java.net.URISyntaxException in case of URL-related errors
      * @see java.net.JarURLConnection
      */
     protected Collection<URL> doFindPathMatchingJarResources(URL rootDirResource, String
subPattern)

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/ddd2955d/modules/spi-support/src/main/java/org/apache/tamaya/spisupport/MapPropertySource.java
----------------------------------------------------------------------
diff --git a/modules/spi-support/src/main/java/org/apache/tamaya/spisupport/MapPropertySource.java
b/modules/spi-support/src/main/java/org/apache/tamaya/spisupport/MapPropertySource.java
index c09258a..ab4176f 100644
--- a/modules/spi-support/src/main/java/org/apache/tamaya/spisupport/MapPropertySource.java
+++ b/modules/spi-support/src/main/java/org/apache/tamaya/spisupport/MapPropertySource.java
@@ -32,7 +32,7 @@ public class MapPropertySource extends BasePropertySource {
     private final String name;
 
     /**
-     * The Property Sources priority, if a fixed priority should be used.
+     * The Property Sources priority, a fixed priority should be used.
      */
     private final Integer priority;
 
@@ -42,9 +42,10 @@ public class MapPropertySource extends BasePropertySource {
     private final Map<String, String> props = new HashMap<>();
 
     /**
-     * Creates a new instance, hereby using the default mechanism for evaluting the property
source's
+     * Creates a new instance, hereby using the default mechanism for evaluating the property
source's
      * priority.
      *
+     * @param name unique name of this source.
      * @param props the properties
      */
     public MapPropertySource(String name, Map<String, String> props) {
@@ -52,9 +53,10 @@ public class MapPropertySource extends BasePropertySource {
     }
 
     /**
-     * Creates a new instance, hereby using the default mechanism for evaluting the property
source's
+     * Creates a new instance, hereby using the default mechanism for evaluating the property
source's
      * priority, but applying a custom mapping {@code rootContext} to the entries provided.
      *
+     * @param name unique name of this source.
      * @param props       the properties
      * @param rootContext the root context mapping, or null (for no mapping).
      */
@@ -63,9 +65,10 @@ public class MapPropertySource extends BasePropertySource {
     }
 
     /**
-     * Creates a new instance, hereby using the default mechanism for evaluting the property
source's
+     * Creates a new instance, hereby using the default mechanism for evaluating the property
source's
      * priority, but applying a custom mapping {@code rootContext} to the entries provided.
      *
+     * @param name unique name of this source.
      * @param props       the properties
      * @param rootContext the root context mapping, or null (for no mapping).
      * @param priority    the (optional) fixed priority. If null, the default priority
@@ -88,9 +91,10 @@ public class MapPropertySource extends BasePropertySource {
     }
 
     /**
-     * Creates a new instance, hereby using the default mechanism for evaluting the property
source's
+     * Creates a new instance, hereby using the default mechanism for evaluating the property
source's
      * priority, but applying a custom mapping {@code rootContext} to the entries provided.
      *
+     * @param name unique name of this source.
      * @param props       the properties
      * @param rootContext the root context mapping, or null (for no mapping).
      * @param priority    the (optional) fixed priority. If null, the default priority
@@ -101,7 +105,7 @@ public class MapPropertySource extends BasePropertySource {
     }
 
     /**
-     * Simple method to convert a Properties to a Map instance.
+     * Simple method to convert Properties into a Map instance.
      * @param props the properties, not null.
      * @return the corresponding Map instance.
      */



Mime
View raw message