Skip to content

Commit

Permalink
[6.2.0] default_java_toolchain.bzl cherry-picks to fix regression (#1…
Browse files Browse the repository at this point in the history
…8225)

* Disable 'IgnoredPureGetter'

See #16996

PiperOrigin-RevId: 494921387
Change-Id: I53dee7da0f321c50e303816b5fb85eda45949efa

* Make LenientFormatStringValidation a warning

PiperOrigin-RevId: 502649182
Change-Id: Ia69e5be9da817d7c25e51cad5086309515bb280a

* Make ReturnMissingNullable a warning

PiperOrigin-RevId: 502710013
Change-Id: I80f35a248623d293e187d481dc5ffbaff08bf25f

* Redirect JVM warnings to stderr in general.

In particular this avoids problems with JVM warnings clashing with the worker protocol, but also matches Blaze's idea of where output goes better.

PiperOrigin-RevId: 524826411
Change-Id: If4c78ac5f63dfd4596da924c12552f6335b8034d

---------

Co-authored-by: Googler <[email protected]>
Co-authored-by: Googler <[email protected]>
Co-authored-by: Googler <[email protected]>
  • Loading branch information
4 people authored Apr 26, 2023
1 parent 3624c74 commit 2442a2e
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tools/jdk/default_java_toolchain.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ BASE_JDK9_JVM_OPTS = [
# TODO(b/64485048): Disable this option in persistent worker mode only.
# Disable symlinks resolution cache since symlinks in exec root change
"-Dsun.io.useCanonCaches=false",

# Since https://bugs.openjdk.org/browse/JDK-8153723, JVM logging goes to stdout. This
# makes it go to stderr instead.
"-Xlog:disable",
"-Xlog:all=warning:stderr:uptime,level,tags",
]

JDK9_JVM_OPTS = BASE_JDK9_JVM_OPTS
Expand All @@ -49,7 +54,11 @@ DEFAULT_JAVACOPTS = [
"-parameters",
# https://github.com/bazelbuild/bazel/issues/15219
"-Xep:ReturnValueIgnored:OFF",
# https://github.com/bazelbuild/bazel/issues/16996
"-Xep:IgnoredPureGetter:OFF",
"-Xep:EmptyTopLevelDeclaration:OFF",
"-Xep:LenientFormatStringValidation:OFF",
"-Xep:ReturnMissingNullable:OFF",
]

# java_toolchain parameters without specifying javac, java.compiler,
Expand Down

0 comments on commit 2442a2e

Please sign in to comment.