src/java.base/linux/classes/jdk/internal/platform/cgroupv1/SubSystem.java
changeset 57535 51286afcbf49
parent 54814 207b7bf04f49
equal deleted inserted replaced
57534:de62b363bbe6 57535:51286afcbf49
   130 
   130 
   131         try {
   131         try {
   132             retval = Long.parseLong(strval);
   132             retval = Long.parseLong(strval);
   133         } catch (NumberFormatException e) {
   133         } catch (NumberFormatException e) {
   134             // For some properties (e.g. memory.limit_in_bytes) we may overflow the range of signed long.
   134             // For some properties (e.g. memory.limit_in_bytes) we may overflow the range of signed long.
   135             // In this case, return Long.max
   135             // In this case, return Long.MAX_VALUE
   136             BigInteger b = new BigInteger(strval);
   136             BigInteger b = new BigInteger(strval);
   137             if (b.compareTo(BigInteger.valueOf(Long.MAX_VALUE)) > 0) {
   137             if (b.compareTo(BigInteger.valueOf(Long.MAX_VALUE)) > 0) {
   138                 return Long.MAX_VALUE;
   138                 return Long.MAX_VALUE;
   139             }
   139             }
   140         }
   140         }