Github user aledsage commented on a diff in the pull request:
https://github.com/apache/brooklyn-server/pull/611#discussion_r108627021
--- Diff:
core/src/main/java/org/apache/brooklyn/core/effector/ExplicitEffector.java ---
@@ -46,12 +58,20 @@ public T call(Entity entity, Map parameters) {
/** convenience to create an effector supplying a closure; annotations
are preferred,
* and subclass here would be failback, but this is offered as
- * workaround for bug GROOVY-5122, as discussed in test class CanSayHi
+ * workaround for bug GROOVY-5122, as discussed in test class CanSayHi.
+ *
+ * @deprecated since 0.11.0; explicit groovy utilities/support will be
deleted.
*/
+ @Deprecated
public static <I,T> ExplicitEffector<I,T> create(String name, Class<T>
type, List<ParameterType<?>> parameters, String description, Closure body) {
+ LOG.warn("Use of groovy.lang.Closure is deprecated, in
ExplicitEffector.create()");
--- End diff --
I've added this to javadoc on the class - I think that's good enough, as
there's not a direct replacement (i.e. one would extend `AbstractEffector`
yourself instead, as we don't need to workaround for GROOVY-5122 if you're not
using groovy - I'm not sure why anyone would want to do that).
I agree in general that if deprecating a method/class, one should point at
the alternative - but if deprecating a class, I don't think we need it on every
method.
---
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.
---