[rhq-project/rhq] d24a6d: [1174841] UnsupportedOperationException on mergeIn...
by Jay Shaughnessy
Branch: refs/heads/RHQ_4_12_0_JON331GA/bug/1197908
Home: https://github.com/rhq-project/rhq
Commit: d24a6d5c9c060954eb399408f13acc27318d33ff
https://github.com/rhq-project/rhq/commit/d24a6d5c9c060954eb399408f13acc2...
Author: Jay Shaughnessy <jshaughn(a)redhat.com>
Date: 2015-03-02 (Mon, 02 Mar 2015)
Changed paths:
M modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/discovery/DiscoveryBossBean.java
Log Message:
-----------
[1174841] UnsupportedOperationException on mergeInventoryReport()
Avoid the use of Iterator.remove() because Resources coming from the
Agent may be using a customized impl for Resource.childResources (like
CopyOnWriteArraySet). The solution "lazily protects" because the
problem scenario is rare (restype reported by agent is not
present on the server) and we don't want to do any unnecessary work (like
changing the Set impl in advance).
(cherry picked from commit 9c374100de109ffa2f759a16b96da5ec20dc8a9a)
9 years, 2 months