Author: skitching Date: Sat May 28 16:26:22 2005 New Revision: 178903 URL: http://svn.apache.org/viewcvs?rev=178903&view=rev Log: Minor javadoc and comment changes only.
Modified: jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/locale/converters/DecimalLocaleConverter.java Modified: jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/locale/converters/DecimalLocaleConverter.java URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/locale/converters/DecimalLocaleConverter.java?rev=178903&r1=178902&r2=178903&view=diff ============================================================================== --- jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/locale/converters/DecimalLocaleConverter.java (original) +++ jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/locale/converters/DecimalLocaleConverter.java Sat May 28 16:26:22 2005 @@ -28,7 +28,7 @@ /** * <p>Standard [EMAIL PROTECTED] org.apache.commons.beanutils.locale.LocaleConverter} * implementation that converts an incoming - * locale-sensitive String into a <code>java.lang.Decimal</code> object, + * locale-sensitive String into a <code>java.lang.Number</code> object, * optionally using a default value or throwing a * [EMAIL PROTECTED] org.apache.commons.beanutils.ConversionException} * if a conversion error occurs.</p> @@ -214,8 +214,8 @@ // --------------------------------------------------------- Methods /** - * Convert the specified locale-sensitive input object into an output object of the - * specified type. + * Convert the specified locale-sensitive input object into an output + * object of the specified type. * * @param value The input object to be converted * @param pattern The pattern is used for the convertion @@ -224,9 +224,14 @@ * successfully */ protected Object parse(Object value, String pattern) throws ParseException { - // DecimalFormat is not thread safe so best to construct one each time + // Note that despite the ambiguous "getInstance" name, and despite the + // fact that objects returned from this method have the same toString + // representation, each call to getInstance actually returns a new + // object. DecimalFormat formatter = (DecimalFormat) DecimalFormat.getInstance(locale); - // if some constructors default pattern to null, it makes only sense to handle null pattern gracefully + + // if some constructors default pattern to null, it makes only sense + // to handle null pattern gracefully if (pattern != null) { if (locPattern) { formatter.applyLocalizedPattern(pattern); --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]