From eb61bf32f91b1cd4c7dd3202f8645b40f6e6a70a Mon Sep 17 00:00:00 2001 From: Stephan Herrmann Date: Tue, 21 Apr 2026 21:39:08 +0200 Subject: [PATCH] Update documentation of SuppressWarnings tokens + new doc for "exports", "module" and "preview" + fix ordering regarding "removal", "unlikely-arg-type" + minor additions and corrections here and there --- .../tasks/task-suppress_warnings.htm | 76 ++++++++++++++----- 1 file changed, 58 insertions(+), 18 deletions(-) diff --git a/eclipse.platform.common/bundles/org.eclipse.jdt.doc.user/tasks/task-suppress_warnings.htm b/eclipse.platform.common/bundles/org.eclipse.jdt.doc.user/tasks/task-suppress_warnings.htm index 06ec81b14fe..b7c7e8302e6 100644 --- a/eclipse.platform.common/bundles/org.eclipse.jdt.doc.user/tasks/task-suppress_warnings.htm +++ b/eclipse.platform.common/bundles/org.eclipse.jdt.doc.user/tasks/task-suppress_warnings.htm @@ -87,7 +87,21 @@

Excluding Warnings Using @SuppressWarnings

to suppress warnings relative to deprecation

-

Deprecated API

+

Usage of deprecated API

+ + + + +

exports

+ + +

to suppress warnings relative to module API leaks

+ + +

Public API exposes a type that is not exported
+ Public API exposes a non-public type
+ Public API exposes a type from another module that is not transitively required +

@@ -145,6 +159,17 @@

Excluding Warnings Using @SuppressWarnings

All options in Java Compiler Javadoc Preferences

+ + +

module

+ + +

to suppress warnings relative to modules

+ + +

An automatic module has an unstable name

+ +

nls

@@ -167,6 +192,18 @@

Excluding Warnings Using @SuppressWarnings

All options in Java Compile Errors/Warnings Preferences for Null Analysis

+ + +

preview

+ + +

to suppress warnings relative to preview features

+ + +

Use of a preview language feature

+

Use of a preview API

+ +

rawtypes

@@ -180,35 +217,35 @@

Excluding Warnings Using @SuppressWarnings

-

resource

+

removal

-

to suppress warnings relative to usage of resources of type Closeable

+

to suppress warnings relative to usage of terminally deprecated API

-

Resource leak
- Potential resource leak
- Resource not managed via try-with-resource

+

Usage of terminally deprecated API

-

restriction

+

resource

-

to suppress warnings relative to usage of discouraged or forbidden references

+

to suppress warnings relative to usage of resources of type Closeable

-

Forbidden reference (access rules)
- Discouraged reference (access rules)

+

Resource leak
+ Potential resource leak
+ Resource not managed via try-with-resource
+ Specification using '@Owning'/'@NotOwning' is insufficient

-

removal

+

restriction

-

to suppress warnings relative to usage of terminally deprecated API

+

to suppress warnings relative to usage of discouraged or forbidden references

Forbidden reference (access rules)
@@ -294,21 +331,21 @@

Excluding Warnings Using @SuppressWarnings

-

unqualified-field-access

+

unlikely-arg-type

-

to suppress warnings relative to field access unqualified

+

to suppress warnings relative to unlikely argument types

-

Unqualified access to instance field

+

Collection method with 'Object' parameter is called with an argument that may never match

-

unlikely-arg-type

+

unqualified-field-access

-

to suppress warnings relative to unlikely argument types

+

to suppress warnings relative to field access unqualified

Unqualified access to instance field

@@ -330,7 +367,10 @@

Excluding Warnings Using @SuppressWarnings

Unused type parameter
Unused import
Unused private member
- Unused 'break' or 'continue' label + Unused 'break' or 'continue' label
+ Redundant super interface specification
+ Unnecessary specification of type arguments
+ Method declares 'throws' but exception is not thrown