GitHub user fpavageau opened a pull request:

    https://github.com/apache/groovy/pull/259

    Fix the comparison of generic types

    The comparison cannot shortcut when a condition passes, only when one fails,
    since it's basically a big AND. E.g. even if both lower bounds are null (and
    therefore equal), the upper bounds still need to be compared. The only
    obvious shortcut is if the operands are the same object, as the first
    condition.
    
    I did not manage to create a test that would fail without the change. 
However, it's a change similar to fae2911 which ended up causing 
[GROOVY-7742](https://issues.apache.org/jira/browse/GROOVY-7742), so I think it 
should only be applied to `master` for the moment.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/fpavageau/groovy generic_comparison

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/groovy/pull/259.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #259
    
----
commit 69de81104f45bb2ef3b2285ac269ebf8b62ecb2a
Author: Frank Pavageau <fpavag...@ekino.com>
Date:   2016-02-10T14:37:02Z

    Fix the comparison of generic types
    
    The comparison cannot shortcut when a condition passes, only when one fails,
    since it's basically a big AND. E.g. even if both lower bounds are null (and
    therefore equal), the upper bounds still need to be compared. The only
    obvious shortcut is if the operands are the same object, as the first
    condition.

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to