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 2016/07/15 12:04:44 UTC
[18/21] incubator-tamaya git commit: - Minimalized current API for
further discussions.
http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/43468987/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
deleted file mode 100644
index a5a32b3..0000000
--- a/code/core/src/main/java/org/apache/tamaya/core/internal/converters/BigIntegerConverter.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * 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.core.internal.converters;
-
-import org.apache.tamaya.spi.ConversionContext;
-import org.apache.tamaya.spi.PropertyConverter;
-
-import java.math.BigInteger;
-import java.util.Objects;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-/**
- * Converter, converting from String to BigInteger, the supported format is one of the following:
- * <ul>
- * <li>0xFFFFFF</li>
- * <li>0XFFFFAC</li>
- * <li>23257352735276352753</li>
- * <li>-0xFFFFFF</li>
- * <li>-0XFFFFAC</li>
- * <li>-23257352735276352753</li>
- * </ul>
- */
-public class BigIntegerConverter implements PropertyConverter<BigInteger>{
-
- /** The logger. */
- private static final Logger LOG = Logger.getLogger(BigIntegerConverter.class.getName());
- /** Converter used to decode hex, octal values. */
- private final ByteConverter byteConverter = new ByteConverter();
-
- @Override
- public BigInteger convert(String value, ConversionContext context) {
- context.addSupportedFormats(getClass(), "[-]0X.. (hex)", "[-]0x... (hex)", "<bigint> -> new BigInteger(bigint)");
- String trimmed = Objects.requireNonNull(value).trim();
- if(trimmed.startsWith("0x") || trimmed.startsWith("0X")){
- LOG.finest("Parsing Hex value to BigInteger: " + value);
- trimmed = trimmed.substring(2);
- StringBuilder decimal = new StringBuilder();
- for(int offset = 0;offset < trimmed.length();offset+=2){
- if(offset==trimmed.length()-1){
- LOG.finest("Invalid Hex-Byte-String: " + value);
- return null;
- }
- byte val = byteConverter.convert("0x" + trimmed.substring(offset, offset + 2), context);
- if(val<10){
- decimal.append('0').append(val);
- } else{
- decimal.append(val);
- }
- }
- return new BigInteger(decimal.toString());
- } else if(trimmed.startsWith("-0x") || trimmed.startsWith("-0X")){
- LOG.finest("Parsing Hex value to BigInteger: " + value);
- trimmed = trimmed.substring(3);
- StringBuilder decimal = new StringBuilder();
- for(int offset = 0;offset < trimmed.length();offset+=2){
- if(offset==trimmed.length()-1){
- LOG.finest("Invalid Hex-Byte-String: " + trimmed);
- return null;
- }
- byte val = byteConverter.convert("0x" + trimmed.substring(offset, offset + 2), context);
- if(val<10){
- decimal.append('0').append(val);
- } else{
- decimal.append(val);
- }
- }
- return new BigInteger('-' + decimal.toString());
- }
- try{
- return new BigInteger(trimmed);
- } catch(Exception e){
- LOG.log(Level.FINEST, "Failed to parse BigInteger from: " + value, e);
- return null;
- }
- }
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/43468987/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
deleted file mode 100644
index 93b1da3..0000000
--- a/code/core/src/main/java/org/apache/tamaya/core/internal/converters/BooleanConverter.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * 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.core.internal.converters;
-
-import org.apache.tamaya.spi.ConversionContext;
-import org.apache.tamaya.spi.PropertyConverter;
-
-import java.util.Locale;
-import java.util.Objects;
-import java.util.logging.Logger;
-
-/**
- * Converter, converting from String to Boolean.
- */
-public class BooleanConverter implements PropertyConverter<Boolean> {
-
- private final Logger LOG = Logger.getLogger(getClass().getName());
-
- @Override
- public Boolean convert(String value, ConversionContext context) {
- context.addSupportedFormats(getClass(), "yes (ignore case)", "y (ignore case)", "true (ignore case)", "t (ignore case)", "no (ignore case)", "n (ignore case)", "false (ignore case)", "f (ignore case)");
- String ignoreCaseValue = Objects.requireNonNull(value)
- .trim()
- .toLowerCase(Locale.ENGLISH);
- switch(ignoreCaseValue) {
- case "yes":
- case "y":
- case "true":
- case "t":
- return Boolean.TRUE;
- case "no":
- case "n":
- case "false":
- case "f":
- return Boolean.FALSE;
- default:
- LOG.finest("Unknown boolean value encountered: " + value);
- }
- return null;
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/43468987/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
deleted file mode 100644
index fc2bf9d..0000000
--- a/code/core/src/main/java/org/apache/tamaya/core/internal/converters/ByteConverter.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * 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.core.internal.converters;
-
-import org.apache.tamaya.spi.ConversionContext;
-import org.apache.tamaya.spi.PropertyConverter;
-
-import java.util.Locale;
-import java.util.Objects;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-/**
- * Converter, converting from String to Byte, the supported format is one of the following:
- * <ul>
- * <li>123 (byte value)</li>
- * <li>0xFF (byte value)</li>
- * <li>0XDF (byte value)</li>
- * <li>0D1 (byte value)</li>
- * <li>-123 (byte value)</li>
- * <li>-0xFF (byte value)</li>
- * <li>-0XDF (byte value)</li>
- * <li>-0D1 (byte value)</li>
- * <li>MIN_VALUE (ignoring case)</li>
- * <li>MIN (ignoring case)</li>
- * <li>MAX_VALUE (ignoring case)</li>
- * <li>MAX (ignoring case)</li>
- * </ul>
- */
-public class ByteConverter implements PropertyConverter<Byte>{
-
- private final Logger LOG = Logger.getLogger(getClass().getName());
-
- @Override
- public Byte convert(String value, ConversionContext context) {
- context.addSupportedFormats(getClass(),"<byte>", "MIN_VALUE", "MIN", "MAX_VALUE", "MAX");
- String trimmed = Objects.requireNonNull(value).trim();
- switch(trimmed.toUpperCase(Locale.ENGLISH)){
- case "MIN_VALUE":
- case "MIN":
- return Byte.MIN_VALUE;
- case "MAX_VALUE":
- case "MAX":
- return Byte.MAX_VALUE;
- default:
- try{
- return Byte.decode(trimmed);
- }
- catch(Exception e){
- LOG.log(Level.FINEST, "Unparseable Byte: " + value);
- return null;
- }
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/43468987/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
deleted file mode 100644
index dd6f557..0000000
--- a/code/core/src/main/java/org/apache/tamaya/core/internal/converters/CharConverter.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * 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.core.internal.converters;
-
-import org.apache.tamaya.spi.ConversionContext;
-import org.apache.tamaya.spi.PropertyConverter;
-
-import java.util.Objects;
-import java.util.logging.Logger;
-
-/**
- * Converter, converting from String to Character, the supported format is one of the following:
- * <ul>
- * <li>'a'</li>
- * <li>123 (byte value)</li>
- * <li>0xFF (byte value)</li>
- * <li>0XDF (byte value)</li>
- * <li>0D1 (byte value)</li>
- * </ul>
- */
-public class CharConverter implements PropertyConverter<Character>{
-
- private static final Logger LOG = Logger.getLogger(CharConverter.class.getName());
-
- @Override
- public Character convert(String value, ConversionContext context) {
- context.addSupportedFormats(getClass(),"\\'<char>\\'", "<char>", "<charNum>");
- String trimmed = Objects.requireNonNull(value).trim();
- if(trimmed.isEmpty()){
- return null;
- }
- if(trimmed.startsWith("'")) {
- try {
- trimmed = trimmed.substring(1, trimmed.length() - 1);
- if (trimmed.isEmpty()) {
- return null;
- }
- return trimmed.charAt(0);
- } catch (Exception e) {
- LOG.finest("Invalid character format encountered: '" + value + "', valid formats are 'a', 101 and a.");
- return null;
- }
- }
- try {
- Integer val = Integer.parseInt(trimmed);
- return (char) val.shortValue();
- } catch (Exception e) {
- LOG.finest("Character format is not numeric: '" + value + "', using first character.");
- return trimmed.charAt(0);
- }
- }
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/43468987/code/core/src/main/java/org/apache/tamaya/core/internal/converters/ClassConverter.java
----------------------------------------------------------------------
diff --git a/code/core/src/main/java/org/apache/tamaya/core/internal/converters/ClassConverter.java b/code/core/src/main/java/org/apache/tamaya/core/internal/converters/ClassConverter.java
deleted file mode 100644
index 15e78d2..0000000
--- a/code/core/src/main/java/org/apache/tamaya/core/internal/converters/ClassConverter.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * 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.core.internal.converters;
-
-import org.apache.tamaya.spi.ConversionContext;
-import org.apache.tamaya.spi.PropertyConverter;
-
-import java.util.Objects;
-import java.util.logging.Logger;
-
-/**
- * Converter, converting from String to Class, hereby using the following classloaders:
- * <ul>
- * <li>The current ThreadContext ClassLoader</li>
- * <li>The Classloader of this class</li>
- * <li>The system Classloader</li>
- * </ul>
- */
-public class ClassConverter implements PropertyConverter<Class<?>>{
-
- private final Logger LOG = Logger.getLogger(getClass().getName());
-
- @Override
- public Class<?> convert(String value, ConversionContext context) {
- context.addSupportedFormats(getClass(),"<fullyQualifiedClassName>");
- String trimmed = Objects.requireNonNull(value).trim();
- try{
- return Class.forName(trimmed, false, Thread.currentThread().getContextClassLoader());
- }
- catch(Exception e){
- LOG.finest("Class not found in context CL: " + trimmed);
- }
- try{
- return Class.forName(trimmed, false, ClassConverter.class.getClassLoader());
- }
- catch(Exception e){
- LOG.finest("Class not found in ClassConverter's CL: " + trimmed);
- }
- try{
- return Class.forName(trimmed, false, ClassLoader.getSystemClassLoader());
- }
- catch(Exception e){
- LOG.finest("Class not found in System CL (giving up): " + trimmed);
- return null;
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/43468987/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
deleted file mode 100644
index f774693..0000000
--- a/code/core/src/main/java/org/apache/tamaya/core/internal/converters/CurrencyConverter.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * 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.core.internal.converters;
-
-import org.apache.tamaya.spi.ConversionContext;
-import org.apache.tamaya.spi.PropertyConverter;
-
-import java.util.Currency;
-import java.util.Locale;
-import java.util.Objects;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-/**
- * Converter, converting from String to Currency, the supported format is one of the following:
- * <ul>
- * <li>CHF (currency code)</li>
- * <li>123 (numeric currency value >
- * = 0)</li>
- * <li>DE (ISO 2-digit country)</li>
- * <li>de_DE, de_DE_123 (Locale)</li>
- * </ul>
- */
-public class CurrencyConverter implements PropertyConverter<Currency> {
-
- private static final Logger LOG = Logger.getLogger(CurrencyConverter.class.getName());
-
- @Override
- public Currency convert(String value, ConversionContext context) {
- context.addSupportedFormats(getClass(), "<currencyCode>, using Locale.ENGLISH", "<numericValue>", "<locale>");
- String trimmed = Objects.requireNonNull(value).trim();
- try {
- return Currency.getInstance(trimmed.toUpperCase(Locale.ENGLISH));
- } catch (Exception e) {
- LOG.log(Level.FINEST, "Not a valid textual currency code: " + trimmed + ", checking for numeric...", e);
- }
- try {
- // Check for numeric code
- Integer numCode = Integer.parseInt(trimmed);
- for (Currency currency : Currency.getAvailableCurrencies()) {
- if (currency.getNumericCode() == numCode) {
- return currency;
- }
- }
- } catch (Exception e) {
- LOG.log(Level.FINEST, "Not a valid numeric currency code: " + trimmed + ", checking for locale...", e);
- }
- try {
- // Check for numeric code
- String[] parts = trimmed.split("\\_");
- Locale locale;
- switch (parts.length) {
- case 1:
- locale = new Locale("", parts[0]);
- break;
- case 2:
- locale = new Locale(parts[0], parts[1]);
- break;
- case 3:
- locale = new Locale(parts[0], parts[1], parts[2]);
- break;
- default:
- locale = null;
- }
- if (locale != null) {
- return Currency.getInstance(locale);
- }
- LOG.finest("Not a valid currency: " + trimmed + ", giving up...");
- } catch (Exception e) {
- LOG.log(Level.FINEST, "Not a valid country locale for currency: " + trimmed + ", giving up...", e);
- }
- return null;
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/43468987/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
deleted file mode 100644
index 791632d..0000000
--- a/code/core/src/main/java/org/apache/tamaya/core/internal/converters/DoubleConverter.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * 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.core.internal.converters;
-
-import org.apache.tamaya.spi.ConversionContext;
-import org.apache.tamaya.spi.PropertyConverter;
-
-import java.util.Locale;
-import java.util.Objects;
-import java.util.logging.Logger;
-
-/**
- * Converter, converting from String to Double, using the Java number syntax:
- * (-)?[0-9]*\.[0-9]*. In case of error the value given also is tried being parsed as integral number using
- * {@link LongConverter}. Additionally the following values are supported:
- * <ul>
- * <li>NaN (ignoring case)</li>
- * <li>POSITIVE_INFINITY (ignoring case)</li>
- * <li>NEGATIVE_INFINITY (ignoring case)</li>
- * </ul>
- */
-public class DoubleConverter implements PropertyConverter<Double> {
- /**
- * The logger.
- */
- private static final Logger LOG = Logger.getLogger(DoubleConverter.class.getName());
- /**
- * The converter used, when floating point parse failed.
- */
- private final LongConverter integerConverter = new LongConverter();
-
- @Override
- public Double convert(String value, ConversionContext context) {
- context.addSupportedFormats(getClass(), "<double>", "MIN", "MIN_VALUE", "MAX", "MAX_VALUE", "POSITIVE_INFINITY", "NEGATIVE_INFINITY", "NAN");
- String trimmed = Objects.requireNonNull(value).trim();
- switch (trimmed.toUpperCase(Locale.ENGLISH)) {
- case "POSITIVE_INFINITY":
- return Double.POSITIVE_INFINITY;
- case "NEGATIVE_INFINITY":
- return Double.NEGATIVE_INFINITY;
- case "NAN":
- return Double.NaN;
- case "MIN_VALUE":
- case "MIN":
- return Double.MIN_VALUE;
- case "MAX_VALUE":
- case "MAX":
- return Double.MAX_VALUE;
- default:
- try {
- return Double.valueOf(trimmed);
- } catch (Exception e) {
- // OK perhaps we have an integral number that must be converted to the double type...
- LOG.finest("Parsing of double as floating number failed, trying parsing integral" +
- " number/hex instead...");
- }
- Long val = integerConverter.convert(trimmed, context);
- if(val!=null){
- return val.doubleValue();
- }
- return null;
- }
-
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/43468987/code/core/src/main/java/org/apache/tamaya/core/internal/converters/EnumConverter.java
----------------------------------------------------------------------
diff --git a/code/core/src/main/java/org/apache/tamaya/core/internal/converters/EnumConverter.java b/code/core/src/main/java/org/apache/tamaya/core/internal/converters/EnumConverter.java
deleted file mode 100644
index 01c15eb..0000000
--- a/code/core/src/main/java/org/apache/tamaya/core/internal/converters/EnumConverter.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * 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.core.internal.converters;
-
-import org.apache.tamaya.ConfigException;
-import org.apache.tamaya.spi.ConversionContext;
-import org.apache.tamaya.spi.PropertyConverter;
-
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.util.Locale;
-import java.util.Objects;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-/**
- * Converter, converting from String to tge given enum type.
- */
-public class EnumConverter<T> implements PropertyConverter<T> {
- private final Logger LOG = Logger.getLogger(EnumConverter.class.getName());
- private Class<T> enumType;
- private Method factory;
-
- public EnumConverter(Class<T> enumType) {
- if (!Enum.class.isAssignableFrom(enumType)) {
- throw new IllegalArgumentException("Not an Enum: " + enumType.getName());
- }
- this.enumType = Objects.requireNonNull(enumType);
- try {
- this.factory = enumType.getMethod("valueOf", String.class);
- } catch (NoSuchMethodException e) {
- throw new ConfigException("Uncovertible enum type without valueOf method found, please provide a custom " +
- "PropertyConverter for: " + enumType.getName());
- }
- }
-
- @Override
- public T convert(String value, ConversionContext context) {
- context.addSupportedFormats(getClass(),"<enumValue>");
- try {
- return (T) factory.invoke(null, value);
- } catch (InvocationTargetException | IllegalAccessException e) {
- LOG.log(Level.FINEST, "Invalid enum value '" + value + "' for " + enumType.getName(), e);
- }
- try {
- return (T) factory.invoke(null, value.toUpperCase(Locale.ENGLISH));
- } catch (InvocationTargetException | IllegalAccessException e) {
- LOG.log(Level.FINEST, "Invalid enum value '" + value + "' for " + enumType.getName(), e);
- }
- return null;
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/43468987/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
deleted file mode 100644
index d66f1f9..0000000
--- a/code/core/src/main/java/org/apache/tamaya/core/internal/converters/FloatConverter.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * 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.core.internal.converters;
-
-import org.apache.tamaya.spi.ConversionContext;
-import org.apache.tamaya.spi.PropertyConverter;
-
-import java.util.Locale;
-import java.util.Objects;
-import java.util.logging.Logger;
-
-/**
- * Converter, converting from String to Float, using the Java number syntax:
- * (-)?[0-9]*\.[0-9]*. In case of error the value given also is tried being parsed as integral number using
- * {@link LongConverter}. Additionally the following values are supported:
- * <ul>
- * <li>NaN (ignoring case)</li>
- * <li>POSITIVE_INFINITY (ignoring case)</li>
- * <li>NEGATIVE_INFINITY (ignoring case)</li>
- * </ul>
- */
-public class FloatConverter implements PropertyConverter<Float> {
- /**
- * The logger.
- */
- private static final Logger LOG = Logger.getLogger(FloatConverter.class.getName());
- /**
- * The converter used, when floating point parse failed.
- */
- private final IntegerConverter integerConverter = new IntegerConverter();
-
- @Override
- public Float convert(String value, ConversionContext context) {
- context.addSupportedFormats(getClass(), "<float>", "MIN", "MIN_VALUE", "MAX", "MAX_VALUE", "POSITIVE_INFINITY", "NEGATIVE_INFINITY", "NAN");
- String trimmed = Objects.requireNonNull(value).trim();
- switch(trimmed.toUpperCase(Locale.ENGLISH)){
- case "POSITIVE_INFINITY":
- return Float.POSITIVE_INFINITY;
- case "NEGATIVE_INFINITY":
- return Float.NEGATIVE_INFINITY;
- case "NAN":
- return Float.NaN;
- case "MIN_VALUE":
- case "MIN":
- return Float.MIN_VALUE;
- case "MAX_VALUE":
- case "MAX":
- return Float.MAX_VALUE;
- default:
- try {
- return Float.valueOf(trimmed);
- } catch(Exception e){
- // OK perhaps we have an integral number that must be converted to the double type...
- LOG.finest("Parsing of float as floating number failed, trying parsing integral" +
- " number/hex instead...");
- }
- Integer val = integerConverter.convert(trimmed, context);
- if(val!=null) {
- return val.floatValue();
- }
- LOG.finest("Unparseable float value: " + trimmed);
- return null;
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/43468987/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
deleted file mode 100644
index 313cb63..0000000
--- a/code/core/src/main/java/org/apache/tamaya/core/internal/converters/IntegerConverter.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * 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.core.internal.converters;
-
-import org.apache.tamaya.spi.ConversionContext;
-import org.apache.tamaya.spi.PropertyConverter;
-
-import java.util.Locale;
-import java.util.Objects;
-import java.util.logging.Logger;
-
-/**
- * Converter, converting from String to Integer, the supported format is one of the following:
- * <ul>
- * <li>123 (byte value)</li>
- * <li>0xFF (byte value)</li>
- * <li>0XDF (byte value)</li>
- * <li>0D1 (byte value)</li>
- * <li>-123 (byte value)</li>
- * <li>-0xFF (byte value)</li>
- * <li>-0XDF (byte value)</li>
- * <li>-0D1 (byte value)</li>
- * <li>MIN_VALUE (ignoring case)</li>
- * <li>MIN (ignoring case)</li>
- * <li>MAX_VALUE (ignoring case)</li>
- * <li>MAX (ignoring case)</li>
- * </ul>
- */
-public class IntegerConverter implements PropertyConverter<Integer>{
-
- /**
- * The logger.
- */
- private static final Logger LOG = Logger.getLogger(IntegerConverter.class.getName());
-
- @Override
- public Integer convert(String value, ConversionContext context) {
- context.addSupportedFormats(getClass(), "<int>", "MIN_VALUE", "MIN", "MAX_VALUE", "MAX");
- String trimmed = Objects.requireNonNull(value).trim();
- switch(trimmed.toUpperCase(Locale.ENGLISH)){
- case "MIN_VALUE":
- case "MIN":
- return Integer.MIN_VALUE;
- case "MAX_VALUE":
- case "MAX":
- return Integer.MAX_VALUE;
- default:
- try{
- return Integer.decode(trimmed);
- }
- catch(Exception e){
- LOG.finest("Unparseable Integer value: " + trimmed);
- return null;
- }
- }
-
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/43468987/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
deleted file mode 100644
index 11cda90..0000000
--- a/code/core/src/main/java/org/apache/tamaya/core/internal/converters/LongConverter.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * 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.core.internal.converters;
-
-import org.apache.tamaya.spi.ConversionContext;
-import org.apache.tamaya.spi.PropertyConverter;
-
-import java.util.Locale;
-import java.util.Objects;
-import java.util.logging.Logger;
-
-/**
- * Converter, converting from String to Long, the supported format is one of the following:
- * <ul>
- * <li>123 (byte value)</li>
- * <li>0xFF (byte value)</li>
- * <li>0XDF (byte value)</li>
- * <li>0D1 (byte value)</li>
- * <li>-123 (byte value)</li>
- * <li>-0xFF (byte value)</li>
- * <li>-0XDF (byte value)</li>
- * <li>-0D1 (byte value)</li>
- * <li>MIN_VALUE (ignoring case)</li>
- * <li>MIN (ignoring case)</li>
- * <li>MAX_VALUE (ignoring case)</li>
- * <li>MAX (ignoring case)</li>
- * </ul>
- */
-public class LongConverter implements PropertyConverter<Long>{
-
- private static final Logger LOGGER = Logger.getLogger(LongConverter.class.getName());
-
- @Override
- public Long convert(String value, ConversionContext context) {
- context.addSupportedFormats(getClass(), "<long>", "MIN", "MIN_VALUE", "MAX", "MAX_VALUE");
-
- String trimmed = Objects.requireNonNull(value).trim();
- switch (trimmed.toUpperCase(Locale.ENGLISH)) {
- case "MIN_VALUE":
- case "MIN":
- return Long.MIN_VALUE;
- case "MAX_VALUE":
- case "MAX":
- return Long.MAX_VALUE;
- default:
- try {
- return Long.decode(trimmed);
- }
- catch(Exception e){
- LOGGER.finest("Unable to parse Long value: " + value);
- return null;
- }
- }
-
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/43468987/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
deleted file mode 100644
index d267580..0000000
--- a/code/core/src/main/java/org/apache/tamaya/core/internal/converters/NumberConverter.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * 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.core.internal.converters;
-
-import org.apache.tamaya.spi.ConversionContext;
-import org.apache.tamaya.spi.PropertyConverter;
-
-import java.math.BigDecimal;
-import java.util.Locale;
-import java.util.Objects;
-import java.util.logging.Logger;
-
-/**
- * Converter, converting from String to Number. Valid inputs are:
- * <pre>
- * POSITIVE_INFINITY -> Double.POSITIVE_INFINITY
- * NEGATIVE_INFINITY -> Double.NEGATIVE_INFINITY
- * NaN > Double.NaN
- * 0xFFDCD3D2 -> Long
- * 1234566789.23642327352735273752 -> new BigDecimal(input)
- * </pre>
- */
-public class NumberConverter implements PropertyConverter<Number>{
- /** the logger. */
- private static final Logger LOGGER = Logger.getLogger(NumberConverter.class.getName());
- /** Converter used for trying to parse as an integral value. */
- private final LongConverter longConverter = new LongConverter();
-
- @Override
- public Number convert(String value, ConversionContext context) {
- context.addSupportedFormats(getClass(), "<double>, <long>", "0x (hex)", "0X... (hex)", "POSITIVE_INFINITY",
- "NEGATIVE_INFINITY", "NAN");
-
- String trimmed = Objects.requireNonNull(value).trim();
- switch(trimmed.toUpperCase(Locale.ENGLISH)) {
- case "POSITIVE_INFINITY":
- return Double.POSITIVE_INFINITY;
- case "NEGATIVE_INFINITY":
- return Double.NEGATIVE_INFINITY;
- case "NAN":
- return Double.NaN;
- default:
- Long lVal = longConverter.convert(trimmed, context);
- if (lVal != null) {
- return lVal;
- }
- try{
- return new BigDecimal(trimmed);
- }
- catch(Exception e){
- LOGGER.finest("Unparseable Number: " + trimmed);
- return null;
- }
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/43468987/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
deleted file mode 100644
index dd9ebdd..0000000
--- a/code/core/src/main/java/org/apache/tamaya/core/internal/converters/ShortConverter.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * 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.core.internal.converters;
-
-import org.apache.tamaya.spi.ConversionContext;
-import org.apache.tamaya.spi.PropertyConverter;
-
-import java.util.Locale;
-import java.util.Objects;
-import java.util.logging.Logger;
-
-/**
- * Converter, converting from String to Short, the supported format is one of the following:
- * <ul>
- * <li>123 (byte value)</li>
- * <li>0xFF (byte value)</li>
- * <li>0XDF (byte value)</li>
- * <li>0D1 (byte value)</li>
- * <li>-123 (byte value)</li>
- * <li>-0xFF (byte value)</li>
- * <li>-0XDF (byte value)</li>
- * <li>-0D1 (byte value)</li>
- * <li>MIN_VALUE (ignoring case)</li>
- * <li>MIN (ignoring case)</li>
- * <li>MAX_VALUE (ignoring case)</li>
- * <li>MAX (ignoring case)</li>
- * </ul>
- */
-public class ShortConverter implements PropertyConverter<Short>{
-
- /** the logger. */
- private static final Logger LOG = Logger.getLogger(ShortConverter.class.getName());
-
- @Override
- public Short convert(String value, ConversionContext context) {
- context.addSupportedFormats(getClass(), "short", "MIN", "MIN_VALUE", "MAX", "MAX_VALUE");
- String trimmed = Objects.requireNonNull(value).trim();
- switch(trimmed.toUpperCase(Locale.ENGLISH)){
- case "MIN_VALUE":
- case "MIN":
- return Short.MIN_VALUE;
- case "MAX_VALUE":
- case "MAX":
- return Short.MAX_VALUE;
- default:
- try{
- return Short.decode(trimmed);
- }
- catch(Exception e){
- LOG.finest("Unparseable Short: " + trimmed);
- return null;
- }
- }
- }
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/43468987/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
deleted file mode 100644
index ac30bfc..0000000
--- a/code/core/src/main/java/org/apache/tamaya/core/internal/converters/URIConverter.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * 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.core.internal.converters;
-
-import org.apache.tamaya.spi.ConversionContext;
-import org.apache.tamaya.spi.PropertyConverter;
-
-import java.net.URI;
-import java.util.Objects;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-/**
- * Converter, converting from String to URI, using new URI(value).
- */
-public class URIConverter implements PropertyConverter<URI> {
-
- private final Logger LOG = Logger.getLogger(getClass().getName());
-
- @Override
- public URI convert(String value, ConversionContext context) {
- context.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;
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/43468987/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
deleted file mode 100644
index 9a85a16..0000000
--- a/code/core/src/main/java/org/apache/tamaya/core/internal/converters/URLConverter.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * 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.core.internal.converters;
-
-import org.apache.tamaya.spi.ConversionContext;
-import org.apache.tamaya.spi.PropertyConverter;
-
-import java.net.URL;
-import java.util.Objects;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-/**
- * Converter, converting from String to URI, using new URL(value).
- */
-public class URLConverter implements PropertyConverter<URL> {
-
- private final Logger LOG = Logger.getLogger(getClass().getName());
-
- @Override
- public URL convert(String value, ConversionContext context) {
- context.addSupportedFormats(getClass(),"<URL>");
- String trimmed = Objects.requireNonNull(value).trim();
- try {
- return new URL(trimmed);
- } catch (Exception e) {
- LOG.log(Level.FINE, "Unparseable URL: " + trimmed, e);
- }
- return null;
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/43468987/code/core/src/main/java/org/apache/tamaya/core/propertysource/BasePropertySource.java
----------------------------------------------------------------------
diff --git a/code/core/src/main/java/org/apache/tamaya/core/propertysource/BasePropertySource.java b/code/core/src/main/java/org/apache/tamaya/core/propertysource/BasePropertySource.java
deleted file mode 100644
index 3745537..0000000
--- a/code/core/src/main/java/org/apache/tamaya/core/propertysource/BasePropertySource.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- * 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.core.propertysource;
-
-import org.apache.tamaya.spi.PropertySource;
-import org.apache.tamaya.spi.PropertyValue;
-import org.apache.tamaya.spi.PropertyValueBuilder;
-
-import java.util.Map;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-/**
- * Abstract {@link org.apache.tamaya.spi.PropertySource} that allows to set a default ordinal that will be used, if no
- * ordinal is provided with the config.
- */
-public abstract class BasePropertySource implements PropertySource{
- /** default ordinal that will be used, if no ordinal is provided with the config. */
- private final int defaultOrdinal;
-
- /**
- * Constructor.
- * @param defaultOrdinal default ordinal that will be used, if no ordinal is provided with the config.
- */
- protected BasePropertySource(int defaultOrdinal){
- this.defaultOrdinal = defaultOrdinal;
- }
-
- /**
- * Constructor, using a default ordinal of 0.
- */
- protected BasePropertySource(){
- this(0);
- }
-
- @Override
- public String getName() {
- return getClass().getSimpleName();
- }
-
- @Override
- public int getOrdinal() {
- PropertyValue configuredOrdinal = get(TAMAYA_ORDINAL);
-
- if(configuredOrdinal!=null){
- try {
- return Integer.parseInt(configuredOrdinal.getValue());
- } catch (Exception e) {
- Logger.getLogger(getClass().getName()).log(Level.WARNING,
- "Configured Ordinal is not an int number: " + configuredOrdinal.getValue(), e);
- }
- }
- return getDefaultOrdinal();
- }
-
- /**
- * Returns the default ordinal used, when no ordinal is set, or the ordinal was not parseable to an int value.
- * @return the default ordinal used, by default 0.
- */
- public int getDefaultOrdinal(){
- return defaultOrdinal;
- }
-
- @Override
- public PropertyValue get(String key) {
- Map<String,String> properties = getProperties();
- String val = properties.get(key);
- if(val==null){
- return null;
- }
- PropertyValueBuilder b = new PropertyValueBuilder(key, val, getName());
- String metaKeyStart = "_" + key + ".";
- for(Map.Entry<String,String> en:properties.entrySet()) {
- if(en.getKey().startsWith(metaKeyStart) && en.getValue()!=null){
- b.addContextData(en.getKey().substring(metaKeyStart.length()), en.getValue());
- }
- }
- return b.build();
- }
-
- @Override
- public boolean isScannable(){
- return true;
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/43468987/code/core/src/main/java/org/apache/tamaya/core/propertysource/CLIPropertySource.java
----------------------------------------------------------------------
diff --git a/code/core/src/main/java/org/apache/tamaya/core/propertysource/CLIPropertySource.java b/code/core/src/main/java/org/apache/tamaya/core/propertysource/CLIPropertySource.java
deleted file mode 100644
index e2d5299..0000000
--- a/code/core/src/main/java/org/apache/tamaya/core/propertysource/CLIPropertySource.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- * 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.core.propertysource;
-
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Objects;
-
-/**
- * PropertySource that allows to add the programs main arguments as configuration entries. Unix syntax using '--' and
- * '-' params is supported.
- */
-public class CLIPropertySource extends BasePropertySource{
-
- /** The original main arguments. */
- private static String[] args = new String[0];
-
- /** The map of parsed main arguments. */
- private static Map<String,String> mainArgs;
-
- /** Initializes the initial state. */
- static{
- initMainArgs(args);
- }
-
-
- /**
- * Creates a new instance.
- */
- public CLIPropertySource(){}
-
- /**
- * Configure the main arguments, hereby parsing and mapping the main arguments into
- * configuration propertiesi as key-value pairs.
- * @param args the main arguments, not null.
- */
- public static void initMainArgs(String... args){
- CLIPropertySource.args = Objects.requireNonNull(args);
- // TODO is there a way to figure out the args?
- String argsProp = System.getProperty("main.args");
- if(argsProp!=null){
- CLIPropertySource.args = argsProp.split("\\s");
- }
- Map<String,String> result = null;
- if(CLIPropertySource.args==null){
- result = Collections.emptyMap();
- }else{
- result = new HashMap<>();
- String prefix = System.getProperty("main.args.prefix");
- if(prefix==null){
- prefix="";
- }
- String key = null;
- for(String arg:CLIPropertySource.args){
- if(arg.startsWith("--")){
- arg = arg.substring(2);
- int index = arg.indexOf("=");
- if(index>0){
- key = arg.substring(0,index).trim();
- result.put(prefix+key, arg.substring(index+1).trim());
- key = null;
- }else{
- result.put(prefix+arg, arg);
- }
- }else if(arg.startsWith("-")){
- key = arg.substring(1);
- }else{
- if(key!=null){
- result.put(prefix+key, arg);
- key = null;
- }else{
- result.put(prefix+arg, arg);
- }
- }
- }
- }
- CLIPropertySource.mainArgs = Collections.unmodifiableMap(result);
- }
-
- @Override
- public Map<String, String> getProperties() {
- return Collections.unmodifiableMap(mainArgs);
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/43468987/code/core/src/main/java/org/apache/tamaya/core/propertysource/EnvironmentPropertySource.java
----------------------------------------------------------------------
diff --git a/code/core/src/main/java/org/apache/tamaya/core/propertysource/EnvironmentPropertySource.java b/code/core/src/main/java/org/apache/tamaya/core/propertysource/EnvironmentPropertySource.java
deleted file mode 100644
index ee5fda0..0000000
--- a/code/core/src/main/java/org/apache/tamaya/core/propertysource/EnvironmentPropertySource.java
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
- * 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.core.propertysource;
-
-import org.apache.tamaya.spi.PropertySource;
-import org.apache.tamaya.spi.PropertyValue;
-
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.logging.Logger;
-
-/**
- * This {@link org.apache.tamaya.spi.PropertySource} provides all Properties which are set
- * via
- * {@code export myprop=myval} on UNIX Systems or
- * {@code set myprop=myval} on Windows. You can disable this feature by setting {@code tamaya.envprops.disable}
- * or {@code tamaya.defaults.disable}.
- */
-public class EnvironmentPropertySource implements PropertySource {
-
- private static final Logger LOG = Logger.getLogger(EnvironmentPropertySource.class.getName());
-
- /**
- * default ordinal for {@link org.apache.tamaya.core.propertysource.EnvironmentPropertySource}
- */
- public static final int DEFAULT_ORDINAL = 300;
-
- private final boolean disabled = evaluateDisabled();
-
- private boolean evaluateDisabled() {
- String value = System.getProperty("tamaya.envprops.disable");
- if(value==null){
- value = System.getenv("tamaya.envprops.disable");
- }
- if(value==null){
- value = System.getProperty("tamaya.defaults.disable");
- }
- if(value==null){
- value = System.getenv("tamaya.defaults.disable");
- }
- if(value==null){
- return false;
- }
- return value.isEmpty() || Boolean.parseBoolean(value);
- }
-
- @Override
- public int getOrdinal() {
- return DEFAULT_ORDINAL;
- }
-
- @Override
- public String getName() {
- if(disabled){
- return "environment-properties(disabled)";
- }
- return "environment-properties";
- }
-
- @Override
- public PropertyValue get(String key) {
- if(disabled){
- return null;
- }
- return PropertyValue.of(key, System.getenv(key), getName());
- }
-
- @Override
- public Map<String, String> getProperties() {
- if(disabled){
- return Collections.emptyMap();
- }
- Map<String, String> entries = new HashMap<>(System.getenv());
- for (Map.Entry<String, String> entry : System.getenv().entrySet()) {
- entries.put("_" + entry.getKey() + ".source", getName());
- }
- return entries;
- }
-
- @Override
- public boolean isScannable() {
- return true;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/43468987/code/core/src/main/java/org/apache/tamaya/core/propertysource/SimplePropertySource.java
----------------------------------------------------------------------
diff --git a/code/core/src/main/java/org/apache/tamaya/core/propertysource/SimplePropertySource.java b/code/core/src/main/java/org/apache/tamaya/core/propertysource/SimplePropertySource.java
deleted file mode 100644
index 8268a72..0000000
--- a/code/core/src/main/java/org/apache/tamaya/core/propertysource/SimplePropertySource.java
+++ /dev/null
@@ -1,136 +0,0 @@
-/*
- * 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.core.propertysource;
-
-import org.apache.tamaya.ConfigException;
-
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.URL;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Objects;
-import java.util.Properties;
-import java.util.logging.Logger;
-
-/**
- * Simple implementation of a {@link org.apache.tamaya.spi.PropertySource} for properties-files.
- */
-public class SimplePropertySource extends BasePropertySource {
-
- private static final Logger LOG = Logger.getLogger(SimplePropertySource.class.getName());
- /**
- * The property source name.
- */
- private String name;
- /**
- * The current properties.
- */
- private Map<String, String> properties;
-
- /**
- * Creates a new Properties based PropertySource based on the given URL.
- *
- * @param propertiesLocation the URL encoded location, not null.
- */
- public SimplePropertySource(File propertiesLocation) {
- super(0);
- try {
- this.name = propertiesLocation.toString();
- this.properties = load(propertiesLocation.toURI().toURL());
- } catch (IOException e) {
- throw new ConfigException("Failed to load properties from " + propertiesLocation, e);
- }
- }
-
- /**
- * Creates a new Properties based PropertySource based on the given URL.
- *
- * @param propertiesLocation the URL encoded location, not null.
- */
- public SimplePropertySource(URL propertiesLocation) {
- super(0);
- this.properties = load(propertiesLocation);
- this.name = propertiesLocation.toString();
- }
-
- /**
- * Creates a new Properties based PropertySource based on the given properties map.
- *
- * @param name the name, not null.
- * @param properties the properties, not null.
- */
- public SimplePropertySource(String name, Map<String, String> properties) {
- super(0);
- this.properties = new HashMap<>(properties);
- this.name = Objects.requireNonNull(name);
- }
-
- /**
- * Creates a new Properties based PropertySource based on the given URL.
- *
- * @param name The property source name
- * @param propertiesLocation the URL encoded location, not null.
- */
- public SimplePropertySource(String name, URL propertiesLocation) {
- super(0);
- this.properties = load(propertiesLocation);
- this.name = Objects.requireNonNull(name);
- }
-
- @Override
- public String getName() {
- return name;
- }
-
- @Override
- public Map<String, String> getProperties() {
- return this.properties;
- }
-
- /**
- * loads the Properties from the given URL
- *
- * @param propertiesFile {@link java.net.URL} to load Properties from
- * @return loaded {@link java.util.Properties}
- * @throws IllegalStateException in case of an error while reading properties-file
- */
- private Map<String, String> load(URL propertiesFile) {
- Map<String, String> properties = new HashMap<>();
- try (InputStream stream = propertiesFile.openStream()) {
- Properties props = new Properties();
- if (stream != null) {
- props.load(stream);
- }
- for (String key : props.stringPropertyNames()) {
- properties.put(key, props.getProperty(key));
- if(getName()==null){
- LOG.warning("No Property Source name found for " + this +", ommitting source meta-entries.");
- }else {
- properties.put("_" + key + ".source", getName());
- }
- }
- } catch (IOException e) {
- throw new ConfigException("Error loading properties " + propertiesFile, e);
- }
- return properties;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/43468987/code/core/src/main/java/org/apache/tamaya/core/propertysource/SystemPropertySource.java
----------------------------------------------------------------------
diff --git a/code/core/src/main/java/org/apache/tamaya/core/propertysource/SystemPropertySource.java b/code/core/src/main/java/org/apache/tamaya/core/propertysource/SystemPropertySource.java
deleted file mode 100644
index 40576fa..0000000
--- a/code/core/src/main/java/org/apache/tamaya/core/propertysource/SystemPropertySource.java
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
- * 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.core.propertysource;
-
-import org.apache.tamaya.spi.PropertySource;
-import org.apache.tamaya.spi.PropertyValue;
-import org.apache.tamaya.spi.PropertyValueBuilder;
-
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Properties;
-
-/**
- * This {@link org.apache.tamaya.spi.PropertySource} manages the system properties. You can disable this feature by
- * setting {@code tamaya.envprops.disable} or {@code tamaya.defaults.disable}.
- */
-public class SystemPropertySource implements PropertySource {
-
- /**
- * default ordinal for {@link org.apache.tamaya.core.propertysource.SystemPropertySource}
- */
- public static final int DEFAULT_ORDINAL = 1000;
-
- private volatile Map<String,String> cachedProperties;
-
- /**
- * previous System.getProperties().hashCode()
- * so we can check if we need to reload
- */
- private int previousHash;
-
- private final boolean disabled = evaluateDisabled();
-
- private boolean evaluateDisabled() {
- String value = System.getProperty("tamaya.sysprops.disable");
- if(value==null){
- value = System.getenv("tamaya.sysprops.disable");
- }
- if(value==null){
- value = System.getProperty("tamaya.defaults.disable");
- }
- if(value==null){
- value = System.getenv("tamaya.defaults.disable");
- }
- if(value==null){
- return false;
- }
- return value.isEmpty() || Boolean.parseBoolean(value);
- }
-
-
-
- public SystemPropertySource() {
- cachedProperties = loadProperties();
- previousHash = System.getProperties().hashCode();
- }
-
- private Map<String, String> loadProperties() {
- Map<String,String> props = new HashMap<>();
- Properties sysProps = System.getProperties();
- for(String name: sysProps.stringPropertyNames()) {
- props.put(name,sysProps.getProperty(name));
- props.put("_"+name+".source",getName());
- }
- return props;
- }
-
- @Override
- public int getOrdinal() {
- return DEFAULT_ORDINAL;
- }
-
- @Override
- public String getName() {
- if(disabled){
- return "system-properties(disabled)";
- }
- return "system-properties";
- }
-
- @Override
- public PropertyValue get(String key) {
- if(disabled){
- return null;
- }
- return PropertyValue.of(key, System.getProperty(key), getName());
- }
-
- @Override
- public Map<String, String> getProperties() {
- if(disabled){
- return Collections.emptyMap();
- }
- // only need to reload and fill our map if something has changed
- // synchronization was removed, Instance was marked as volatile. In the worst case it
- // is reloaded twice, but the values will be the same.
- if (previousHash != System.getProperties().hashCode()) {
- Map<String, String> properties = loadProperties();
- this.cachedProperties = Collections.unmodifiableMap(properties);
- previousHash = System.getProperties().hashCode();
- }
- return this.cachedProperties;
- }
-
- @Override
- public boolean isScannable() {
- return true;
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/43468987/code/core/src/main/java/org/apache/tamaya/core/provider/JavaConfigurationProvider.java
----------------------------------------------------------------------
diff --git a/code/core/src/main/java/org/apache/tamaya/core/provider/JavaConfigurationProvider.java b/code/core/src/main/java/org/apache/tamaya/core/provider/JavaConfigurationProvider.java
deleted file mode 100644
index 331f88a..0000000
--- a/code/core/src/main/java/org/apache/tamaya/core/provider/JavaConfigurationProvider.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * 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.core.provider;
-
-import org.apache.tamaya.ConfigException;
-import org.apache.tamaya.core.propertysource.SimplePropertySource;
-import org.apache.tamaya.spi.PropertySource;
-import org.apache.tamaya.spi.PropertySourceProvider;
-
-import java.io.IOException;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Enumeration;
-import java.util.List;
-
-/**
- * Provider which reads all {@code javaconfiguration.properties} files from classpath. By setting
- * {@code tamaya.defaultprops.disable} or {@code tamaya.defaults.disable} as system or environment property this feature
- * can be disabled.
- */
-public class JavaConfigurationProvider implements PropertySourceProvider {
- /** Default location in the classpath, where Tamaya looks for configuration by default. */
- public static final String DEFAULT_PROPERTIES_FILE_NAME="META-INF/javaconfiguration.properties";
-
- private final boolean disabled = evaluateDisabled();
-
- private boolean evaluateDisabled() {
- String value = System.getProperty("tamaya.defaultprops.disable");
- if(value==null){
- value = System.getenv("tamaya.defaultprops.disable");
- }
- if(value==null){
- value = System.getProperty("tamaya.defaults.disable");
- }
- if(value==null){
- value = System.getenv("tamaya.defaults.disable");
- }
- if(value==null){
- return false;
- }
- return value.isEmpty() || Boolean.parseBoolean(value);
- }
-
- @Override
- public Collection<PropertySource> getPropertySources() {
- if(disabled){
- return Collections.emptySet();
- }
- List<PropertySource> propertySources = new ArrayList<>();
- try {
- ClassLoader cl = Thread.currentThread().getContextClassLoader();
- if(cl!=null) {
- Enumeration<URL> urls = Thread.currentThread().getContextClassLoader()
- .getResources(DEFAULT_PROPERTIES_FILE_NAME);
- while (urls.hasMoreElements()) {
- propertySources.add(new SimplePropertySource(urls.nextElement()));
- }
- }
-
- } catch (IOException e) {
- throw new ConfigException("Error while loading javaconfiguration.properties", e);
- }
- return Collections.unmodifiableList(propertySources);
- }
-
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/43468987/code/core/src/main/resources/META-INF/services/org.apache.tamaya.Configuration
----------------------------------------------------------------------
diff --git a/code/core/src/main/resources/META-INF/services/org.apache.tamaya.Configuration b/code/core/src/main/resources/META-INF/services/org.apache.tamaya.Configuration
index e51a247..4efdc7d 100644
--- a/code/core/src/main/resources/META-INF/services/org.apache.tamaya.Configuration
+++ b/code/core/src/main/resources/META-INF/services/org.apache.tamaya.Configuration
@@ -16,4 +16,4 @@
# specific language governing permissions and limitations
# under the License.
#
-org.apache.tamaya.core.internal.DefaultConfiguration
+org.apache.tamaya.core.DefaultConfiguration
http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/43468987/code/core/src/main/resources/META-INF/services/org.apache.tamaya.spi.ConfigurationContextBuilder
----------------------------------------------------------------------
diff --git a/code/core/src/main/resources/META-INF/services/org.apache.tamaya.spi.ConfigurationContextBuilder b/code/core/src/main/resources/META-INF/services/org.apache.tamaya.spi.ConfigurationContextBuilder
deleted file mode 100644
index 4efa42e..0000000
--- a/code/core/src/main/resources/META-INF/services/org.apache.tamaya.spi.ConfigurationContextBuilder
+++ /dev/null
@@ -1,19 +0,0 @@
-#
-# 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 current 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.
-#
-org.apache.tamaya.core.internal.DefaultConfigurationContextBuilder
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/43468987/code/core/src/main/resources/META-INF/services/org.apache.tamaya.spi.ConfigurationProviderSpi
----------------------------------------------------------------------
diff --git a/code/core/src/main/resources/META-INF/services/org.apache.tamaya.spi.ConfigurationProviderSpi b/code/core/src/main/resources/META-INF/services/org.apache.tamaya.spi.ConfigurationProviderSpi
deleted file mode 100644
index 7c0e249..0000000
--- a/code/core/src/main/resources/META-INF/services/org.apache.tamaya.spi.ConfigurationProviderSpi
+++ /dev/null
@@ -1,19 +0,0 @@
-#
-# 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 current 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.
-#
-org.apache.tamaya.core.internal.DefaultConfigurationProvider
http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/43468987/code/core/src/main/resources/META-INF/services/org.apache.tamaya.spi.PropertyConverter
----------------------------------------------------------------------
diff --git a/code/core/src/main/resources/META-INF/services/org.apache.tamaya.spi.PropertyConverter b/code/core/src/main/resources/META-INF/services/org.apache.tamaya.spi.PropertyConverter
deleted file mode 100644
index 93f7b11..0000000
--- a/code/core/src/main/resources/META-INF/services/org.apache.tamaya.spi.PropertyConverter
+++ /dev/null
@@ -1,33 +0,0 @@
-#
-# 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 current 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.
-#
-org.apache.tamaya.core.internal.converters.BooleanConverter
-org.apache.tamaya.core.internal.converters.ByteConverter
-org.apache.tamaya.core.internal.converters.CharConverter
-org.apache.tamaya.core.internal.converters.ClassConverter
-org.apache.tamaya.core.internal.converters.DoubleConverter
-org.apache.tamaya.core.internal.converters.FloatConverter
-org.apache.tamaya.core.internal.converters.IntegerConverter
-org.apache.tamaya.core.internal.converters.LongConverter
-org.apache.tamaya.core.internal.converters.ShortConverter
-org.apache.tamaya.core.internal.converters.BigDecimalConverter
-org.apache.tamaya.core.internal.converters.BigIntegerConverter
-org.apache.tamaya.core.internal.converters.CurrencyConverter
-org.apache.tamaya.core.internal.converters.NumberConverter
-org.apache.tamaya.core.internal.converters.URIConverter
-org.apache.tamaya.core.internal.converters.URLConverter
http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/43468987/code/core/src/main/resources/META-INF/services/org.apache.tamaya.spi.PropertySource
----------------------------------------------------------------------
diff --git a/code/core/src/main/resources/META-INF/services/org.apache.tamaya.spi.PropertySource b/code/core/src/main/resources/META-INF/services/org.apache.tamaya.spi.PropertySource
deleted file mode 100644
index 5bc940d..0000000
--- a/code/core/src/main/resources/META-INF/services/org.apache.tamaya.spi.PropertySource
+++ /dev/null
@@ -1,21 +0,0 @@
-#
-# 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 current 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.
-#
-org.apache.tamaya.core.propertysource.EnvironmentPropertySource
-org.apache.tamaya.core.propertysource.SystemPropertySource
-org.apache.tamaya.core.propertysource.CLIPropertySource
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/43468987/code/core/src/main/resources/META-INF/services/org.apache.tamaya.spi.PropertySourceProvider
----------------------------------------------------------------------
diff --git a/code/core/src/main/resources/META-INF/services/org.apache.tamaya.spi.PropertySourceProvider b/code/core/src/main/resources/META-INF/services/org.apache.tamaya.spi.PropertySourceProvider
deleted file mode 100644
index 4535a09..0000000
--- a/code/core/src/main/resources/META-INF/services/org.apache.tamaya.spi.PropertySourceProvider
+++ /dev/null
@@ -1,19 +0,0 @@
-#
-# 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 current 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.
-#
-org.apache.tamaya.core.provider.JavaConfigurationProvider
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/43468987/code/core/src/main/resources/META-INF/services/org.apache.tamaya.spi.ServiceContext
----------------------------------------------------------------------
diff --git a/code/core/src/main/resources/META-INF/services/org.apache.tamaya.spi.ServiceContext b/code/core/src/main/resources/META-INF/services/org.apache.tamaya.spi.ServiceContext
deleted file mode 100644
index f8e7e7f..0000000
--- a/code/core/src/main/resources/META-INF/services/org.apache.tamaya.spi.ServiceContext
+++ /dev/null
@@ -1,19 +0,0 @@
-#
-# 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 current 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.
-#
-org.apache.tamaya.core.internal.DefaultServiceContext
http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/43468987/code/core/src/test/java/org/apache/tamaya/core/internal/A.java
----------------------------------------------------------------------
diff --git a/code/core/src/test/java/org/apache/tamaya/core/internal/A.java b/code/core/src/test/java/org/apache/tamaya/core/internal/A.java
deleted file mode 100644
index aaab601..0000000
--- a/code/core/src/test/java/org/apache/tamaya/core/internal/A.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * 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.core.internal;
-
-/**
- * Test class for testing transitively evaluated property converters.
- */
-class A implements AutoCloseable{
- @Override
- public void close() throws Exception {
-
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/43468987/code/core/src/test/java/org/apache/tamaya/core/internal/B.java
----------------------------------------------------------------------
diff --git a/code/core/src/test/java/org/apache/tamaya/core/internal/B.java b/code/core/src/test/java/org/apache/tamaya/core/internal/B.java
deleted file mode 100644
index 31bafb6..0000000
--- a/code/core/src/test/java/org/apache/tamaya/core/internal/B.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * 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.core.internal;
-
-/**
- * Test class for testing transitively evaluated property converters.
- */
-public class B extends A implements Runnable{
- @Override
- public void run() {
-
- }
-}