From ec73e33c5a29b8aa2c0b06dccbb6e969fe976946 Mon Sep 17 00:00:00 2001 From: Luca Frosini Date: Tue, 7 Jul 2020 17:16:30 +0200 Subject: [PATCH] Added suppress warning annotation --- .../resourceregistry/instances/SmartgearResourcesTest.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/test/java/org/gcube/informationsystem/resourceregistry/instances/SmartgearResourcesTest.java b/src/test/java/org/gcube/informationsystem/resourceregistry/instances/SmartgearResourcesTest.java index f36ff78..5413e09 100644 --- a/src/test/java/org/gcube/informationsystem/resourceregistry/instances/SmartgearResourcesTest.java +++ b/src/test/java/org/gcube/informationsystem/resourceregistry/instances/SmartgearResourcesTest.java @@ -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