commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yo...@apache.org
Subject cvs commit: jakarta-commons/beanutils/src/java/org/apache/commons/beanutils/locale/converters DecimalLocaleConverter.java
Date Wed, 04 Feb 2004 02:22:55 GMT
yoavs       2004/02/03 18:22:55

  Modified:    beanutils/src/java/org/apache/commons/beanutils/locale
                        package.html
               beanutils/src/java/org/apache/commons/beanutils/locale/converters
                        DecimalLocaleConverter.java
  Log:
  Fixed typo in package.html.
  Made formatter assignment happen after locale assignment
  in consturctor of DecimalLocaleConverter so that we use the
  assigned locale rather than the default.
  
  Revision  Changes    Path
  1.2       +1 -1      jakarta-commons/beanutils/src/java/org/apache/commons/beanutils/locale/package.html
  
  Index: package.html
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/beanutils/src/java/org/apache/commons/beanutils/locale/package.html,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- package.html	3 Sep 2002 21:34:20 -0000	1.1
  +++ package.html	4 Feb 2004 02:22:55 -0000	1.2
  @@ -4,7 +4,7 @@
   </head>
   <body bgcolor="white">
   <p>Locale-aware extensions of the standard beanutils classes. 
  -This package allows locale-dependent population of JavaBean's.</p>
  +This package allows locale-dependent population of JavaBeans.</p>
   
   </body>
   </html>
  
  
  
  1.7       +8 -5      jakarta-commons/beanutils/src/java/org/apache/commons/beanutils/locale/converters/DecimalLocaleConverter.java
  
  Index: DecimalLocaleConverter.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/beanutils/src/java/org/apache/commons/beanutils/locale/converters/DecimalLocaleConverter.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- DecimalLocaleConverter.java	9 Oct 2003 20:41:41 -0000	1.6
  +++ DecimalLocaleConverter.java	4 Feb 2004 02:22:55 -0000	1.7
  @@ -79,6 +79,8 @@
    * if a conversion error occurs.</p>
    *
    * @author Yauheny Mikulski
  + * @author Yoav Shapira
  + * @since 1.7
    */
   
   public class DecimalLocaleConverter extends BaseLocaleConverter {
  @@ -90,7 +92,7 @@
       private static Log log = LogFactory.getLog(DecimalLocaleConverter.class);     
   
       /** The Decimal formatter */
  -    private DecimalFormat formatter = (DecimalFormat) DecimalFormat.getInstance(locale);
  +    private DecimalFormat formatter = null;
   
       // ----------------------------------------------------------- Constructors
   
  @@ -169,7 +171,7 @@
        */
       public DecimalLocaleConverter(Locale locale, String pattern, boolean locPattern) {
   
  -        super(locale, pattern, locPattern);
  +        this(null, locale, pattern, locPattern);
       }
   
       /**
  @@ -254,6 +256,7 @@
       public DecimalLocaleConverter(Object defaultValue, Locale locale, String pattern, boolean
locPattern) {
   
           super(defaultValue, locale, pattern, locPattern);
  +	formatter = (DecimalFormat) DecimalFormat.getInstance(locale);
       }
   
       // --------------------------------------------------------- Methods
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message