dion 2003/07/27 21:49:21
Modified: src/java/org/apache/maven DVSLFormatter.java
Log:
Renaming and formatting added back
Revision Changes Path
1.13 +10 -10 maven/src/java/org/apache/maven/DVSLFormatter.java
Index: DVSLFormatter.java
===================================================================
RCS file: /home/cvs/maven/src/java/org/apache/maven/DVSLFormatter.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- DVSLFormatter.java 27 Jul 2003 23:33:56 -0000 1.12
+++ DVSLFormatter.java 28 Jul 2003 04:49:21 -0000 1.13
@@ -56,11 +56,11 @@
* ====================================================================
*/
+import java.text.DecimalFormat;
+
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import java.text.DecimalFormat;
-
/**
* Formatting tool for use with the DVSL toolbox. This class contains
* static methods to assist in formatting needs that can't be done or
@@ -80,7 +80,7 @@
/**
* Log for debug output
*/
- private static Log LOG = LogFactory.getLog(DVSLFormatter.class);
+ private static Log log = LogFactory.getLog(DVSLFormatter.class);
/**
* Formats a string as a number using the specified pattern.
@@ -96,9 +96,9 @@
* @throws IllegalArgumentException If an invalid pattern is
* specified.
*/
- public static final String formatNumber( String value, String pattern )
+ public static final String formatNumber( final String value, final String
pattern )
{
- LOG.debug("value = '" + value + "', pattern = '" + pattern + "'");
+ log.debug("value = '" + value + "', pattern = '" + pattern + "'");
if ( pattern == null || value == null )
{
return "<error formatting: '" + value + "' with '" + pattern + "'>";
@@ -110,7 +110,7 @@
{
formatter = new DecimalFormat(pattern);
Number valueAsNumber = Double.valueOf(value.trim());
-
+
if (pattern.indexOf(".") != -1 || pattern.indexOf("%") != -1)
{
// parse as a decimal
@@ -122,15 +122,15 @@
formatter.setParseIntegerOnly(true);
ret = formatter.format(valueAsNumber.longValue());
}
- LOG.debug("ret='" + ret + "'");
+ log.debug("ret='" + ret + "'");
}
catch ( Exception e )
{
- LOG.error("<error formatting: '" + value + "' with '" + pattern + "'>",
e);
+ log.error("<error formatting: '" + value + "' with '" + pattern + "'>",
e);
return "<error formatting: '" + value + "' with '" + pattern + "'>";
}
return ret;
}
-}
\ No newline at end of file
+}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]