Added suppress warning annotation
This commit is contained in:
parent
1e47580d39
commit
ec73e33c5a
|
@ -378,9 +378,12 @@ public class SmartgearResourcesTest extends ContextTest {
|
|||
|
||||
OperatingSystemMXBean mxbean = ManagementFactory
|
||||
.getOperatingSystemMXBean();
|
||||
@SuppressWarnings("restriction")
|
||||
com.sun.management.OperatingSystemMXBean sunmxbean = (com.sun.management.OperatingSystemMXBean) mxbean;
|
||||
@SuppressWarnings("restriction")
|
||||
long freeMemory = sunmxbean.getFreePhysicalMemorySize() / 1048576; // in
|
||||
// MB
|
||||
@SuppressWarnings("restriction")
|
||||
long totalMemory = sunmxbean.getTotalPhysicalMemorySize() / 1048576; // in
|
||||
// MB
|
||||
|
||||
|
|
Loading…
Reference in New Issue