8247863: Unreachable code in OperatingSystemImpl.getTotalSwapSpaceSize()

After 8231111 we have -1 for missing metrics, thus the fix of 8236617 is obsolete

Reviewed-by: mbaesken
This commit is contained in:
Severin Gehwolf 2020-06-19 10:40:04 +02:00
parent a4eaf9536c
commit 79f02a67ce

View File

@ -61,8 +61,7 @@ class OperatingSystemImpl extends BaseOperatingSystemImpl
// it can use as much memory as the host's OS allows.
long memLimit = containerMetrics.getMemoryLimit();
if (limit >= 0 && memLimit >= 0) {
// we see a limit == 0 on some machines where "kernel does not support swap limit capabilities"
return (limit < memLimit) ? 0 : limit - memLimit;
return limit - memLimit; // might potentially be 0 for limit == memLimit
}
}
return getTotalSwapSpaceSize0();