[Mondrian] Typo in the Format.LiteralFormat.format(String, StringBuilder)

Julian Hyde jhyde at pentaho.com
Thu Jan 28 17:12:31 EST 2010


Alexander,
 
You are correct that there is a bug. But I don't understand how you could
have run into this bug, since we don't implement string formatting (e.g. the
'<', '>' and '@' formatting symbols) yet.
 
Can you provide a test case that reproduces this bug?
 
Julian


  _____  

From: mondrian-bounces at pentaho.org [mailto:mondrian-bounces at pentaho.org] On
Behalf Of Alexander Korsukov
Sent: Thursday, January 28, 2010 3:19 AM
To: Mondrian developer mailing list
Subject: [Mondrian] Typo in the
Format.LiteralFormat.format(String,StringBuilder)


Hello.

src\mondrian\src\main\mondrian\util\Format.java (line 428):
   /**
    * LiteralFormat is an implementation of {@link Format.BasicFormat} which
    * prints a constant value, regardless of the value to be formatted.
    *
    * @see CompoundFormat
    */
   static class LiteralFormat extends BasicFormat
   {
       String s;

       LiteralFormat(String s)
       {
           this(FORMAT_LITERAL, s);
       }

       LiteralFormat(int code, String s)
       {
           super(code);
           this.s = s;
       }

       void format(double d, StringBuilder buf) {
           buf.append(s);
       }

       void format(long n, StringBuilder buf) {
           buf.append(s);
       }

       void format(String s, StringBuilder buf) {
           buf.append(s);
       }

       void format(Date date, StringBuilder buf) {
           buf.append(s);
       }

       void format(Calendar calendar, StringBuilder buf) {
           buf.append(s);
       }
   }

should be something like:

       void format(String str, StringBuilder buf) {
           buf.append(s);
       }

-- 
Alexander
_____________________________________________________
mailto:akorsukov at gmail.com                icq:8572488
(2E0A2052)                        xmpp:shko at jabber.ru
<mailto:xmpp%3Ashko at jabber.ru> 




-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.pentaho.org/pipermail/mondrian/attachments/20100128/fc4d7aff/attachment.html 


More information about the Mondrian mailing list