diff options
author | 2025-02-10 13:45:01 -0800 | |
---|---|---|
committer | 2025-02-10 13:49:58 -0800 | |
commit | f394c3cdfaa9398d644f1d21120dba5cc70c7942 (patch) | |
tree | 16cc1ca3553e371047db5b63b72d5c8b45d38fdf /cmd | |
parent | 9721de4d212e37a56cd48144735b55a2f61577f6 (diff) |
Hide -source 8 and -target 8 deprecation warnings
We know -source 8 and -target 8 will be deprecated, no need to print
it on every compile.
Test: manual
Change-Id: I2a16578a67b5f55628f145c9a03b6b6ce0df0cd0
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/javac_wrapper/javac_wrapper.go | 3 | ||||
-rw-r--r-- | cmd/javac_wrapper/javac_wrapper_test.go | 9 |
2 files changed, 12 insertions, 0 deletions
diff --git a/cmd/javac_wrapper/javac_wrapper.go b/cmd/javac_wrapper/javac_wrapper.go index 4679906d5..49bcedf9e 100644 --- a/cmd/javac_wrapper/javac_wrapper.go +++ b/cmd/javac_wrapper/javac_wrapper.go @@ -200,6 +200,9 @@ var warningCount = regexp.MustCompile(`^([0-9]+) warning(s)?$`) var warningFilters = []*regexp.Regexp{ regexp.MustCompile(`bootstrap class path not set in conjunction with -source`), + regexp.MustCompile(`source value 8 is obsolete and will be removed in a future release`), + regexp.MustCompile(`target value 8 is obsolete and will be removed in a future release`), + regexp.MustCompile(`To suppress warnings about obsolete options, use -Xlint:-options.`), } var filters = []*regexp.Regexp{ diff --git a/cmd/javac_wrapper/javac_wrapper_test.go b/cmd/javac_wrapper/javac_wrapper_test.go index ad230012e..5e2678672 100644 --- a/cmd/javac_wrapper/javac_wrapper_test.go +++ b/cmd/javac_wrapper/javac_wrapper_test.go @@ -90,6 +90,15 @@ warning: [options] bootstrap class path not set in conjunction with -source 1.9\ `, out: "\n\x1b[1m\x1b[35mwarning:\x1b[0m\x1b[1m foo\x1b[0m\n1 warning\n", }, + { + in: ` +warning: [options] source value 8 is obsolete and will be removed in a future release +warning: [options] target value 8 is obsolete and will be removed in a future release +warning: [options] To suppress warnings about obsolete options, use -Xlint:-options. +3 warnings +`, + out: "\n", + }, } func TestJavacColorize(t *testing.T) { |