tamaya-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anat...@apache.org
Subject [19/22] incubator-tamaya git commit: TAMAYA-360 Converter now handle also null values.
Date Sun, 18 Nov 2018 21:21:23 GMT
TAMAYA-360 Converter now handle also null values.


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

Branch: refs/heads/master
Commit: 21808ea0d8ff979245644ea92f4190d5f9b1facb
Parents: 1f92cef
Author: Anatole Tresch <atsticks@gmail.com>
Authored: Sun Nov 18 22:14:15 2018 +0100
Committer: Anatole Tresch <atsticks@gmail.com>
Committed: Sun Nov 18 22:14:15 2018 +0100

----------------------------------------------------------------------
 .../converters/BigDecimalConverter.java         |   6 +-
 .../converters/BigIntegerConverter.java         |   5 +-
 .../internal/converters/BooleanConverter.java   |   6 +-
 .../core/internal/converters/ByteConverter.java |   5 +-
 .../core/internal/converters/CharConverter.java |   5 +-
 .../core/internal/converters/ConvertQuery.java  |   6 +-
 .../internal/converters/CurrencyConverter.java  |   5 +-
 .../internal/converters/DoubleConverter.java    |   5 +-
 .../internal/converters/DurationConverter.java  |   3 +
 .../internal/converters/FloatConverter.java     |   5 +-
 .../internal/converters/InstantConverter.java   |   3 +
 .../internal/converters/IntegerConverter.java   |   5 +-
 .../internal/converters/LocalDateConverter.java |   3 +
 .../converters/LocalDateTimeConverter.java      |   3 +
 .../internal/converters/LocalTimeConverter.java |   3 +
 .../core/internal/converters/LongConverter.java |   5 +-
 .../internal/converters/NumberConverter.java    |   5 +-
 .../converters/OffsetDateTimeConverter.java     |   3 +
 .../converters/OffsetTimeConverter.java         |   3 +
 .../internal/converters/OptionalConverter.java  |   2 +-
 .../core/internal/converters/PathConverter.java |  11 +-
 .../internal/converters/ShortConverter.java     |   5 +-
 .../internal/converters/SupplierConverter.java  |   2 +-
 .../core/internal/converters/URIConverter.java  |  11 +-
 .../core/internal/converters/URLConverter.java  |   6 +-
 .../internal/converters/ConvertQueryTest.java   |  10 +-
 .../ConverterTestsPropertySource.java           | 241 +++++++++----------
 .../converters/SupplierConverterTest.java       |   2 +-
 28 files changed, 215 insertions(+), 159 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/21808ea0/code/core/src/main/java/org/apache/tamaya/core/internal/converters/BigDecimalConverter.java
----------------------------------------------------------------------
diff --git a/code/core/src/main/java/org/apache/tamaya/core/internal/converters/BigDecimalConverter.java b/code/core/src/main/java/org/apache/tamaya/core/internal/converters/BigDecimalConverter.java
index 2086d74..daf1ccd 100644
--- a/code/core/src/main/java/org/apache/tamaya/core/internal/converters/BigDecimalConverter.java
+++ b/code/core/src/main/java/org/apache/tamaya/core/internal/converters/BigDecimalConverter.java
@@ -49,8 +49,10 @@ public class BigDecimalConverter implements PropertyConverter<BigDecimal> {
     @Override
     public BigDecimal convert(String value, ConversionContext ctx) {
         ctx.addSupportedFormats(getClass(), "<bigDecimal> -> new BigDecimal(String)");
-
-        String trimmed = Objects.requireNonNull(value).trim();
+        if(value==null){
+            return null;
+        }
+        String trimmed = value.trim();
         try{
             return new BigDecimal(trimmed);
         } catch(Exception e){

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/21808ea0/code/core/src/main/java/org/apache/tamaya/core/internal/converters/BigIntegerConverter.java
----------------------------------------------------------------------
diff --git a/code/core/src/main/java/org/apache/tamaya/core/internal/converters/BigIntegerConverter.java b/code/core/src/main/java/org/apache/tamaya/core/internal/converters/BigIntegerConverter.java
index 2dac3c0..771aaf6 100644
--- a/code/core/src/main/java/org/apache/tamaya/core/internal/converters/BigIntegerConverter.java
+++ b/code/core/src/main/java/org/apache/tamaya/core/internal/converters/BigIntegerConverter.java
@@ -47,7 +47,10 @@ public class BigIntegerConverter implements PropertyConverter<BigInteger> {
     @Override
     public BigInteger convert(String value, ConversionContext ctx) {
         ctx.addSupportedFormats(getClass(), "[-]0X.. (hex)", "[-]0x... (hex)", "<bigint> -> new BigInteger(bigint)");
-        String trimmed = Objects.requireNonNull(value).trim();
+        if(value==null){
+            return null;
+        }
+        String trimmed = value.trim();
         if(trimmed.startsWith("0x") || trimmed.startsWith("0X")){
             LOG.finest("Parsing Hex createValue to BigInteger: " + value);
             return new BigInteger(value.substring(2), 16);

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/21808ea0/code/core/src/main/java/org/apache/tamaya/core/internal/converters/BooleanConverter.java
----------------------------------------------------------------------
diff --git a/code/core/src/main/java/org/apache/tamaya/core/internal/converters/BooleanConverter.java b/code/core/src/main/java/org/apache/tamaya/core/internal/converters/BooleanConverter.java
index a34acaa..989e4da 100644
--- a/code/core/src/main/java/org/apache/tamaya/core/internal/converters/BooleanConverter.java
+++ b/code/core/src/main/java/org/apache/tamaya/core/internal/converters/BooleanConverter.java
@@ -39,8 +39,10 @@ public class BooleanConverter implements PropertyConverter<Boolean> {
         ctx.addSupportedFormats(getClass(), "yes (ignore case)", "y (ignore case)",
                 "true (ignore case)", "t (ignore case)", "1", "no (ignore case)", "n (ignore case)",
                 "false (ignore case)", "f (ignore case)", "0");
-        String ignoreCaseValue = Objects.requireNonNull(value)
-                                        .trim()
+        if(value==null){
+            return null;
+        }
+        String ignoreCaseValue = value.trim()
                                         .toLowerCase(Locale.ENGLISH);
         switch(ignoreCaseValue) {
             case "1":

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/21808ea0/code/core/src/main/java/org/apache/tamaya/core/internal/converters/ByteConverter.java
----------------------------------------------------------------------
diff --git a/code/core/src/main/java/org/apache/tamaya/core/internal/converters/ByteConverter.java b/code/core/src/main/java/org/apache/tamaya/core/internal/converters/ByteConverter.java
index 8a7e740..e1dc97a 100644
--- a/code/core/src/main/java/org/apache/tamaya/core/internal/converters/ByteConverter.java
+++ b/code/core/src/main/java/org/apache/tamaya/core/internal/converters/ByteConverter.java
@@ -52,7 +52,10 @@ public class ByteConverter implements PropertyConverter<Byte>{
     @Override
     public Byte convert(String value, ConversionContext ctx) {
         ctx.addSupportedFormats(getClass(),"<byte>", "MIN_VALUE", "MIN", "MAX_VALUE", "MAX");
-        String trimmed = Objects.requireNonNull(value).trim();
+        if(value==null){
+            return null;
+        }
+        String trimmed = value.trim();
         switch(trimmed.toUpperCase(Locale.ENGLISH)){
             case "MIN_VALUE":
             case "MIN":

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/21808ea0/code/core/src/main/java/org/apache/tamaya/core/internal/converters/CharConverter.java
----------------------------------------------------------------------
diff --git a/code/core/src/main/java/org/apache/tamaya/core/internal/converters/CharConverter.java b/code/core/src/main/java/org/apache/tamaya/core/internal/converters/CharConverter.java
index 52467ed..e3f08e7 100644
--- a/code/core/src/main/java/org/apache/tamaya/core/internal/converters/CharConverter.java
+++ b/code/core/src/main/java/org/apache/tamaya/core/internal/converters/CharConverter.java
@@ -43,7 +43,10 @@ public class CharConverter implements PropertyConverter<Character>{
     @Override
     public Character convert(String value, ConversionContext ctx) {
         ctx.addSupportedFormats(getClass(),"\\'<char>\\'", "<char>", "<charNum>");
-        String trimmed = Objects.requireNonNull(value).trim();
+        if(value==null){
+            return null;
+        }
+        String trimmed = value.trim();
         if(trimmed.isEmpty()){
             return null;
         }

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/21808ea0/code/core/src/main/java/org/apache/tamaya/core/internal/converters/ConvertQuery.java
----------------------------------------------------------------------
diff --git a/code/core/src/main/java/org/apache/tamaya/core/internal/converters/ConvertQuery.java b/code/core/src/main/java/org/apache/tamaya/core/internal/converters/ConvertQuery.java
index a999112..55256b6 100644
--- a/code/core/src/main/java/org/apache/tamaya/core/internal/converters/ConvertQuery.java
+++ b/code/core/src/main/java/org/apache/tamaya/core/internal/converters/ConvertQuery.java
@@ -18,7 +18,6 @@
  */
 package org.apache.tamaya.core.internal.converters;
 
-import org.apache.tamaya.ConfigQuery;
 import org.apache.tamaya.Configuration;
 import org.apache.tamaya.TypeLiteral;
 import org.apache.tamaya.spi.ConversionContext;
@@ -26,6 +25,7 @@ import org.apache.tamaya.spi.PropertyConverter;
 
 import java.util.List;
 import java.util.Objects;
+import java.util.function.Function;
 import java.util.logging.Level;
 import java.util.logging.Logger;
 
@@ -33,7 +33,7 @@ import java.util.logging.Logger;
  * Query to convert a String createValue.
  * @param <T> the target type.
  */
-final class ConvertQuery<T> implements ConfigQuery<T> {
+final class ConvertQuery<T> implements Function<Configuration, T> {
 
     private static final Logger LOG = Logger.getLogger(ConvertQuery.class.getName());
 
@@ -46,7 +46,7 @@ final class ConvertQuery<T> implements ConfigQuery<T> {
     }
 
     @Override
-    public T query(Configuration config) {
+    public T apply(Configuration config) {
         List<PropertyConverter<T>> converters = config.getContext().getPropertyConverters(type);
         ConversionContext context = new ConversionContext.Builder(type).setConfiguration(config)
                 .setKey(ConvertQuery.class.getName()).build();

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/21808ea0/code/core/src/main/java/org/apache/tamaya/core/internal/converters/CurrencyConverter.java
----------------------------------------------------------------------
diff --git a/code/core/src/main/java/org/apache/tamaya/core/internal/converters/CurrencyConverter.java b/code/core/src/main/java/org/apache/tamaya/core/internal/converters/CurrencyConverter.java
index d7b9343..d82e815 100644
--- a/code/core/src/main/java/org/apache/tamaya/core/internal/converters/CurrencyConverter.java
+++ b/code/core/src/main/java/org/apache/tamaya/core/internal/converters/CurrencyConverter.java
@@ -47,7 +47,10 @@ public class CurrencyConverter implements PropertyConverter<Currency> {
     public Currency convert(String value, ConversionContext ctx) {
         ctx.addSupportedFormats(getClass(), "<currencyCode>, using Locale.ENGLISH", "<numericValue>",
                 "<locale>");
-        String trimmed = Objects.requireNonNull(value).trim();
+        if(value==null){
+            return null;
+        }
+        String trimmed = value.trim();
         try {
             return Currency.getInstance(trimmed.toUpperCase(Locale.ENGLISH));
         } catch (Exception e) {

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/21808ea0/code/core/src/main/java/org/apache/tamaya/core/internal/converters/DoubleConverter.java
----------------------------------------------------------------------
diff --git a/code/core/src/main/java/org/apache/tamaya/core/internal/converters/DoubleConverter.java b/code/core/src/main/java/org/apache/tamaya/core/internal/converters/DoubleConverter.java
index f92fe72..a9afba5 100644
--- a/code/core/src/main/java/org/apache/tamaya/core/internal/converters/DoubleConverter.java
+++ b/code/core/src/main/java/org/apache/tamaya/core/internal/converters/DoubleConverter.java
@@ -55,7 +55,10 @@ public class DoubleConverter implements PropertyConverter<Double> {
     public Double convert(String value, ConversionContext ctx) {
         ctx.addSupportedFormats(getClass(), "<double>", "MIN", "MIN_VALUE", "MAX", "MAX_VALUE",
                 "POSITIVE_INFINITY", "NEGATIVE_INFINITY", "NAN");
-        String trimmed = Objects.requireNonNull(value).trim();
+        if(value==null){
+            return null;
+        }
+        String trimmed = value.trim();
         switch (trimmed.toUpperCase(Locale.ENGLISH)) {
             case "POSITIVE_INFINITY":
                 return Double.POSITIVE_INFINITY;

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/21808ea0/code/core/src/main/java/org/apache/tamaya/core/internal/converters/DurationConverter.java
----------------------------------------------------------------------
diff --git a/code/core/src/main/java/org/apache/tamaya/core/internal/converters/DurationConverter.java b/code/core/src/main/java/org/apache/tamaya/core/internal/converters/DurationConverter.java
index 9fb5d7b..c58e0af 100644
--- a/code/core/src/main/java/org/apache/tamaya/core/internal/converters/DurationConverter.java
+++ b/code/core/src/main/java/org/apache/tamaya/core/internal/converters/DurationConverter.java
@@ -40,6 +40,9 @@ public class DurationConverter implements PropertyConverter<Duration> {
     public Duration convert(String value, ConversionContext ctx) {
         ctx.addSupportedFormats(getClass(),
                 Duration.of(1234, ChronoUnit.SECONDS).toString());
+        if(value==null){
+            return null;
+        }
         try {
             return Duration.parse(value);
         }catch(Exception e){

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/21808ea0/code/core/src/main/java/org/apache/tamaya/core/internal/converters/FloatConverter.java
----------------------------------------------------------------------
diff --git a/code/core/src/main/java/org/apache/tamaya/core/internal/converters/FloatConverter.java b/code/core/src/main/java/org/apache/tamaya/core/internal/converters/FloatConverter.java
index eaae2b4..cc2f9d8 100644
--- a/code/core/src/main/java/org/apache/tamaya/core/internal/converters/FloatConverter.java
+++ b/code/core/src/main/java/org/apache/tamaya/core/internal/converters/FloatConverter.java
@@ -55,7 +55,10 @@ public class FloatConverter implements PropertyConverter<Float> {
     public Float convert(String value, ConversionContext ctx) {
         ctx.addSupportedFormats(getClass(), "<float>", "MIN", "MIN_VALUE", "MAX", "MAX_VALUE",
                         "POSITIVE_INFINITY", "NEGATIVE_INFINITY", "NAN");
-        String trimmed = Objects.requireNonNull(value).trim();
+        if(value==null){
+            return null;
+        }
+        String trimmed = value.trim();
         switch(trimmed.toUpperCase(Locale.ENGLISH)){
             case "POSITIVE_INFINITY":
                 return Float.POSITIVE_INFINITY;

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/21808ea0/code/core/src/main/java/org/apache/tamaya/core/internal/converters/InstantConverter.java
----------------------------------------------------------------------
diff --git a/code/core/src/main/java/org/apache/tamaya/core/internal/converters/InstantConverter.java b/code/core/src/main/java/org/apache/tamaya/core/internal/converters/InstantConverter.java
index f7eafa7..4a0994f 100644
--- a/code/core/src/main/java/org/apache/tamaya/core/internal/converters/InstantConverter.java
+++ b/code/core/src/main/java/org/apache/tamaya/core/internal/converters/InstantConverter.java
@@ -38,6 +38,9 @@ public class InstantConverter implements PropertyConverter<Instant> {
     @Override
     public Instant convert(String value, ConversionContext ctx) {
         ctx.addSupportedFormats(getClass(), Instant.now().toString());
+        if(value==null){
+            return null;
+        }
         try{
             return Instant.parse(value);
         }catch(Exception e){

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/21808ea0/code/core/src/main/java/org/apache/tamaya/core/internal/converters/IntegerConverter.java
----------------------------------------------------------------------
diff --git a/code/core/src/main/java/org/apache/tamaya/core/internal/converters/IntegerConverter.java b/code/core/src/main/java/org/apache/tamaya/core/internal/converters/IntegerConverter.java
index 1fa1124..169bfc9 100644
--- a/code/core/src/main/java/org/apache/tamaya/core/internal/converters/IntegerConverter.java
+++ b/code/core/src/main/java/org/apache/tamaya/core/internal/converters/IntegerConverter.java
@@ -54,7 +54,10 @@ public class IntegerConverter implements PropertyConverter<Integer>{
     @Override
     public Integer convert(String value, ConversionContext ctx) {
         ctx.addSupportedFormats(getClass(), "<int>", "MIN_VALUE", "MIN", "MAX_VALUE", "MAX");
-        String trimmed = Objects.requireNonNull(value).trim();
+        if(value==null){
+            return null;
+        }
+        String trimmed = value.trim();
         switch(trimmed.toUpperCase(Locale.ENGLISH)){
             case "MIN_VALUE":
             case "MIN":

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/21808ea0/code/core/src/main/java/org/apache/tamaya/core/internal/converters/LocalDateConverter.java
----------------------------------------------------------------------
diff --git a/code/core/src/main/java/org/apache/tamaya/core/internal/converters/LocalDateConverter.java b/code/core/src/main/java/org/apache/tamaya/core/internal/converters/LocalDateConverter.java
index 04d107a..5f09ec4 100644
--- a/code/core/src/main/java/org/apache/tamaya/core/internal/converters/LocalDateConverter.java
+++ b/code/core/src/main/java/org/apache/tamaya/core/internal/converters/LocalDateConverter.java
@@ -38,6 +38,9 @@ public class LocalDateConverter implements PropertyConverter<LocalDate> {
     @Override
     public LocalDate convert(String value, ConversionContext ctx) {
         ctx.addSupportedFormats(getClass(), LocalDate.now().toString());
+        if(value==null){
+            return null;
+        }
         try{
             return LocalDate.parse(value);
         }catch(Exception e){

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/21808ea0/code/core/src/main/java/org/apache/tamaya/core/internal/converters/LocalDateTimeConverter.java
----------------------------------------------------------------------
diff --git a/code/core/src/main/java/org/apache/tamaya/core/internal/converters/LocalDateTimeConverter.java b/code/core/src/main/java/org/apache/tamaya/core/internal/converters/LocalDateTimeConverter.java
index 4a46b6d..ea92f6c 100644
--- a/code/core/src/main/java/org/apache/tamaya/core/internal/converters/LocalDateTimeConverter.java
+++ b/code/core/src/main/java/org/apache/tamaya/core/internal/converters/LocalDateTimeConverter.java
@@ -38,6 +38,9 @@ public class LocalDateTimeConverter implements PropertyConverter<LocalDateTime>
     @Override
     public LocalDateTime convert(String value, ConversionContext ctx) {
         ctx.addSupportedFormats(getClass(), LocalDateTime.now().toString());
+        if(value==null){
+            return null;
+        }
         try{
             return LocalDateTime.parse(value);
         }catch(Exception e){

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/21808ea0/code/core/src/main/java/org/apache/tamaya/core/internal/converters/LocalTimeConverter.java
----------------------------------------------------------------------
diff --git a/code/core/src/main/java/org/apache/tamaya/core/internal/converters/LocalTimeConverter.java b/code/core/src/main/java/org/apache/tamaya/core/internal/converters/LocalTimeConverter.java
index 17f9779..5fbaa47 100644
--- a/code/core/src/main/java/org/apache/tamaya/core/internal/converters/LocalTimeConverter.java
+++ b/code/core/src/main/java/org/apache/tamaya/core/internal/converters/LocalTimeConverter.java
@@ -38,6 +38,9 @@ public class LocalTimeConverter implements PropertyConverter<LocalTime> {
     @Override
     public LocalTime convert(String value, ConversionContext ctx) {
         ctx.addSupportedFormats(getClass(), LocalTime.now().toString());
+        if(value==null){
+            return null;
+        }
         try{
             return LocalTime.parse(value);
         }catch(Exception e){

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/21808ea0/code/core/src/main/java/org/apache/tamaya/core/internal/converters/LongConverter.java
----------------------------------------------------------------------
diff --git a/code/core/src/main/java/org/apache/tamaya/core/internal/converters/LongConverter.java b/code/core/src/main/java/org/apache/tamaya/core/internal/converters/LongConverter.java
index 429065c..64a1c5e 100644
--- a/code/core/src/main/java/org/apache/tamaya/core/internal/converters/LongConverter.java
+++ b/code/core/src/main/java/org/apache/tamaya/core/internal/converters/LongConverter.java
@@ -52,7 +52,10 @@ public class LongConverter implements PropertyConverter<Long>{
     public Long convert(String value, ConversionContext ctx) {
         ctx.addSupportedFormats(getClass(), "<long>", "MIN", "MIN_VALUE", "MAX", "MAX_VALUE");
 
-        String trimmed = Objects.requireNonNull(value).trim();
+        if(value==null){
+            return null;
+        }
+        String trimmed = value.trim();
             switch (trimmed.toUpperCase(Locale.ENGLISH)) {
                 case "MIN_VALUE":
                 case "MIN":

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/21808ea0/code/core/src/main/java/org/apache/tamaya/core/internal/converters/NumberConverter.java
----------------------------------------------------------------------
diff --git a/code/core/src/main/java/org/apache/tamaya/core/internal/converters/NumberConverter.java b/code/core/src/main/java/org/apache/tamaya/core/internal/converters/NumberConverter.java
index a02d0cf..2972611 100644
--- a/code/core/src/main/java/org/apache/tamaya/core/internal/converters/NumberConverter.java
+++ b/code/core/src/main/java/org/apache/tamaya/core/internal/converters/NumberConverter.java
@@ -49,7 +49,10 @@ public class NumberConverter implements PropertyConverter<Number>{
         ctx.addSupportedFormats(getClass(), "<double>, <long>", "0x (hex)", "0X... (hex)", "POSITIVE_INFINITY",
                 "NEGATIVE_INFINITY", "NAN");
 
-        String trimmed = Objects.requireNonNull(value).trim();
+        if(value==null){
+            return null;
+        }
+        String trimmed = value.trim();
         switch(trimmed.toUpperCase(Locale.ENGLISH)) {
             case "POSITIVE_INFINITY":
                 return Double.POSITIVE_INFINITY;

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/21808ea0/code/core/src/main/java/org/apache/tamaya/core/internal/converters/OffsetDateTimeConverter.java
----------------------------------------------------------------------
diff --git a/code/core/src/main/java/org/apache/tamaya/core/internal/converters/OffsetDateTimeConverter.java b/code/core/src/main/java/org/apache/tamaya/core/internal/converters/OffsetDateTimeConverter.java
index 141ef2b..3ef70db 100644
--- a/code/core/src/main/java/org/apache/tamaya/core/internal/converters/OffsetDateTimeConverter.java
+++ b/code/core/src/main/java/org/apache/tamaya/core/internal/converters/OffsetDateTimeConverter.java
@@ -38,6 +38,9 @@ public class OffsetDateTimeConverter implements PropertyConverter<OffsetDateTime
     @Override
     public OffsetDateTime convert(String value, ConversionContext ctx) {
         ctx.addSupportedFormats(getClass(), OffsetDateTime.now().toString());
+        if(value==null){
+            return null;
+        }
         try{
             return OffsetDateTime.parse(value);
         }catch(Exception e){

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/21808ea0/code/core/src/main/java/org/apache/tamaya/core/internal/converters/OffsetTimeConverter.java
----------------------------------------------------------------------
diff --git a/code/core/src/main/java/org/apache/tamaya/core/internal/converters/OffsetTimeConverter.java b/code/core/src/main/java/org/apache/tamaya/core/internal/converters/OffsetTimeConverter.java
index 19d6ddd..9eb7b0a 100644
--- a/code/core/src/main/java/org/apache/tamaya/core/internal/converters/OffsetTimeConverter.java
+++ b/code/core/src/main/java/org/apache/tamaya/core/internal/converters/OffsetTimeConverter.java
@@ -38,6 +38,9 @@ public class OffsetTimeConverter implements PropertyConverter<OffsetTime> {
     @Override
     public OffsetTime convert(String value, ConversionContext ctx) {
         ctx.addSupportedFormats(getClass(), OffsetTime.now().toString());
+        if(value==null){
+            return null;
+        }
         try{
             return OffsetTime.parse(value);
         }catch(Exception e){

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/21808ea0/code/core/src/main/java/org/apache/tamaya/core/internal/converters/OptionalConverter.java
----------------------------------------------------------------------
diff --git a/code/core/src/main/java/org/apache/tamaya/core/internal/converters/OptionalConverter.java b/code/core/src/main/java/org/apache/tamaya/core/internal/converters/OptionalConverter.java
index f37d2f9..e9002e0 100644
--- a/code/core/src/main/java/org/apache/tamaya/core/internal/converters/OptionalConverter.java
+++ b/code/core/src/main/java/org/apache/tamaya/core/internal/converters/OptionalConverter.java
@@ -47,7 +47,7 @@ public class OptionalConverter implements PropertyConverter<Optional> {
                 return Optional.of(value);
             }
             ConvertQuery converter = new ConvertQuery(value, TypeLiteral.of(pt.getActualTypeArguments()[0]));
-            return Optional.ofNullable(ctx.getConfiguration().query(converter));
+            return Optional.ofNullable(ctx.getConfiguration().adapt(converter));
         }catch(Exception e){
             throw new ConfigException("Error evaluating config createValue.", e);
         }

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/21808ea0/code/core/src/main/java/org/apache/tamaya/core/internal/converters/PathConverter.java
----------------------------------------------------------------------
diff --git a/code/core/src/main/java/org/apache/tamaya/core/internal/converters/PathConverter.java b/code/core/src/main/java/org/apache/tamaya/core/internal/converters/PathConverter.java
index 046dafd..57e739b 100644
--- a/code/core/src/main/java/org/apache/tamaya/core/internal/converters/PathConverter.java
+++ b/code/core/src/main/java/org/apache/tamaya/core/internal/converters/PathConverter.java
@@ -38,17 +38,20 @@ public class PathConverter implements PropertyConverter<Path> {
 
     @Override
     public Path convert(String value, ConversionContext ctx) {
-        if(value==null || value.isEmpty()){
+        ctx.addSupportedFormats(getClass(),"<File>");
+        if(value==null){
+            return null;
+        }
+        String trimmed = value.trim();
+        if(value.isEmpty()){
             return null;
         }
-        ctx.addSupportedFormats(getClass(),"<File>");
-        String trimmed = Objects.requireNonNull(value).trim();
         try {
             return FileSystems.getDefault().getPath(value);
         } catch (Exception e) {
             LOG.log(Level.FINE, "Unparseable Path: " + trimmed, e);
+            return null;
         }
-        return null;
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/21808ea0/code/core/src/main/java/org/apache/tamaya/core/internal/converters/ShortConverter.java
----------------------------------------------------------------------
diff --git a/code/core/src/main/java/org/apache/tamaya/core/internal/converters/ShortConverter.java b/code/core/src/main/java/org/apache/tamaya/core/internal/converters/ShortConverter.java
index ca945f5..d46f132 100644
--- a/code/core/src/main/java/org/apache/tamaya/core/internal/converters/ShortConverter.java
+++ b/code/core/src/main/java/org/apache/tamaya/core/internal/converters/ShortConverter.java
@@ -52,7 +52,10 @@ public class ShortConverter implements PropertyConverter<Short>{
     @Override
     public Short convert(String value, ConversionContext ctx) {
         ctx.addSupportedFormats(getClass(), "short", "MIN", "MIN_VALUE", "MAX", "MAX_VALUE");
-        String trimmed = Objects.requireNonNull(value).trim();
+        if(value==null){
+            return null;
+        }
+        String trimmed = value.trim();
         switch(trimmed.toUpperCase(Locale.ENGLISH)){
             case "MIN_VALUE":
             case "MIN":

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/21808ea0/code/core/src/main/java/org/apache/tamaya/core/internal/converters/SupplierConverter.java
----------------------------------------------------------------------
diff --git a/code/core/src/main/java/org/apache/tamaya/core/internal/converters/SupplierConverter.java b/code/core/src/main/java/org/apache/tamaya/core/internal/converters/SupplierConverter.java
index d4cd196..e04096f 100644
--- a/code/core/src/main/java/org/apache/tamaya/core/internal/converters/SupplierConverter.java
+++ b/code/core/src/main/java/org/apache/tamaya/core/internal/converters/SupplierConverter.java
@@ -48,7 +48,7 @@ public class SupplierConverter implements PropertyConverter<Supplier> {
                     return value;
                 }
                 ConvertQuery converter = new ConvertQuery(value, TypeLiteral.of(pt.getActualTypeArguments()[0]));
-                Object o = context.getConfiguration().query(converter);
+                Object o = context.getConfiguration().adapt(converter);
                 if(o==null){
                     throw new ConfigException("No such createValue: " + context.getKey());
                 }

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/21808ea0/code/core/src/main/java/org/apache/tamaya/core/internal/converters/URIConverter.java
----------------------------------------------------------------------
diff --git a/code/core/src/main/java/org/apache/tamaya/core/internal/converters/URIConverter.java b/code/core/src/main/java/org/apache/tamaya/core/internal/converters/URIConverter.java
index 3cd37c6..19aa341 100644
--- a/code/core/src/main/java/org/apache/tamaya/core/internal/converters/URIConverter.java
+++ b/code/core/src/main/java/org/apache/tamaya/core/internal/converters/URIConverter.java
@@ -37,17 +37,20 @@ public class URIConverter implements PropertyConverter<URI> {
 
     @Override
     public URI convert(String value, ConversionContext ctx) {
-        if(value==null || value.isEmpty()){
+        ctx.addSupportedFormats(getClass(), "<uri> -> new URI(uri)");
+        if(value==null){
+            return null;
+        }
+        String trimmed = value.trim();
+        if(value.isEmpty()){
             return null;
         }
-        ctx.addSupportedFormats(getClass(), "<uri> -> new URI(uri)");
-        String trimmed = Objects.requireNonNull(value).trim();
         try {
             return new URI(trimmed);
         } catch (Exception e) {
             LOG.log(Level.FINE, "Unparseable URI: " + trimmed, e);
+            return null;
         }
-        return null;
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/21808ea0/code/core/src/main/java/org/apache/tamaya/core/internal/converters/URLConverter.java
----------------------------------------------------------------------
diff --git a/code/core/src/main/java/org/apache/tamaya/core/internal/converters/URLConverter.java b/code/core/src/main/java/org/apache/tamaya/core/internal/converters/URLConverter.java
index 683f2a7..2939e85 100644
--- a/code/core/src/main/java/org/apache/tamaya/core/internal/converters/URLConverter.java
+++ b/code/core/src/main/java/org/apache/tamaya/core/internal/converters/URLConverter.java
@@ -37,11 +37,11 @@ public class URLConverter implements PropertyConverter<URL> {
 
     @Override
     public URL convert(String value, ConversionContext ctx) {
-        if(value==null || value.isEmpty()){
+        ctx.addSupportedFormats(getClass(),"<URL>");
+        if(value==null){
             return null;
         }
-        ctx.addSupportedFormats(getClass(),"<URL>");
-        String trimmed = Objects.requireNonNull(value).trim();
+        String trimmed = value.trim();
         try {
             return new URL(trimmed);
         } catch (Exception e) {

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/21808ea0/code/core/src/test/java/org/apache/tamaya/core/internal/converters/ConvertQueryTest.java
----------------------------------------------------------------------
diff --git a/code/core/src/test/java/org/apache/tamaya/core/internal/converters/ConvertQueryTest.java b/code/core/src/test/java/org/apache/tamaya/core/internal/converters/ConvertQueryTest.java
index 6dc7c3b..e67bb16 100644
--- a/code/core/src/test/java/org/apache/tamaya/core/internal/converters/ConvertQueryTest.java
+++ b/code/core/src/test/java/org/apache/tamaya/core/internal/converters/ConvertQueryTest.java
@@ -36,7 +36,7 @@ public class ConvertQueryTest {
     public void testIntegerQuery() {
         Configuration config = Configuration.current();
         ConvertQuery<Integer> converter = new ConvertQuery<>("101", TypeLiteral.of(Integer.class));
-        Integer result = converter.query(config);
+        Integer result = converter.apply(config);
         assertThat(result.longValue()).isEqualTo(101);
     }
 
@@ -47,7 +47,7 @@ public class ConvertQueryTest {
     public void testConfigUsingIntegerQuery() {
         Configuration config = Configuration.current();
         ConvertQuery<Integer> converter = new ConvertQuery<>("101", TypeLiteral.of(Integer.class));
-        Integer result = config.query(converter);
+        Integer result = config.adapt(converter);
         assertThat(result.longValue()).isEqualTo(101);
     }
 
@@ -58,10 +58,10 @@ public class ConvertQueryTest {
     public void testNonGenericQuery() {
         Configuration config = Configuration.current();
 
-        Integer intResult = (Integer) new ConvertQuery("101", TypeLiteral.of(Integer.class)).query(config);
+        Integer intResult = (Integer) new ConvertQuery("101", TypeLiteral.of(Integer.class)).apply(config);
         assertThat(intResult.longValue()).isEqualTo(101);
 
-        Boolean booleanResult = (Boolean) new ConvertQuery("true", TypeLiteral.of(Boolean.class)).query(config);
+        Boolean booleanResult = (Boolean) new ConvertQuery("true", TypeLiteral.of(Boolean.class)).apply(config);
         assertThat(booleanResult).isEqualTo(Boolean.TRUE);
     }
 
@@ -72,7 +72,7 @@ public class ConvertQueryTest {
     public void testNullWithoutSuccess() {
         Configuration config = Configuration.current();
 
-        Integer intResult = (Integer) new ConvertQuery("invalid", TypeLiteral.of(Integer.class)).query(config);
+        Integer intResult = (Integer) new ConvertQuery("invalid", TypeLiteral.of(Integer.class)).apply(config);
         assertThat(intResult).isNull();
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/21808ea0/code/core/src/test/java/org/apache/tamaya/core/internal/converters/ConverterTestsPropertySource.java
----------------------------------------------------------------------
diff --git a/code/core/src/test/java/org/apache/tamaya/core/internal/converters/ConverterTestsPropertySource.java b/code/core/src/test/java/org/apache/tamaya/core/internal/converters/ConverterTestsPropertySource.java
index 1ef80f1..bf28a41 100644
--- a/code/core/src/test/java/org/apache/tamaya/core/internal/converters/ConverterTestsPropertySource.java
+++ b/code/core/src/test/java/org/apache/tamaya/core/internal/converters/ConverterTestsPropertySource.java
@@ -44,251 +44,251 @@ public class ConverterTestsPropertySource implements PropertySource {
         switch (key) {
             // Bytes
             case "tests.converter.byte.decimal":
-                return PropertyValue.of(key, "101", getName());
+                return PropertyValue.createValue(key, "101");
             case "tests.converter.byte.octal":
-                return PropertyValue.of(key, "02", getName());
+                return PropertyValue.createValue(key, "02");
             case "tests.converter.byte.hex.lowerX":
-                return PropertyValue.of(key, "0x2F", getName());
+                return PropertyValue.createValue(key, "0x2F");
             case "tests.converter.byte.hex.upperX":
-                return PropertyValue.of(key, "0X3F", getName());
+                return PropertyValue.createValue(key, "0X3F");
             case "tests.converter.byte.min":
-                return PropertyValue.of(key, "min", getName());
+                return PropertyValue.createValue(key, "min");
             case "tests.converter.byte.max":
-                return PropertyValue.of(key, "MAX_Value", getName());
+                return PropertyValue.createValue(key, "MAX_Value");
             case "tests.converter.byte.invalid":
-                return PropertyValue.of(key, "invalid", getName());
+                return PropertyValue.createValue(key, "invalid");
             // Boolean
             case "tests.converter.boolean.y1":
-                return PropertyValue.of(key, "y", getName());
+                return PropertyValue.createValue(key, "y");
             case "tests.converter.boolean.y2":
-                return PropertyValue.of(key, "Y", getName());
+                return PropertyValue.createValue(key, "Y");
             case "tests.converter.boolean.yes1":
-                return PropertyValue.of(key, "yes", getName());
+                return PropertyValue.createValue(key, "yes");
             case "tests.converter.boolean.yes2":
-                return PropertyValue.of(key, "Yes", getName());
+                return PropertyValue.createValue(key, "Yes");
             case "tests.converter.boolean.yes3":
-                return PropertyValue.of(key, "yeS", getName());
+                return PropertyValue.createValue(key, "yeS");
             case "tests.converter.boolean.true1":
-                return PropertyValue.of(key, "true", getName());
+                return PropertyValue.createValue(key, "true");
             case "tests.converter.boolean.true2":
-                return PropertyValue.of(key, "True", getName());
+                return PropertyValue.createValue(key, "True");
             case "tests.converter.boolean.true3":
-                return PropertyValue.of(key, "trUe", getName());
+                return PropertyValue.createValue(key, "trUe");
             case "tests.converter.boolean.t1":
-                return PropertyValue.of(key, "t", getName());
+                return PropertyValue.createValue(key, "t");
             case "tests.converter.boolean.t2":
-                return PropertyValue.of(key, "T", getName());
+                return PropertyValue.createValue(key, "T");
             case "tests.converter.boolean.n1":
-                return PropertyValue.of(key, "n", getName());
+                return PropertyValue.createValue(key, "n");
             case "tests.converter.boolean.n2":
-                return PropertyValue.of(key, "N", getName());
+                return PropertyValue.createValue(key, "N");
             case "tests.converter.boolean.no1":
-                return PropertyValue.of(key, "no", getName());
+                return PropertyValue.createValue(key, "no");
             case "tests.converter.boolean.no2":
-                return PropertyValue.of(key, "No", getName());
+                return PropertyValue.createValue(key, "No");
             case "tests.converter.boolean.no3":
-                return PropertyValue.of(key, "nO", getName());
+                return PropertyValue.createValue(key, "nO");
             case "tests.converter.boolean.false1":
-                return PropertyValue.of(key, "false", getName());
+                return PropertyValue.createValue(key, "false");
             case "tests.converter.boolean.false2":
-                return PropertyValue.of(key, "False", getName());
+                return PropertyValue.createValue(key, "False");
             case "tests.converter.boolean.false3":
-                return PropertyValue.of(key, "falSe", getName());
+                return PropertyValue.createValue(key, "falSe");
             case "tests.converter.boolean.f1":
-                return PropertyValue.of(key, "f", getName());
+                return PropertyValue.createValue(key, "f");
             case "tests.converter.boolean.f2":
-                return PropertyValue.of(key, "F", getName());
+                return PropertyValue.createValue(key, "F");
             case "tests.converter.boolean.invalid":
-                return PropertyValue.of(key, "invalid", getName());
+                return PropertyValue.createValue(key, "invalid");
             // Character
             case "tests.converter.char.f":
-                return PropertyValue.of(key, "f", getName());
+                return PropertyValue.createValue(key, "f");
             case "tests.converter.char.d":
-                return PropertyValue.of(key, "'d'", getName());
+                return PropertyValue.createValue(key, "'d'");
             case "tests.converter.char.f-before":
-                return PropertyValue.of(key, "  f", getName());
+                return PropertyValue.createValue(key, "  f");
             case "tests.converter.char.f-after":
-                return PropertyValue.of(key, "f   ", getName());
+                return PropertyValue.createValue(key, "f   ");
             case "tests.converter.char.f-around":
-                return PropertyValue.of(key, "   f      ", getName());
+                return PropertyValue.createValue(key, "   f      ");
             case "tests.converter.char.f-numeric":
-                return PropertyValue.of(key, "101", getName());
+                return PropertyValue.createValue(key, "101");
             case "tests.converter.char.single-quote":
-                return PropertyValue.of(key, "'", getName());
+                return PropertyValue.createValue(key, "'");
             case "tests.converter.char.two-single-quotes":
-                return PropertyValue.of(key, "''", getName());
+                return PropertyValue.createValue(key, "''");
             case "tests.converter.char.three-single-quotes":
-                return PropertyValue.of(key, "'''", getName());
+                return PropertyValue.createValue(key, "'''");
             case "tests.converter.char.invalid":
-                return PropertyValue.of(key, "invalid", getName());
+                return PropertyValue.createValue(key, "invalid");
             case "tests.converter.char.quoted-invalid":
-                return PropertyValue.of(key, "'invalid'", getName());
+                return PropertyValue.createValue(key, "'invalid'");
             case "tests.converter.char.あ":
-                return PropertyValue.of(key, "あ", getName());
+                return PropertyValue.createValue(key, "あ");
             case "tests.converter.char.กขฃคฅฆงจฉช":
-                return PropertyValue.of(key, "กขฃคฅฆงจฉช", getName());
+                return PropertyValue.createValue(key, "กขฃคฅฆงจฉช");
 
             // currency
             case "tests.converter.currency.code1":
-                return PropertyValue.of(key, "CHF", getName());
+                return PropertyValue.createValue(key, "CHF");
             case "tests.converter.currency.code2":
-                return PropertyValue.of(key, "cHf", getName());
+                return PropertyValue.createValue(key, "cHf");
             case "tests.converter.currency.code3":
-                return PropertyValue.of(key, "  CHF", getName());
+                return PropertyValue.createValue(key, "  CHF");
             case "tests.converter.currency.code4":
-                return PropertyValue.of(key, "CHF   ", getName());
+                return PropertyValue.createValue(key, "CHF   ");
             case "tests.converter.currency.code5":
-                return PropertyValue.of(key, "  CHF   ", getName());
+                return PropertyValue.createValue(key, "  CHF   ");
             case "tests.converter.currency.code-numeric1":
-                return PropertyValue.of(key, "100", getName());
+                return PropertyValue.createValue(key, "100");
             case "tests.converter.currency.code-numeric2":
-                return PropertyValue.of(key, "  100", getName());
+                return PropertyValue.createValue(key, "  100");
             case "tests.converter.currency.code-numeric3":
-                return PropertyValue.of(key, "100  ", getName());
+                return PropertyValue.createValue(key, "100  ");
             case "tests.converter.currency.code-numeric4":
-                return PropertyValue.of(key, "  100  ", getName());
+                return PropertyValue.createValue(key, "  100  ");
             case "tests.converter.currency.code-locale1":
-                return PropertyValue.of(key, "DE", getName());
+                return PropertyValue.createValue(key, "DE");
             case "tests.converter.currency.code-locale2":
-                return PropertyValue.of(key, "  DE", getName());
+                return PropertyValue.createValue(key, "  DE");
             case "tests.converter.currency.code-locale3":
-                return PropertyValue.of(key, "DE  ", getName());
+                return PropertyValue.createValue(key, "DE  ");
             case "tests.converter.currency.code-locale4":
-                return PropertyValue.of(key, "  DE  ", getName());
+                return PropertyValue.createValue(key, "  DE  ");
             case "tests.converter.currency.code-locale-twopart":
-                return PropertyValue.of(key, "jp_JP", getName());
+                return PropertyValue.createValue(key, "jp_JP");
             case "tests.converter.currency.code-locale-threepart":
-                return PropertyValue.of(key, "jp_JP_JP", getName());
+                return PropertyValue.createValue(key, "jp_JP_JP");
             case "tests.converter.currency.code-locale-fourpart":
-                return PropertyValue.of(key, "jp_JP_JP_JP", getName());
+                return PropertyValue.createValue(key, "jp_JP_JP_JP");
             case "tests.converter.currency.invalid":
-                return PropertyValue.of(key, "invalid", getName());
+                return PropertyValue.createValue(key, "invalid");
             //double
             case "tests.converter.double.decimal":
-                return PropertyValue.of(key, "1.23456789", getName());
+                return PropertyValue.createValue(key, "1.23456789");
             case "tests.converter.double.decimalNegative":
-                return PropertyValue.of(key, "-1.23456789", getName());
+                return PropertyValue.createValue(key, "-1.23456789");
             case "tests.converter.double.integer":
-                return PropertyValue.of(key, "  100", getName());
+                return PropertyValue.createValue(key, "  100");
             case "tests.converter.double.hex1":
-                return PropertyValue.of(key, " 0XFF", getName());
+                return PropertyValue.createValue(key, " 0XFF");
             case "tests.converter.double.hex2":
-                return PropertyValue.of(key, "-0xFF  ", getName());
+                return PropertyValue.createValue(key, "-0xFF  ");
             case "tests.converter.double.hex3":
-                return PropertyValue.of(key, "#FF", getName());
+                return PropertyValue.createValue(key, "#FF");
             case "tests.converter.double.octal":
-                return PropertyValue.of(key, "0013", getName());
+                return PropertyValue.createValue(key, "0013");
             case "tests.converter.double.min":
-                return PropertyValue.of(key, "MIN_Value", getName());
+                return PropertyValue.createValue(key, "MIN_Value");
             case "tests.converter.double.max":
-                return PropertyValue.of(key, "max", getName());
+                return PropertyValue.createValue(key, "max");
             case "tests.converter.double.nan":
-                return PropertyValue.of(key, "NAN", getName());
+                return PropertyValue.createValue(key, "NAN");
             case "tests.converter.double.pi":
-                return PropertyValue.of(key, "positive_infinity", getName());
+                return PropertyValue.createValue(key, "positive_infinity");
             case "tests.converter.double.ni":
-                return PropertyValue.of(key, "Negative_Infinity", getName());
+                return PropertyValue.createValue(key, "Negative_Infinity");
             case "tests.converter.double.invalid":
-                return PropertyValue.of(key, "invalid", getName());
+                return PropertyValue.createValue(key, "invalid");
             //float
             case "tests.converter.float.decimal":
-                return PropertyValue.of(key, "1.23456789", getName());
+                return PropertyValue.createValue(key, "1.23456789");
             case "tests.converter.float.decimalNegative":
-                return PropertyValue.of(key, "-1.23456789", getName());
+                return PropertyValue.createValue(key, "-1.23456789");
             case "tests.converter.float.integer":
-                return PropertyValue.of(key, "  100", getName());
+                return PropertyValue.createValue(key, "  100");
             case "tests.converter.float.hex1":
-                return PropertyValue.of(key, " 0XFF", getName());
+                return PropertyValue.createValue(key, " 0XFF");
             case "tests.converter.float.hex2":
-                return PropertyValue.of(key, "-0xFF  ", getName());
+                return PropertyValue.createValue(key, "-0xFF  ");
             case "tests.converter.float.hex3":
-                return PropertyValue.of(key, "#FF", getName());
+                return PropertyValue.createValue(key, "#FF");
             case "tests.converter.float.octal":
-                return PropertyValue.of(key, "0013", getName());
+                return PropertyValue.createValue(key, "0013");
             case "tests.converter.float.min":
-                return PropertyValue.of(key, "MIN_Value", getName());
+                return PropertyValue.createValue(key, "MIN_Value");
             case "tests.converter.float.max":
-                return PropertyValue.of(key, "max", getName());
+                return PropertyValue.createValue(key, "max");
             case "tests.converter.float.nan":
-                return PropertyValue.of(key, "NAN", getName());
+                return PropertyValue.createValue(key, "NAN");
             case "tests.converter.float.pi":
-                return PropertyValue.of(key, "positive_infinity", getName());
+                return PropertyValue.createValue(key, "positive_infinity");
             case "tests.converter.float.ni":
-                return PropertyValue.of(key, "Negative_Infinity", getName());
+                return PropertyValue.createValue(key, "Negative_Infinity");
             case "tests.converter.float.invalid":
-                return PropertyValue.of(key, "invalid", getName());
+                return PropertyValue.createValue(key, "invalid");
             // Integer
             case "tests.converter.integer.decimal":
-                return PropertyValue.of(key, "101", getName());
+                return PropertyValue.createValue(key, "101");
             case "tests.converter.integer.octal":
-                return PropertyValue.of(key, "02", getName());
+                return PropertyValue.createValue(key, "02");
             case "tests.converter.integer.hex.lowerX":
-                return PropertyValue.of(key, "0x2F", getName());
+                return PropertyValue.createValue(key, "0x2F");
             case "tests.converter.integer.hex.upperX":
-                return PropertyValue.of(key, "0X3F", getName());
+                return PropertyValue.createValue(key, "0X3F");
             case "tests.converter.integer.min":
-                return PropertyValue.of(key, "min", getName());
+                return PropertyValue.createValue(key, "min");
             case "tests.converter.integer.max":
-                return PropertyValue.of(key, "MAX_Value", getName());
+                return PropertyValue.createValue(key, "MAX_Value");
             case "tests.converter.integer.invalid":
-                return PropertyValue.of(key, "invalid", getName());
+                return PropertyValue.createValue(key, "invalid");
             // Long
             case "tests.converter.long.decimal":
-                return PropertyValue.of(key, "101", getName());
+                return PropertyValue.createValue(key, "101");
             case "tests.converter.long.octal":
-                return PropertyValue.of(key, "02", getName());
+                return PropertyValue.createValue(key, "02");
             case "tests.converter.long.hex.lowerX":
-                return PropertyValue.of(key, "0x2F", getName());
+                return PropertyValue.createValue(key, "0x2F");
             case "tests.converter.long.hex.upperX":
-                return PropertyValue.of(key, "0X3F", getName());
+                return PropertyValue.createValue(key, "0X3F");
             case "tests.converter.long.min":
-                return PropertyValue.of(key, "min", getName());
+                return PropertyValue.createValue(key, "min");
             case "tests.converter.long.max":
-                return PropertyValue.of(key, "MAX_Value", getName());
+                return PropertyValue.createValue(key, "MAX_Value");
             case "tests.converter.long.invalid":
-                return PropertyValue.of(key, "invalid", getName());
+                return PropertyValue.createValue(key, "invalid");
             // Short
             case "tests.converter.short.decimal":
-                return PropertyValue.of(key, "101", getName());
+                return PropertyValue.createValue(key, "101");
             case "tests.converter.short.octal":
-                return PropertyValue.of(key, "02", getName());
+                return PropertyValue.createValue(key, "02");
             case "tests.converter.short.hex.lowerX":
-                return PropertyValue.of(key, "0x2F", getName());
+                return PropertyValue.createValue(key, "0x2F");
             case "tests.converter.short.hex.upperX":
-                return PropertyValue.of(key, "0X3F", getName());
+                return PropertyValue.createValue(key, "0X3F");
             case "tests.converter.short.min":
-                return PropertyValue.of(key, "min", getName());
+                return PropertyValue.createValue(key, "min");
             case "tests.converter.short.max":
-                return PropertyValue.of(key, "MAX_Value", getName());
+                return PropertyValue.createValue(key, "MAX_Value");
             case "tests.converter.short.invalid":
-                return PropertyValue.of(key, "invalid", getName());
+                return PropertyValue.createValue(key, "invalid");
             // BigDecimal & BigInteger
             case "tests.converter.bd.decimal":
-                return PropertyValue.of(key, "101", getName());
+                return PropertyValue.createValue(key, "101");
             case "tests.converter.bd.float":
-                return PropertyValue.of(key, "101.36438746", getName());
+                return PropertyValue.createValue(key, "101.36438746");
             case "tests.converter.bd.big":
-                return PropertyValue.of(key, "101666666666666662333337263723628763821638923628193612983618293628763", getName());
+                return PropertyValue.createValue(key, "101666666666666662333337263723628763821638923628193612983618293628763");
             case "tests.converter.bd.bigFloat":
-                return PropertyValue.of(key, "1016666666666666623333372637236287638216389293628763.101666666666666662333337263723628763821638923628193612983618293628763", getName());
+                return PropertyValue.createValue(key, "1016666666666666623333372637236287638216389293628763.101666666666666662333337263723628763821638923628193612983618293628763");
             case "tests.converter.bd.hex.lowerX":
-                return PropertyValue.of(key, "0x2F", getName());
+                return PropertyValue.createValue(key, "0x2F");
             case "tests.converter.bd.hex.upperX":
-                return PropertyValue.of(key, "0X3F", getName());
+                return PropertyValue.createValue(key, "0X3F");
             case "tests.converter.bd.hex.negLowerX":
-                return PropertyValue.of(key, "-0x2F", getName());
+                return PropertyValue.createValue(key, "-0x2F");
             case "tests.converter.bd.hex.negUpperX":
-                return PropertyValue.of(key, "-0X3F", getName());
+                return PropertyValue.createValue(key, "-0X3F");
             case "tests.converter.bd.hex.badX":
-                return PropertyValue.of(key, "0X3G2", getName());
+                return PropertyValue.createValue(key, "0X3G2");
             case "tests.converter.bd.hex.negBadX":
-                return PropertyValue.of(key, "-0X3G2", getName());
+                return PropertyValue.createValue(key, "-0X3G2");
             case "tests.converter.bd.hex.subTenX":
-                return PropertyValue.of(key, "0XFFFFFF", getName());
+                return PropertyValue.createValue(key, "0XFFFFFF");
             case "tests.converter.bd.hex.negSubTenX":
-                return PropertyValue.of(key, "-0X0107", getName());
+                return PropertyValue.createValue(key, "-0X0107");
             case "tests.converter.bd.invalid":
-                return PropertyValue.of(key, "invalid", getName());
+                return PropertyValue.createValue(key, "invalid");
 
         }
         return null;
@@ -298,9 +298,4 @@ public class ConverterTestsPropertySource implements PropertySource {
     public Map<String, PropertyValue> getProperties() {
         return Collections.emptyMap();
     }
-
-    @Override
-    public boolean isScannable() {
-        return false;
-    }
 }

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/21808ea0/code/core/src/test/java/org/apache/tamaya/core/internal/converters/SupplierConverterTest.java
----------------------------------------------------------------------
diff --git a/code/core/src/test/java/org/apache/tamaya/core/internal/converters/SupplierConverterTest.java b/code/core/src/test/java/org/apache/tamaya/core/internal/converters/SupplierConverterTest.java
index 549b287..bd8dad5 100644
--- a/code/core/src/test/java/org/apache/tamaya/core/internal/converters/SupplierConverterTest.java
+++ b/code/core/src/test/java/org/apache/tamaya/core/internal/converters/SupplierConverterTest.java
@@ -57,7 +57,7 @@ public class SupplierConverterTest {
         Supplier<InetAddress> addressResult;
         
         Configuration mockConfig = Mockito.mock(Configuration.class);
-        Mockito.when(mockConfig.query(any())).thenReturn(Mockito.mock(InetAddress.class));
+        Mockito.when(mockConfig.adapt(any())).thenReturn(Mockito.mock(InetAddress.class));
         
         TypeLiteral myConverterTypeLiteral = new TypeLiteral<MyConverter<InetAddress>> () {};
         ConversionContext myConverterContext = new ConversionContext.Builder(myConverterTypeLiteral)


Mime
View raw message