8067291: Need additional vm checks in jdk/test/lib/testlibrary/jdk/testlibrary/Platform, checking which vm is run
Reviewed-by: fzhinkin, iignatyev
--- a/jdk/test/lib/testlibrary/jdk/testlibrary/Platform.java Wed Dec 24 17:54:00 2014 +0300
+++ b/jdk/test/lib/testlibrary/jdk/testlibrary/Platform.java Fri Dec 12 00:40:56 2014 +0300
@@ -28,6 +28,15 @@
private static final String dataModel = System.getProperty("sun.arch.data.model");
private static final String vmVersion = System.getProperty("java.vm.version");
private static final String osArch = System.getProperty("os.arch");
+ private static final String vmName = System.getProperty("java.vm.name");
+
+ public static boolean isClient() {
+ return vmName.endsWith(" Client VM");
+ }
+
+ public static boolean isServer() {
+ return vmName.endsWith(" Server VM");
+ }
public static boolean is32bit() {
return dataModel.equals("32");