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: Fixed deprecated calls, some javadoc issues.
Date Tue, 15 Mar 2016 09:42:18 GMT
Repository: incubator-tamaya
Updated Branches:
  refs/heads/master 5e4d9ef4a -> 5a5d637cb


Fixed deprecated calls, some javadoc issues.


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

Branch: refs/heads/master
Commit: 8f37dd7deded80e9ac4fc69a7eab984eb0b7992b
Parents: 5e4d9ef
Author: anatole <anatole@apache.org>
Authored: Tue Mar 15 08:39:07 2016 +0100
Committer: anatole <anatole@apache.org>
Committed: Tue Mar 15 08:39:07 2016 +0100

----------------------------------------------------------------------
 .../org/apache/tamaya/builder/ConfigurationBuilderTest.java  | 5 ++---
 .../tamaya/format/BaseFormatPropertySourceProvider.java      | 8 ++++----
 .../java/org/apache/tamaya/functions/PropertyMatcher.java    | 1 -
 .../org/apache/tamaya/inject/internal/InjectionHelper.java   | 7 ++++---
 .../apache/tamaya/integration/cdi/ConfigurationProducer.java | 4 ++--
 .../apache/tamaya/integration/cdi/DefaultDynamicValue.java   | 2 +-
 .../tamaya/integration/osgi/OSGIEnhancedConfiguration.java   | 2 +-
 .../apache/tamaya/spisupport/PropertyConverterManager.java   | 1 +
 8 files changed, 15 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/8f37dd7d/modules/builder/src/test/java/org/apache/tamaya/builder/ConfigurationBuilderTest.java
----------------------------------------------------------------------
diff --git a/modules/builder/src/test/java/org/apache/tamaya/builder/ConfigurationBuilderTest.java
b/modules/builder/src/test/java/org/apache/tamaya/builder/ConfigurationBuilderTest.java
index 43196f7..07a72c5 100644
--- a/modules/builder/src/test/java/org/apache/tamaya/builder/ConfigurationBuilderTest.java
+++ b/modules/builder/src/test/java/org/apache/tamaya/builder/ConfigurationBuilderTest.java
@@ -370,8 +370,7 @@ public class ConfigurationBuilderTest {
     @Test(expected = NullPointerException.class)
     public void canNotAddNullAsPropertyFilter() {
         ConfigurationBuilder builder = new ConfigurationBuilder();
-
-        builder.addPropertyFilters(null);
+        builder.addPropertyFilters((PropertyFilter[])null);
     }
 
     @Test
@@ -505,7 +504,7 @@ public class ConfigurationBuilderTest {
 
     @Test(expected = NullPointerException.class)
     public void cannotAddNullAsPropertyProvider() {
-        new ConfigurationBuilder().addPropertySourceProviders(null);
+        new ConfigurationBuilder().addPropertySourceProviders((PropertySourceProvider[])null);
     }
 
     @Test

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/8f37dd7d/modules/formats/src/main/java/org/apache/tamaya/format/BaseFormatPropertySourceProvider.java
----------------------------------------------------------------------
diff --git a/modules/formats/src/main/java/org/apache/tamaya/format/BaseFormatPropertySourceProvider.java
b/modules/formats/src/main/java/org/apache/tamaya/format/BaseFormatPropertySourceProvider.java
index a474ba8..84d6cfa 100644
--- a/modules/formats/src/main/java/org/apache/tamaya/format/BaseFormatPropertySourceProvider.java
+++ b/modules/formats/src/main/java/org/apache/tamaya/format/BaseFormatPropertySourceProvider.java
@@ -35,10 +35,10 @@ import java.util.logging.Logger;
 
 /**
  * Implementation of a {@link PropertySourceProvider} that reads configuration from some
given resource paths
- * and using the given formats. The resource path are resolved using the current
- * {@link org.apache.tamaya.resource.ResourceResolver} active. For each resource found the
configuration formats
- * passed get a chance to read the resource, if they succeed the result is taken as the providers
PropertySources
- * to be exposed.
+ * and using the given formats. The resource path are resolved as classpath resources. This
can be changed by
+ * overriding {@link #getPropertySources()}.
+ * For each resource found the configuration formats passed get a chance to read the resource,
if they succeed the
+ * result is taken as the providers PropertySources to be exposed.
  */
 public abstract class BaseFormatPropertySourceProvider implements PropertySourceProvider
{
     /**

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/8f37dd7d/modules/functions/src/main/java/org/apache/tamaya/functions/PropertyMatcher.java
----------------------------------------------------------------------
diff --git a/modules/functions/src/main/java/org/apache/tamaya/functions/PropertyMatcher.java
b/modules/functions/src/main/java/org/apache/tamaya/functions/PropertyMatcher.java
index 0df3cb0..e0f5212 100644
--- a/modules/functions/src/main/java/org/apache/tamaya/functions/PropertyMatcher.java
+++ b/modules/functions/src/main/java/org/apache/tamaya/functions/PropertyMatcher.java
@@ -31,7 +31,6 @@ public interface PropertyMatcher {
      * @param key the key, not null
      * @param value, the value, not null
      * @return {@code true} if the entry should match the predicate,
-     * otherwise {@code false}
      */
     boolean test(String key, String value);
 

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/8f37dd7d/modules/injection/src/main/java/org/apache/tamaya/inject/internal/InjectionHelper.java
----------------------------------------------------------------------
diff --git a/modules/injection/src/main/java/org/apache/tamaya/inject/internal/InjectionHelper.java
b/modules/injection/src/main/java/org/apache/tamaya/inject/internal/InjectionHelper.java
index 2b7271f..418d51b 100644
--- a/modules/injection/src/main/java/org/apache/tamaya/inject/internal/InjectionHelper.java
+++ b/modules/injection/src/main/java/org/apache/tamaya/inject/internal/InjectionHelper.java
@@ -38,6 +38,7 @@ import org.apache.tamaya.inject.api.InjectionUtils;
 import org.apache.tamaya.inject.api.WithPropertyConverter;
 import org.apache.tamaya.inject.spi.ConfiguredType;
 import org.apache.tamaya.resolver.spi.ExpressionEvaluator;
+import org.apache.tamaya.spi.ConfigurationContext;
 import org.apache.tamaya.spi.ConversionContext;
 import org.apache.tamaya.spi.PropertyConverter;
 import org.apache.tamaya.spi.ServiceContextManager;
@@ -188,11 +189,11 @@ final class InjectionHelper {
             if(configValue==null) {
                 return null;
             }
-            List<PropertyConverter<T>> converters = ConfigurationProvider.getConfigurationContext()
+            ConfigurationContext configContext = ConfigurationProvider.getConfiguration().getContext();
+            List<PropertyConverter<T>> converters = configContext
                     .getPropertyConverters(targetType);
             ConversionContext ctx = new ConversionContext.Builder(ConfigurationProvider.getConfiguration(),
-                    ConfigurationProvider.getConfigurationContext(), key, targetType)
-                    .setAnnotatedElement(element).build();
+                    configContext, key, targetType).setAnnotatedElement(element).build();
             for (PropertyConverter<T> converter : converters) {
                 adaptedValue = converter.convert(configValue, ctx);
                 if (adaptedValue != null) {

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/8f37dd7d/modules/integration/cdi/src/main/java/org/apache/tamaya/integration/cdi/ConfigurationProducer.java
----------------------------------------------------------------------
diff --git a/modules/integration/cdi/src/main/java/org/apache/tamaya/integration/cdi/ConfigurationProducer.java
b/modules/integration/cdi/src/main/java/org/apache/tamaya/integration/cdi/ConfigurationProducer.java
index bf7c6eb..8d5f346 100644
--- a/modules/integration/cdi/src/main/java/org/apache/tamaya/integration/cdi/ConfigurationProducer.java
+++ b/modules/integration/cdi/src/main/java/org/apache/tamaya/integration/cdi/ConfigurationProducer.java
@@ -99,7 +99,7 @@ public class ConfigurationProducer {
             }
         }
         ConversionContext.Builder builder = new ConversionContext.Builder(config,
-                ConfigurationProvider.getConfigurationContext(), keyFound, TypeLiteral.of(toType));
+                ConfigurationProvider.getConfiguration().getContext(), keyFound, TypeLiteral.of(toType));
         if (injectionPoint.getMember() instanceof AnnotatedElement) {
             builder.setAnnotatedElement((AnnotatedElement) injectionPoint.getMember());
         }
@@ -117,7 +117,7 @@ public class ConfigurationProducer {
                 value = customCnverter.convert(defaultTextValue, conversionContext);
             }
             if (value == null) {
-                List<PropertyConverter<Object>> converters = ConfigurationProvider.getConfigurationContext()
+                List<PropertyConverter<Object>> converters = ConfigurationProvider.getConfiguration().getContext()
                         .getPropertyConverters(TypeLiteral.of(toType));
                 for (PropertyConverter<Object> converter : converters) {
                     try {

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/8f37dd7d/modules/integration/cdi/src/main/java/org/apache/tamaya/integration/cdi/DefaultDynamicValue.java
----------------------------------------------------------------------
diff --git a/modules/integration/cdi/src/main/java/org/apache/tamaya/integration/cdi/DefaultDynamicValue.java
b/modules/integration/cdi/src/main/java/org/apache/tamaya/integration/cdi/DefaultDynamicValue.java
index dbae46a..3b436a5 100644
--- a/modules/integration/cdi/src/main/java/org/apache/tamaya/integration/cdi/DefaultDynamicValue.java
+++ b/modules/integration/cdi/src/main/java/org/apache/tamaya/integration/cdi/DefaultDynamicValue.java
@@ -384,7 +384,7 @@ final class DefaultDynamicValue<T> extends BaseDynamicValue<T>
{
             } else {
                 String source = configuration.get(key);
                 ConversionContext ctx = new ConversionContext.Builder(configuration,
-                        ConfigurationProvider.getConfigurationContext(), key, targetType).build();
+                        configuration.getContext(), key, targetType).build();
                 value = propertyConverter.convert(source, ctx);
             }
 

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/8f37dd7d/modules/integration/osgi/src/main/java/org/apache/tamaya/integration/osgi/OSGIEnhancedConfiguration.java
----------------------------------------------------------------------
diff --git a/modules/integration/osgi/src/main/java/org/apache/tamaya/integration/osgi/OSGIEnhancedConfiguration.java
b/modules/integration/osgi/src/main/java/org/apache/tamaya/integration/osgi/OSGIEnhancedConfiguration.java
index c0ca5c5..c94f1f7 100644
--- a/modules/integration/osgi/src/main/java/org/apache/tamaya/integration/osgi/OSGIEnhancedConfiguration.java
+++ b/modules/integration/osgi/src/main/java/org/apache/tamaya/integration/osgi/OSGIEnhancedConfiguration.java
@@ -60,7 +60,7 @@ public class OSGIEnhancedConfiguration extends DefaultConfiguration{
      * Configuration wrapped into a Tamaya PropertySource.
      */
     private static final class OSGIConfigurationContext extends DefaultConfigurationContext{
-        private ConfigurationContext tamayaContext = ConfigurationProvider.getConfigurationContext();
+        private ConfigurationContext tamayaContext = ConfigurationProvider.getConfiguration().getContext();
         private OSGIPropertySource osgiPropertySource;
 
         public OSGIConfigurationContext(org.osgi.service.cm.Configuration osgiConfiguration){

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/8f37dd7d/modules/spi-support/src/main/java/org/apache/tamaya/spisupport/PropertyConverterManager.java
----------------------------------------------------------------------
diff --git a/modules/spi-support/src/main/java/org/apache/tamaya/spisupport/PropertyConverterManager.java
b/modules/spi-support/src/main/java/org/apache/tamaya/spisupport/PropertyConverterManager.java
index 5fd219b..ff64210 100644
--- a/modules/spi-support/src/main/java/org/apache/tamaya/spisupport/PropertyConverterManager.java
+++ b/modules/spi-support/src/main/java/org/apache/tamaya/spisupport/PropertyConverterManager.java
@@ -302,6 +302,7 @@ public class PropertyConverterManager {
      * @param <T>        the type
      * @return the boxed type, or null.
      */
+    @SuppressWarnings("all")
     private <T> TypeLiteral<T> mapBoxedType(TypeLiteral<T> targetType)
{
         Type parameterType = targetType.getType();
         if (parameterType == int.class) {


Mime
View raw message