tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 51234] New: NumberFormatException in fmt:formatNumber tag
Date Fri, 20 May 2011 09:37:47 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=51234

             Bug #: 51234
           Summary: NumberFormatException in fmt:formatNumber tag
           Product: Taglibs
           Version: 1.1.0
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Standard Taglib
        AssignedTo: dev@tomcat.apache.org
        ReportedBy: a.kupcov@gmail.com
    Classification: Unclassified


http://svn.apache.org/repos/asf/tomcat/taglibs/standard/trunk/impl/src/main/java/org/apache/taglibs/standard/tag/common/fmt/FormatNumberSupport.java

==== Cut ====

        if (input instanceof String) {
            try {
                if (((String) input).indexOf('.') != -1) {
                    input = Double.valueOf((String) input);
                } else {
                    input = Long.valueOf((String) input);
                }
            } catch (NumberFormatException nfe) {
                throw new JspException(
                        Resources.getMessage("FORMAT_NUMBER_PARSE_ERROR",
input),
                        nfe);
            }
        }

==== End of cut ==========

What about string value "0e-8"? It is a normal zero value but exception throws.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

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


Mime
View raw message