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

tests that set SecurityManager fail due to UnsupportedOperationException in Java 21

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P4
    • None
    • None
    • tools
    • None

    Description

      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


      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              vpetko Vladimir Petko
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: