On Wed, 26 Jan 2022 21:22:58 GMT, Joe Darcy <da...@openjdk.org> wrote:

> The SuppressWarnings annotation type is declared have multiple targets, 
> including modules; however, "package" is left off of its target list. As 
> package-info file are another kind of declaration where a compiler could give 
> warnings, allowing SuppressWarnings in that case is reasonable. Wanting 
> SuppressWarnings in package-info file came up while working on doclint 
> warnings (JDK-8280534). 
> 
> Please also review the companion CSR:
> https://bugs.openjdk.java.net/browse/JDK-8280745
> 
> While the SuppressWarnings annotation does have a JLS section (9.6.4.5. 
> @SuppressWarnings), the section doesn't mention the target list therefore 
> doesn't appear to need to be updated.

This pull request has now been integrated.

Changeset: 78574057
Author:    Joe Darcy <da...@openjdk.org>
URL:       
https://git.openjdk.java.net/jdk/commit/78574057a4758fc3da5f39af77df09dc2232a9a1
Stats:     56 lines in 1 file changed: 37 ins; 12 del; 7 mod

8280744: Allow SuppressWarnings to be used in all declaration contexts

Reviewed-by: iris

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

PR: https://git.openjdk.java.net/jdk/pull/7239

Reply via email to