< prev index next >

test/jdk/java/lang/invoke/VarHandles/VarHandleTestMethodHandleAccessString.java

Print this page
*** 19,10 ***
--- 19,12 ---
   * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
   * or visit www.oracle.com if you need additional information or have any
   * questions.
   */
  
+ // -- This file was mechanically generated: Do not edit! -- //
+ 
  /*
   * @test
   * @run testng/othervm -Diters=20000 VarHandleTestMethodHandleAccessString
   */
  

*** 37,10 ***
--- 39,12 ---
  import java.util.List;
  
  import static org.testng.Assert.*;
  
  public class VarHandleTestMethodHandleAccessString extends VarHandleBaseTest {
+     static final Class<?> type = String.class;
+ 
      static final String static_final_v = "foo";
  
      static String static_v;
  
      final String final_v = "foo";

*** 55,25 ***
  
      VarHandle vhStaticFinalField;
  
      VarHandle vhArray;
  
      @BeforeClass
      public void setup() throws Exception {
          vhFinalField = MethodHandles.lookup().findVarHandle(
!                 VarHandleTestMethodHandleAccessString.class, "final_v", String.class);
  
          vhField = MethodHandles.lookup().findVarHandle(
!                 VarHandleTestMethodHandleAccessString.class, "v", String.class);
  
          vhStaticFinalField = MethodHandles.lookup().findStaticVarHandle(
!             VarHandleTestMethodHandleAccessString.class, "static_final_v", String.class);
  
          vhStaticField = MethodHandles.lookup().findStaticVarHandle(
!             VarHandleTestMethodHandleAccessString.class, "static_v", String.class);
  
          vhArray = MethodHandles.arrayElementVarHandle(String[].class);
      }
  
  
      @DataProvider
      public Object[][] accessTestCaseProvider() throws Exception {
--- 59,27 ---
  
      VarHandle vhStaticFinalField;
  
      VarHandle vhArray;
  
+ 
      @BeforeClass
      public void setup() throws Exception {
          vhFinalField = MethodHandles.lookup().findVarHandle(
!                 VarHandleTestMethodHandleAccessString.class, "final_v", type);
  
          vhField = MethodHandles.lookup().findVarHandle(
!                 VarHandleTestMethodHandleAccessString.class, "v", type);
  
          vhStaticFinalField = MethodHandles.lookup().findStaticVarHandle(
!             VarHandleTestMethodHandleAccessString.class, "static_final_v", type);
  
          vhStaticField = MethodHandles.lookup().findStaticVarHandle(
!             VarHandleTestMethodHandleAccessString.class, "static_v", type);
  
          vhArray = MethodHandles.arrayElementVarHandle(String[].class);
+ 
      }
  
  
      @DataProvider
      public Object[][] accessTestCaseProvider() throws Exception {
< prev index next >