diff --git a/lucene/core/src/java/org/apache/lucene/util/RamUsageEstimator.java b/lucene/core/src/java/org/apache/lucene/util/RamUsageEstimator.java index 4176539f155..a2dc7506023 100644 --- a/lucene/core/src/java/org/apache/lucene/util/RamUsageEstimator.java +++ b/lucene/core/src/java/org/apache/lucene/util/RamUsageEstimator.java @@ -420,6 +420,7 @@ public final class RamUsageEstimator { seen.add(ob); final Class obClazz = ob.getClass(); + assert obClazz != null : "jvm bug detected (Object.getClass() == null). please report this to your vendor"; if (obClazz.isArray()) { /* * Consider an array, possibly of primitive types. Push any of its references to