avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dona...@apache.org
Subject cvs commit: jakarta-avalon-excalibur/converter/src/java/org/apache/excalibur/converter/lib StringToBigDecimalConverter.java StringToBigIntegerConverter.java StringToBooleanConverter.java StringToByteConverter.java StringToClassConverter.java StringToDateConverter.java StringToDoubleConverter.java StringToFloatConverter.java StringToIntegerConverter.java StringToLongConverter.java StringToShortConverter.java StringToTimeConverter.java StringToTimestampConverter.java StringToURLConverter.java Resources.properties
Date Tue, 16 Jul 2002 00:41:36 GMT
donaldp     2002/07/15 17:41:36

  Modified:    converter/src/java/org/apache/excalibur/converter
                        AbstractConverter.java Resources.properties
               converter/src/java/org/apache/excalibur/converter/lib
                        StringToBigDecimalConverter.java
                        StringToBigIntegerConverter.java
                        StringToBooleanConverter.java
                        StringToByteConverter.java
                        StringToClassConverter.java
                        StringToDateConverter.java
                        StringToDoubleConverter.java
                        StringToFloatConverter.java
                        StringToIntegerConverter.java
                        StringToLongConverter.java
                        StringToShortConverter.java
                        StringToTimeConverter.java
                        StringToTimestampConverter.java
                        StringToURLConverter.java
  Removed:     converter/src/java/org/apache/excalibur/converter/lib
                        Resources.properties
  Log:
  Hmogenize error handling
  
  Revision  Changes    Path
  1.2       +17 -1     jakarta-avalon-excalibur/converter/src/java/org/apache/excalibur/converter/AbstractConverter.java
  
  Index: AbstractConverter.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/converter/src/java/org/apache/excalibur/converter/AbstractConverter.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- AbstractConverter.java	27 Apr 2002 05:23:00 -0000	1.1
  +++ AbstractConverter.java	16 Jul 2002 00:41:35 -0000	1.2
  @@ -69,6 +69,22 @@
       }
   
       /**
  +     * A helper method to throw an exception indicating that could
  +     * not perform conversion of specified object due to an exception.
  +     */
  +    protected final Object noConvert( final Object value, final Throwable throwable )
  +        throws ConverterException
  +    {
  +        final String message =
  +            REZ.getString( "no-convert.error",
  +                           m_source.getName(),
  +                           m_destination.getName(),
  +                           value,
  +                           throwable );
  +        throw new ConverterException( message );
  +    }
  +
  +    /**
        * Overide this in a particular converter to do the conversion.
        *
        * @param original the original Object
  
  
  
  1.2       +1 -0      jakarta-avalon-excalibur/converter/src/java/org/apache/excalibur/converter/Resources.properties
  
  Index: Resources.properties
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/converter/src/java/org/apache/excalibur/converter/Resources.properties,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Resources.properties	27 Apr 2002 05:23:00 -0000	1.1
  +++ Resources.properties	16 Jul 2002 00:41:35 -0000	1.2
  @@ -1,5 +1,6 @@
   bad-destination.error=Destination type ({0}) is not equal to {1}.
   bad-instance.error=Object {0} is not an instance of {1}.
  +no-convert.error=Could not convert from {0} to {1} for instance "{2}". (Reason: {3}).
   
   #AbstractMasterConverter
   convert.error=Could not convert from {0} to {1}.
  
  
  
  1.2       +2 -9      jakarta-avalon-excalibur/converter/src/java/org/apache/excalibur/converter/lib/StringToBigDecimalConverter.java
  
  Index: StringToBigDecimalConverter.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/converter/src/java/org/apache/excalibur/converter/lib/StringToBigDecimalConverter.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- StringToBigDecimalConverter.java	16 Jul 2002 00:15:59 -0000	1.1
  +++ StringToBigDecimalConverter.java	16 Jul 2002 00:41:35 -0000	1.2
  @@ -7,11 +7,9 @@
    */
   package org.apache.excalibur.converter.lib;
   
  -import org.apache.avalon.excalibur.i18n.ResourceManager;
  -import org.apache.avalon.excalibur.i18n.Resources;
  +import java.math.BigDecimal;
   import org.apache.excalibur.converter.AbstractConverter;
   import org.apache.excalibur.converter.ConverterException;
  -import java.math.BigDecimal;
   
   /**
    * String to {@link BigDecimal} converter.
  @@ -22,9 +20,6 @@
   public class StringToBigDecimalConverter
       extends AbstractConverter
   {
  -    private static final Resources REZ =
  -        ResourceManager.getPackageResources( StringToBigDecimalConverter.class );
  -
       /**
        * Construct the converter.
        */
  @@ -50,9 +45,7 @@
           }
           catch( final NumberFormatException nfe )
           {
  -            final String message =
  -                REZ.getString( "convert.bad-bigdecimal.error", object );
  -            throw new ConverterException( message, nfe );
  +            return noConvert( object, nfe );
           }
       }
   }
  
  
  
  1.2       +2 -9      jakarta-avalon-excalibur/converter/src/java/org/apache/excalibur/converter/lib/StringToBigIntegerConverter.java
  
  Index: StringToBigIntegerConverter.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/converter/src/java/org/apache/excalibur/converter/lib/StringToBigIntegerConverter.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- StringToBigIntegerConverter.java	16 Jul 2002 00:15:59 -0000	1.1
  +++ StringToBigIntegerConverter.java	16 Jul 2002 00:41:35 -0000	1.2
  @@ -7,11 +7,9 @@
    */
   package org.apache.excalibur.converter.lib;
   
  -import org.apache.avalon.excalibur.i18n.ResourceManager;
  -import org.apache.avalon.excalibur.i18n.Resources;
  +import java.math.BigInteger;
   import org.apache.excalibur.converter.AbstractConverter;
   import org.apache.excalibur.converter.ConverterException;
  -import java.math.BigInteger;
   
   /**
    * String to {@link BigInteger} converter.
  @@ -22,9 +20,6 @@
   public class StringToBigIntegerConverter
       extends AbstractConverter
   {
  -    private static final Resources REZ =
  -        ResourceManager.getPackageResources( StringToBigIntegerConverter.class );
  -
       /**
        * Construct the converter.
        */
  @@ -50,9 +45,7 @@
           }
           catch( final NumberFormatException nfe )
           {
  -            final String message =
  -                REZ.getString( "convert.bad-biginteger.error", object );
  -            throw new ConverterException( message, nfe );
  +            return noConvert( object, nfe );
           }
       }
   }
  
  
  
  1.4       +1 -7      jakarta-avalon-excalibur/converter/src/java/org/apache/excalibur/converter/lib/StringToBooleanConverter.java
  
  Index: StringToBooleanConverter.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/converter/src/java/org/apache/excalibur/converter/lib/StringToBooleanConverter.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- StringToBooleanConverter.java	15 Jul 2002 23:52:02 -0000	1.3
  +++ StringToBooleanConverter.java	16 Jul 2002 00:41:35 -0000	1.4
  @@ -7,8 +7,6 @@
    */
   package org.apache.excalibur.converter.lib;
   
  -import org.apache.avalon.excalibur.i18n.ResourceManager;
  -import org.apache.avalon.excalibur.i18n.Resources;
   import org.apache.excalibur.converter.AbstractConverter;
   import org.apache.excalibur.converter.ConverterException;
   
  @@ -21,9 +19,6 @@
   public class StringToBooleanConverter
       extends AbstractConverter
   {
  -    private static final Resources REZ =
  -        ResourceManager.getPackageResources( StringToBooleanConverter.class );
  -
       /**
        * Construct the converter.
        */
  @@ -58,8 +53,7 @@
           }
           else
           {
  -            final String message = REZ.getString( "convert.bad-boolean.error", object );
  -            throw new ConverterException( message );
  +            return noConvert( object, null );
           }
       }
   }
  
  
  
  1.3       +1 -7      jakarta-avalon-excalibur/converter/src/java/org/apache/excalibur/converter/lib/StringToByteConverter.java
  
  Index: StringToByteConverter.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/converter/src/java/org/apache/excalibur/converter/lib/StringToByteConverter.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- StringToByteConverter.java	13 May 2002 12:17:38 -0000	1.2
  +++ StringToByteConverter.java	16 Jul 2002 00:41:35 -0000	1.3
  @@ -7,8 +7,6 @@
    */
   package org.apache.excalibur.converter.lib;
   
  -import org.apache.avalon.excalibur.i18n.ResourceManager;
  -import org.apache.avalon.excalibur.i18n.Resources;
   import org.apache.excalibur.converter.AbstractConverter;
   import org.apache.excalibur.converter.ConverterException;
   
  @@ -24,9 +22,6 @@
   public class StringToByteConverter
       extends AbstractConverter
   {
  -    private static final Resources REZ =
  -        ResourceManager.getPackageResources( StringToByteConverter.class );
  -
       /**
        * Construct the converter.
        */
  @@ -70,8 +65,7 @@
           }
           catch( final NumberFormatException nfe )
           {
  -            final String message = REZ.getString( "convert.bad-byte.error", object );
  -            throw new ConverterException( message, nfe );
  +            return noConvert( object, nfe );
           }
       }
   }
  
  
  
  1.3       +1 -7      jakarta-avalon-excalibur/converter/src/java/org/apache/excalibur/converter/lib/StringToClassConverter.java
  
  Index: StringToClassConverter.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/converter/src/java/org/apache/excalibur/converter/lib/StringToClassConverter.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- StringToClassConverter.java	13 May 2002 12:17:38 -0000	1.2
  +++ StringToClassConverter.java	16 Jul 2002 00:41:35 -0000	1.3
  @@ -7,8 +7,6 @@
    */
   package org.apache.excalibur.converter.lib;
   
  -import org.apache.avalon.excalibur.i18n.ResourceManager;
  -import org.apache.avalon.excalibur.i18n.Resources;
   import org.apache.excalibur.converter.AbstractConverter;
   import org.apache.excalibur.converter.ConverterException;
   
  @@ -21,9 +19,6 @@
   public class StringToClassConverter
       extends AbstractConverter
   {
  -    private static final Resources REZ =
  -        ResourceManager.getPackageResources( StringToClassConverter.class );
  -
       /**
        * Construct the converter.
        */
  @@ -50,8 +45,7 @@
           }
           catch( final Exception e )
           {
  -            final String message = REZ.getString( "convert.bad-class.error", object );
  -            throw new ConverterException( message, e );
  +            return noConvert( object, e );
           }
       }
   }
  
  
  
  1.4       +1 -7      jakarta-avalon-excalibur/converter/src/java/org/apache/excalibur/converter/lib/StringToDateConverter.java
  
  Index: StringToDateConverter.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/converter/src/java/org/apache/excalibur/converter/lib/StringToDateConverter.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- StringToDateConverter.java	13 Jun 2002 17:24:50 -0000	1.3
  +++ StringToDateConverter.java	16 Jul 2002 00:41:35 -0000	1.4
  @@ -9,8 +9,6 @@
   
   import java.text.DateFormat;
   import java.util.Date;
  -import org.apache.avalon.excalibur.i18n.ResourceManager;
  -import org.apache.avalon.excalibur.i18n.Resources;
   import org.apache.excalibur.converter.AbstractConverter;
   import org.apache.excalibur.converter.ConverterException;
   
  @@ -28,9 +26,6 @@
   public class StringToDateConverter
       extends AbstractConverter
   {
  -    private static final Resources REZ =
  -        ResourceManager.getPackageResources( StringToDateConverter.class );
  -
       /**
        * Construct the converter.
        */
  @@ -57,8 +52,7 @@
           }
           catch( final NumberFormatException nfe )
           {
  -            final String message = REZ.getString( "convert.bad-byte.error", object );
  -            throw new ConverterException( message, nfe );
  +            return noConvert( object, nfe );
           }
       }
   }
  
  
  
  1.3       +1 -7      jakarta-avalon-excalibur/converter/src/java/org/apache/excalibur/converter/lib/StringToDoubleConverter.java
  
  Index: StringToDoubleConverter.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/converter/src/java/org/apache/excalibur/converter/lib/StringToDoubleConverter.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- StringToDoubleConverter.java	13 May 2002 12:17:38 -0000	1.2
  +++ StringToDoubleConverter.java	16 Jul 2002 00:41:35 -0000	1.3
  @@ -7,8 +7,6 @@
    */
   package org.apache.excalibur.converter.lib;
   
  -import org.apache.avalon.excalibur.i18n.ResourceManager;
  -import org.apache.avalon.excalibur.i18n.Resources;
   import org.apache.excalibur.converter.AbstractConverter;
   import org.apache.excalibur.converter.ConverterException;
   
  @@ -21,9 +19,6 @@
   public class StringToDoubleConverter
       extends AbstractConverter
   {
  -    private static final Resources REZ =
  -        ResourceManager.getPackageResources( StringToDoubleConverter.class );
  -
       /**
        * Construct the converter.
        */
  @@ -49,8 +44,7 @@
           }
           catch( final NumberFormatException nfe )
           {
  -            final String message = REZ.getString( "convert.bad-double.error", object );
  -            throw new ConverterException( message, nfe );
  +            return noConvert( object, nfe );
           }
       }
   }
  
  
  
  1.3       +1 -7      jakarta-avalon-excalibur/converter/src/java/org/apache/excalibur/converter/lib/StringToFloatConverter.java
  
  Index: StringToFloatConverter.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/converter/src/java/org/apache/excalibur/converter/lib/StringToFloatConverter.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- StringToFloatConverter.java	13 May 2002 12:17:38 -0000	1.2
  +++ StringToFloatConverter.java	16 Jul 2002 00:41:35 -0000	1.3
  @@ -7,8 +7,6 @@
    */
   package org.apache.excalibur.converter.lib;
   
  -import org.apache.avalon.excalibur.i18n.ResourceManager;
  -import org.apache.avalon.excalibur.i18n.Resources;
   import org.apache.excalibur.converter.AbstractConverter;
   import org.apache.excalibur.converter.ConverterException;
   
  @@ -21,9 +19,6 @@
   public class StringToFloatConverter
       extends AbstractConverter
   {
  -    private static final Resources REZ =
  -        ResourceManager.getPackageResources( StringToFloatConverter.class );
  -
       /**
        * Construct the converter.
        */
  @@ -49,8 +44,7 @@
           }
           catch( final NumberFormatException nfe )
           {
  -            final String message = REZ.getString( "convert.bad-float.error", object );
  -            throw new ConverterException( message, nfe );
  +            return noConvert( object, nfe );
           }
       }
   }
  
  
  
  1.3       +1 -7      jakarta-avalon-excalibur/converter/src/java/org/apache/excalibur/converter/lib/StringToIntegerConverter.java
  
  Index: StringToIntegerConverter.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/converter/src/java/org/apache/excalibur/converter/lib/StringToIntegerConverter.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- StringToIntegerConverter.java	13 May 2002 12:17:38 -0000	1.2
  +++ StringToIntegerConverter.java	16 Jul 2002 00:41:35 -0000	1.3
  @@ -7,8 +7,6 @@
    */
   package org.apache.excalibur.converter.lib;
   
  -import org.apache.avalon.excalibur.i18n.ResourceManager;
  -import org.apache.avalon.excalibur.i18n.Resources;
   import org.apache.excalibur.converter.AbstractConverter;
   import org.apache.excalibur.converter.ConverterException;
   
  @@ -24,9 +22,6 @@
   public class StringToIntegerConverter
       extends AbstractConverter
   {
  -    private static final Resources REZ =
  -        ResourceManager.getPackageResources( StringToFloatConverter.class );
  -
       /**
        * Construct the converter.
        */
  @@ -70,8 +65,7 @@
           }
           catch( final NumberFormatException nfe )
           {
  -            final String message = REZ.getString( "convert.bad-integer.error", object );
  -            throw new ConverterException( message, nfe );
  +            return noConvert( object, nfe );
           }
       }
   }
  
  
  
  1.3       +1 -7      jakarta-avalon-excalibur/converter/src/java/org/apache/excalibur/converter/lib/StringToLongConverter.java
  
  Index: StringToLongConverter.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/converter/src/java/org/apache/excalibur/converter/lib/StringToLongConverter.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- StringToLongConverter.java	13 May 2002 12:17:38 -0000	1.2
  +++ StringToLongConverter.java	16 Jul 2002 00:41:35 -0000	1.3
  @@ -7,8 +7,6 @@
    */
   package org.apache.excalibur.converter.lib;
   
  -import org.apache.avalon.excalibur.i18n.ResourceManager;
  -import org.apache.avalon.excalibur.i18n.Resources;
   import org.apache.excalibur.converter.AbstractConverter;
   import org.apache.excalibur.converter.ConverterException;
   
  @@ -24,9 +22,6 @@
   public class StringToLongConverter
       extends AbstractConverter
   {
  -    private static final Resources REZ =
  -        ResourceManager.getPackageResources( StringToLongConverter.class );
  -
       /**
        * Construct the converter.
        */
  @@ -70,8 +65,7 @@
           }
           catch( final NumberFormatException nfe )
           {
  -            final String message = REZ.getString( "convert.bad-long.error", object );
  -            throw new ConverterException( message, nfe );
  +            return noConvert( object, nfe );
           }
       }
   }
  
  
  
  1.3       +1 -7      jakarta-avalon-excalibur/converter/src/java/org/apache/excalibur/converter/lib/StringToShortConverter.java
  
  Index: StringToShortConverter.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/converter/src/java/org/apache/excalibur/converter/lib/StringToShortConverter.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- StringToShortConverter.java	13 May 2002 12:17:38 -0000	1.2
  +++ StringToShortConverter.java	16 Jul 2002 00:41:35 -0000	1.3
  @@ -7,8 +7,6 @@
    */
   package org.apache.excalibur.converter.lib;
   
  -import org.apache.avalon.excalibur.i18n.ResourceManager;
  -import org.apache.avalon.excalibur.i18n.Resources;
   import org.apache.excalibur.converter.AbstractConverter;
   import org.apache.excalibur.converter.ConverterException;
   
  @@ -24,9 +22,6 @@
   public class StringToShortConverter
       extends AbstractConverter
   {
  -    private static final Resources REZ =
  -        ResourceManager.getPackageResources( StringToShortConverter.class );
  -
       /**
        * Construct the converter.
        */
  @@ -70,8 +65,7 @@
           }
           catch( final NumberFormatException nfe )
           {
  -            final String message = REZ.getString( "convert.bad-short.error", object );
  -            throw new ConverterException( message, nfe );
  +            return noConvert( object, nfe );
           }
       }
   }
  
  
  
  1.2       +3 -10     jakarta-avalon-excalibur/converter/src/java/org/apache/excalibur/converter/lib/StringToTimeConverter.java
  
  Index: StringToTimeConverter.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/converter/src/java/org/apache/excalibur/converter/lib/StringToTimeConverter.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- StringToTimeConverter.java	16 Jul 2002 00:15:59 -0000	1.1
  +++ StringToTimeConverter.java	16 Jul 2002 00:41:35 -0000	1.2
  @@ -7,11 +7,9 @@
    */
   package org.apache.excalibur.converter.lib;
   
  -import org.apache.avalon.excalibur.i18n.ResourceManager;
  -import org.apache.avalon.excalibur.i18n.Resources;
  +import java.sql.Time;
   import org.apache.excalibur.converter.AbstractConverter;
   import org.apache.excalibur.converter.ConverterException;
  -import java.sql.Time;
   
   /**
    * String to {@link Time} converter.
  @@ -22,9 +20,6 @@
   public class StringToTimeConverter
       extends AbstractConverter
   {
  -    private static final Resources REZ =
  -        ResourceManager.getPackageResources( StringToTimeConverter.class );
  -
       /**
        * Construct the converter.
        */
  @@ -48,11 +43,9 @@
           {
               return Time.valueOf( object.toString() );
           }
  -        catch( final NumberFormatException nfe )
  +        catch( final Exception e )
           {
  -            final String message =
  -                REZ.getString( "convert.bad-time.error", object );
  -            throw new ConverterException( message, nfe );
  +            return noConvert( object, e );
           }
       }
   }
  
  
  
  1.2       +2 -7      jakarta-avalon-excalibur/converter/src/java/org/apache/excalibur/converter/lib/StringToTimestampConverter.java
  
  Index: StringToTimestampConverter.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/converter/src/java/org/apache/excalibur/converter/lib/StringToTimestampConverter.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- StringToTimestampConverter.java	16 Jul 2002 00:15:59 -0000	1.1
  +++ StringToTimestampConverter.java	16 Jul 2002 00:41:35 -0000	1.2
  @@ -22,9 +22,6 @@
   public class StringToTimestampConverter
       extends AbstractConverter
   {
  -    private static final Resources REZ =
  -        ResourceManager.getPackageResources( StringToTimestampConverter.class );
  -
       /**
        * Construct the converter.
        */
  @@ -48,11 +45,9 @@
           {
               return Timestamp.valueOf( object.toString() );
           }
  -        catch( final NumberFormatException nfe )
  +        catch( final Exception e )
           {
  -            final String message =
  -                REZ.getString( "convert.bad-timestamp.error", object );
  -            throw new ConverterException( message, nfe );
  +            return noConvert( object, e );
           }
       }
   }
  
  
  
  1.3       +1 -8      jakarta-avalon-excalibur/converter/src/java/org/apache/excalibur/converter/lib/StringToURLConverter.java
  
  Index: StringToURLConverter.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/converter/src/java/org/apache/excalibur/converter/lib/StringToURLConverter.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- StringToURLConverter.java	13 May 2002 12:17:38 -0000	1.2
  +++ StringToURLConverter.java	16 Jul 2002 00:41:35 -0000	1.3
  @@ -9,8 +9,6 @@
   
   import java.net.MalformedURLException;
   import java.net.URL;
  -import org.apache.avalon.excalibur.i18n.ResourceManager;
  -import org.apache.avalon.excalibur.i18n.Resources;
   import org.apache.excalibur.converter.AbstractConverter;
   import org.apache.excalibur.converter.ConverterException;
   
  @@ -23,9 +21,6 @@
   public class StringToURLConverter
       extends AbstractConverter
   {
  -    private static final Resources REZ =
  -        ResourceManager.getPackageResources( StringToURLConverter.class );
  -
       /**
        * Construct the converter.
        */
  @@ -51,10 +46,8 @@
           }
           catch( final MalformedURLException mue )
           {
  -            final String message = REZ.getString( "convert.bad-url.error", object );
  -            throw new ConverterException( message, mue );
  +            return noConvert( object, mue );
           }
  -
       }
   }
   
  
  
  

--
To unsubscribe, e-mail:   <mailto:avalon-cvs-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:avalon-cvs-help@jakarta.apache.org>


Mime
View raw message