tamaya-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anat...@apache.org
Subject [2/4] incubator-tamaya git commit: TAMAYA-63: Fixed checlstyle warnings.
Date Fri, 13 Feb 2015 20:18:16 GMT
TAMAYA-63: Fixed checlstyle 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/0e6044b1
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tamaya/tree/0e6044b1
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tamaya/diff/0e6044b1

Branch: refs/heads/master
Commit: 0e6044b19f706d51808758122b0a44dfb7e58a30
Parents: f97d12b
Author: anatole <anatole@apache.org>
Authored: Fri Feb 13 21:11:46 2015 +0100
Committer: anatole <anatole@apache.org>
Committed: Fri Feb 13 21:17:14 2015 +0100

----------------------------------------------------------------------
 .../core/internal/converters/URLConverter.java  |  7 ++---
 .../core/internal/converters/URiConverter.java  |  7 ++---
 .../core/internal/converters/ByteConverter.java | 16 +++++-----
 .../internal/converters/ClassConverter.java     | 14 ++++-----
 .../internal/converters/IntegerConverter.java   |  7 ++---
 .../internal/converters/NumberConverter.java    | 14 +++++----
 .../internal/converters/ShortConverter.java     | 33 ++++++++++----------
 .../core/internal/converters/URLConverter.java  |  4 +--
 .../core/internal/converters/URiConverter.java  |  6 ++--
 .../internal/converters/ZoneIdConverter.java    |  5 +--
 modules/pom.xml                                 |  2 +-
 11 files changed, 55 insertions(+), 60 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/0e6044b1/java7/core/src/main/java/org/apache/tamaya/core/internal/converters/URLConverter.java
----------------------------------------------------------------------
diff --git a/java7/core/src/main/java/org/apache/tamaya/core/internal/converters/URLConverter.java
b/java7/core/src/main/java/org/apache/tamaya/core/internal/converters/URLConverter.java
index c91fab6..272fdd8 100644
--- a/java7/core/src/main/java/org/apache/tamaya/core/internal/converters/URLConverter.java
+++ b/java7/core/src/main/java/org/apache/tamaya/core/internal/converters/URLConverter.java
@@ -28,17 +28,16 @@ import java.util.logging.Logger;
 /**
  * Converter, converting from String to URI, using new URL(value).
  */
-public class URLConverter implements PropertyConverter<URL>{
+public class URLConverter implements PropertyConverter<URL> {
 
     private Logger LOG = Logger.getLogger(getClass().getName());
 
     @Override
     public URL convert(String value) {
         String trimmed = Objects.requireNonNull(value).trim();
-        try{
+        try {
             return new URL(trimmed);
-        }
-        catch(Exception e){
+        } catch (Exception e) {
             LOG.log(Level.FINE, "Unparseable URL: " + trimmed, e);
         }
         return null;

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/0e6044b1/java7/core/src/main/java/org/apache/tamaya/core/internal/converters/URiConverter.java
----------------------------------------------------------------------
diff --git a/java7/core/src/main/java/org/apache/tamaya/core/internal/converters/URiConverter.java
b/java7/core/src/main/java/org/apache/tamaya/core/internal/converters/URiConverter.java
index b422d10..14a7f1d 100644
--- a/java7/core/src/main/java/org/apache/tamaya/core/internal/converters/URiConverter.java
+++ b/java7/core/src/main/java/org/apache/tamaya/core/internal/converters/URiConverter.java
@@ -28,17 +28,16 @@ import java.util.logging.Logger;
 /**
  * Converter, converting from String to URI, using new URI(value).
  */
-public class URiConverter implements PropertyConverter<URI>{
+public class URiConverter implements PropertyConverter<URI> {
 
     private Logger LOG = Logger.getLogger(getClass().getName());
 
     @Override
     public URI convert(String value) {
         String trimmed = Objects.requireNonNull(value).trim();
-        try{
+        try {
             return new URI(trimmed);
-        }
-        catch(Exception e){
+        } catch (Exception e) {
             LOG.log(Level.FINE, "Unparseable URI: " + trimmed, e);
         }
         return null;

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/0e6044b1/java8/core/src/main/java/org/apache/tamaya/core/internal/converters/ByteConverter.java
----------------------------------------------------------------------
diff --git a/java8/core/src/main/java/org/apache/tamaya/core/internal/converters/ByteConverter.java
b/java8/core/src/main/java/org/apache/tamaya/core/internal/converters/ByteConverter.java
index b12eeab..7802d25 100644
--- a/java8/core/src/main/java/org/apache/tamaya/core/internal/converters/ByteConverter.java
+++ b/java8/core/src/main/java/org/apache/tamaya/core/internal/converters/ByteConverter.java
@@ -27,21 +27,21 @@ import java.util.logging.Logger;
 /**
  * Converter, converting from String to Byte, the supported format is one of the following:
  * <ul>
- *     <li>0xFF</li>
- *     <li>0XFF</li>
- *     <li>45</li>
- *     <li>-34</li>
- *     <li>0D1</li>
+ * <li>0xFF</li>
+ * <li>0XFF</li>
+ * <li>45</li>
+ * <li>-34</li>
+ * <li>0D1</li>
  * </ul>
  */
-public class ByteConverter implements PropertyConverter<Byte>{
+public class ByteConverter implements PropertyConverter<Byte> {
 
     private Logger LOG = Logger.getLogger(getClass().getName());
 
     @Override
     public Byte convert(String value) {
         String trimmed = Objects.requireNonNull(value).trim();
-        switch(trimmed.toUpperCase(Locale.ENGLISH)){
+        switch (trimmed.toUpperCase(Locale.ENGLISH)) {
             case "MIN_VALUE":
             case "MIN":
                 return Byte.MIN_VALUE;
@@ -51,7 +51,7 @@ public class ByteConverter implements PropertyConverter<Byte>{
             default:
                 try {
                     return Byte.decode(trimmed);
-                } catch (Exception e){
+                } catch (Exception e) {
                     LOG.finest("Failed to parse Byte value: " + value);
                     return null;
                 }

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/0e6044b1/java8/core/src/main/java/org/apache/tamaya/core/internal/converters/ClassConverter.java
----------------------------------------------------------------------
diff --git a/java8/core/src/main/java/org/apache/tamaya/core/internal/converters/ClassConverter.java
b/java8/core/src/main/java/org/apache/tamaya/core/internal/converters/ClassConverter.java
index 740d1d7..75fb3fa 100644
--- a/java8/core/src/main/java/org/apache/tamaya/core/internal/converters/ClassConverter.java
+++ b/java8/core/src/main/java/org/apache/tamaya/core/internal/converters/ClassConverter.java
@@ -26,12 +26,12 @@ 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>
+ * <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<?>>{
+public class ClassConverter implements PropertyConverter<Class<?>> {
 
     private Logger LOG = Logger.getLogger(getClass().getName());
 
@@ -43,16 +43,14 @@ public class ClassConverter implements PropertyConverter<Class<?>>{
         } catch (Exception e) {
             LOG.finest("Class not found in context CL: " + trimmed);
         }
-
         try {
             return Class.forName(trimmed, false, ClassConverter.class.getClassLoader());
-        } catch(Exception e) {
+        } catch (Exception e) {
             LOG.finest("Class not found in ClassConverter's CL: " + trimmed);
         }
-
         try {
             return Class.forName(trimmed, false, ClassLoader.getSystemClassLoader());
-        } catch (Exception e){
+        } 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/0e6044b1/java8/core/src/main/java/org/apache/tamaya/core/internal/converters/IntegerConverter.java
----------------------------------------------------------------------
diff --git a/java8/core/src/main/java/org/apache/tamaya/core/internal/converters/IntegerConverter.java
b/java8/core/src/main/java/org/apache/tamaya/core/internal/converters/IntegerConverter.java
index d9f1afb..6358719 100644
--- a/java8/core/src/main/java/org/apache/tamaya/core/internal/converters/IntegerConverter.java
+++ b/java8/core/src/main/java/org/apache/tamaya/core/internal/converters/IntegerConverter.java
@@ -51,8 +51,7 @@ public class IntegerConverter implements PropertyConverter<Integer>{
     @Override
     public Integer convert(String value) {
         String trimmed = Objects.requireNonNull(value).trim();
-
-        switch(trimmed.toUpperCase(Locale.ENGLISH)) {
+        switch (trimmed.toUpperCase(Locale.ENGLISH)) {
             case "MIN_VALUE":
             case "MIN":
                 return Integer.MIN_VALUE;
@@ -60,9 +59,9 @@ public class IntegerConverter implements PropertyConverter<Integer>{
             case "MAX":
                 return Integer.MAX_VALUE;
             default:
-                try {
+                try{
                     return Integer.decode(trimmed);
-                } catch (Exception e){
+                } catch (Exception e) {
                     LOG.finest(() -> "Unparseable Integer value: " + trimmed);
                     return null;
                 }

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/0e6044b1/java8/core/src/main/java/org/apache/tamaya/core/internal/converters/NumberConverter.java
----------------------------------------------------------------------
diff --git a/java8/core/src/main/java/org/apache/tamaya/core/internal/converters/NumberConverter.java
b/java8/core/src/main/java/org/apache/tamaya/core/internal/converters/NumberConverter.java
index 7b726ce..4f9b01e 100644
--- a/java8/core/src/main/java/org/apache/tamaya/core/internal/converters/NumberConverter.java
+++ b/java8/core/src/main/java/org/apache/tamaya/core/internal/converters/NumberConverter.java
@@ -37,15 +37,19 @@ import java.util.logging.Logger;
  */
 public class NumberConverter implements PropertyConverter<Number> {
 
-    /** the logger. */
+    /**
+     * the logger.
+     */
     private static final Logger LOGGER = Logger.getLogger(NumberConverter.class.getName());
-    /** Converter used for trying to parse as an integral value. */
+    /**
+     * Converter used for trying to parse as an integral value.
+     */
     private LongConverter longConverter = new LongConverter();
 
     @Override
     public Number convert(String value) {
         String trimmed = Objects.requireNonNull(value).trim();
-        switch(trimmed.toUpperCase(Locale.ENGLISH)) {
+        switch (trimmed.toUpperCase(Locale.ENGLISH)) {
             case "POSITIVE_INFINITY":
                 return Double.POSITIVE_INFINITY;
             case "NEGATIVE_INFINITY":
@@ -54,14 +58,12 @@ public class NumberConverter implements PropertyConverter<Number>
{
                 return Double.NaN;
             default:
                 Long lVal = longConverter.convert(trimmed);
-
                 if (lVal != null) {
                     return lVal;
                 }
-
                 try {
                     return new BigDecimal(trimmed);
-                } catch (Exception e){
+                } catch (Exception e) {
                     LOGGER.finest("Unparseable Number: " + trimmed);
                     return null;
                 }

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/0e6044b1/java8/core/src/main/java/org/apache/tamaya/core/internal/converters/ShortConverter.java
----------------------------------------------------------------------
diff --git a/java8/core/src/main/java/org/apache/tamaya/core/internal/converters/ShortConverter.java
b/java8/core/src/main/java/org/apache/tamaya/core/internal/converters/ShortConverter.java
index 3c2a30b..9e28007 100644
--- a/java8/core/src/main/java/org/apache/tamaya/core/internal/converters/ShortConverter.java
+++ b/java8/core/src/main/java/org/apache/tamaya/core/internal/converters/ShortConverter.java
@@ -27,30 +27,31 @@ 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>
+ * <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>{
+public class ShortConverter implements PropertyConverter<Short> {
 
-    /** the logger. */
+    /**
+     * the logger.
+     */
     private static final Logger LOG = Logger.getLogger(ShortConverter.class.getName());
 
     @Override
     public Short convert(String value) {
         String trimmed = Objects.requireNonNull(value).trim();
-
-        switch(trimmed.toUpperCase(Locale.ENGLISH)) {
+        switch (trimmed.toUpperCase(Locale.ENGLISH)) {
             case "MIN_VALUE":
             case "MIN":
                 return Short.MIN_VALUE;

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/0e6044b1/java8/core/src/main/java/org/apache/tamaya/core/internal/converters/URLConverter.java
----------------------------------------------------------------------
diff --git a/java8/core/src/main/java/org/apache/tamaya/core/internal/converters/URLConverter.java
b/java8/core/src/main/java/org/apache/tamaya/core/internal/converters/URLConverter.java
index bb84cd0..27470a5 100644
--- a/java8/core/src/main/java/org/apache/tamaya/core/internal/converters/URLConverter.java
+++ b/java8/core/src/main/java/org/apache/tamaya/core/internal/converters/URLConverter.java
@@ -28,20 +28,18 @@ import java.util.logging.Logger;
 /**
  * Converter, converting from String to URI, using new URL(value).
  */
-public class URLConverter implements PropertyConverter<URL>{
+public class URLConverter implements PropertyConverter<URL> {
 
     private Logger LOG = Logger.getLogger(getClass().getName());
 
     @Override
     public URL convert(String value) {
         String trimmed = Objects.requireNonNull(value).trim();
-
         try {
             return new URL(trimmed);
         } catch (Exception e) {
             LOG.log(Level.FINE, e, () -> "Unparseable URL: " + trimmed);
         }
-
         return null;
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/0e6044b1/java8/core/src/main/java/org/apache/tamaya/core/internal/converters/URiConverter.java
----------------------------------------------------------------------
diff --git a/java8/core/src/main/java/org/apache/tamaya/core/internal/converters/URiConverter.java
b/java8/core/src/main/java/org/apache/tamaya/core/internal/converters/URiConverter.java
index 08fd6ae..2c29ecc 100644
--- a/java8/core/src/main/java/org/apache/tamaya/core/internal/converters/URiConverter.java
+++ b/java8/core/src/main/java/org/apache/tamaya/core/internal/converters/URiConverter.java
@@ -28,20 +28,18 @@ import java.util.logging.Logger;
 /**
  * Converter, converting from String to URI, using new URI(value).
  */
-public class URiConverter implements PropertyConverter<URI> {
+public class URiConverter implements PropertyConverter<URI>{
 
     private Logger LOG = Logger.getLogger(getClass().getName());
 
     @Override
     public URI convert(String value) {
         String trimmed = Objects.requireNonNull(value).trim();
-
         try {
             return new URI(trimmed);
-        } catch (Exception e){
+        } catch (Exception e) {
             LOG.log(Level.FINE, e, () -> "Unparseable URI: " + trimmed);
         }
-
         return null;
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/0e6044b1/java8/core/src/main/java/org/apache/tamaya/core/internal/converters/ZoneIdConverter.java
----------------------------------------------------------------------
diff --git a/java8/core/src/main/java/org/apache/tamaya/core/internal/converters/ZoneIdConverter.java
b/java8/core/src/main/java/org/apache/tamaya/core/internal/converters/ZoneIdConverter.java
index 6ed7ed6..fcbfbd4 100644
--- a/java8/core/src/main/java/org/apache/tamaya/core/internal/converters/ZoneIdConverter.java
+++ b/java8/core/src/main/java/org/apache/tamaya/core/internal/converters/ZoneIdConverter.java
@@ -29,13 +29,14 @@ import java.util.logging.Logger;
  */
 public class ZoneIdConverter implements PropertyConverter<ZoneId> {
 
-    /** the logger. */
+    /**
+     * the logger.
+     */
     private static final Logger LOG = Logger.getLogger(ShortConverter.class.getName());
 
     @Override
     public ZoneId convert(String value) {
         String trimmed = Objects.requireNonNull(value).trim();
-
         try {
             return ZoneId.of(trimmed);
         } catch (Exception e) {

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/0e6044b1/modules/pom.xml
----------------------------------------------------------------------
diff --git a/modules/pom.xml b/modules/pom.xml
index 5b5d9a2..5702415 100644
--- a/modules/pom.xml
+++ b/modules/pom.xml
@@ -37,7 +37,7 @@ under the License.
         <module>builder</module>
         <module>apiextensions</module>
         <module>injection</module>
-        <!--<module>formats</module>-->
+        <module>formats</module>
         <module>json</module>
         <module>resolver</module>
         <module>resources</module>


Mime
View raw message