Description
On few places in Artemis code, inefficient iteration over Map object is present.
Example
Map<Thread, StackTraceElement[]> threadMap = Thread.getAllStackTraces(); for (Thread thread : threadMap.keySet()) { StackTraceElement[] stack = threadMap.get(thread); ....
To make it more efficient, we should use Map.Entry instead of getting keySet and than finding corresponding value.
Places where this could be changed
- ScaleDownHandler#scaleDownDuplicateIDs
- PostOfficeJournalLoader#recoverPendingPageCounters
- ActiveMQTestBase#tearDown
Attachments
Issue Links
- links to