JDK-8221181 : Deprecate AllowJNIEnvProxy
  • Type: CSR
  • Component: hotspot
  • Sub-Component: runtime
  • Priority: P4
  • Status: Closed
  • Resolution: Approved
  • Fix Versions: 13
  • Submitted: 2019-03-21
  • Updated: 2019-03-21
  • Resolved: 2019-03-21
Related Reports
CSR :  
Description
Summary
-------

Deprecate the `-XX:+AllowJNIEnvProxy` flag

Problem
-------

The `-XX:+AllowJNIEnvProxy` flag was added in Java 6 to allow backward compatibility with an old version of the Solaris `jdbx` debugger, even though the underlying functionality violated the JNI Specification. This flag has not been needed for many years and the underlying functionality has likely not worked for at least as long.

Solution
--------
Deprecate  the `-XX:+AllowJNIEnvProxy` flag.

The flag will still be accepted and acted upon but a deprecation warning will be issued.

The flag will be obsoleted in JDK 14 and removed in JDK 15.

Specification
-------------

    diff -r d9f43dfbe524 src/hotspot/share/runtime/arguments.cpp
    --- a/src/hotspot/share/runtime/arguments.cpp
    +++ b/src/hotspot/share/runtime/arguments.cpp
    @@ -530,6 +530,7 @@
       { "UseMembar",                    JDK_Version::jdk(10), JDK_Version::jdk(12), JDK_Version::undefined() },
       { "CompilationPolicyChoice",      JDK_Version::jdk(13), JDK_Version::jdk(14), JDK_Version::undefined() },
       { "FailOverToOldVerifier",        JDK_Version::jdk(13), JDK_Version::jdk(14), JDK_Version::undefined() },
    +  { "AllowJNIEnvProxy",             JDK_Version::jdk(13), JDK_Version::jdk(14), JDK_Version::jdk(15) },
       { "ThreadLocalHandshakes",        JDK_Version::jdk(13), JDK_Version::jdk(14), JDK_Version::jdk(15) },
     
       // --- Deprecated alias flags (see also aliased_jvm_flags) - sorted by obsolete_in then expired_in:
    diff -r d9f43dfbe524 src/hotspot/share/runtime/globals.hpp
    --- a/src/hotspot/share/runtime/globals.hpp
    +++ b/src/hotspot/share/runtime/globals.hpp
    @@ -861,7 +861,7 @@
               "by the application (Solaris & Linux only)")                      \
                                                                                 \
       product(bool, AllowJNIEnvProxy, false,                                    \
    -          "Allow JNIEnv proxies for jdbx")                                  \
    +          "(Deprecated) Allow JNIEnv proxies for jdbx")                     \




Comments
Moving to Approved.
21-03-2019