You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tamaya.apache.org by an...@apache.org on 2015/01/11 10:58:09 UTC

[3/3] incubator-tamaya git commit: Added commons-config to format module (experimental). Fixed invalid replacements aa_a -> a

Added commons-config to format module (experimental).
Fixed invalid replacements aa_a -> a


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

Branch: refs/heads/master
Commit: f97e294c3f0a00ba948592e8afa7a6f88e997287
Parents: 8b15907
Author: anatole <an...@apache.org>
Authored: Sun Jan 11 10:57:55 2015 +0100
Committer: anatole <an...@apache.org>
Committed: Sun Jan 11 10:57:55 2015 +0100

----------------------------------------------------------------------
 modules/formats/pom.xml                         |  5 ++
 .../format/CommonsConfigPropertySource.java     | 79 ++++++++++++++++++++
 .../tamaya/format/ConfigurationFormat.java      | 15 +++-
 .../tamaya/format/IniConfigurationFormat.java   | 72 ++++++++++++++++++
 modules/resolver/pom.xml                        |  2 +-
 .../internal/DefaultExpressionEvaluator.java    |  4 +-
 .../internal/ExpressionResolutionFilter.java    |  4 +-
 .../tamaya/resolver/spi/ExpressionResolver.java |  8 +-
 ...ache.tamaya.resolver.spi.ExpressionEvaluator |  2 +-
 ...pache.tamaya.resolver.spi.ExpressionResolver |  2 +-
 .../org.apache.tamaya.spi.PropertyFilter        |  2 +-
 .../org.apache.tamaya.spi.PropertySource        |  2 +-
 .../src/test/resources/Testresource.txt         |  2 +-
 .../src/test/resources/Testresource2.txt        |  2 +-
 modules/resources/pom.xml                       |  2 +-
 .../tamaya/resource/ResourceResolver.java       | 24 +++---
 .../resource/internal/ClasspathCollector.java   | 12 +--
 .../internal/DefaultResourceResolver.java       |  2 +-
 .../tamaya/resource/internal/FileCollector.java |  6 +-
 .../tamaya/resource/internal/Locator.java       |  8 +-
 20 files changed, 210 insertions(+), 45 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/f97e294c/modules/formats/pom.xml
----------------------------------------------------------------------
diff --git a/modules/formats/pom.xml b/modules/formats/pom.xml
index 65b40f4..d39c845 100644
--- a/modules/formats/pom.xml
+++ b/modules/formats/pom.xml
@@ -41,5 +41,10 @@ under the License.
             <artifactId>tamaya-resources</artifactId>
             <version>${project.version}</version>
         </dependency>
+        <dependency>
+            <groupId>commons-configuration</groupId>
+            <artifactId>commons-configuration</artifactId>
+            <version>1.10</version>
+        </dependency>
     </dependencies>
 </project>

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/f97e294c/modules/formats/src/main/java/org/apache/tamaya/format/CommonsConfigPropertySource.java
----------------------------------------------------------------------
diff --git a/modules/formats/src/main/java/org/apache/tamaya/format/CommonsConfigPropertySource.java b/modules/formats/src/main/java/org/apache/tamaya/format/CommonsConfigPropertySource.java
new file mode 100644
index 0000000..31b2b83
--- /dev/null
+++ b/modules/formats/src/main/java/org/apache/tamaya/format/CommonsConfigPropertySource.java
@@ -0,0 +1,79 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tamaya.format;
+
+import org.apache.commons.configuration.Configuration;
+import org.apache.tamaya.spi.PropertySource;
+
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Objects;
+
+/**
+ * PropertySource that wraps {@link org.apache.commons.configuration.Configuration}.
+ */
+public class CommonsConfigPropertySource implements PropertySource {
+
+    private Configuration commonsConfig;
+    private Integer ordinal;
+    private String name;
+
+    public CommonsConfigPropertySource(int ordinal, String name, Configuration commonsConfig) {
+        this.commonsConfig = Objects.requireNonNull(commonsConfig);
+        this.ordinal = ordinal;
+        this.name = Objects.requireNonNull(name);
+    }
+
+    public CommonsConfigPropertySource(String name, Configuration commonsConfig) {
+        this.commonsConfig = Objects.requireNonNull(commonsConfig);
+        this.name = Objects.requireNonNull(name);
+        try {
+            this.ordinal = commonsConfig.getInt(PropertySource.TAMAYA_ORDINAL);
+        } catch (Exception e) {
+            // ignore
+        }
+    }
+
+    @Override
+    public int getOrdinal() {
+        return ordinal == null ? 0 : ordinal.intValue();
+    }
+
+    @Override
+    public String getName() {
+        return name;
+    }
+
+    @Override
+    public String get(String key) {
+        return commonsConfig.getString(key);
+    }
+
+    @Override
+    public Map<String, String> getProperties() {
+        Map<String, String> config = new HashMap<>();
+        Iterator<String> keyIter = commonsConfig.getKeys();
+        while (keyIter.hasNext()) {
+            String key = keyIter.next();
+            config.put(key, commonsConfig.getString(key));
+        }
+        return config;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/f97e294c/modules/formats/src/main/java/org/apache/tamaya/format/ConfigurationFormat.java
----------------------------------------------------------------------
diff --git a/modules/formats/src/main/java/org/apache/tamaya/format/ConfigurationFormat.java b/modules/formats/src/main/java/org/apache/tamaya/format/ConfigurationFormat.java
index 2e43c17..c455d11 100644
--- a/modules/formats/src/main/java/org/apache/tamaya/format/ConfigurationFormat.java
+++ b/modules/formats/src/main/java/org/apache/tamaya/format/ConfigurationFormat.java
@@ -18,8 +18,9 @@
  */
 package org.apache.tamaya.format;
 
-import java.io.IOException;
 import java.net.URL;
+import java.util.Collections;
+import java.util.HashSet;
 import java.util.Map;
 import java.util.Set;
 
@@ -37,6 +38,14 @@ public interface ConfigurationFormat {
      * The default entry type returned if a format implementation does not support any explicit entry types.
      */
     public static final String DEFAULT_ENTRY_TYPE = "default";
+    public static final Set<String> DEFAULT_ENTRY_TYPE_SET = initDefaultSet();
+    public static final String DYNAMIC_ENTRY_TYPE = "<dynamic>";
+
+    static Set<String> initDefaultSet(){
+            Set<String> set = new HashSet<>();
+            set.add(DEFAULT_ENTRY_TYPE);
+            return Collections.unmodifiableSet(set);
+    };
 
     /**
      * Access the different entry types a format supports. Entries of the same entry type hereby share the same
@@ -71,8 +80,8 @@ public interface ConfigurationFormat {
      *            resource or something else.
      * @return the corresponding {@link java.util.Map} instances of properties read, never {@code null}. Each
      * {@link java.util.Map} instance hereby is provided using a type key.
+     * @throws org.apache.tamaya.ConfigException if parsing of the input fails.
      */
-    Map<String, Map<String,String>> readConfiguration(URL url)
-            throws IOException;
+    Map<String, Map<String,String>> readConfiguration(URL url);
 
 }

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/f97e294c/modules/formats/src/main/java/org/apache/tamaya/format/IniConfigurationFormat.java
----------------------------------------------------------------------
diff --git a/modules/formats/src/main/java/org/apache/tamaya/format/IniConfigurationFormat.java b/modules/formats/src/main/java/org/apache/tamaya/format/IniConfigurationFormat.java
new file mode 100644
index 0000000..cb73c1e
--- /dev/null
+++ b/modules/formats/src/main/java/org/apache/tamaya/format/IniConfigurationFormat.java
@@ -0,0 +1,72 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tamaya.format;
+
+import org.apache.commons.configuration.ConfigurationException;
+import org.apache.commons.configuration.HierarchicalINIConfiguration;
+import org.apache.commons.configuration.SubnodeConfiguration;
+import org.apache.tamaya.ConfigException;
+
+import java.net.URL;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Set;
+
+/**
+ * Implements a ini file format based on the APache Commons
+ * {@link org.apache.commons.configuration.HierarchicalINIConfiguration}.
+ */
+public class IniConfigurationFormat implements ConfigurationFormat{
+
+    private Set<String> entryTypes = new HashSet<>();
+
+    public IniConfigurationFormat(){
+        entryTypes.add(ConfigurationFormat.DYNAMIC_ENTRY_TYPE);
+        entryTypes = Collections.unmodifiableSet(entryTypes);
+    }
+
+    @Override
+    public Set<String> getEntryTypes() {
+        return entryTypes;
+    }
+
+    @Override
+    public Map<String, Map<String, String>> readConfiguration(URL url) {
+        Map<String, Map<String, String>> result = new HashMap<>();
+        try {
+            HierarchicalINIConfiguration commonIniConfiguration = new HierarchicalINIConfiguration(url);
+            for(String section:commonIniConfiguration.getSections()){
+                SubnodeConfiguration sectionConfig = commonIniConfiguration.getSection(section);
+                Map<String, String> properties = new HashMap<>();
+                Iterator<String> keyIter = sectionConfig.getKeys();
+                while(keyIter.hasNext()){
+                    String key = keyIter.next();
+                    properties.put(key, sectionConfig.getString(key));
+                }
+                result.put(section, properties);
+            }
+            return result;
+        } catch (ConfigurationException e) {
+            throw new ConfigException("Failed to parse ini-file format from " + url, e);
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/f97e294c/modules/resolver/pom.xml
----------------------------------------------------------------------
diff --git a/modules/resolver/pom.xml b/modules/resolver/pom.xml
index 2f181b2..3a354c6 100644
--- a/modules/resolver/pom.xml
+++ b/modules/resolver/pom.xml
@@ -5,7 +5,7 @@ distributed with this work for additional information
 regarding copyright ownership.  The ASF licenses this file
 to you under the Apache License, Version 2.0 (the
 "License"); you may not use this file except in compliance
-with the License.  You may obtain aa_a copy current the License at
+with the License.  You may obtain a copy current the License at
 
    http://www.apache.org/licenses/LICENSE-2.0
 

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/f97e294c/modules/resolver/src/main/java/org/apache/tamaya/resolver/internal/DefaultExpressionEvaluator.java
----------------------------------------------------------------------
diff --git a/modules/resolver/src/main/java/org/apache/tamaya/resolver/internal/DefaultExpressionEvaluator.java b/modules/resolver/src/main/java/org/apache/tamaya/resolver/internal/DefaultExpressionEvaluator.java
index c81bc14..0d51753 100644
--- a/modules/resolver/src/main/java/org/apache/tamaya/resolver/internal/DefaultExpressionEvaluator.java
+++ b/modules/resolver/src/main/java/org/apache/tamaya/resolver/internal/DefaultExpressionEvaluator.java
@@ -32,7 +32,7 @@ import java.util.logging.Logger;
 
 /**
  * Default expression evaluator that manages several instances of {@link org.apache.tamaya.resolver.spi.ExpressionResolver}.
- * Each resolver is identified by aa_a resolver id. Each expression passed has the form resolverId:resolverExpression, which
+ * Each resolver is identified by a resolver id. Each expression passed has the form resolverId:resolverExpression, which
  * has the advantage that different resolvers can be active in parallel.
  */
 @Priority(10000)
@@ -89,7 +89,7 @@ public class DefaultExpressionEvaluator implements ExpressionEvaluator {
      * <li><code>foor${expression}bar${resolverId2:expression2}more</code></li>
      * <li><code>\${expression}foo${resolverId2:expression2}bar</code> (first expression is escaped).</li>
      * </ul>
-     * Given {@code resolverId:} is aa_a valid prefix targeting aa_a {@link java.beans.Expression} explicitly, also the
+     * Given {@code resolverId:} is a valid prefix targeting a {@link java.beans.Expression} explicitly, also the
      * following expressions are valid:
      * <ul>
      * <li><code>${resolverId:expression}</code></li>

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/f97e294c/modules/resolver/src/main/java/org/apache/tamaya/resolver/internal/ExpressionResolutionFilter.java
----------------------------------------------------------------------
diff --git a/modules/resolver/src/main/java/org/apache/tamaya/resolver/internal/ExpressionResolutionFilter.java b/modules/resolver/src/main/java/org/apache/tamaya/resolver/internal/ExpressionResolutionFilter.java
index 63e4575..fb4c122 100644
--- a/modules/resolver/src/main/java/org/apache/tamaya/resolver/internal/ExpressionResolutionFilter.java
+++ b/modules/resolver/src/main/java/org/apache/tamaya/resolver/internal/ExpressionResolutionFilter.java
@@ -27,7 +27,7 @@ import java.util.logging.Logger;
 
 /**
  * Default expression evaluator that manages several instances of {@link org.apache.tamaya.resolver.spi.ExpressionResolver}.
- * Each resolver is identified by aa_a resolver id. Each expression passed has the form resolverId:resolverExpression, which
+ * Each resolver is identified by a resolver id. Each expression passed has the form resolverId:resolverExpression, which
  * has the advantage that different resolvers can be active in parallel.
  */
 @Priority(10000)
@@ -56,7 +56,7 @@ public class ExpressionResolutionFilter implements PropertyFilter {
      * <li><code>foor${expression}bar${resolverId2:expression2}more</code></li>
      * <li><code>\${expression}foo${resolverId2:expression2}bar</code> (first expression is escaped).</li>
      * </ul>
-     * Given {@code resolverId:} is aa_a valid prefix targeting aa_a {@link java.beans.Expression} explicitly, also the
+     * Given {@code resolverId:} is a valid prefix targeting a {@link java.beans.Expression} explicitly, also the
      * following expressions are valid:
      * <ul>
      * <li><code>${resolverId:expression}</code></li>

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/f97e294c/modules/resolver/src/main/java/org/apache/tamaya/resolver/spi/ExpressionResolver.java
----------------------------------------------------------------------
diff --git a/modules/resolver/src/main/java/org/apache/tamaya/resolver/spi/ExpressionResolver.java b/modules/resolver/src/main/java/org/apache/tamaya/resolver/spi/ExpressionResolver.java
index 20daea3..4691f29 100644
--- a/modules/resolver/src/main/java/org/apache/tamaya/resolver/spi/ExpressionResolver.java
+++ b/modules/resolver/src/main/java/org/apache/tamaya/resolver/spi/ExpressionResolver.java
@@ -20,14 +20,14 @@ package org.apache.tamaya.resolver.spi;
 
 
 /**
- * This interfaces provides aa_a model for expression evaluation. This enables transparently plugin expression languages
- * as needed. In aa_a Java EE context full fledged EL may be used, whereas in ME only simple replacement mechanisms
+ * This interfaces provides a model for expression evaluation. This enables transparently plugin expression languages
+ * as needed. In a Java EE context full fledged EL may be used, whereas in ME only simple replacement mechanisms
  * are better suited to the runtime requirements.
  */
 public interface ExpressionResolver {
 
     /**
-     * Get the unique resolver prefix. This allows to address aa_a resolver explicitly, in case of conflicts. By
+     * Get the unique resolver prefix. This allows to address a resolver explicitly, in case of conflicts. By
      * default all registered resolvers are called in order as defined by the {@link javax.annotation.Priority}
      * annotation.
      *
@@ -38,7 +38,7 @@ public interface ExpressionResolver {
     /**
      * Evaluates the given expression.
      *
-     * @param expression       the expression to be evaluated, not null. If aa_a resolver was addressed explicitly,
+     * @param expression       the expression to be evaluated, not null. If a resolver was addressed explicitly,
      *                         the prefix is removed prior to calling this method.
      * @return the evaluated expression, or null, if the evaluator is not able to resolve the expression.
      */

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/f97e294c/modules/resolver/src/main/resources/META-INF/services/org.apache.tamaya.resolver.spi.ExpressionEvaluator
----------------------------------------------------------------------
diff --git a/modules/resolver/src/main/resources/META-INF/services/org.apache.tamaya.resolver.spi.ExpressionEvaluator b/modules/resolver/src/main/resources/META-INF/services/org.apache.tamaya.resolver.spi.ExpressionEvaluator
index 00c91d2..aa766b6 100644
--- a/modules/resolver/src/main/resources/META-INF/services/org.apache.tamaya.resolver.spi.ExpressionEvaluator
+++ b/modules/resolver/src/main/resources/META-INF/services/org.apache.tamaya.resolver.spi.ExpressionEvaluator
@@ -5,7 +5,7 @@
 # regarding copyright ownership.  The ASF licenses this file
 # to you under the Apache License, Version 2.0 (the
 # "License"); you may not use this file except in compliance
-# with the License.  You may obtain aa_a copy current the License at
+# with the License.  You may obtain a copy current the License at
 #
 #    http://www.apache.org/licenses/LICENSE-2.0
 #

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/f97e294c/modules/resolver/src/main/resources/META-INF/services/org.apache.tamaya.resolver.spi.ExpressionResolver
----------------------------------------------------------------------
diff --git a/modules/resolver/src/main/resources/META-INF/services/org.apache.tamaya.resolver.spi.ExpressionResolver b/modules/resolver/src/main/resources/META-INF/services/org.apache.tamaya.resolver.spi.ExpressionResolver
index 95efd7c..ddfbb09 100644
--- a/modules/resolver/src/main/resources/META-INF/services/org.apache.tamaya.resolver.spi.ExpressionResolver
+++ b/modules/resolver/src/main/resources/META-INF/services/org.apache.tamaya.resolver.spi.ExpressionResolver
@@ -5,7 +5,7 @@
 # regarding copyright ownership.  The ASF licenses this file
 # to you under the Apache License, Version 2.0 (the
 # "License"); you may not use this file except in compliance
-# with the License.  You may obtain aa_a copy current the License at
+# with the License.  You may obtain a copy current the License at
 #
 #    http://www.apache.org/licenses/LICENSE-2.0
 #

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/f97e294c/modules/resolver/src/main/resources/META-INF/services/org.apache.tamaya.spi.PropertyFilter
----------------------------------------------------------------------
diff --git a/modules/resolver/src/main/resources/META-INF/services/org.apache.tamaya.spi.PropertyFilter b/modules/resolver/src/main/resources/META-INF/services/org.apache.tamaya.spi.PropertyFilter
index c822b66..c8788b5 100644
--- a/modules/resolver/src/main/resources/META-INF/services/org.apache.tamaya.spi.PropertyFilter
+++ b/modules/resolver/src/main/resources/META-INF/services/org.apache.tamaya.spi.PropertyFilter
@@ -5,7 +5,7 @@
 # regarding copyright ownership.  The ASF licenses this file
 # to you under the Apache License, Version 2.0 (the
 # "License"); you may not use this file except in compliance
-# with the License.  You may obtain aa_a copy current the License at
+# with the License.  You may obtain a copy current the License at
 #
 #    http://www.apache.org/licenses/LICENSE-2.0
 #

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/f97e294c/modules/resolver/src/test/resources/META-INF/services/org.apache.tamaya.spi.PropertySource
----------------------------------------------------------------------
diff --git a/modules/resolver/src/test/resources/META-INF/services/org.apache.tamaya.spi.PropertySource b/modules/resolver/src/test/resources/META-INF/services/org.apache.tamaya.spi.PropertySource
index b48b26d..088aca9 100644
--- a/modules/resolver/src/test/resources/META-INF/services/org.apache.tamaya.spi.PropertySource
+++ b/modules/resolver/src/test/resources/META-INF/services/org.apache.tamaya.spi.PropertySource
@@ -5,7 +5,7 @@
 # regarding copyright ownership.  The ASF licenses this file
 # to you under the Apache License, Version 2.0 (the
 # "License"); you may not use this file except in compliance
-# with the License.  You may obtain aa_a copy current the License at
+# with the License.  You may obtain a copy current the License at
 #
 #    http://www.apache.org/licenses/LICENSE-2.0
 #

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/f97e294c/modules/resolver/src/test/resources/Testresource.txt
----------------------------------------------------------------------
diff --git a/modules/resolver/src/test/resources/Testresource.txt b/modules/resolver/src/test/resources/Testresource.txt
index efd92ab..9731609 100644
--- a/modules/resolver/src/test/resources/Testresource.txt
+++ b/modules/resolver/src/test/resources/Testresource.txt
@@ -5,7 +5,7 @@
 # regarding copyright ownership.  The ASF licenses this file
 # to you under the Apache License, Version 2.0 (the
 # "License"); you may not use this file except in compliance
-# with the License.  You may obtain aa_a copy current the License at
+# with the License.  You may obtain a copy current the License at
 #
 #    http://www.apache.org/licenses/LICENSE-2.0
 #

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/f97e294c/modules/resolver/src/test/resources/Testresource2.txt
----------------------------------------------------------------------
diff --git a/modules/resolver/src/test/resources/Testresource2.txt b/modules/resolver/src/test/resources/Testresource2.txt
index 27c9152..a43bf62 100644
--- a/modules/resolver/src/test/resources/Testresource2.txt
+++ b/modules/resolver/src/test/resources/Testresource2.txt
@@ -5,7 +5,7 @@
 # regarding copyright ownership.  The ASF licenses this file
 # to you under the Apache License, Version 2.0 (the
 # "License"); you may not use this file except in compliance
-# with the License.  You may obtain aa_a copy current the License at
+# with the License.  You may obtain a copy current the License at
 #
 #    http://www.apache.org/licenses/LICENSE-2.0
 #

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/f97e294c/modules/resources/pom.xml
----------------------------------------------------------------------
diff --git a/modules/resources/pom.xml b/modules/resources/pom.xml
index cdb1030..b395336 100644
--- a/modules/resources/pom.xml
+++ b/modules/resources/pom.xml
@@ -5,7 +5,7 @@ distributed with this work for additional information
 regarding copyright ownership.  The ASF licenses this file
 to you under the Apache License, Version 2.0 (the
 "License"); you may not use this file except in compliance
-with the License.  You may obtain aa_a copy current the License at
+with the License.  You may obtain a copy current the License at
 
    http://www.apache.org/licenses/LICENSE-2.0
 

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/f97e294c/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 167a5e1..3dcf6fa 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
@@ -24,11 +24,11 @@ import java.util.Collection;
 
 /**
  * Interface to be implemented by modules. It supports loading of files or classpath resources either directly or by
- * defining aa_a Ant-styled resource pattern:
+ * defining a Ant-styled resource pattern:
  * <ul>
- *     <li>'*' is aa_a placeholder for any character (0..n)</li>
- *     <li>'**' is aa_a placeholder for any number of subdirectories going down aa_a directory structure recursively.</li>
- *     <li>'?' is aa_a placeholder for exact one character</li>
+ *     <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>
+ *     <li>'?' is a placeholder for exact one character</li>
  * </ul>
  * Given that the following expressions are valid expressions:
  * <pre>
@@ -45,9 +45,9 @@ import java.util.Collection;
 public interface ResourceResolver {
 
     /**
-     * Resolves resource expressions to aa_a list of {@link URL}s. Hereby
+     * Resolves resource expressions to a list of {@link URL}s. Hereby
      * the ordering of format matches the input of the resolved expressions. Nevertheless be aware that
-     * there is no determined ordering of format located within aa_a classloader.
+     * there is no determined ordering of format located within a classloader.
      *
      * @param expressions the expressions to be resolved, not empty.
      * @return the corresponding collection of current {@link URL}s found, never
@@ -63,9 +63,9 @@ public interface ResourceResolver {
     }
 
     /**
-     * Resolves resource expressions to aa_a list of {@link URL}s. Hereby
+     * Resolves resource expressions to a list of {@link URL}s. Hereby
      * the ordering of format matches the input of the resolved expressions. Nevertheless be aware that
-     * there is no determined ordering of format located within aa_a classloader.
+     * there is no determined ordering of format located within a classloader.
      *
      * @param expressions the expressions to be resolved, not empty.
      * @return the corresponding collection of current {@link URL}s found, never
@@ -77,10 +77,10 @@ public interface ResourceResolver {
     }
 
     /**
-     * Resolves resource expressions to aa_a list of {@link URL}s, considerubg
+     * Resolves resource expressions to a list of {@link URL}s, considerubg
      * the given classloader for classloader dependent format. Hereby
      * the ordering of format matches the input of the resolved expressions. Nevertheless be aware that
-     * there is no determined ordering of format located within aa_a classloader.
+     * there is no determined ordering of format located within a classloader.
      *
      * @param expressions the expressions to be resolved, not empty.
      * @return the corresponding collection of current {@link URL}s found, never
@@ -92,10 +92,10 @@ public interface ResourceResolver {
     }
 
     /**
-     * Resolves resource expressions to aa_a list of {@link URL}s, considerubg
+     * Resolves resource expressions to a list of {@link URL}s, considerubg
      * the given classloader for classloader dependent format. Hereby
      * the ordering of format matches the input of the resolved expressions. Nevertheless be aware that
-     * there is no determined ordering of format located within aa_a classloader.
+     * there is no determined ordering of format located within a classloader.
      *
      * @param expressions the expressions to be resolved, not empty.
      * @return the corresponding collection of current {@link URL}s found, never

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/f97e294c/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 bbab3fc..8688ce8 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
@@ -61,7 +61,7 @@ public class ClasspathCollector {
     private static final String PROTOCOL_ZIP = "zip";
 
     /**
-     * ZIP protocol for aa_a JBoss jar file entry: "vfszip".
+     * ZIP protocol for a JBoss jar file entry: "vfszip".
      */
     private static final String PROTOCOL_VFSZIP = "vfszip";
 
@@ -91,7 +91,7 @@ public class ClasspathCollector {
     private ClassLoader classLoader;
 
     /**
-     * Creates aa_a new instance.
+     * Creates a new instance.
      *
      * @param classLoader the class loader to be used, not null.
      */
@@ -213,7 +213,7 @@ public class ClasspathCollector {
     }
 
     /**
-     * Creates aa_a new URL based on the given root path and the relative path to be added.
+     * Creates a new URL based on the given root path and the relative path to be added.
      *
      * @param url          the root, not null
      * @param relativePath the relative path to be added, not null
@@ -234,7 +234,7 @@ public class ClasspathCollector {
 
 
     /**
-     * Small check if aa_a given URL is aa_a jar file URL.
+     * Small check if a given URL is a jar file URL.
      *
      * @param url the URL to check, not null.
      * @return true if the URL has one of the following protocols: jar, zip, vfszip, wsjar, code-source.
@@ -249,10 +249,10 @@ public class ClasspathCollector {
     }
 
     /**
-     * Creates aa_a file from an URL.
+     * Creates a file from an URL.
      *
      * @param resourceUrl the url, not null.
-     * @return aa_a new file instance. The instance still may not exist. if the url's protocol is not 'file', {@code null}
+     * @return a new file instance. The instance still may not exist. if the url's protocol is not 'file', {@code null}
      * is returned.
      */
     private File getFile(URL resourceUrl) {

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/f97e294c/modules/resources/src/main/java/org/apache/tamaya/resource/internal/DefaultResourceResolver.java
----------------------------------------------------------------------
diff --git a/modules/resources/src/main/java/org/apache/tamaya/resource/internal/DefaultResourceResolver.java b/modules/resources/src/main/java/org/apache/tamaya/resource/internal/DefaultResourceResolver.java
index f5cbefd..c90e53a 100644
--- a/modules/resources/src/main/java/org/apache/tamaya/resource/internal/DefaultResourceResolver.java
+++ b/modules/resources/src/main/java/org/apache/tamaya/resource/internal/DefaultResourceResolver.java
@@ -94,7 +94,7 @@ public class DefaultResourceResolver implements ResourceResolver {
     }
 
     /**
-     * Tries to evaluate the location passed by lokking up aa_a file.
+     * Tries to evaluate the location passed by lokking up a file.
      * @param expression the path expression
      * @param resources the resources for adding the results
      * @return true, if the expression could be resolved.

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/f97e294c/modules/resources/src/main/java/org/apache/tamaya/resource/internal/FileCollector.java
----------------------------------------------------------------------
diff --git a/modules/resources/src/main/java/org/apache/tamaya/resource/internal/FileCollector.java b/modules/resources/src/main/java/org/apache/tamaya/resource/internal/FileCollector.java
index ef26e76..6d85a92 100644
--- a/modules/resources/src/main/java/org/apache/tamaya/resource/internal/FileCollector.java
+++ b/modules/resources/src/main/java/org/apache/tamaya/resource/internal/FileCollector.java
@@ -134,7 +134,7 @@ public class FileCollector {
     }
 
     /**
-     * Simple matcher method for aa_a single token.
+     * Simple matcher method for a single token.
      * @param childFile the file to match
      * @param subTokens the subtoken list
      * @param tokenIndex the index where to start
@@ -151,7 +151,7 @@ public class FileCollector {
     }
 
     /**
-     * Get an URL from aa_a file.
+     * Get an URL from a file.
      *
      * @param file the file, not null.
      * @return the URL, never null.
@@ -167,7 +167,7 @@ public class FileCollector {
     }
 
     /**
-     * Constructs aa_a sub expression, using the tokens from {@code subTokens} starting at index {@code startIndex}.
+     * Constructs a sub expression, using the tokens from {@code subTokens} starting at index {@code startIndex}.
      *
      * @param subTokens  the token list, not null
      * @param startIndex the start index from where tokens should be taken to produce the path.

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/f97e294c/modules/resources/src/main/java/org/apache/tamaya/resource/internal/Locator.java
----------------------------------------------------------------------
diff --git a/modules/resources/src/main/java/org/apache/tamaya/resource/internal/Locator.java b/modules/resources/src/main/java/org/apache/tamaya/resource/internal/Locator.java
index 8e40fc6..acab285 100644
--- a/modules/resources/src/main/java/org/apache/tamaya/resource/internal/Locator.java
+++ b/modules/resources/src/main/java/org/apache/tamaya/resource/internal/Locator.java
@@ -25,7 +25,7 @@ import java.util.StringJoiner;
 import java.util.stream.Collectors;
 
 /**
- * Small helper class that manages the path parts of aa_a location expression.
+ * Small helper class that manages the path parts of a location expression.
  */
 final class Locator {
     /**
@@ -34,7 +34,7 @@ final class Locator {
     private List<String> tokens;
 
     /**
-     * Creates aa_a new instances based on the tokenized expression.
+     * Creates a new instances based on the tokenized expression.
      *
      * @param tokens the tokenized expression, not null.
      */
@@ -43,7 +43,7 @@ final class Locator {
     }
 
     /**
-     * Creates aa_a new instance of the corresponding expression.
+     * Creates a new instance of the corresponding expression.
      *
      * @param expression the location expression, not null.
      * @return the tokenized instance.
@@ -72,7 +72,7 @@ final class Locator {
     }
 
     /**
-     * Return the sub expression path, which contains the second part of the expression, starting with aa_a placeholder
+     * Return the sub expression path, which contains the second part of the expression, starting with a placeholder
      * or wildcard token.
      *
      * @return the sub expression part, never null.