GitHub user aledsage opened a pull request:

    https://github.com/apache/brooklyn-server/pull/706

    Remove GroovyJavaMethods.* usage

    Motivated by @duncangrant encountering more problems like that in 
https://issues.apache.org/jira/browse/BROOKLYN-449, but this time when it tried 
to call `DslComponent` which called `GroovyJavaMethods.truth`.
    
    Now the only use of `GroovyJavaMethods` are:
    * If we genuinely have a Groovy-specific object, such as a `Closure` 
    * `AbstractAggregatingEnricher` constructor uses 
`GroovyJavaMethods.castToPredicate()` (but that code is all deprecated since 
0.7.0, so should just be deleted - assuming it is never mentioned in anyone's 
persisted state?!)
    
    ---
    These changes will change the semantics of our `attributeWhenReady` etc 
very slightly, for people taking advantage of the more unusual groovy'isms.
    
    The difference between `GroovyJavaMethods.truth` and 
`JavaGroovyEquivalents.groovyTruth()` is that the former also handles 
"matchers" and classes with an asBoolean method (see 
http://groovy-lang.org/semantics.html#Groovy-Truth).
    
    However, we deprecated all the groovy support in 0.11.0, so I think it's 
fine to make these changes now.

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

    $ git pull https://github.com/aledsage/brooklyn-server remove-groovy-usage

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

    https://github.com/apache/brooklyn-server/pull/706.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 #706
    
----
commit c52cb126c6efa64a1093efca423245b6ee9d8e52
Author: Aled Sage <[email protected]>
Date:   2017-05-29T11:27:10Z

    Remove GroovyJavaMethods.* usage

----


---
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 [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to