tamaya-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anat...@apache.org
Subject [incubator-tamaya] 04/04: Fixed quality issues.
Date Tue, 14 May 2019 14:52:08 GMT
This is an automated email from the ASF dual-hosted git repository.

anatole pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-tamaya.git

commit 8dfffeac8c3b33d5832964f8be6f728d8f16c92c
Author: Anatole Tresch <atsticks@gmail.com>
AuthorDate: Tue May 14 16:51:00 2019 +0200

    Fixed quality issues.
---
 code/api/src/main/java/org/apache/tamaya/spi/PropertyValue.java   | 1 +
 code/api/src/main/java/org/apache/tamaya/spi/ServiceContext.java  | 2 --
 .../java/org/apache/tamaya/spi/ServiceContextManagerTest.java     | 2 --
 .../org/apache/tamaya/spi/TestLowerOrdinalServiceContext.java     | 1 -
 .../src/test/java/org/apache/tamaya/spi/TestServiceContext.java   | 1 -
 .../java/org/apache/tamaya/core/internal/OSGIServiceContext.java  | 1 -
 .../tamaya/core/internal/converters/LocalDateTimeConverter.java   | 1 -
 .../tamaya/core/internal/converters/YearMonthConverter.java       | 1 -
 .../org/apache/tamaya/core/internal/OSGIServiceContextTest.java   | 1 -
 .../org/apache/tamaya/spisupport/DefaultConfigurationContext.java | 8 +++++++-
 .../apache/tamaya/spisupport/DefaultConfigurationSnapshot.java    | 2 --
 .../org/apache/tamaya/spisupport/PropertyConverterManager.java    | 1 -
 .../propertysource/JavaConfigurationPropertySource.java           | 4 ----
 .../propertysource/PropertiesResourcePropertySource.java          | 1 -
 .../apache/tamaya/spisupport/services/DefaultServiceContext.java  | 2 --
 15 files changed, 8 insertions(+), 21 deletions(-)

diff --git a/code/api/src/main/java/org/apache/tamaya/spi/PropertyValue.java b/code/api/src/main/java/org/apache/tamaya/spi/PropertyValue.java
index 3e9da06..32e119e 100644
--- a/code/api/src/main/java/org/apache/tamaya/spi/PropertyValue.java
+++ b/code/api/src/main/java/org/apache/tamaya/spi/PropertyValue.java
@@ -136,6 +136,7 @@ public class PropertyValue implements Serializable, Iterable<PropertyValue>{
      * @param config the String based mapProperties, not {@code null}.
      * @param source the source name, not {@code null}.
      * @param metaData additional metadata, not {@code null}.
+     * @param prefix the prefix to add (optional).
      * @return the corresponding createValue based mapProperties.
      */
     public static Map<String, PropertyValue> mapProperties(Map<String, String>
config, String source,
diff --git a/code/api/src/main/java/org/apache/tamaya/spi/ServiceContext.java b/code/api/src/main/java/org/apache/tamaya/spi/ServiceContext.java
index ae82c07..cf3b2ea 100644
--- a/code/api/src/main/java/org/apache/tamaya/spi/ServiceContext.java
+++ b/code/api/src/main/java/org/apache/tamaya/spi/ServiceContext.java
@@ -19,7 +19,6 @@
 package org.apache.tamaya.spi;
 
 import javax.annotation.Priority;
-import java.io.IOException;
 import java.net.URL;
 import java.util.*;
 import java.util.function.Supplier;
@@ -169,7 +168,6 @@ public interface ServiceContext extends ClassloaderAware{
      * specific code to load resources, e.g. within OSGI environments.
      * @param resource the resource, not {@code null}.
      * @return the resources found
-     * @throws IOException if load fails.
      */
     default Collection<URL> getResources(String resource){
         List<URL> urls = new ArrayList<>();
diff --git a/code/api/src/test/java/org/apache/tamaya/spi/ServiceContextManagerTest.java b/code/api/src/test/java/org/apache/tamaya/spi/ServiceContextManagerTest.java
index 761a429..dd6bd73 100644
--- a/code/api/src/test/java/org/apache/tamaya/spi/ServiceContextManagerTest.java
+++ b/code/api/src/test/java/org/apache/tamaya/spi/ServiceContextManagerTest.java
@@ -20,11 +20,9 @@ package org.apache.tamaya.spi;
 
 import org.junit.Test;
 
-import java.io.IOException;
 import java.net.URL;
 import java.util.Collection;
 import java.util.Collections;
-import java.util.Enumeration;
 import java.util.List;
 import java.util.function.Supplier;
 
diff --git a/code/api/src/test/java/org/apache/tamaya/spi/TestLowerOrdinalServiceContext.java
b/code/api/src/test/java/org/apache/tamaya/spi/TestLowerOrdinalServiceContext.java
index 39bc87a..ac926d9 100644
--- a/code/api/src/test/java/org/apache/tamaya/spi/TestLowerOrdinalServiceContext.java
+++ b/code/api/src/test/java/org/apache/tamaya/spi/TestLowerOrdinalServiceContext.java
@@ -18,7 +18,6 @@
  */
 package org.apache.tamaya.spi;
 
-import java.io.IOException;
 import java.net.URL;
 import java.util.*;
 import java.util.function.Supplier;
diff --git a/code/api/src/test/java/org/apache/tamaya/spi/TestServiceContext.java b/code/api/src/test/java/org/apache/tamaya/spi/TestServiceContext.java
index 765c032..9dddd41 100644
--- a/code/api/src/test/java/org/apache/tamaya/spi/TestServiceContext.java
+++ b/code/api/src/test/java/org/apache/tamaya/spi/TestServiceContext.java
@@ -18,7 +18,6 @@
  */
 package org.apache.tamaya.spi;
 
-import java.io.IOException;
 import java.net.URL;
 import java.util.*;
 import java.util.concurrent.ConcurrentHashMap;
diff --git a/code/core/src/main/java/org/apache/tamaya/core/internal/OSGIServiceContext.java
b/code/core/src/main/java/org/apache/tamaya/core/internal/OSGIServiceContext.java
index 9eeac72..4cb820f 100644
--- a/code/core/src/main/java/org/apache/tamaya/core/internal/OSGIServiceContext.java
+++ b/code/core/src/main/java/org/apache/tamaya/core/internal/OSGIServiceContext.java
@@ -25,7 +25,6 @@ import org.osgi.framework.Bundle;
 import org.osgi.framework.InvalidSyntaxException;
 import org.osgi.framework.ServiceReference;
 
-import java.io.IOException;
 import java.net.URL;
 import java.util.*;
 import java.util.function.Supplier;
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 b7fedee..9983291 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
@@ -23,7 +23,6 @@ import org.apache.tamaya.spi.PropertyConverter;
 import org.osgi.service.component.annotations.Component;
 
 import java.time.LocalDateTime;
-import java.time.format.DateTimeFormatter;
 import java.util.Objects;
 import java.util.logging.Level;
 import java.util.logging.Logger;
diff --git a/code/core/src/main/java/org/apache/tamaya/core/internal/converters/YearMonthConverter.java
b/code/core/src/main/java/org/apache/tamaya/core/internal/converters/YearMonthConverter.java
index a66bffe..0bcf52d 100644
--- a/code/core/src/main/java/org/apache/tamaya/core/internal/converters/YearMonthConverter.java
+++ b/code/core/src/main/java/org/apache/tamaya/core/internal/converters/YearMonthConverter.java
@@ -22,7 +22,6 @@ import org.apache.tamaya.spi.ConversionContext;
 import org.apache.tamaya.spi.PropertyConverter;
 import org.osgi.service.component.annotations.Component;
 
-import java.time.LocalTime;
 import java.time.YearMonth;
 import java.util.Objects;
 import java.util.logging.Level;
diff --git a/code/core/src/test/java/org/apache/tamaya/core/internal/OSGIServiceContextTest.java
b/code/core/src/test/java/org/apache/tamaya/core/internal/OSGIServiceContextTest.java
index 9c69039..0f079a9 100644
--- a/code/core/src/test/java/org/apache/tamaya/core/internal/OSGIServiceContextTest.java
+++ b/code/core/src/test/java/org/apache/tamaya/core/internal/OSGIServiceContextTest.java
@@ -21,7 +21,6 @@ package org.apache.tamaya.core.internal;
 import java.io.IOException;
 import java.net.URL;
 import java.util.Collection;
-import java.util.Enumeration;
 import java.util.List;
 
 import org.junit.Test;
diff --git a/code/spi-support/src/main/java/org/apache/tamaya/spisupport/DefaultConfigurationContext.java
b/code/spi-support/src/main/java/org/apache/tamaya/spisupport/DefaultConfigurationContext.java
index 7d65fa5..d5ad696 100644
--- a/code/spi-support/src/main/java/org/apache/tamaya/spisupport/DefaultConfigurationContext.java
+++ b/code/spi-support/src/main/java/org/apache/tamaya/spisupport/DefaultConfigurationContext.java
@@ -19,7 +19,13 @@
 package org.apache.tamaya.spisupport;
 
 import org.apache.tamaya.TypeLiteral;
-import org.apache.tamaya.spi.*;
+import org.apache.tamaya.spi.ConfigurationContext;
+import org.apache.tamaya.spi.PropertyConverter;
+import org.apache.tamaya.spi.PropertyFilter;
+import org.apache.tamaya.spi.PropertySource;
+import org.apache.tamaya.spi.PropertyValue;
+import org.apache.tamaya.spi.ServiceContext;
+import org.apache.tamaya.spi.ServiceContextManager;
 
 import java.io.IOException;
 import java.io.ObjectInputStream;
diff --git a/code/spi-support/src/main/java/org/apache/tamaya/spisupport/DefaultConfigurationSnapshot.java
b/code/spi-support/src/main/java/org/apache/tamaya/spisupport/DefaultConfigurationSnapshot.java
index 15ee71c..9d2d9cb 100644
--- a/code/spi-support/src/main/java/org/apache/tamaya/spisupport/DefaultConfigurationSnapshot.java
+++ b/code/spi-support/src/main/java/org/apache/tamaya/spisupport/DefaultConfigurationSnapshot.java
@@ -24,8 +24,6 @@ import org.apache.tamaya.TypeLiteral;
 import org.apache.tamaya.spi.ConfigurationContext;
 import org.apache.tamaya.spi.PropertyConverter;
 
-import java.io.ObjectInputStream;
-import java.io.ObjectOutputStream;
 import java.io.Serializable;
 import java.util.*;
 import java.util.stream.Collectors;
diff --git a/code/spi-support/src/main/java/org/apache/tamaya/spisupport/PropertyConverterManager.java
b/code/spi-support/src/main/java/org/apache/tamaya/spisupport/PropertyConverterManager.java
index 0654712..a9ea77b 100644
--- a/code/spi-support/src/main/java/org/apache/tamaya/spisupport/PropertyConverterManager.java
+++ b/code/spi-support/src/main/java/org/apache/tamaya/spisupport/PropertyConverterManager.java
@@ -28,7 +28,6 @@ import java.lang.reflect.Constructor;
 import java.lang.reflect.Method;
 import java.lang.reflect.Modifier;
 import java.lang.reflect.Type;
-import java.net.URI;
 import java.security.AccessController;
 import java.security.PrivilegedAction;
 import java.util.*;
diff --git a/code/spi-support/src/main/java/org/apache/tamaya/spisupport/propertysource/JavaConfigurationPropertySource.java
b/code/spi-support/src/main/java/org/apache/tamaya/spisupport/propertysource/JavaConfigurationPropertySource.java
index 990a025..ca65c97 100644
--- a/code/spi-support/src/main/java/org/apache/tamaya/spisupport/propertysource/JavaConfigurationPropertySource.java
+++ b/code/spi-support/src/main/java/org/apache/tamaya/spisupport/propertysource/JavaConfigurationPropertySource.java
@@ -18,7 +18,6 @@
  */
 package org.apache.tamaya.spisupport.propertysource;
 
-import org.apache.tamaya.ConfigException;
 import org.apache.tamaya.spi.ChangeSupport;
 import org.apache.tamaya.spi.ClassloaderAware;
 import org.apache.tamaya.spi.PropertySource;
@@ -26,12 +25,9 @@ import org.apache.tamaya.spi.PropertyValue;
 import org.apache.tamaya.spi.ServiceContextManager;
 import org.apache.tamaya.spisupport.PropertySourceComparator;
 
-import java.io.IOException;
 import java.net.URL;
 import java.util.*;
 
-import static java.lang.String.format;
-
 /**
  * Provider which reads all {@value DEFAULT_SIMPLE_PROPERTIES_FILE_NAME} and
  * {@value DEFAULT_XML_PROPERTIES_FILE_NAME} files found in the
diff --git a/code/spi-support/src/main/java/org/apache/tamaya/spisupport/propertysource/PropertiesResourcePropertySource.java
b/code/spi-support/src/main/java/org/apache/tamaya/spisupport/propertysource/PropertiesResourcePropertySource.java
index 9cd264a..6f084aa 100644
--- a/code/spi-support/src/main/java/org/apache/tamaya/spisupport/propertysource/PropertiesResourcePropertySource.java
+++ b/code/spi-support/src/main/java/org/apache/tamaya/spisupport/propertysource/PropertiesResourcePropertySource.java
@@ -25,7 +25,6 @@ import org.apache.tamaya.spi.PropertyValue;
 import org.apache.tamaya.spi.ServiceContextManager;
 import org.apache.tamaya.spisupport.PropertySourceChangeSupport;
 
-import java.io.IOException;
 import java.io.InputStream;
 import java.net.URL;
 import java.util.*;
diff --git a/code/spi-support/src/test/java/org/apache/tamaya/spisupport/services/DefaultServiceContext.java
b/code/spi-support/src/test/java/org/apache/tamaya/spisupport/services/DefaultServiceContext.java
index 7bd0506..2686cdb 100644
--- a/code/spi-support/src/test/java/org/apache/tamaya/spisupport/services/DefaultServiceContext.java
+++ b/code/spi-support/src/test/java/org/apache/tamaya/spisupport/services/DefaultServiceContext.java
@@ -22,10 +22,8 @@ import org.apache.tamaya.ConfigException;
 import org.apache.tamaya.spi.ClassloaderAware;
 import org.apache.tamaya.spi.ServiceContext;
 import org.apache.tamaya.spisupport.PriorityServiceComparator;
-import org.apache.tamaya.spisupport.propertysource.SimplePropertySource;
 
 import javax.annotation.Priority;
-import java.io.IOException;
 import java.net.URL;
 import java.text.MessageFormat;
 import java.util.*;


Mime
View raw message