You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tamaya.apache.org by pl...@apache.org on 2016/09/25 21:24:18 UTC
[30/50] [abbrv] incubator-tamaya-sandbox git commit: Fixed further
issues from quality gates.
Fixed further issues from quality gates.
Project: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/commit/714305e7
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/tree/714305e7
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/diff/714305e7
Branch: refs/heads/master
Commit: 714305e795d3c0bb97f8512703139a2f29ce5f80
Parents: 528a07d
Author: anatole <an...@apache.org>
Authored: Sun Jan 10 02:14:41 2016 +0100
Committer: anatole <an...@apache.org>
Committed: Sun Jan 10 02:14:41 2016 +0100
----------------------------------------------------------------------
.../java/org/apache/tamaya/builder/ConfigurationBuilder.java | 5 ++---
.../tamaya/builder/ProgrammaticConfigurationContext.java | 8 ++++----
.../org/apache/tamaya/builder/PropertySourceBuilder.java | 4 ++--
.../java/org/apache/tamaya/builder/SimplePropertySource.java | 4 ++--
4 files changed, 10 insertions(+), 11 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/714305e7/src/main/java/org/apache/tamaya/builder/ConfigurationBuilder.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/tamaya/builder/ConfigurationBuilder.java b/src/main/java/org/apache/tamaya/builder/ConfigurationBuilder.java
index 5126cea..cd457a1 100644
--- a/src/main/java/org/apache/tamaya/builder/ConfigurationBuilder.java
+++ b/src/main/java/org/apache/tamaya/builder/ConfigurationBuilder.java
@@ -80,7 +80,7 @@ import static java.lang.String.format;
*/
public class ConfigurationBuilder {
/** Builder used to create new ConfigurationContext instances. */
- private ProgrammaticConfigurationContext.Builder contextBuilder = new ProgrammaticConfigurationContext.Builder();
+ private final ProgrammaticConfigurationContext.Builder contextBuilder = new ProgrammaticConfigurationContext.Builder();
/**
* Flag if the config has already been built.
@@ -113,6 +113,7 @@ public class ConfigurationBuilder {
* Allows to set configuration context during unit tests.
*/
ConfigurationBuilder setConfigurationContext(ConfigurationContext configurationContext) {
+ //noinspection deprecation
contextBuilder.setConfigurationContext(configurationContext);
return this;
}
@@ -487,8 +488,6 @@ public class ConfigurationBuilder {
* Disables the automatic loading of all {@link org.apache.tamaya.spi.PropertyFilter}
* service providers.
*
- * @return the builder instance currently used
- *
* @see org.apache.tamaya.spi.PropertyFilter
* @see #enabledProvidedPropertyFilters()
* @see #addPropertyFilters(org.apache.tamaya.spi.PropertyFilter...)
http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/714305e7/src/main/java/org/apache/tamaya/builder/ProgrammaticConfigurationContext.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/tamaya/builder/ProgrammaticConfigurationContext.java b/src/main/java/org/apache/tamaya/builder/ProgrammaticConfigurationContext.java
index b3a1c3f..68e770d 100644
--- a/src/main/java/org/apache/tamaya/builder/ProgrammaticConfigurationContext.java
+++ b/src/main/java/org/apache/tamaya/builder/ProgrammaticConfigurationContext.java
@@ -76,7 +76,7 @@ class ProgrammaticConfigurationContext implements ConfigurationContext {
/**
* Lock for internal synchronization.
*/
- private ReadWriteLock propertySourceLock = new ReentrantReadWriteLock();
+ private final ReadWriteLock propertySourceLock = new ReentrantReadWriteLock();
/**
@@ -256,14 +256,14 @@ class ProgrammaticConfigurationContext implements ConfigurationContext {
/**
* The current unmodifiable list of loaded {@link org.apache.tamaya.spi.PropertySource} instances.
*/
- private List<PropertySource> propertySources = new ArrayList<>();
+ private final List<PropertySource> propertySources = new ArrayList<>();
/**
* The current unmodifiable list of loaded {@link org.apache.tamaya.spi.PropertyFilter} instances.
*/
- private List<PropertyFilter> propertyFilters = new ArrayList<>();
+ private final List<PropertyFilter> propertyFilters = new ArrayList<>();
- private Map<TypeLiteral<?>, List<PropertyConverter<?>>> propertyConverters = new HashMap<>();
+ private final Map<TypeLiteral<?>, List<PropertyConverter<?>>> propertyConverters = new HashMap<>();
/**
* The overriding policy used when combining PropertySources registered to evalute the final configuration
http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/714305e7/src/main/java/org/apache/tamaya/builder/PropertySourceBuilder.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/tamaya/builder/PropertySourceBuilder.java b/src/main/java/org/apache/tamaya/builder/PropertySourceBuilder.java
index e298939..481a80c 100644
--- a/src/main/java/org/apache/tamaya/builder/PropertySourceBuilder.java
+++ b/src/main/java/org/apache/tamaya/builder/PropertySourceBuilder.java
@@ -31,9 +31,9 @@ public final class PropertySourceBuilder {
/** The ordinal to be used. */
private int ordinal;
/** The name to be used. */
- private String name;
+ private final String name;
/** The properties. */
- private Map<String,String> properties = new HashMap<>();
+ private final Map<String,String> properties = new HashMap<>();
/** private constructor. */
private PropertySourceBuilder(String name){
http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/714305e7/src/main/java/org/apache/tamaya/builder/SimplePropertySource.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/tamaya/builder/SimplePropertySource.java b/src/main/java/org/apache/tamaya/builder/SimplePropertySource.java
index f39a0cc..0d5561e 100644
--- a/src/main/java/org/apache/tamaya/builder/SimplePropertySource.java
+++ b/src/main/java/org/apache/tamaya/builder/SimplePropertySource.java
@@ -31,9 +31,9 @@ import java.util.logging.Logger;
*/
public class SimplePropertySource implements PropertySource {
/** The properties. */
- private Map<String, String> properties;
+ private final Map<String, String> properties;
/** The source's name. */
- private String name;
+ private final String name;
public SimplePropertySource(String name, Map<String, String> properties){
this.properties = new HashMap<>(properties);