test/jdk/java/lang/invoke/condy/CondyRepeatFailedResolution.java
changeset 49387 98e7a2c315a9
parent 48965 be873d8c0114
child 49987 e4b3cc56e2b2
equal deleted inserted replaced
49386:d89e98d85841 49387:98e7a2c315a9
    37 import jdk.experimental.bytecode.TypedCodeBuilder;
    37 import jdk.experimental.bytecode.TypedCodeBuilder;
    38 import org.testng.Assert;
    38 import org.testng.Assert;
    39 import org.testng.annotations.BeforeClass;
    39 import org.testng.annotations.BeforeClass;
    40 import org.testng.annotations.Test;
    40 import org.testng.annotations.Test;
    41 
    41 
    42 import java.io.File;
       
    43 import java.io.FileOutputStream;
       
    44 import java.lang.invoke.MethodHandles;
    42 import java.lang.invoke.MethodHandles;
    45 import java.lang.invoke.MethodType;
    43 import java.lang.invoke.MethodType;
    46 import java.lang.reflect.InvocationTargetException;
    44 import java.lang.reflect.InvocationTargetException;
    47 import java.lang.reflect.Method;
    45 import java.lang.reflect.Method;
    48 
    46 
   215                                               S -> S.add(Integer.MAX_VALUE))
   213                                               S -> S.add(Integer.MAX_VALUE))
   216                                                 .areturn()
   214                                                 .areturn()
   217                                 ))
   215                                 ))
   218                 .build();
   216                 .build();
   219 
   217 
   220         // For debugging purposes
       
   221         new FileOutputStream(new File(genClassName + ".class")).write(byteArray);
       
   222 
       
   223         gc = MethodHandles.lookup().defineClass(byteArray);
   218         gc = MethodHandles.lookup().defineClass(byteArray);
   224     }
   219     }
   225 
   220 
   226     @Test
   221     @Test
   227     public void testPrimitives() throws Exception {
   222     public void testPrimitives() throws Exception {