Re: Compound expressions Problem and solution

From: Cris Daniluk (cris.danilu..mail.com)
Date: Mon May 16 2005 - 13:49:25 EDT

  • Next message: Andrus Adamchik: "Re: Compound expressions Problem and solution"

    I've had a few developers make the same mistake and waste hours
    looking for a solution... A good lint checker will generate a warning
    whenever you ignore a method's return value. Our CI tool automatically
    emails developers with any lint as they commit, which catches a lot of
    these.

    The Expression javadoc should probably emphasize that expressions are immutable.

    On 5/16/05, Joshua Pyle <joshua.t.pyl..mail.com> wrote:
    > One of our developers, new to cayenne, recently ran in to this problem...
    >
    >
    > (didn't work)
    > Expression exp =
    > ExpressionFactory.matchExp(AuthUserAttribute.ATTR_NAME_PROPERTY,
    > testAttributeName);
    > exp.andExp
    > (ExpressionFactory.matchExp(AuthUserAttribute.USERNAME_PROPERTY,
    > testUser));
    >
    >
    > (works)
    > Expression exp =
    > ExpressionFactory.matchExp(AuthUserAttribute.ATTR_NAME_PROPERTY,
    > testAttributeName);
    > exp = exp.andExp(
    > ExpressionFactory.matchExp(AuthUserAttribute.USERNAME_PROPERTY,
    > testUser));
    >
    > It seem smalll but could cost a developer significant time.
    >
    >
    > --
    > Joshua T. Pyle
    > Go has always existed.
    >



    This archive was generated by hypermail 2.0.0 : Mon May 16 2005 - 13:49:27 EDT