--- a/test/lib/jdk/test/lib/Utils.java Tue Aug 23 19:30:35 2016 +0300
+++ b/test/lib/jdk/test/lib/Utils.java Fri Aug 26 14:47:51 2016 -0700
@@ -25,7 +25,6 @@
import java.io.File;
import java.io.IOException;
-import java.lang.reflect.Field;
import java.net.InetAddress;
import java.net.MalformedURLException;
import java.net.ServerSocket;
@@ -51,7 +50,6 @@
import java.util.function.Function;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
-import jdk.internal.misc.Unsafe;
import static jdk.test.lib.Asserts.assertTrue;
import jdk.test.lib.process.ProcessTools;
@@ -97,8 +95,6 @@
*/
public static final String TEST_CLASSES = System.getProperty("test.classes", ".");
- private static Unsafe unsafe = null;
-
/**
* Defines property name for seed value.
*/
@@ -383,21 +379,6 @@
return new String(Files.readAllBytes(filePath));
}
- /**
- * @return Unsafe instance.
- */
- public static synchronized Unsafe getUnsafe() {
- if (unsafe == null) {
- try {
- Field f = Unsafe.class.getDeclaredField("theUnsafe");
- f.setAccessible(true);
- unsafe = (Unsafe) f.get(null);
- } catch (NoSuchFieldException | IllegalAccessException e) {
- throw new RuntimeException("Unable to get Unsafe instance.", e);
- }
- }
- return unsafe;
- }
private static final char[] hexArray = new char[]{'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F'};
/**