reugn commented on code in PR #16743:
URL: https://github.com/apache/lucene/pull/16743#discussion_r4218625342
##########
lucene/core/src/java/org/apache/lucene/util/RamUsageEstimator.java:
##########
@@ -399,15 +413,21 @@ private static long sizeOfObject(Object o, int depth,
long defSize) {
case Accountable a -> size = a.ramBytesUsed();
case String s -> size = sizeOf(s);
case boolean[] ba -> size = sizeOf(ba);
+ case Boolean _ -> size = BOOLEAN_SIZE;
case byte[] ba -> size = sizeOf(ba);
+ case Byte _ -> size = BYTE_SIZE;
case char[] ca -> size = sizeOf(ca);
+ case Character _ -> size = CHARACTER_SIZE;
case double[] da -> size = sizeOf(da);
+ case Double _ -> size = DOUBLE_SIZE;
case float[] fa -> size = sizeOf(fa);
+ case Float _ -> size = FLOAT_SIZE;
case int[] ia -> size = sizeOf(ia);
case Integer i -> size = sizeOf(i);
case Long l -> size = sizeOf(l);
Review Comment:
Simplified Integer and Long cases.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]