tamaya-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pottlin...@apache.org
Subject incubator-tamaya git commit: TAMAYA-294: Eliminate Eclipse warnings
Date Sat, 21 Oct 2017 20:15:41 GMT
Repository: incubator-tamaya
Updated Branches:
  refs/heads/master 9b88f32b3 -> 695a9aa7a


TAMAYA-294: Eliminate Eclipse warnings


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

Branch: refs/heads/master
Commit: 695a9aa7a7db11b966f92456778c417a62d231d1
Parents: 9b88f32
Author: Phil Ottlinger <pottlinger@apache.org>
Authored: Sat Oct 21 22:15:19 2017 +0200
Committer: Phil Ottlinger <pottlinger@apache.org>
Committed: Sat Oct 21 22:15:19 2017 +0200

----------------------------------------------------------------------
 code/api/src/main/java/org/apache/tamaya/TypeLiteral.java      | 3 ++-
 .../org/apache/tamaya/spi/ConfigurationContextBuilder.java     | 4 ++--
 .../src/main/java/org/apache/tamaya/spi/ConversionContext.java | 6 +++---
 .../api/src/main/java/org/apache/tamaya/spi/FilterContext.java | 2 +-
 .../src/main/java/org/apache/tamaya/spi/PropertyConverter.java | 5 +----
 5 files changed, 9 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/695a9aa7/code/api/src/main/java/org/apache/tamaya/TypeLiteral.java
----------------------------------------------------------------------
diff --git a/code/api/src/main/java/org/apache/tamaya/TypeLiteral.java b/code/api/src/main/java/org/apache/tamaya/TypeLiteral.java
index 89c875d..74b6e18 100644
--- a/code/api/src/main/java/org/apache/tamaya/TypeLiteral.java
+++ b/code/api/src/main/java/org/apache/tamaya/TypeLiteral.java
@@ -122,7 +122,8 @@ public class TypeLiteral<T> implements Serializable {
      *
      * @return the actual type represented by this object
      */
-    public final Class<T> getRawType() {
+    @SuppressWarnings("unchecked")
+	public final Class<T> getRawType() {
         Class<T> rawType;
 
         if (this.definedType instanceof Class) {

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/695a9aa7/code/api/src/main/java/org/apache/tamaya/spi/ConfigurationContextBuilder.java
----------------------------------------------------------------------
diff --git a/code/api/src/main/java/org/apache/tamaya/spi/ConfigurationContextBuilder.java
b/code/api/src/main/java/org/apache/tamaya/spi/ConfigurationContextBuilder.java
index f1fbe4e..8aa0d05 100644
--- a/code/api/src/main/java/org/apache/tamaya/spi/ConfigurationContextBuilder.java
+++ b/code/api/src/main/java/org/apache/tamaya/spi/ConfigurationContextBuilder.java
@@ -236,7 +236,7 @@ public interface ConfigurationContextBuilder {
      * @return this builder, for chaining, never null.
      */
     <T> ConfigurationContextBuilder addPropertyConverters(TypeLiteral<T> typeToConvert,
-                                                          PropertyConverter<T>... propertyConverters);
+                                                          @SuppressWarnings("unchecked")
PropertyConverter<T>... propertyConverters);
 
     /**
      * This method can be used for adding {@link PropertyConverter}s.
@@ -268,7 +268,7 @@ public interface ConfigurationContextBuilder {
      * @return this builder, for chaining, never null.
      */
     <T> ConfigurationContextBuilder removePropertyConverters(TypeLiteral<T> typeToConvert,
-                                                             PropertyConverter<T>...
propertyConverters);
+                                                             @SuppressWarnings("unchecked")
PropertyConverter<T>... propertyConverters);
 
     /**
      * Removes the given PropertyConverter instances for the given type,

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/695a9aa7/code/api/src/main/java/org/apache/tamaya/spi/ConversionContext.java
----------------------------------------------------------------------
diff --git a/code/api/src/main/java/org/apache/tamaya/spi/ConversionContext.java b/code/api/src/main/java/org/apache/tamaya/spi/ConversionContext.java
index 4553e52..e039cf2 100644
--- a/code/api/src/main/java/org/apache/tamaya/spi/ConversionContext.java
+++ b/code/api/src/main/java/org/apache/tamaya/spi/ConversionContext.java
@@ -96,7 +96,7 @@ public class ConversionContext {
      * @param converterType the converter, which implements the formats provided.
      * @param formatDescriptors the format descriptions in a human readable form, e.g. as
regular expressions.
      */
-    public void addSupportedFormats(Class<? extends PropertyConverter> converterType,
String... formatDescriptors){
+    public void addSupportedFormats(@SuppressWarnings("rawtypes") Class<? extends PropertyConverter>
converterType, String... formatDescriptors){
         synchronized (supportedFormats){
             for(String format: formatDescriptors) {
                 supportedFormats.add(format + " (" + converterType.getSimpleName() + ")");
@@ -224,7 +224,7 @@ public class ConversionContext {
          * @param targetType the
          * @return the builder for chaining.
          */
-        public Builder setTargetType(TypeLiteral targetType) {
+        public Builder setTargetType(@SuppressWarnings("rawtypes") TypeLiteral targetType)
{
             this.targetType = Objects.requireNonNull(targetType);
             return this;
         }
@@ -236,7 +236,7 @@ public class ConversionContext {
          * @param formatDescriptors the formats supported in a human readable form, e.g.
as regular expressions.
          * @return the builder instance, for chaining
          */
-        public Builder addSupportedFormats(Class<? extends PropertyConverter> converterType,
String... formatDescriptors){
+        public Builder addSupportedFormats(@SuppressWarnings("rawtypes") Class<? extends
PropertyConverter> converterType, String... formatDescriptors){
             for(String format: formatDescriptors) {
                 supportedFormats.add(format + " (" + converterType.getSimpleName() + ")");
             }

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/695a9aa7/code/api/src/main/java/org/apache/tamaya/spi/FilterContext.java
----------------------------------------------------------------------
diff --git a/code/api/src/main/java/org/apache/tamaya/spi/FilterContext.java b/code/api/src/main/java/org/apache/tamaya/spi/FilterContext.java
index 411c732..76babb5 100644
--- a/code/api/src/main/java/org/apache/tamaya/spi/FilterContext.java
+++ b/code/api/src/main/java/org/apache/tamaya/spi/FilterContext.java
@@ -36,7 +36,7 @@ public class FilterContext {
     /** tHE CURRENT CONTEXT. */
     private final ConfigurationContext context;
     @Experimental
-    private Map<String, PropertyValue> configEntries = new HashMap();
+    private Map<String, PropertyValue> configEntries = new HashMap<>();
     @Experimental
     private boolean singlePropertyScoped;
 

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/695a9aa7/code/api/src/main/java/org/apache/tamaya/spi/PropertyConverter.java
----------------------------------------------------------------------
diff --git a/code/api/src/main/java/org/apache/tamaya/spi/PropertyConverter.java b/code/api/src/main/java/org/apache/tamaya/spi/PropertyConverter.java
index 56ac5e6..ab96b6b 100644
--- a/code/api/src/main/java/org/apache/tamaya/spi/PropertyConverter.java
+++ b/code/api/src/main/java/org/apache/tamaya/spi/PropertyConverter.java
@@ -18,13 +18,10 @@
  */
 package org.apache.tamaya.spi;
 
-
-import jdk.nashorn.internal.objects.annotations.Function;
-
 /**
  * Interface for an property that converts a configured String into something else.
  * This is used for implementing type conversion from a property (String) to a certain target
- * type. Hereby the target type can be multivalued (e.g. collections) or complex if needed.
+ * type. Hereby the target type can be multi-value (e.g. collections) or complex if needed.
  * 
  * @param <T> the type of the type literal
  */


Mime
View raw message