<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=us-ascii" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.6001.18813"></HEAD>
<BODY>
<DIV><SPAN class=175020702-29092009><FONT color=#000080 size=2 
face="Lucida Sans">Thanks. I fixed the bug today. See my comments on 
MONDRIAN-620 and duplicate bug <A 
href="http://jira.pentaho.com/browse/MONDRIAN-434"><FONT size=3 
face="Times New Roman">http://jira.pentaho.com/browse/MONDRIAN-434</FONT></A>.</FONT></SPAN></DIV><BR>
<BLOCKQUOTE 
style="BORDER-LEFT: #000080 2px solid; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px">
  <DIV dir=ltr lang=en-us class=OutlookMessageHeader align=left>
  <HR tabIndex=-1>
  <FONT size=2 face=Tahoma><B>From:</B> Matt Campbell [mailto:mkambol@gmail.com] 
  <BR><B>Sent:</B> Monday, September 28, 2009 5:00 AM<BR><B>To:</B> 
  jhyde@pentaho.com; Mondrian developer mailing list<BR><B>Subject:</B> Re: 
  [Mondrian] MONDRIAN-620: Incomplete format string<BR></FONT><BR></DIV>
  <DIV></DIV>I've updated the bug with info about the default Analysis Services 
  2000/2005 behavior.<BR><BR>
  <DIV class=gmail_quote>On Tue, Sep 15, 2009 at 10:52 PM, Julian Hyde <SPAN 
  dir=ltr>&lt;<A 
  href="mailto:jhyde@pentaho.com">jhyde@pentaho.com</A>&gt;</SPAN> wrote:<BR>
  <BLOCKQUOTE 
  style="BORDER-LEFT: rgb(204,204,204) 1px solid; MARGIN: 0pt 0pt 0pt 0.8ex; PADDING-LEFT: 1ex" 
  class=gmail_quote>
    <DIV>
    <DIV><SPAN><FONT color=#000080 size=2 
    face="Lucida Sans">Matt,</FONT></SPAN></DIV>
    <DIV><SPAN><FONT color=#000080 size=2 
    face="Lucida Sans"></FONT></SPAN>&nbsp;</DIV>
    <DIV><SPAN><FONT color=#000080 size=2 face="Lucida Sans">See my comments on 
    the bug.</FONT></SPAN></DIV>
    <DIV><SPAN><FONT color=#000080 size=2 
    face="Lucida Sans"></FONT></SPAN>&nbsp;</DIV>
    <DIV><SPAN><A href="http://jira.pentaho.com/browse/MONDRIAN-620" 
    target=_blank>http://jira.pentaho.com/browse/MONDRIAN-620</A></SPAN></DIV>
    <DIV><SPAN><FONT color=#000080 size=2 
    face="Lucida Sans"></FONT></SPAN>&nbsp;</DIV>
    <DIV><SPAN><FONT color=#000080 size=2 
    face="Lucida Sans">Julian</FONT></SPAN></DIV><BR>
    <BLOCKQUOTE 
    style="BORDER-LEFT: rgb(0,0,128) 2px solid; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px">
      <DIV dir=ltr lang=en-us align=left>
      <HR>
      <FONT size=2 face=Tahoma><B>From:</B> <A 
      href="mailto:mondrian-bounces@pentaho.org" 
      target=_blank>mondrian-bounces@pentaho.org</A> [mailto:<A 
      href="mailto:mondrian-bounces@pentaho.org" 
      target=_blank>mondrian-bounces@pentaho.org</A>] <B>On Behalf Of </B>Matt 
      Campbell<BR><B>Sent:</B> Tuesday, September 15, 2009 11:32 
      AM<BR><B>To:</B> Mondrian developer mailing list<BR><B>Subject:</B> 
      [Mondrian] MONDRIAN-620: Incomplete format string<BR></FONT><BR></DIV>
      <DIV>
      <DIV></DIV>
      <DIV class=h5>
      <DIV></DIV>I just entered MONDRIAN-620 for the following issue.&nbsp; 
      Mondrian supports a format string that follows a layout like this:&nbsp; 
      <BR><BR>&nbsp;&nbsp;&nbsp;&nbsp; #,##0;(#,##0);0<BR><BR>Where the item to 
      the left is the format for positive numbers, the format in the middle is 
      negative, and the format to the right is Nil.<BR><BR>I discovered recently 
      that if you omit the Nil format string you can get an 
      ArrayIndexOutOfBoundsException.&nbsp; The following unit test shows this 
      (it uses checkFormat() from FormatTest):<BR><BR><BR>&nbsp;public void 
      testMissingNilFormat() <BR>&nbsp;&nbsp;&nbsp;&nbsp;{ 
      <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;checkFormat(null, 
      -0.02, "#,##0;(#,##0)"); <BR>&nbsp;&nbsp;&nbsp;&nbsp;} 
      <BR><BR><BR>java.lang.ArrayIndexOutOfBoundsException: 
      2<BR>&nbsp;&nbsp;&nbsp; at 
      mondrian.util.Format$AlternateFormat.format(Format.java:348)<BR>&nbsp;&nbsp;&nbsp; 
      at mondrian.util.Format.format(Format.java:2432)<BR>&nbsp;&nbsp;&nbsp; at 
      mondrian.util.Format.format(Format.java:2420)<BR>&nbsp;&nbsp;&nbsp; at 
      mondrian.util.FormatTest.checkFormat(FormatTest.java:404)<BR>&nbsp;&nbsp;&nbsp; 
      at 
      mondrian.util.FormatTest.testSmallNumber(FormatTest.java:249)<BR>&nbsp;&nbsp;&nbsp; 
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native 
      Method)<BR>&nbsp;&nbsp;&nbsp; at 
      sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)<BR>&nbsp;&nbsp;&nbsp; 
      at 
      sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)<BR>&nbsp;&nbsp;&nbsp; 
      at 
      com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:40)<BR>&nbsp;&nbsp;&nbsp; 
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native 
      Method)<BR>&nbsp;&nbsp;&nbsp; at 
      sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)<BR>&nbsp;&nbsp;&nbsp; 
      at 
      sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)<BR>&nbsp;&nbsp;&nbsp; 
      at 
      com.intellij.rt.execution.application.AppMain.main(AppMain.java:90)<BR><BR>A 
      possible solution would be to use a default format string if none is 
      specified.&nbsp; Does that sound like a reasonable 
    fix?<BR></DIV></DIV></BLOCKQUOTE></DIV><BR>_______________________________________________<BR>Mondrian 
    mailing list<BR><A 
    href="mailto:Mondrian@pentaho.org">Mondrian@pentaho.org</A><BR><A 
    href="http://lists.pentaho.org/mailman/listinfo/mondrian" 
    target=_blank>http://lists.pentaho.org/mailman/listinfo/mondrian</A><BR><BR></BLOCKQUOTE></DIV><BR></BLOCKQUOTE></BODY></HTML>