FAQ
Sorry for the email storm. I thought my 3.0 upgrade had gone smoothly,
but it turns out that there were hidden test failures due to someone
changing some code on me.

As I'm coming across some of these things that worked in 2.0.3 and fail
in 3.0, I'm wondering to what degree things are supposed to be backward
compatible. Take my run-in with passing null into
ExpressionFactory#likeIgnoreCaseExp. In 3.0, this results in an NPE
(that I planned to clean up), whereas in 2.0 it results in a properly
constructed Expression. This expression ends up returning no objects
for any query, but it works. Is it more wrong for the user to pass in
null or for the framework to hide an error by degrading gracefully? I
guess without knowing why it doesn't work in 3.0, I can't really say if
it's a bug or not.

Maybe the best thing to do is open up JIRA issues and let Andrus decide
whether or not they're actually bugs?

--
Kevin Menard
Servprise International, Inc.
800.832.3823 x308

Search Discussions

  • Andrus Adamchik at Aug 4, 2007 at 6:02 pm
    This is strange. I do not recall any changes that should affect the
    "exp" package. If you can prove that the behavior has changed, I'd
    appreciate a bug report with details.

    Generally we are trying to document all cases where backwards
    compatibility is broken in the UPGRADE-NOTES.txt.

    Andrus

    On Aug 3, 2007, at 8:46 PM, Kevin Menard wrote:
    Sorry for the email storm. I thought my 3.0 upgrade had gone
    smoothly,
    but it turns out that there were hidden test failures due to someone
    changing some code on me.

    As I'm coming across some of these things that worked in 2.0.3 and
    fail
    in 3.0, I'm wondering to what degree things are supposed to be
    backward
    compatible. Take my run-in with passing null into
    ExpressionFactory#likeIgnoreCaseExp. In 3.0, this results in an NPE
    (that I planned to clean up), whereas in 2.0 it results in a properly
    constructed Expression. This expression ends up returning no objects
    for any query, but it works. Is it more wrong for the user to pass in
    null or for the framework to hide an error by degrading gracefully? I
    guess without knowing why it doesn't work in 3.0, I can't really
    say if
    it's a bug or not.

    Maybe the best thing to do is open up JIRA issues and let Andrus
    decide
    whether or not they're actually bugs?

    --
    Kevin Menard
    Servprise International, Inc.
    800.832.3823 x308
  • Andrus Adamchik at Aug 14, 2007 at 9:35 pm

    On Aug 3, 2007, at 1:46 PM, Kevin Menard wrote:

    Take my run-in with passing null into
    ExpressionFactory#likeIgnoreCaseExp. In 3.0, this results in an NPE
    (that I planned to clean up), whereas in 2.0 it results in a properly
    constructed Expression.
    Kevin,

    by any chance this is the same problem as this Jira that I just opened?

    https://issues.apache.org/cayenne/browse/CAY-847

    Andrus
  • Andrus Adamchik at Aug 14, 2007 at 9:42 pm
    Ok, I think it is not the same but related. Comparing ASTEquals and
    ASTLikeIgnoreCase, NULL wrapping is done differently:

    public ASTEqual(ASTPath path, Object value) {
    super(ExpressionParserTreeConstants.JJTEQUAL);
    jjtAddChild(path, 0);
    jjtAddChild(new ASTScalar(value), 1);
    connectChildren();
    }

    public ASTLikeIgnoreCase(ASTPath path, Object pattern) {
    super(ExpressionParserTreeConstants.JJTLIKEIGNORECASE, true);
    jjtAddChild(path, 0);
    jjtAddChild(wrapChild(pattern), 1);
    connectChildren();
    }

    Andrus


    On Aug 14, 2007, at 5:35 PM, Andrus Adamchik wrote:

    On Aug 3, 2007, at 1:46 PM, Kevin Menard wrote:

    Take my run-in with passing null into
    ExpressionFactory#likeIgnoreCaseExp. In 3.0, this results in an NPE
    (that I planned to clean up), whereas in 2.0 it results in a properly
    constructed Expression.
    Kevin,

    by any chance this is the same problem as this Jira that I just
    opened?

    https://issues.apache.org/cayenne/browse/CAY-847

    Andrus

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupdev @
categoriescayenne
postedAug 3, '07 at 5:46p
activeAug 14, '07 at 9:42p
posts4
users2
websitecayenne.apache.org

2 users in discussion

Andrus Adamchik: 3 posts Kevin Menard: 1 post

People

Translate

site design / logo © 2022 Grokbase