PDA

View Full Version : [Mondrian] Cube getTimeDimension use when Cube has no Time dimension



Richard Emberson
06-06-2007, 03:50 PM
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 (DOT) org
http://lists.pentaho.org/mailman/listinfo/mondrian