Github user aledsage commented on a diff in the pull request:
https://github.com/apache/incubator-brooklyn/pull/910#discussion_r41485190
--- Diff:
core/src/main/java/org/apache/brooklyn/enricher/stock/Transformer.java ---
@@ -44,9 +44,6 @@
public static ConfigKey<Function<?, ?>> TRANSFORMATION_FROM_VALUE =
ConfigKeys.newConfigKey(new TypeToken<Function<?, ?>>() {},
"enricher.transformation");
public static ConfigKey<Function<?, ?>> TRANSFORMATION_FROM_EVENT =
ConfigKeys.newConfigKey(new TypeToken<Function<?, ?>>() {},
"enricher.transformation.fromevent");
- public Transformer() {
--- End diff --
No particularly strong feelings from me, but I'd lean towards including the
no-arg constructor for two reasons:
1. It's consistent with the other enrichers (we could change them all, but
having some of each pattern seems more confusing).
2. The contract for enrichers/policies/entities/locations to be
instantiated through the `EnricherSpec` etc is that the class must have a
no-arg constructor. We don't expect people to call this constructor directly.
The second point means we probably should include the constructor with a
comment. We could maybe even change `InternalPolicyFactory` etc so that it can
handle calling protected constructors, which would enforce that more.
Anyway, I'm happy to ignore it in this PR.
---
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.
---