diff --git a/pom.xml b/pom.xml index 07d4e72c9..ab106f1ad 100755 --- a/pom.xml +++ b/pom.xml @@ -20,7 +20,7 @@ net.openhft java-parent-pom - 1.1.16 + 1.1.17 diff --git a/src/test/java/net/openhft/chronicle/map/MemoryLeaksTest.java b/src/test/java/net/openhft/chronicle/map/MemoryLeaksTest.java index 3ad44013a..a31a4d087 100644 --- a/src/test/java/net/openhft/chronicle/map/MemoryLeaksTest.java +++ b/src/test/java/net/openhft/chronicle/map/MemoryLeaksTest.java @@ -20,6 +20,8 @@ import com.google.common.collect.Lists; import net.openhft.chronicle.bytes.NoBytesStore; import net.openhft.chronicle.core.OS; import net.openhft.chronicle.core.values.IntValue; +import net.openhft.chronicle.hash.impl.util.Cleaner; +import net.openhft.chronicle.hash.impl.util.CleanerUtils; import net.openhft.chronicle.hash.serialization.impl.StringSizedReader; import net.openhft.chronicle.hash.serialization.impl.StringUtf8DataAccess; import net.openhft.chronicle.values.Values; @@ -27,7 +29,6 @@ import org.junit.*; import org.junit.rules.TemporaryFolder; import org.junit.runner.RunWith; import org.junit.runners.Parameterized; -import sun.misc.Cleaner; import java.io.IOException; import java.io.PrintWriter; @@ -224,7 +225,7 @@ public class MemoryLeaksTest { CountedStringReader() { serializerCount.incrementAndGet(); serializers.add(new WeakReference<>(this)); - cleaner = Cleaner.create(this, serializerCount::decrementAndGet); + cleaner = CleanerUtils.createCleaner(this, serializerCount::decrementAndGet); try (StringWriter stringWriter = new StringWriter(); PrintWriter printWriter = new PrintWriter(stringWriter)) { new Exception().printStackTrace(printWriter);