Github user aledsage commented on a diff in the pull request:
https://github.com/apache/brooklyn-server/pull/331#discussion_r80220422
--- Diff:
camp/camp-base/src/main/java/org/apache/brooklyn/camp/spi/collection/BasicResourceLookup.java
---
@@ -43,6 +47,11 @@ public synchronized void add(T item) {
if (old!=null) {
items.put(old.getId(), old);
throw new IllegalStateException("Already contains item for
"+item.getId()+": "+old+" (adding "+item+")");
--- End diff --
Why does this override the previous value and then throw the exception? I'd
have thought we'd either just throw, or we'd override and just log.warn.
---
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.
---