Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8221181

Deprecate AllowJNIEnvProxy

    XMLWordPrintable

    Details

    • Type: CSR
    • Status: Closed
    • Priority: P4
    • Resolution: Approved
    • Fix Version/s: 13
    • Component/s: hotspot
    • Labels:
      None
    • Subcomponent:
    • Compatibility Kind:
      behavioral
    • Compatibility Risk:
      minimal
    • Compatibility Risk Description:
      An ancient and unused flag.
    • Interface Kind:
      add/remove/modify command line option

      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")                     \

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              dholmes David Holmes
              Reporter:
              dholmes David Holmes
              Reviewed By:
              Daniel Daugherty
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: