<!DOCTYPE html><html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<p>I always assumed what you assumed :-)</p>
<p>E.g. _all_ is a special markers which selects all, _none_ one
that selects nothing. From there you can remove (in the first
case) or add (in the second case).</p>
<p>If it doesn't work like that, I'd say that's a bug.</p>
<p>Maurizio<br>
</p>
<div class="moz-cite-prefix">On 20/03/2025 20:16, Archie Cobbs
wrote:<br>
</div>
<blockquote type="cite" cite="mid:CANSoFxuKuVDPE5qVZy-UkK7ZyhYybpy1yNzU90Pb9Uo80WiZLg@mail.gmail.com">
<div dir="ltr">
<div>What is the intended meaning of a javac flag like <span style="font-family:monospace">-Xlint:none,serial</span>
(where you might replace <span style="font-family:monospace">"serial"</span>
with any other non-mandatory lint category).</div>
<div><br>
</div>
<div>I always assumed that this means "Disable all lint
categories, and then enable the <span style="font-family:monospace">"serial"</span> category". And
in fact, that's how it works for mandatory lint categories
like <span style="font-family:monospace">"unchecked"</span>.</div>
<div><br>
</div>
<div>But for non-mandatory lint categories, what it actually
means is "Disable all lint categories, period." (which happens
<a href="https://github.com/openjdk/jdk/blob/56038fb5a156568cce2e80f5db18b10ad61c06e4/src/jdk.compiler/share/classes/com/sun/tools/javac/util/Log.java#L370" moz-do-not-send="true">here</a> and <a href="https://github.com/openjdk/jdk/blob/56038fb5a156568cce2e80f5db18b10ad61c06e4/src/jdk.compiler/share/classes/com/sun/tools/javac/util/Log.java#L722" moz-do-not-send="true">here</a>). <br>
</div>
<div><br>
</div>
<div>Is that intended? It seems surprising, and is asymmetrical
with the meaning of <span style="font-family:monospace">-Xlint:all,-serial</span>,
which means the converse "Enable all lint categories, and then
disable the <span style="font-family:monospace">"serial"</span>
category".</div>
<div><br>
</div>
<div>Thanks,</div>
<div>-Archie</div>
<br>
<span class="gmail_signature_prefix">-- </span><br>
<div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature">Archie L. Cobbs<br>
</div>
</div>
</blockquote>
</body>
</html>