RFR: 8343477: Remove unnecessary @SuppressWarnings annotations (compiler) [v6]

Maurizio Cimadamore mcimadamore at openjdk.org
Mon Dec 16 10:45:41 UTC 2024


On Mon, 9 Dec 2024 19:20:35 GMT, Archie Cobbs <acobbs at openjdk.org> wrote:

>> Please review this patch which removes unnecessary `@SuppressWarnings` annotations.
>
> Archie Cobbs has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains 10 additional commits since the last revision:
> 
>  - Merge branch 'master' into SuppressWarningsCleanup-compiler
>  - Merge branch 'master' into SuppressWarningsCleanup-compiler
>  - Merge branch 'master' into SuppressWarningsCleanup-compiler
>  - Merge branch 'master' into SuppressWarningsCleanup-compiler
>  - Update copyright years.
>  - Merge branch 'master' into SuppressWarningsCleanup-compiler
>  - Merge branch 'master' into SuppressWarningsCleanup-compiler
>  - Apply change that was missed somehow.
>  - Undo change that will be moved to the core-libs branch.
>  - Remove unnecessary @SuppressWarnings annotations.

src/jdk.compiler/share/classes/com/sun/tools/javac/model/AnnotationProxyMaker.java line 223:

> 221:         }
> 222: 
> 223:         @SuppressWarnings("unchecked")

Tricky but correct :-) This relies on the special pleading for casts to "raw" `Class`

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/21851#discussion_r1886584666


More information about the compiler-dev mailing list