[Mondrian] Cube getTimeDimension use when Cube has no Time dimension

Julian Hyde julianhyde at speakeasy.net
Thu Jun 7 10:21:27 EDT 2007


Richard,

Please log a bug.

Julian

> -----Original Message-----
> From: mondrian-bounces at pentaho.org 
> [mailto:mondrian-bounces at pentaho.org] On Behalf Of Richard Emberson
> Sent: Wednesday, June 06, 2007 12:43 PM
> To: 'Mondrian developer mailing list'
> Subject: [Mondrian] Cube getTimeDimension use when Cube has 
> no Time dimension
> 
> 
> The Cube interface has the method getTimeDimension()
> defined. A common usage pattern appearing in
> LastPeriodsFunDef, PeriodsToDateFunDef, XtdFunDef,
> OpeningClosingPeriodFunDef and ParallelPeriodFunDef
> is:
> 
> validator.getQuery().getCube().getTimeDimension().getHierarchy().
> 
> 
> If the Cube does not define a Time dimension, then all of these
> result in a NullPointerException rather than some
> Mondrian usage exception.
> 
> Granted, the above functions only make sense if a Time
> dimension is defined for the Cube, but there is no check.
> 
> Richard
> 
> -- 
> Quis custodiet ipsos custodes:
> This email message is for the sole use of the intended 
> recipient(s) and
> may contain confidential information.  Any unauthorized review, use,
> disclosure or distribution is prohibited.  If you are not the intended
> recipient, please contact the sender by reply email and destroy all
> copies of the original message.
> _______________________________________________
> Mondrian mailing list
> Mondrian at pentaho.org
> http://lists.pentaho.org/mailman/listinfo/mondrian
> 




More information about the Mondrian mailing list