tianhang tang created HBASE-27594:
-------------------------------------

             Summary: [JDK17] SecurityManager is deprecated since JDK17
                 Key: HBASE-27594
                 URL: https://issues.apache.org/jira/browse/HBASE-27594
             Project: HBase
          Issue Type: Sub-task
            Reporter: tianhang tang
            Assignee: tianhang tang


Our UTs will print out lots of WARNINGs if we run on JDK17:
{code:java}
WARNING: A terminally deprecated method in java.lang.System has been called
WARNING: System::setSecurityManager has been called by 
org.apache.hadoop.hbase.SystemExitRule 
(file:/Users/tianhang.tang/workspaces/apache/hbase/hbase-common/target/test-classes/)
WARNING: Please consider reporting this to the maintainers of 
org.apache.hadoop.hbase.SystemExitRule
WARNING: System::setSecurityManager will be removed in a future release{code}
This is because [JEP 411|[https://openjdk.org/jeps/411],] Security Manager is 
deprecated since JDK17, and will removed in the future version after JDK18.

We introduced the SecurityManager in 
[HBASE-24185|https://issues.apache.org/jira/browse/HBASE-24185], mainly using 
??checkExit?? to ensure that the JVM does not exit during testing. 
[JDK-8199704|https://bugs.openjdk.org/browse/JDK-8199704] may provide an API in 
the future, but at the moment we really don't seem to have an alternative 
available.

In short, this WARNING does not have any practical impact at present, what we 
need to do is to refactor HBASE-24185 in the future. But the large amount of 
logging is still annoying, and I haven't found a way to turn it off yet.

 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to