Skip to content

Commit

Permalink
GH-249 getAllEngineInstances() can return collection with null elements
Browse files Browse the repository at this point in the history
(cherry picked from commit 6377e2b)
  • Loading branch information
thurka committed Nov 9, 2020
1 parent 7dd6012 commit f7f67c3
Showing 1 changed file with 3 additions and 0 deletions.
Expand Up @@ -213,6 +213,7 @@ private Collection<CPUSampler> getAllStackTracesInstances() {
Collection<Engine> all = getAllEngineInstances();

for (Engine engine : all) {
if (engine == null) continue;
CPUSampler sampler = CPUSampler.find(engine);

if (sampler != null) {
Expand Down Expand Up @@ -251,6 +252,7 @@ private Collection<HeapMonitor> getAllHeapHistogramInstances() {
Collection<Engine> all = getAllEngineInstances();

for (Engine engine : all) {
if (engine == null) continue;
HeapMonitor heapHisto = HeapMonitor.find(engine);

if (heapHisto != null) {
Expand Down Expand Up @@ -333,6 +335,7 @@ private void setMode(Mode m) {
Collection<Engine> all = getAllEngineInstances();

for (Engine engine : all) {
if (engine == null) continue;
CPUSampler sampler = CPUSampler.find(engine);

if (sampler != null) {
Expand Down

0 comments on commit f7f67c3

Please sign in to comment.