)]}'
{
  "commit": "ec0e90c370471fa75b487b6cce63479934475e08",
  "tree": "e31667df676c1dd6d509d62352e06ab03b8c14fe",
  "parents": [
    "b39810e07ea3f484c63a3d6ca8ba9b2fc6c08530"
  ],
  "author": {
    "name": "David Ostrovsky",
    "email": "david@ostrovsky.org",
    "time": "Fri Aug 21 01:46:59 2026 -0700"
  },
  "committer": {
    "name": "rules_java Copybara",
    "email": "noreply@google.com",
    "time": "Fri Aug 21 01:47:20 2026 -0700"
  },
  "message": "Add a `java_toolchain` attribute to specify options to the `header_compiler_direct` tool (#375)\n\nPrimary motivation is to let users not using the Turbine graal native image silence protobuf sun.misc.Unsafe warnings from the direct header compiler\n\nturbine_direct (header_compiler_direct) bundles protobuf, whose UnsafeUtil calls terminally-deprecated sun.misc.Unsafe methods. On JDK 24+ (JEP 498) the JVM prints a warning for each such call during header compilation:\n\n  WARNING: A terminally deprecated method in sun.misc.Unsafe has been called\n  WARNING: sun.misc.Unsafe::arrayBaseOffset has been called by\n  com.google.protobuf.UnsafeUtil (.../java_tools/turbine_direct_binary_deploy.jar)\n\nUnlike the Turbine worker, header_compiler_direct does not receive turbine_jvm_opts, and --jvmopt does not reach header-compilation actions, so a toolchain currently has no way to silence these warnings for the direct header compiler. Add --sun-misc-unsafe-memory-access\u003dallow to header_compiler_direct_jvm_opts, gated on the runtime feature version since the flag is rejected on JDK \u003c\u003d 22.\n\nSee https://github.com/protocolbuffers/protobuf/issues/20760.\n\nFixes #374\n\nCloses #375\n\nCOPYBARA_INTEGRATE_REVIEW\u003dhttps://github.com/bazelbuild/rules_java/pull/375 from davido:turbine-direct-unsafe-memory-access da635b6bebb7ac660f19451469182f54adea884c\nPiperOrigin-RevId: 968352943\nChange-Id: I94d5bc5d564016ced3cc3b6e06330fad4d8451a7\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "a24ae4f166ce1fe6860f6dcedb1055bde2c8d810",
      "old_mode": 33188,
      "old_path": "java/common/rules/java_toolchain.bzl",
      "new_id": "a635c5dde3197df9c4a607404c6883cf931db86f",
      "new_mode": 33188,
      "new_path": "java/common/rules/java_toolchain.bzl"
    }
  ]
}
