Hitachi Vantara Pentaho Community Forums
Results 1 to 2 of 2

Thread: [Mondrian] Assert not conforming documentation

  1. #1
    Pappyn Bart Guest

    Default [Mondrian] Assert not conforming documentation

    I would like to return SetType(null) in a user defined function. The
    documentation says it is ok to pass null in case the type is not known.

    But the following code :

    public class SetType implements Type {

    private final Type elementType;

    /**
    * Creates a type representing a set of elements of a given type.
    *
    * @param elementType The type of the elements in the set, or null
    if not
    * known
    */
    public SetType(Type elementType) {
    assert elementType instanceof MemberType ||
    elementType instanceof TupleType;
    this.elementType = elementType;
    }

    -> In case null is passed, then this will raise an assertion failure.

    Kind regards,
    Bart


    _______________________________________________
    Mondrian mailing list
    Mondrian (AT) pentaho (DOT) org
    http://lists.pentaho.org/mailman/listinfo/mondrian

  2. #2
    Julian Hyde Guest

    Default RE: [Mondrian] Assert not conforming documentation

    Bart,

    You are correct. Feel free to change that assert.

    Julian


    _____

    From: mondrian-bounces (AT) pentaho (DOT) org [mailto:mondrian-bounces (AT) pentaho (DOT) org]
    On Behalf Of Pappyn Bart
    Sent: Thursday, April 26, 2007 3:07 AM
    To: Mondrian developer mailing list
    Subject: [Mondrian] Assert not conforming documentation


    I would like to return SetType(null) in a user defined function. The
    documentation says it is ok to pass null in case the type is not known.

    But the following code :

    public class SetType implements Type {

    private final Type elementType;

    /**
    * Creates a type representing a set of elements of a given type.
    *
    * @param elementType The type of the elements in the set, or null
    if not
    * known
    */
    public SetType(Type elementType) {
    assert elementType instanceof MemberType ||
    elementType instanceof TupleType;
    this.elementType = elementType;
    }

    -> In case null is passed, then this will raise an assertion failure.

    Kind regards,
    Bart



    _______________________________________________
    Mondrian mailing list
    Mondrian (AT) pentaho (DOT) org
    http://lists.pentaho.org/mailman/listinfo/mondrian

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.