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

Richard Emberson remberson at edgedynamics.com
Wed Jun 6 15:43:18 EDT 2007


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.



More information about the Mondrian mailing list