Found a problem related to recent performance branch merge

Thomas Segismont tsegismo at redhat.com
Wed Jan 29 17:26:09 UTC 2014


I saw this in my agent log:

2014-01-29 18:18:52,689 WARN  [Content.discovery-5] 
(rhq.core.pc.content.ContentDiscoveryRunner)- Exception received from 
component while attempting content retrieval
java.lang.UnsupportedOperationException
	at java.util.AbstractCollection.add(AbstractCollection.java:260)
	at java.util.AbstractCollection.addAll(AbstractCollection.java:342)
	at 
org.rhq.core.pc.content.ContentManager.handleDiscoveredContent(ContentManager.java:618)
	at 
org.rhq.core.pc.content.ContentManager.performContentDiscovery(ContentManager.java:428)
	at 
org.rhq.core.pc.content.ContentDiscoveryRunner.call(ContentDiscoveryRunner.java:121)
	at 
org.rhq.core.pc.content.ContentDiscoveryRunner.run(ContentDiscoveryRunner.java:86)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
	at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:304)
	at 
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:178)
	at 
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
	at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
	at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
	at java.lang.Thread.run(Thread.java:744)


This is due to 
org.rhq.core.pc.inventory.ResourceContainer#getInstalledPackages, which 
used to create a new empty set, and now returns Collections#emptySet, 
which is immutable.

I'm going to update the code to take this into account, but I wanted to 
let you know that such problems could occur anywhere else.

Regards,
Thomas


More information about the rhq-devel mailing list