< prev index next >

test/jdk/com/sun/jdi/TestScaffold.java

Print this page
*** 556,13 ***
  
          // Need to change args to run wrapper using command like 'DebuggeeWrapper <app-name>'
          // and set property 'test.thread.factory' so test could use DebuggeeWrapper.isVirtual() method
          String testThreadFactoryName = DebuggeeWrapper.getTestThreadFactoryName();
          if (testThreadFactoryName != null && !argInfo.targetAppCommandLine.isEmpty()) {
!             argInfo.targetVMArgs += "-D" + DebuggeeWrapper.PROPERTY_NAME + "=" + testThreadFactoryName;
              argInfo.targetAppCommandLine = DebuggeeWrapper.class.getName() + ' ' + argInfo.targetAppCommandLine;
!         } else if ("true".equals(System.getProperty("test.enable.preview"))) {
              // the test specified @enablePreview.
              argInfo.targetVMArgs += "--enable-preview ";
          }
          return argInfo;
      }
--- 556,14 ---
  
          // Need to change args to run wrapper using command like 'DebuggeeWrapper <app-name>'
          // and set property 'test.thread.factory' so test could use DebuggeeWrapper.isVirtual() method
          String testThreadFactoryName = DebuggeeWrapper.getTestThreadFactoryName();
          if (testThreadFactoryName != null && !argInfo.targetAppCommandLine.isEmpty()) {
!             argInfo.targetVMArgs += "-D" + DebuggeeWrapper.PROPERTY_NAME + "=" + testThreadFactoryName + " ";
              argInfo.targetAppCommandLine = DebuggeeWrapper.class.getName() + ' ' + argInfo.targetAppCommandLine;
!         }
+         if ("true".equals(System.getProperty("test.enable.preview"))) {
              // the test specified @enablePreview.
              argInfo.targetVMArgs += "--enable-preview ";
          }
          return argInfo;
      }
< prev index next >