< prev index next >

test/jdk/java/util/ServiceLoader/BadProvidersTest.java

Print this page
@@ -21,10 +21,11 @@
   * questions.
   */
  
  /**
   * @test
+  * @enablePreview
   * @library /test/lib
   * @modules jdk.compiler
   * @build jdk.test.lib.compiler.CompilerUtils
   * @run testng/othervm BadProvidersTest
   * @summary Basic test of ServiceLoader with bad provider and bad provider

@@ -213,11 +214,11 @@
      public void testWithTwoFactoryMethods() throws Exception {
          Path mods = compileTest(TEST1_MODULE);
  
          var bytes = ClassFile.of().build(ClassDesc.of("p", "ProviderFactory"), clb -> {
              clb.withSuperclass(CD_Object);
-             clb.withFlags(AccessFlag.PUBLIC, AccessFlag.SUPER);
+             clb.withFlags(AccessFlag.PUBLIC, AccessFlag.IDENTITY);
  
              var providerFactory$1 = ClassDesc.of("p", "ProviderFactory$1");
  
              // public static p.Service provider()
              clb.withMethodBody("provider", MethodTypeDesc.of(ClassDesc.of("p", "Service")),
< prev index next >