Github user aledsage commented on a diff in the pull request:
https://github.com/apache/brooklyn-server/pull/340#discussion_r79991712
--- Diff:
core/src/main/java/org/apache/brooklyn/core/entity/AbstractEntity.java ---
@@ -1209,59 +1208,18 @@ public void remove(AttributeSensor<?> attribute) {
public class BasicConfigurationSupport extends
AbstractConfigurationSupportInternal {
@Override
- public <T> T get(ConfigKey<T> key) {
- return configsInternal.getConfig(key);
- }
-
- @Override
- public <T> T set(ConfigKey<T> key, T val) {
+ protected <T> void assertValid(ConfigKey<T> key, T val) {
ConfigConstraints.assertValid(AbstractEntity.this, key, val);
- return setConfigInternal(key, val);
- }
-
- @Override
- public <T> T set(ConfigKey<T> key, Task<T> val) {
- return setConfigInternal(key, val);
- }
-
- @Override
- public ConfigBag getBag() {
- return configsInternal.getAllConfigBag();
- }
-
- @Override
- public ConfigBag getLocalBag() {
- return configsInternal.getLocalConfigBag();
- }
-
- @Override
- public Maybe<Object> getRaw(ConfigKey<?> key) {
- return configsInternal.getConfigRaw(key, true);
}
-
- @Override
- public Maybe<Object> getLocalRaw(ConfigKey<?> key) {
- return configsInternal.getConfigRaw(key, false);
- }
-
- @Override
- public void addToLocalBag(Map<String, ?> vals) {
- configsInternal.addToLocalBag(vals);
- }
-
- @Override
- public void removeFromLocalBag(String key) {
- configsInternal.removeFromLocalBag(key);
+
+ protected AbstractConfigMapImpl<?> getConfigsInternal() {
--- End diff --
I don't like us exposing implementation classes. Is this really needed?!
---
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.
---