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:
parent
a4eaf9536c
commit
79f02a67ce
@ -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();
|
||||
|
Loading…
x
Reference in New Issue
Block a user