Uploaded image for project: 'Code Tools'
  1. Code Tools
  2. CODETOOLS-7903645

tests that set SecurityManager fail due to UnsupportedOperationException in Java 21

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • jtreg7.6
    • None
    • tools
    • None

      Java 21 throws UnsupportedOperationException when setSecurityManager() is called without passing -Djava.security.manager=... property.

      This causes jtreg self-test failures such as:
      ----
      /bin/grep -s 'Test results: passed: 18; failed: 2' /<<PKGBUILDDIR>>/build/test/BadTests.othervm/jt.log > /dev/null
      make[2]: *** [../test/badtests/BadTests.gmk:38: /<<PKGBUILDDIR>>/build/test/BadTests.othervm.ok] Error 1
      ----
      caused by an extra failure in ExitTest:
      ------
      ExitTest.java#id1 Failed. Execution failed: `main' threw exception: java.lang.UnsupportedOperationException: The Security Manager is deprecated and will be removed in a future release
      ------

      Tests that fail:
      - test/BadTests.othervm
      - test/SecurityManager


            jpai Jaikiran Pai
            vpetko Vladimir Petko
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: