Description of problem: I have a plugin that uses the subclass and parent class to obtain measurement values. I wrote the code in the following way: @Override public void getValues(MeasurementReport mr, Set<MeasurementScheduleRequest> msrs) { Map<String, Double> map = new HashMap<String, Double>(); try { getMeasurements(map); } catch (Exception e) { log.warn("failed to digest additional content", e); } for (Iterator<MeasurementScheduleRequest> i = msrs.iterator(); i.hasNext(); ) { MeasurementScheduleRequest msr = i.next(); Double d = digest.get(msr.getName()); if (d != null) { mr.addData(new MeasurementDataNumeric(msr, d)); i.remove(); // XXX } } super.getValues(mr, msrs); } What this does, unfortunately, is unschedule the measurement request. The "Set" passed into the method should either be read-only or a copy. It would probably be better to be read-only, though. Version-Release number of selected component (if applicable): RHQ 4.2 How reproducible: Always Additional info:
Mazz, could you look into this? I think it makes a lot of sense
Created attachment 593763 [details] patch to measurement subsystem in PC attaching a patch for the PC's measurement classes that will now pass in a read-only set. this isn't the finished patch. I will be looking at writing unit tests for this prior to committing to master. But the patch should be all the code that goes into the PC. any additional changes will be to test classes.
git commit to master 2af89d1 added a new unit test in our arquillian test suite. there is nothing for QE to test - this is a code change.
Bulk closing of BZs that have no target version set, but which are ON_QA for more than a year and thus are in production for a long time.