[
https://issues.apache.org/jira/browse/SOLR-18704?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18154260#comment-18154260
]
Pierre Salagnac commented on SOLR-18704:
----------------------------------------
Thanks.
I will open a PR soon that fixes the warnings for {{benchmark}} module, but
only for the differences from moving to JDK 25.
My understanding is SOLR-18705 is not so JDK dependent.
> Benchmark module logs tons warning when building with JDK 25
> ------------------------------------------------------------
>
> Key: SOLR-18704
> URL: https://issues.apache.org/jira/browse/SOLR-18704
> Project: Solr
> Issue Type: Bug
> Components: benchmarks
> Affects Versions: 10.1
> Reporter: Pierre Salagnac
> Priority: Trivial
>
> With OpenJDK 25, plenty of warnings are logged when building benchmark module.
> They fall into two categories:
> - 1 javac warnings
> - 2 errorprone warnings
>
> Detailed AI🤖 explanations for the second category:
> {quote}Because Error Prone runs as a {{javac}} plugin and reports its
> warnings as non-lint compiler warnings:
> - On JDK 21: Passing {{-Xlint:none}} implicitly enabled {{{}-nowarn{}}},
> which silently suppressed all non-mandatory javac warnings — including Error
> Prone's warnings.
> - On JDK 25: {{-Xlint:none}} only disables {{{}javac{}}}'s built-in lint
> categories. Since {{-nowarn}} is no longer implied, Error Prone's warnings
> are now actually printed instead of being swallowed.{quote}
> {quote}The javac change ({{{}com.sun.tools.javac.util.Log.initOptions{}}},
> from each JDK's {{{}src.zip{}}}):
> - JDK 21: {{emitWarnings = options.isUnset(XLINT_CUSTOM, "none");}}
> - JDK 25: {{emitWarnings = options.isUnset(NOWARN);}}
> When {{emitWarnings}} is false, {{Log}} drops every warning that isn't
> mandatory. Error Prone reports through the same {{{}Log{}}}, so its warnings
> are dropped too. In JDK 25 only {{-nowarn}} has that effect.
> {quote}
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]