< prev index next >

test/jdk/java/lang/invoke/defineHiddenClass/BasicTest.java

Print this page
*** 1,7 ***
  /*
!  * Copyright (c) 2019, 2025, Oracle and/or its affiliates. All rights reserved.
   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   *
   * This code is free software; you can redistribute it and/or modify it
   * under the terms of the GNU General Public License version 2 only, as
   * published by the Free Software Foundation.
--- 1,7 ---
  /*
!  * Copyright (c) 2019, 2026, Oracle and/or its affiliates. All rights reserved.
   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   *
   * This code is free software; you can redistribute it and/or modify it
   * under the terms of the GNU General Public License version 2 only, as
   * published by the Free Software Foundation.

*** 304,11 ***
                  break;
              default:
                  throw new IllegalArgumentException("unexpected access flag: " + accessFlags);
          }
          assertTrue(hc.isHidden());
!         assertEquals(hc.getModifiers(), ACC_PUBLIC | accessFlags);
          assertFalse(hc.isLocalClass());
          assertFalse(hc.isMemberClass());
          assertFalse(hc.isAnonymousClass());
          assertFalse(hc.isArray());
      }
--- 304,12 ---
                  break;
              default:
                  throw new IllegalArgumentException("unexpected access flag: " + accessFlags);
          }
          assertTrue(hc.isHidden());
!         // ACC_SUPER bit may appear spuriously if preview is enabled
+         assertEquals(hc.getModifiers() & (~ACC_SUPER), (ACC_PUBLIC | accessFlags));
          assertFalse(hc.isLocalClass());
          assertFalse(hc.isMemberClass());
          assertFalse(hc.isAnonymousClass());
          assertFalse(hc.isArray());
      }
< prev index next >