RFR (S): 8230854: Cleanup SuppressWarnings in test lib and remove noisy traces in StreamPumper

Langer, Christoph christoph.langer at sap.com
Thu Sep 19 21:54:47 UTC 2019

Hi Joe,

thanks for looking into that. Seems like a good idea to update jls- then.

Best regards

From: Joe Darcy <joe.darcy at oracle.com>
Sent: Dienstag, 17. September 2019 22:01
To: Langer, Christoph <christoph.langer at sap.com>; David Holmes <david.holmes at oracle.com>; hotspot-dev at openjdk.java.net
Subject: Re: RFR (S): 8230854: Cleanup SuppressWarnings in test lib and remove noisy traces in StreamPumper


The specification for the SuppressWarnings type states:

"The presence of unrecognized warning names is not an error: Compilers must ignore any warning names they do not recognize. They are, however, free to emit a warning if an annotation contains an unrecognized warning name."

Note that the JLS does not repeat this requirement of compilers in its section on @SuppressWarnings:


I've filed JDK-8231147 for this issue.


On 9/13/2019 1:04 AM, Langer, Christoph wrote:

Hi David,


-     @SuppressWarnings("overloads")

        public static Process startProcess(String name,

                                           ProcessBuilder processBuilder,

                                           final Predicate<String>


Unnecessary? I can't find what this warning is supposed to mean. Is it used by some IDE's?

I didn't find any reference either and the IDE says that this is an unknown

annotation. So unless somebody steps up and tells us what it's good for, I guess it can be removed.

Not it is a valid warning. Try compiling with -Xlint:all without the

warning suppressed:




warning: [overloads]

startProcess(String,ProcessBuilder,Consumer<String>) in ProcessTools is

potentially ambiguous with

startProcess(String,ProcessBuilder,Predicate<String>) in ProcessTools

     public static Process startProcess(String name,


Thanks for taking a closer look here and enlightening me.

@SuppressWarnings("overloads") is supported by javac but not by my Eclipse IDE. One can list supported @SuppressWarnings types with javac -X. You'll get:

overloads            Warn about issues regarding method overloads.

So I now understand what the warning means and why @SuppressWarnings("overloads") is required here. I've also configured my Eclipse to ignore this unknown annotation.

New webrev, keeping @SuppressWarnings("overloads"): http://cr.openjdk.java.net/~clanger/webrevs/8230854.1/

Best regards


More information about the hotspot-dev mailing list