> It's entirely possible it fails to dig into Maps correctly with newer Java
> releases; maybe Dawid or Uwe would know?

We have removed all reflection from that class a while ago exactly
because of encapsulation issues introduced in newer Java versions.

https://github.com/apache/lucene-solr/blob/master/lucene/core/src/java/org/apache/lucene/util/RamUsageEstimator.java

I think you may be thinking of RamUsageTester which is in the test
framework and indeed accumulates only keys and values from iterables.
These methods are for tests only and are rough. You shouldn't rely on
them for accurate memory consumption accounting (instead, use the
Accountable interface).

Dawid
D.

---------------------------------------------------------------------