DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5689>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5689

Java "code-formatter" incorrectly formats double values

           Summary: Java "code-formatter" incorrectly formats double values
           Product: Cocoon 2
           Version: 2.0
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: general components
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


Cocoon is incorrectly formatting scientific notation numbers in Java.

Suppose I have the following code in a logicsheet
<xsp:logic>
        double small_value = 1e-10;
        double large_value = 1e10;
        double other_value = 1e+10;
</xsp:logic>

then Cocoon will generate a java file with the following code in it
        double small_value = 1e - 10;
        double large_value = 1e10;
        double other_value = 1e + 10;

Cocoon should produce "1e-10" and "1e+10" not "1e - 10" and "1e + 10". The 
spaces introduced into these numbers produces a syntax error during compilation 
since the numbers are incorrectly formatted. Cocoon returns 
an "org.apache.cocoon.ProcessingException".

I'm guessing this is caused by JstyleFormatter? (from the following parameter 
in my cocoon.xconf)
           <parameter name="code-formatter" 
value="org.apache.cocoon.components.language.programming.java.JstyleFormatter"/>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to