commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ohe...@apache.org
Subject svn commit: r1535148 - in /commons/proper/beanutils/branches/java5/src: main/java/org/apache/commons/beanutils/converters/ test/java/org/apache/commons/beanutils/converters/
Date Wed, 23 Oct 2013 20:14:48 GMT
Author: oheger
Date: Wed Oct 23 20:14:47 2013
New Revision: 1535148

URL: http://svn.apache.org/r1535148
Log:
Removed the generic parameter for default type from AbstractConverter.

This parameter had little purpose as the default value can be set as Object
anyway - it is converted if necessary.

Modified:
    commons/proper/beanutils/branches/java5/src/main/java/org/apache/commons/beanutils/converters/AbstractConverter.java
    commons/proper/beanutils/branches/java5/src/main/java/org/apache/commons/beanutils/converters/ArrayConverter.java
    commons/proper/beanutils/branches/java5/src/main/java/org/apache/commons/beanutils/converters/BigDecimalConverter.java
    commons/proper/beanutils/branches/java5/src/main/java/org/apache/commons/beanutils/converters/BigIntegerConverter.java
    commons/proper/beanutils/branches/java5/src/main/java/org/apache/commons/beanutils/converters/BooleanConverter.java
    commons/proper/beanutils/branches/java5/src/main/java/org/apache/commons/beanutils/converters/ByteConverter.java
    commons/proper/beanutils/branches/java5/src/main/java/org/apache/commons/beanutils/converters/DoubleConverter.java
    commons/proper/beanutils/branches/java5/src/main/java/org/apache/commons/beanutils/converters/FloatConverter.java
    commons/proper/beanutils/branches/java5/src/main/java/org/apache/commons/beanutils/converters/IntegerConverter.java
    commons/proper/beanutils/branches/java5/src/main/java/org/apache/commons/beanutils/converters/LongConverter.java
    commons/proper/beanutils/branches/java5/src/main/java/org/apache/commons/beanutils/converters/NumberConverter.java
    commons/proper/beanutils/branches/java5/src/main/java/org/apache/commons/beanutils/converters/ShortConverter.java
    commons/proper/beanutils/branches/java5/src/test/java/org/apache/commons/beanutils/converters/ArrayConverterTestCase.java
    commons/proper/beanutils/branches/java5/src/test/java/org/apache/commons/beanutils/converters/BigDecimalConverterTestCase.java
    commons/proper/beanutils/branches/java5/src/test/java/org/apache/commons/beanutils/converters/BigIntegerConverterTestCase.java
    commons/proper/beanutils/branches/java5/src/test/java/org/apache/commons/beanutils/converters/ByteConverterTestCase.java
    commons/proper/beanutils/branches/java5/src/test/java/org/apache/commons/beanutils/converters/DoubleConverterTestCase.java
    commons/proper/beanutils/branches/java5/src/test/java/org/apache/commons/beanutils/converters/FloatConverterTestCase.java
    commons/proper/beanutils/branches/java5/src/test/java/org/apache/commons/beanutils/converters/IntegerConverterTestCase.java
    commons/proper/beanutils/branches/java5/src/test/java/org/apache/commons/beanutils/converters/LongConverterTestCase.java
    commons/proper/beanutils/branches/java5/src/test/java/org/apache/commons/beanutils/converters/NumberConverterTestBase.java
    commons/proper/beanutils/branches/java5/src/test/java/org/apache/commons/beanutils/converters/ShortConverterTestCase.java

Modified: commons/proper/beanutils/branches/java5/src/main/java/org/apache/commons/beanutils/converters/AbstractConverter.java
URL: http://svn.apache.org/viewvc/commons/proper/beanutils/branches/java5/src/main/java/org/apache/commons/beanutils/converters/AbstractConverter.java?rev=1535148&r1=1535147&r2=1535148&view=diff
==============================================================================
--- commons/proper/beanutils/branches/java5/src/main/java/org/apache/commons/beanutils/converters/AbstractConverter.java
(original)
+++ commons/proper/beanutils/branches/java5/src/main/java/org/apache/commons/beanutils/converters/AbstractConverter.java
Wed Oct 23 20:14:47 2013
@@ -51,11 +51,10 @@ import org.apache.commons.logging.LogFac
  * tries to transform the default value to the requested target type.
  * If this fails, a {@code ConversionException} if thrown.
  *
- * @param <D> the default conversion target type of this converter
  * @version $Id$
  * @since 1.8.0
  */
-public abstract class AbstractConverter<D> implements Converter {
+public abstract class AbstractConverter implements Converter {
 
     /** Debug logging message to indicate default value configuration */
     private static final String DEFAULT_CONFIG_MSG =
@@ -79,7 +78,7 @@ public abstract class AbstractConverter<
     /**
      * The default value specified to our Constructor, if any.
      */
-    private D defaultValue = null;
+    private Object defaultValue = null;
 
     // ----------------------------------------------------------- Constructors
 
@@ -98,7 +97,7 @@ public abstract class AbstractConverter<
      * if the value to be converted is missing or an error
      * occurs converting the value.
      */
-    public AbstractConverter(D defaultValue) {
+    public AbstractConverter(Object defaultValue) {
         setDefaultValue(defaultValue);
     }
 
@@ -363,7 +362,7 @@ public abstract class AbstractConverter<
      *
      * @return The default type this <code>Converter</code> handles.
      */
-    protected abstract Class<? extends D> getDefaultType();
+    protected abstract Class<?> getDefaultType();
 
     /**
      * Return the default value for conversions to the specified

Modified: commons/proper/beanutils/branches/java5/src/main/java/org/apache/commons/beanutils/converters/ArrayConverter.java
URL: http://svn.apache.org/viewvc/commons/proper/beanutils/branches/java5/src/main/java/org/apache/commons/beanutils/converters/ArrayConverter.java?rev=1535148&r1=1535147&r2=1535148&view=diff
==============================================================================
--- commons/proper/beanutils/branches/java5/src/main/java/org/apache/commons/beanutils/converters/ArrayConverter.java
(original)
+++ commons/proper/beanutils/branches/java5/src/main/java/org/apache/commons/beanutils/converters/ArrayConverter.java
Wed Oct 23 20:14:47 2013
@@ -126,9 +126,9 @@ import org.apache.commons.beanutils.Conv
  * @version $Id$
  * @since 1.8.0
  */
-public class ArrayConverter<D> extends AbstractConverter<D> {
+public class ArrayConverter extends AbstractConverter {
 
-    private final Class<D> defaultType;
+    private final Class<?> defaultType;
     private final Converter elementConverter;
     private int defaultSize;
     private char delimiter    = ',';
@@ -147,7 +147,7 @@ public class ArrayConverter<D> extends A
      * @param elementConverter Converter used to convert
      *  individual array elements.
      */
-    public ArrayConverter(Class<D> defaultType, Converter elementConverter) {
+    public ArrayConverter(Class<?> defaultType, Converter elementConverter) {
         super();
         if (defaultType == null) {
             throw new IllegalArgumentException("Default type is missing");
@@ -174,7 +174,7 @@ public class ArrayConverter<D> extends A
      * @param defaultSize Specifies the size of the default array value or if less
      *  than zero indicates that a <code>null</code> default value should be
used.
      */
-    public ArrayConverter(Class<D> defaultType, Converter elementConverter, int defaultSize)
{
+    public ArrayConverter(Class<?> defaultType, Converter elementConverter, int defaultSize)
{
         this(defaultType, elementConverter);
         this.defaultSize = defaultSize;
         Object defaultValue = null;
@@ -222,7 +222,7 @@ public class ArrayConverter<D> extends A
      * @return The default type this <code>Converter</code> handles.
      */
     @Override
-    protected Class<D> getDefaultType() {
+    protected Class<?> getDefaultType() {
         return defaultType;
     }
 

Modified: commons/proper/beanutils/branches/java5/src/main/java/org/apache/commons/beanutils/converters/BigDecimalConverter.java
URL: http://svn.apache.org/viewvc/commons/proper/beanutils/branches/java5/src/main/java/org/apache/commons/beanutils/converters/BigDecimalConverter.java?rev=1535148&r1=1535147&r2=1535148&view=diff
==============================================================================
--- commons/proper/beanutils/branches/java5/src/main/java/org/apache/commons/beanutils/converters/BigDecimalConverter.java
(original)
+++ commons/proper/beanutils/branches/java5/src/main/java/org/apache/commons/beanutils/converters/BigDecimalConverter.java
Wed Oct 23 20:14:47 2013
@@ -33,7 +33,7 @@ import java.math.BigDecimal;
  * @version $Id$
  * @since 1.3
  */
-public final class BigDecimalConverter extends NumberConverter<BigDecimal> {
+public final class BigDecimalConverter extends NumberConverter {
 
     /**
      * Construct a <b>java.math.BigDecimal</b> <i>Converter</i> that
throws

Modified: commons/proper/beanutils/branches/java5/src/main/java/org/apache/commons/beanutils/converters/BigIntegerConverter.java
URL: http://svn.apache.org/viewvc/commons/proper/beanutils/branches/java5/src/main/java/org/apache/commons/beanutils/converters/BigIntegerConverter.java?rev=1535148&r1=1535147&r2=1535148&view=diff
==============================================================================
--- commons/proper/beanutils/branches/java5/src/main/java/org/apache/commons/beanutils/converters/BigIntegerConverter.java
(original)
+++ commons/proper/beanutils/branches/java5/src/main/java/org/apache/commons/beanutils/converters/BigIntegerConverter.java
Wed Oct 23 20:14:47 2013
@@ -33,7 +33,7 @@ import java.math.BigInteger;
  * @version $Id$
  * @since 1.3
  */
-public final class BigIntegerConverter extends NumberConverter<BigInteger> {
+public final class BigIntegerConverter extends NumberConverter {
 
     /**
      * Construct a <b>java.math.BigInteger</b> <i>Converter</i> that
throws

Modified: commons/proper/beanutils/branches/java5/src/main/java/org/apache/commons/beanutils/converters/BooleanConverter.java
URL: http://svn.apache.org/viewvc/commons/proper/beanutils/branches/java5/src/main/java/org/apache/commons/beanutils/converters/BooleanConverter.java?rev=1535148&r1=1535147&r2=1535148&view=diff
==============================================================================
--- commons/proper/beanutils/branches/java5/src/main/java/org/apache/commons/beanutils/converters/BooleanConverter.java
(original)
+++ commons/proper/beanutils/branches/java5/src/main/java/org/apache/commons/beanutils/converters/BooleanConverter.java
Wed Oct 23 20:14:47 2013
@@ -51,7 +51,7 @@ import org.apache.commons.beanutils.Conv
  * @version $Id$
  * @since 1.3
  */
-public final class BooleanConverter extends AbstractConverter<Boolean> {
+public final class BooleanConverter extends AbstractConverter {
 
 
     // ----------------------------------------------------------- Constructors

Modified: commons/proper/beanutils/branches/java5/src/main/java/org/apache/commons/beanutils/converters/ByteConverter.java
URL: http://svn.apache.org/viewvc/commons/proper/beanutils/branches/java5/src/main/java/org/apache/commons/beanutils/converters/ByteConverter.java?rev=1535148&r1=1535147&r2=1535148&view=diff
==============================================================================
--- commons/proper/beanutils/branches/java5/src/main/java/org/apache/commons/beanutils/converters/ByteConverter.java
(original)
+++ commons/proper/beanutils/branches/java5/src/main/java/org/apache/commons/beanutils/converters/ByteConverter.java
Wed Oct 23 20:14:47 2013
@@ -31,7 +31,7 @@ package org.apache.commons.beanutils.con
  * @version $Id$
  * @since 1.3
  */
-public final class ByteConverter extends NumberConverter<Byte> {
+public final class ByteConverter extends NumberConverter {
 
     /**
      * Construct a <b>java.lang.Byte</b> <i>Converter</i> that throws

Modified: commons/proper/beanutils/branches/java5/src/main/java/org/apache/commons/beanutils/converters/DoubleConverter.java
URL: http://svn.apache.org/viewvc/commons/proper/beanutils/branches/java5/src/main/java/org/apache/commons/beanutils/converters/DoubleConverter.java?rev=1535148&r1=1535147&r2=1535148&view=diff
==============================================================================
--- commons/proper/beanutils/branches/java5/src/main/java/org/apache/commons/beanutils/converters/DoubleConverter.java
(original)
+++ commons/proper/beanutils/branches/java5/src/main/java/org/apache/commons/beanutils/converters/DoubleConverter.java
Wed Oct 23 20:14:47 2013
@@ -31,7 +31,7 @@ package org.apache.commons.beanutils.con
  * @version $Id$
  * @since 1.3
  */
-public final class DoubleConverter extends NumberConverter<Double> {
+public final class DoubleConverter extends NumberConverter {
 
     /**
      * Construct a <b>java.lang.Double</b> <i>Converter</i> that
throws

Modified: commons/proper/beanutils/branches/java5/src/main/java/org/apache/commons/beanutils/converters/FloatConverter.java
URL: http://svn.apache.org/viewvc/commons/proper/beanutils/branches/java5/src/main/java/org/apache/commons/beanutils/converters/FloatConverter.java?rev=1535148&r1=1535147&r2=1535148&view=diff
==============================================================================
--- commons/proper/beanutils/branches/java5/src/main/java/org/apache/commons/beanutils/converters/FloatConverter.java
(original)
+++ commons/proper/beanutils/branches/java5/src/main/java/org/apache/commons/beanutils/converters/FloatConverter.java
Wed Oct 23 20:14:47 2013
@@ -31,7 +31,7 @@ package org.apache.commons.beanutils.con
  * @version $Id$
  * @since 1.3
  */
-public final class FloatConverter extends NumberConverter<Float> {
+public final class FloatConverter extends NumberConverter {
 
     /**
      * Construct a <b>java.lang.Float</b> <i>Converter</i> that throws

Modified: commons/proper/beanutils/branches/java5/src/main/java/org/apache/commons/beanutils/converters/IntegerConverter.java
URL: http://svn.apache.org/viewvc/commons/proper/beanutils/branches/java5/src/main/java/org/apache/commons/beanutils/converters/IntegerConverter.java?rev=1535148&r1=1535147&r2=1535148&view=diff
==============================================================================
--- commons/proper/beanutils/branches/java5/src/main/java/org/apache/commons/beanutils/converters/IntegerConverter.java
(original)
+++ commons/proper/beanutils/branches/java5/src/main/java/org/apache/commons/beanutils/converters/IntegerConverter.java
Wed Oct 23 20:14:47 2013
@@ -31,7 +31,7 @@ package org.apache.commons.beanutils.con
  * @version $Id$
  * @since 1.3
  */
-public final class IntegerConverter extends NumberConverter<Integer> {
+public final class IntegerConverter extends NumberConverter {
 
     /**
      * Construct a <b>java.lang.Integer</b> <i>Converter</i> that
throws

Modified: commons/proper/beanutils/branches/java5/src/main/java/org/apache/commons/beanutils/converters/LongConverter.java
URL: http://svn.apache.org/viewvc/commons/proper/beanutils/branches/java5/src/main/java/org/apache/commons/beanutils/converters/LongConverter.java?rev=1535148&r1=1535147&r2=1535148&view=diff
==============================================================================
--- commons/proper/beanutils/branches/java5/src/main/java/org/apache/commons/beanutils/converters/LongConverter.java
(original)
+++ commons/proper/beanutils/branches/java5/src/main/java/org/apache/commons/beanutils/converters/LongConverter.java
Wed Oct 23 20:14:47 2013
@@ -31,7 +31,7 @@ package org.apache.commons.beanutils.con
  * @version $Id$
  * @since 1.3
  */
-public final class LongConverter extends NumberConverter<Long> {
+public final class LongConverter extends NumberConverter {
 
     /**
      * Construct a <b>java.lang.Long</b> <i>Converter</i> that throws

Modified: commons/proper/beanutils/branches/java5/src/main/java/org/apache/commons/beanutils/converters/NumberConverter.java
URL: http://svn.apache.org/viewvc/commons/proper/beanutils/branches/java5/src/main/java/org/apache/commons/beanutils/converters/NumberConverter.java?rev=1535148&r1=1535147&r2=1535148&view=diff
==============================================================================
--- commons/proper/beanutils/branches/java5/src/main/java/org/apache/commons/beanutils/converters/NumberConverter.java
(original)
+++ commons/proper/beanutils/branches/java5/src/main/java/org/apache/commons/beanutils/converters/NumberConverter.java
Wed Oct 23 20:14:47 2013
@@ -79,11 +79,10 @@ import org.apache.commons.beanutils.Conv
  * For example to cater for number styles used in Germany such as <code>0.000,00</code>
the pattern
  * is specified in the normal form <code>0,000.00</code> and the locale set to
<code>Locale.GERMANY</code>.
  *
- * @param <D> the default type of this converter
  * @version $Id$
  * @since 1.8.0
  */
-public abstract class NumberConverter<D> extends AbstractConverter<D> {
+public abstract class NumberConverter extends AbstractConverter {
 
     private static final Integer ZERO = new Integer(0);
     private static final Integer ONE  = new Integer(1);

Modified: commons/proper/beanutils/branches/java5/src/main/java/org/apache/commons/beanutils/converters/ShortConverter.java
URL: http://svn.apache.org/viewvc/commons/proper/beanutils/branches/java5/src/main/java/org/apache/commons/beanutils/converters/ShortConverter.java?rev=1535148&r1=1535147&r2=1535148&view=diff
==============================================================================
--- commons/proper/beanutils/branches/java5/src/main/java/org/apache/commons/beanutils/converters/ShortConverter.java
(original)
+++ commons/proper/beanutils/branches/java5/src/main/java/org/apache/commons/beanutils/converters/ShortConverter.java
Wed Oct 23 20:14:47 2013
@@ -31,7 +31,7 @@ package org.apache.commons.beanutils.con
  * @version $Id$
  * @since 1.3
  */
-public final class ShortConverter extends NumberConverter<Short> {
+public final class ShortConverter extends NumberConverter {
 
     /**
      * Construct a <b>java.lang.Short</b> <i>Converter</i> that throws

Modified: commons/proper/beanutils/branches/java5/src/test/java/org/apache/commons/beanutils/converters/ArrayConverterTestCase.java
URL: http://svn.apache.org/viewvc/commons/proper/beanutils/branches/java5/src/test/java/org/apache/commons/beanutils/converters/ArrayConverterTestCase.java?rev=1535148&r1=1535147&r2=1535148&view=diff
==============================================================================
--- commons/proper/beanutils/branches/java5/src/test/java/org/apache/commons/beanutils/converters/ArrayConverterTestCase.java
(original)
+++ commons/proper/beanutils/branches/java5/src/test/java/org/apache/commons/beanutils/converters/ArrayConverterTestCase.java
Wed Oct 23 20:14:47 2013
@@ -69,7 +69,7 @@ public class ArrayConverterTestCase exte
         IntegerConverter intConverter = new IntegerConverter(new Integer(0));
         intConverter.setPattern("#,###");
         intConverter.setLocale(Locale.US);
-        ArrayConverter<int[]> arrayConverter = new ArrayConverter<int[]>(int[].class,
intConverter, 0);
+        ArrayConverter arrayConverter = new ArrayConverter(int[].class, intConverter, 0);
         arrayConverter.setAllowedChars(new char[] {',', '-'});
         arrayConverter.setDelimiter(';');
 
@@ -212,7 +212,7 @@ public class ArrayConverterTestCase exte
 
         // Configure Converter
         IntegerConverter intConverter = new IntegerConverter();
-        ArrayConverter<int[]> arrayConverter = new ArrayConverter<int[]>(int[].class,
intConverter);
+        ArrayConverter arrayConverter = new ArrayConverter(int[].class, intConverter);
 
         // Test Data
         String[] array = new String[] {"10", "  11", "12  ", "  13  "};
@@ -280,14 +280,14 @@ public class ArrayConverterTestCase exte
         // Construct an array Converter for an integer array (i.e. int[]) using
         // an IntegerConverter as the element converter.
         // N.B. Uses the default comma (i.e. ",") as the delimiter between individual numbers
-        ArrayConverter<int[]> arrayConverter = new ArrayConverter<int[]>(int[].class,
integerConverter);
+        ArrayConverter arrayConverter = new ArrayConverter(int[].class, integerConverter);
 
         // Construct a "Matrix" Converter which converts arrays of integer arrays using
         // the first (int[]) Converter as the element Converter.
         // N.B. Uses a semi-colon (i.e. ";") as the delimiter to separate the different sets
of numbers.
         //      Also the delimiter for the above array Converter needs to be added to this
         //      array Converter's "allowed characters"
-        ArrayConverter<int[][]> matrixConverter = new ArrayConverter<int[][]>(int[][].class,
arrayConverter);
+        ArrayConverter matrixConverter = new ArrayConverter(int[][].class, arrayConverter);
         matrixConverter.setDelimiter(';');
         matrixConverter.setAllowedChars(new char[] {','});
 
@@ -320,9 +320,9 @@ public class ArrayConverterTestCase exte
         int[]  oneArray   = new int[1];
         IntegerConverter intConverter = new IntegerConverter();
 
-        assertEquals("Null Default", null,   new ArrayConverter<int[]>(int[].class,
intConverter, -1).convert(int[].class, null));
-        checkArray("Zero Length",  zeroArray, new ArrayConverter<int[]>(int[].class,
intConverter, 0).convert(int[].class, null));
-        checkArray("One Length",   oneArray,  new ArrayConverter<Integer[]>(Integer[].class,
intConverter, 1).convert(int[].class, null));
+        assertEquals("Null Default", null,   new ArrayConverter(int[].class, intConverter,
-1).convert(int[].class, null));
+        checkArray("Zero Length",  zeroArray, new ArrayConverter(int[].class, intConverter,
0).convert(int[].class, null));
+        checkArray("One Length",   oneArray,  new ArrayConverter(Integer[].class, intConverter,
1).convert(int[].class, null));
     }
 
     /**
@@ -332,8 +332,8 @@ public class ArrayConverterTestCase exte
         int[]  zeroArray  = new int[0];
         IntegerConverter intConverter = new IntegerConverter();
 
-        checkArray("Empty String",  zeroArray, new ArrayConverter<int[]>(int[].class,
intConverter, -1).convert(int[].class, ""));
-        assertEquals("Default String",  null, new ArrayConverter<int[]>(int[].class,
intConverter).convert(String.class, null));
+        checkArray("Empty String",  zeroArray, new ArrayConverter(int[].class, intConverter,
-1).convert(int[].class, ""));
+        assertEquals("Default String",  null, new ArrayConverter(int[].class, intConverter).convert(String.class,
null));
     }
 
     /**
@@ -341,19 +341,19 @@ public class ArrayConverterTestCase exte
      */
     public void testErrors() {
         try {
-            new ArrayConverter<Object>(null, new DateConverter());
+            new ArrayConverter(null, new DateConverter());
             fail("Default Type missing - expected IllegalArgumentException");
         } catch (IllegalArgumentException e) {
             // expected result
         }
         try {
-            new ArrayConverter<Boolean>(Boolean.class, new DateConverter());
+            new ArrayConverter(Boolean.class, new DateConverter());
             fail("Default Type not an array - expected IllegalArgumentException");
         } catch (IllegalArgumentException e) {
             // expected result
         }
         try {
-            new ArrayConverter<int[]>(int[].class, null);
+            new ArrayConverter(int[].class, null);
             fail("Component Converter missing - expected IllegalArgumentException");
         } catch (IllegalArgumentException e) {
             // expected result
@@ -365,7 +365,7 @@ public class ArrayConverterTestCase exte
      */
     public void testUnderscore_BEANUTILS_302() {
         String value = "first_value,second_value";
-        ArrayConverter<String[]> converter = new ArrayConverter<String[]>(String[].class,
new StringConverter());
+        ArrayConverter converter = new ArrayConverter(String[].class, new StringConverter());
 
         // test underscore not allowed (the default)
         String[] result = converter.convert(String[].class, value);

Modified: commons/proper/beanutils/branches/java5/src/test/java/org/apache/commons/beanutils/converters/BigDecimalConverterTestCase.java
URL: http://svn.apache.org/viewvc/commons/proper/beanutils/branches/java5/src/test/java/org/apache/commons/beanutils/converters/BigDecimalConverterTestCase.java?rev=1535148&r1=1535147&r2=1535148&view=diff
==============================================================================
--- commons/proper/beanutils/branches/java5/src/test/java/org/apache/commons/beanutils/converters/BigDecimalConverterTestCase.java
(original)
+++ commons/proper/beanutils/branches/java5/src/test/java/org/apache/commons/beanutils/converters/BigDecimalConverterTestCase.java
Wed Oct 23 20:14:47 2013
@@ -63,12 +63,12 @@ public class BigDecimalConverterTestCase
     // ------------------------------------------------------------------------
 
     @Override
-    protected NumberConverter<?> makeConverter() {
+    protected NumberConverter makeConverter() {
         return new BigDecimalConverter();
     }
 
     @Override
-    protected NumberConverter<?> makeConverter(Object defaultValue) {
+    protected NumberConverter makeConverter(Object defaultValue) {
         return new BigDecimalConverter(defaultValue);
     }
 

Modified: commons/proper/beanutils/branches/java5/src/test/java/org/apache/commons/beanutils/converters/BigIntegerConverterTestCase.java
URL: http://svn.apache.org/viewvc/commons/proper/beanutils/branches/java5/src/test/java/org/apache/commons/beanutils/converters/BigIntegerConverterTestCase.java?rev=1535148&r1=1535147&r2=1535148&view=diff
==============================================================================
--- commons/proper/beanutils/branches/java5/src/test/java/org/apache/commons/beanutils/converters/BigIntegerConverterTestCase.java
(original)
+++ commons/proper/beanutils/branches/java5/src/test/java/org/apache/commons/beanutils/converters/BigIntegerConverterTestCase.java
Wed Oct 23 20:14:47 2013
@@ -62,12 +62,12 @@ public class BigIntegerConverterTestCase
     // ------------------------------------------------------------------------
 
     @Override
-    protected NumberConverter<?> makeConverter() {
+    protected NumberConverter makeConverter() {
         return new BigIntegerConverter();
     }
 
     @Override
-    protected NumberConverter<?> makeConverter(Object defaultValue) {
+    protected NumberConverter makeConverter(Object defaultValue) {
         return new BigIntegerConverter(defaultValue);
     }
 

Modified: commons/proper/beanutils/branches/java5/src/test/java/org/apache/commons/beanutils/converters/ByteConverterTestCase.java
URL: http://svn.apache.org/viewvc/commons/proper/beanutils/branches/java5/src/test/java/org/apache/commons/beanutils/converters/ByteConverterTestCase.java?rev=1535148&r1=1535147&r2=1535148&view=diff
==============================================================================
--- commons/proper/beanutils/branches/java5/src/test/java/org/apache/commons/beanutils/converters/ByteConverterTestCase.java
(original)
+++ commons/proper/beanutils/branches/java5/src/test/java/org/apache/commons/beanutils/converters/ByteConverterTestCase.java
Wed Oct 23 20:14:47 2013
@@ -61,12 +61,12 @@ public class ByteConverterTestCase exten
     // ------------------------------------------------------------------------
 
     @Override
-    protected NumberConverter<?> makeConverter() {
+    protected NumberConverter makeConverter() {
         return new ByteConverter();
     }
 
     @Override
-    protected NumberConverter<?> makeConverter(Object defaultValue) {
+    protected NumberConverter makeConverter(Object defaultValue) {
         return new ByteConverter(defaultValue);
     }
     @Override

Modified: commons/proper/beanutils/branches/java5/src/test/java/org/apache/commons/beanutils/converters/DoubleConverterTestCase.java
URL: http://svn.apache.org/viewvc/commons/proper/beanutils/branches/java5/src/test/java/org/apache/commons/beanutils/converters/DoubleConverterTestCase.java?rev=1535148&r1=1535147&r2=1535148&view=diff
==============================================================================
--- commons/proper/beanutils/branches/java5/src/test/java/org/apache/commons/beanutils/converters/DoubleConverterTestCase.java
(original)
+++ commons/proper/beanutils/branches/java5/src/test/java/org/apache/commons/beanutils/converters/DoubleConverterTestCase.java
Wed Oct 23 20:14:47 2013
@@ -61,12 +61,12 @@ public class DoubleConverterTestCase ext
     // ------------------------------------------------------------------------
 
     @Override
-    protected NumberConverter<?> makeConverter() {
+    protected NumberConverter makeConverter() {
         return new DoubleConverter();
     }
 
     @Override
-    protected NumberConverter<?> makeConverter(Object defaultValue) {
+    protected NumberConverter makeConverter(Object defaultValue) {
         return new DoubleConverter(defaultValue);
     }
 

Modified: commons/proper/beanutils/branches/java5/src/test/java/org/apache/commons/beanutils/converters/FloatConverterTestCase.java
URL: http://svn.apache.org/viewvc/commons/proper/beanutils/branches/java5/src/test/java/org/apache/commons/beanutils/converters/FloatConverterTestCase.java?rev=1535148&r1=1535147&r2=1535148&view=diff
==============================================================================
--- commons/proper/beanutils/branches/java5/src/test/java/org/apache/commons/beanutils/converters/FloatConverterTestCase.java
(original)
+++ commons/proper/beanutils/branches/java5/src/test/java/org/apache/commons/beanutils/converters/FloatConverterTestCase.java
Wed Oct 23 20:14:47 2013
@@ -61,12 +61,12 @@ public class FloatConverterTestCase exte
     // ------------------------------------------------------------------------
 
     @Override
-    protected NumberConverter<?> makeConverter() {
+    protected NumberConverter makeConverter() {
         return new FloatConverter();
     }
 
     @Override
-    protected NumberConverter<?> makeConverter(Object defaultValue) {
+    protected NumberConverter makeConverter(Object defaultValue) {
         return new FloatConverter(defaultValue);
     }
 

Modified: commons/proper/beanutils/branches/java5/src/test/java/org/apache/commons/beanutils/converters/IntegerConverterTestCase.java
URL: http://svn.apache.org/viewvc/commons/proper/beanutils/branches/java5/src/test/java/org/apache/commons/beanutils/converters/IntegerConverterTestCase.java?rev=1535148&r1=1535147&r2=1535148&view=diff
==============================================================================
--- commons/proper/beanutils/branches/java5/src/test/java/org/apache/commons/beanutils/converters/IntegerConverterTestCase.java
(original)
+++ commons/proper/beanutils/branches/java5/src/test/java/org/apache/commons/beanutils/converters/IntegerConverterTestCase.java
Wed Oct 23 20:14:47 2013
@@ -62,12 +62,12 @@ public class IntegerConverterTestCase ex
     // ------------------------------------------------------------------------
 
     @Override
-    protected NumberConverter<?> makeConverter() {
+    protected NumberConverter makeConverter() {
         return new IntegerConverter();
     }
 
     @Override
-    protected NumberConverter<?> makeConverter(Object defaultValue) {
+    protected NumberConverter makeConverter(Object defaultValue) {
         return new IntegerConverter(defaultValue);
     }
 
@@ -173,7 +173,7 @@ public class IntegerConverterTestCase ex
      * Tests whether an invalid default object causes an exception.
      */
     public void testInvalidDefaultObject() {
-        NumberConverter<?> converter = makeConverter();
+        NumberConverter converter = makeConverter();
         try {
             converter.setDefaultValue("notANumber");
             fail("Invalid default value not detected!");

Modified: commons/proper/beanutils/branches/java5/src/test/java/org/apache/commons/beanutils/converters/LongConverterTestCase.java
URL: http://svn.apache.org/viewvc/commons/proper/beanutils/branches/java5/src/test/java/org/apache/commons/beanutils/converters/LongConverterTestCase.java?rev=1535148&r1=1535147&r2=1535148&view=diff
==============================================================================
--- commons/proper/beanutils/branches/java5/src/test/java/org/apache/commons/beanutils/converters/LongConverterTestCase.java
(original)
+++ commons/proper/beanutils/branches/java5/src/test/java/org/apache/commons/beanutils/converters/LongConverterTestCase.java
Wed Oct 23 20:14:47 2013
@@ -61,12 +61,12 @@ public class LongConverterTestCase exten
     // ------------------------------------------------------------------------
 
     @Override
-    protected NumberConverter<?> makeConverter() {
+    protected NumberConverter makeConverter() {
         return new LongConverter();
     }
 
     @Override
-    protected NumberConverter<?> makeConverter(Object defaultValue) {
+    protected NumberConverter makeConverter(Object defaultValue) {
         return new LongConverter(defaultValue);
     }
 

Modified: commons/proper/beanutils/branches/java5/src/test/java/org/apache/commons/beanutils/converters/NumberConverterTestBase.java
URL: http://svn.apache.org/viewvc/commons/proper/beanutils/branches/java5/src/test/java/org/apache/commons/beanutils/converters/NumberConverterTestBase.java?rev=1535148&r1=1535147&r2=1535148&view=diff
==============================================================================
--- commons/proper/beanutils/branches/java5/src/test/java/org/apache/commons/beanutils/converters/NumberConverterTestBase.java
(original)
+++ commons/proper/beanutils/branches/java5/src/test/java/org/apache/commons/beanutils/converters/NumberConverterTestBase.java
Wed Oct 23 20:14:47 2013
@@ -47,8 +47,8 @@ public abstract class NumberConverterTes
 
     // ------------------------------------------------------------------------
 
-    protected abstract NumberConverter<?> makeConverter();
-    protected abstract NumberConverter<?> makeConverter(Object defaultValue);
+    protected abstract NumberConverter makeConverter();
+    protected abstract NumberConverter makeConverter(Object defaultValue);
     protected abstract Class<?> getExpectedType();
 
     // ------------------------------------------------------------------------
@@ -111,7 +111,7 @@ public abstract class NumberConverterTes
         Locale defaultLocale = Locale.getDefault();
         Locale.setDefault(Locale.US);
 
-        NumberConverter<?> converter = makeConverter();
+        NumberConverter converter = makeConverter();
         converter.setPattern("[0,0.0];(0,0.0)");
 
         // Default Locale
@@ -136,7 +136,7 @@ public abstract class NumberConverterTes
         Locale defaultLocale = Locale.getDefault();
         Locale.setDefault(Locale.US);
 
-        NumberConverter<?> converter = makeConverter();
+        NumberConverter converter = makeConverter();
         converter.setUseLocaleFormat(true);
 
         // Default Locale
@@ -158,7 +158,7 @@ public abstract class NumberConverterTes
     public void testStringArrayToInteger() {
 
         Integer defaultValue = new Integer(-1);
-        NumberConverter<?> converter = makeConverter(defaultValue);
+        NumberConverter converter = makeConverter(defaultValue);
 
         // Default Locale
         assertEquals("Valid First",   new Integer(5), converter.convert(Integer.class, new
String[] {"5", "4", "3"}));
@@ -172,7 +172,7 @@ public abstract class NumberConverterTes
      */
     public void testNumberToStringDefault() {
 
-        NumberConverter<?> converter = makeConverter();
+        NumberConverter converter = makeConverter();
 
         // Default Number --> String conversion
         assertEquals("Default Convert " + numbers[0], numbers[0].toString(), converter.convert(String.class,
numbers[0]));
@@ -189,7 +189,7 @@ public abstract class NumberConverterTes
         Locale defaultLocale = Locale.getDefault();
         Locale.setDefault(Locale.US);
 
-        NumberConverter<?> converter = makeConverter();
+        NumberConverter converter = makeConverter();
         converter.setPattern("[0,0];(0,0)");
 
         // Default Locale
@@ -236,7 +236,7 @@ public abstract class NumberConverterTes
         Locale defaultLocale = Locale.getDefault();
         Locale.setDefault(Locale.US);
 
-        NumberConverter<?> converter = makeConverter();
+        NumberConverter converter = makeConverter();
         converter.setUseLocaleFormat(true);
 
         // Default Locale
@@ -273,7 +273,7 @@ public abstract class NumberConverterTes
      */
     public void testStringToNumberDefault() {
 
-        NumberConverter<?> converter = makeConverter();
+        NumberConverter converter = makeConverter();
         converter.setUseLocaleFormat(false);
 
         // Default String --> Number conversion
@@ -293,7 +293,7 @@ public abstract class NumberConverterTes
      * default type should be used.
      */
     public void testStringToNumberDefaultType() {
-        NumberConverter<?> converter = makeConverter();
+        NumberConverter converter = makeConverter();
         converter.setUseLocaleFormat(false);
 
         assertEquals("Default Convert " + numbers[0], numbers[0], converter.convert(null,
numbers[0].toString()));
@@ -304,7 +304,7 @@ public abstract class NumberConverterTes
      */
     public void testBooleanToNumberDefault() {
 
-        NumberConverter<?> converter = makeConverter();
+        NumberConverter converter = makeConverter();
 
         // Other type --> String conversion
         assertEquals("Boolean.FALSE to Number ", 0, ((Number)converter.convert(getExpectedType(),
Boolean.FALSE)).intValue());
@@ -317,7 +317,7 @@ public abstract class NumberConverterTes
      */
     public void testDateToNumber() {
 
-        NumberConverter<?> converter = makeConverter();
+        NumberConverter converter = makeConverter();
 
         Date dateValue = new Date();
         long longValue = dateValue.getTime();
@@ -340,7 +340,7 @@ public abstract class NumberConverterTes
      */
     public void testCalendarToNumber() {
 
-        NumberConverter<?> converter = makeConverter();
+        NumberConverter converter = makeConverter();
 
         Calendar calendarValue = Calendar.getInstance();
         long longValue = calendarValue.getTime().getTime();
@@ -363,7 +363,7 @@ public abstract class NumberConverterTes
      */
     public void testOtherToStringDefault() {
 
-        NumberConverter<?> converter = makeConverter();
+        NumberConverter converter = makeConverter();
 
         // Other type --> String conversion
         assertEquals("Default Convert ", "ABC", converter.convert(String.class, new StringBuffer("ABC")));
@@ -376,7 +376,7 @@ public abstract class NumberConverterTes
     public void testInvalidDefault() {
 
         Object defaultvalue = numbers[0];
-        NumberConverter<?> converter = makeConverter(defaultvalue);
+        NumberConverter converter = makeConverter(defaultvalue);
 
         // Default String --> Number conversion
         assertEquals("Invalid null ", defaultvalue, converter.convert(getExpectedType(),
null));
@@ -388,7 +388,7 @@ public abstract class NumberConverterTes
      */
     public void testInvalidException() {
 
-        NumberConverter<?> converter = makeConverter();
+        NumberConverter converter = makeConverter();
 
         try {
             converter.convert(getExpectedType(), null);
@@ -409,7 +409,7 @@ public abstract class NumberConverterTes
      */
     public void testInvalidType() {
 
-        NumberConverter<?> converter = makeConverter();
+        NumberConverter converter = makeConverter();
 
         try {
             converter.convert(Object.class, numbers[0]);
@@ -424,7 +424,7 @@ public abstract class NumberConverterTes
      */
     public void testInvalidTypeWithDefault() {
 
-        NumberConverter<?> converter = makeConverter(42);
+        NumberConverter converter = makeConverter(42);
 
         try {
             converter.convert(Object.class, numbers[0]);

Modified: commons/proper/beanutils/branches/java5/src/test/java/org/apache/commons/beanutils/converters/ShortConverterTestCase.java
URL: http://svn.apache.org/viewvc/commons/proper/beanutils/branches/java5/src/test/java/org/apache/commons/beanutils/converters/ShortConverterTestCase.java?rev=1535148&r1=1535147&r2=1535148&view=diff
==============================================================================
--- commons/proper/beanutils/branches/java5/src/test/java/org/apache/commons/beanutils/converters/ShortConverterTestCase.java
(original)
+++ commons/proper/beanutils/branches/java5/src/test/java/org/apache/commons/beanutils/converters/ShortConverterTestCase.java
Wed Oct 23 20:14:47 2013
@@ -61,12 +61,12 @@ public class ShortConverterTestCase exte
     // ------------------------------------------------------------------------
 
     @Override
-    protected NumberConverter<?> makeConverter() {
+    protected NumberConverter makeConverter() {
         return new ShortConverter();
     }
 
     @Override
-    protected NumberConverter<?> makeConverter(Object defaultValue) {
+    protected NumberConverter makeConverter(Object defaultValue) {
         return new ShortConverter(defaultValue);
     }
 



Mime
View raw message