Added suppress warning annotation

This commit is contained in:
Luca Frosini 2020-07-07 17:16:30 +02:00
parent 1e47580d39
commit ec73e33c5a
1 changed files with 3 additions and 0 deletions

View File

@ -378,9 +378,12 @@ public class SmartgearResourcesTest extends ContextTest {
OperatingSystemMXBean mxbean = ManagementFactory OperatingSystemMXBean mxbean = ManagementFactory
.getOperatingSystemMXBean(); .getOperatingSystemMXBean();
@SuppressWarnings("restriction")
com.sun.management.OperatingSystemMXBean sunmxbean = (com.sun.management.OperatingSystemMXBean) mxbean; com.sun.management.OperatingSystemMXBean sunmxbean = (com.sun.management.OperatingSystemMXBean) mxbean;
@SuppressWarnings("restriction")
long freeMemory = sunmxbean.getFreePhysicalMemorySize() / 1048576; // in long freeMemory = sunmxbean.getFreePhysicalMemorySize() / 1048576; // in
// MB // MB
@SuppressWarnings("restriction")
long totalMemory = sunmxbean.getTotalPhysicalMemorySize() / 1048576; // in long totalMemory = sunmxbean.getTotalPhysicalMemorySize() / 1048576; // in
// MB // MB