VisualVM OQL filter not working as expected

777 views Asked by At

I am wondering why the following OQL query is not simply returning the maximum amount of returns:

filter(heap.objects(), function(it) {
 return true;
});

In fact, I only get 1 random object returned.

Does this make any sense? My heap has 31.000 objects.

As far as I know, the above should return ALL objects (or the limit of returns).

My end goal is to be able to loop every object's field to check if it is a float and has a certain value.

1

There are 1 answers

0
Tom On BEST ANSWER

My level of humanity once again waisted a lot of time, I forgot to add the select statement:

select filter(heap.objects(), function(it) {
     return true;
    });

Hopefully this will help someone else just as human as me.