Skip to content

Commit 6c89aa3

Browse files
stephan-herrmannmerks
authored andcommitted
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
1 parent 979afbd commit 6c89aa3

1 file changed

Lines changed: 58 additions & 18 deletions

File tree

eclipse.platform.common/bundles/org.eclipse.jdt.doc.user/tasks/task-suppress_warnings.htm

Lines changed: 58 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,21 @@ <h1>Excluding Warnings Using @SuppressWarnings</h1>
8787
<p>to suppress warnings relative to deprecation</p>
8888
</td>
8989
<td>
90-
<p>Deprecated API</p>
90+
<p>Usage of deprecated API</p>
91+
</td>
92+
</tr>
93+
<tr>
94+
<td>
95+
<p><span class="token">exports</span></p>
96+
</td>
97+
<td>
98+
<p>to suppress warnings relative to module API leaks</p>
99+
</td>
100+
<td>
101+
<p>Public API exposes a type that is not exported<br/>
102+
Public API exposes a non-public type<br/>
103+
Public API exposes a type from another module that is not transitively required
104+
</p>
91105
</td>
92106
</tr>
93107
<tr>
@@ -145,6 +159,17 @@ <h1>Excluding Warnings Using @SuppressWarnings</h1>
145159
<p>All options in <a href="../reference/preferences/java/compiler/ref-preferences-javadoc.htm">Java Compiler Javadoc Preferences</a></p>
146160
</td>
147161
</tr>
162+
<tr>
163+
<td>
164+
<p><span class="token">module</span></p>
165+
</td>
166+
<td>
167+
<p>to suppress warnings relative to modules</p>
168+
</td>
169+
<td>
170+
<p>An automatic module has an unstable name</p>
171+
</td>
172+
</tr>
148173
<tr>
149174
<td>
150175
<p><span class="token">nls</span></p>
@@ -167,6 +192,18 @@ <h1>Excluding Warnings Using @SuppressWarnings</h1>
167192
<p>All options in <a href="../reference/preferences/java/compiler/ref-preferences-errors-warnings.htm#null_analysis">Java Compile Errors/Warnings Preferences for Null Analysis</a></p>
168193
</td>
169194
</tr>
195+
<tr>
196+
<td>
197+
<p><span class="token">preview</span></p>
198+
</td>
199+
<td>
200+
<p>to suppress warnings relative to preview features</p>
201+
</td>
202+
<td>
203+
<p>Use of a preview language feature</p>
204+
<p>Use of a preview API</p>
205+
</td>
206+
</tr>
170207
<tr>
171208
<td>
172209
<p><span class="token">rawtypes</span></p>
@@ -180,35 +217,35 @@ <h1>Excluding Warnings Using @SuppressWarnings</h1>
180217
</tr>
181218
<tr>
182219
<td>
183-
<p><span class="token">resource</span></p>
220+
<p><span class="token">removal</span></p>
184221
</td>
185222
<td>
186-
<p>to suppress warnings relative to usage of resources of type Closeable</p>
223+
<p>to suppress warnings relative to usage of terminally deprecated API</p>
187224
</td>
188225
<td>
189-
<p>Resource leak<br/>
190-
Potential resource leak<br/>
191-
Resource not managed via try-with-resource</p>
226+
<p>Usage of terminally deprecated API</p>
192227
</td>
193228
</tr>
194229
<tr>
195230
<td>
196-
<p><span class="token">restriction</span></p>
231+
<p><span class="token">resource</span></p>
197232
</td>
198233
<td>
199-
<p>to suppress warnings relative to usage of discouraged or forbidden references</p>
234+
<p>to suppress warnings relative to usage of resources of type Closeable</p>
200235
</td>
201236
<td>
202-
<p>Forbidden reference (access rules)<br/>
203-
Discouraged reference (access rules)</p>
237+
<p>Resource leak<br/>
238+
Potential resource leak<br/>
239+
Resource not managed via try-with-resource<br/>
240+
Specification using '@Owning'/'@NotOwning' is insufficient</p>
204241
</td>
205242
</tr>
206243
<tr>
207244
<td>
208-
<p><span class="token">removal</span></p>
245+
<p><span class="token">restriction</span></p>
209246
</td>
210247
<td>
211-
<p>to suppress warnings relative to usage of terminally deprecated API</p>
248+
<p>to suppress warnings relative to usage of discouraged or forbidden references</p>
212249
</td>
213250
<td>
214251
<p>Forbidden reference (access rules)<br/>
@@ -294,21 +331,21 @@ <h1>Excluding Warnings Using @SuppressWarnings</h1>
294331
</tr>
295332
<tr>
296333
<td>
297-
<p><span class="token">unqualified-field-access</span></p>
334+
<p><span class="token">unlikely-arg-type</span></p>
298335
</td>
299336
<td>
300-
<p>to suppress warnings relative to field access unqualified</p>
337+
<p>to suppress warnings relative to unlikely argument types</p>
301338
</td>
302339
<td>
303-
<p>Unqualified access to instance field</p>
340+
<p>Collection method with 'Object' parameter is called with an argument that may never match</p>
304341
</td>
305342
</tr>
306343
<tr>
307344
<td>
308-
<p><span class="token">unlikely-arg-type</span></p>
345+
<p><span class="token">unqualified-field-access</span></p>
309346
</td>
310347
<td>
311-
<p>to suppress warnings relative to unlikely argument types</p>
348+
<p>to suppress warnings relative to field access unqualified</p>
312349
</td>
313350
<td>
314351
<p>Unqualified access to instance field</p>
@@ -330,7 +367,10 @@ <h1>Excluding Warnings Using @SuppressWarnings</h1>
330367
Unused type parameter<br/>
331368
Unused import<br/>
332369
Unused private member<br/>
333-
Unused 'break' or 'continue' label
370+
Unused 'break' or 'continue' label<br/>
371+
Redundant super interface specification<br/>
372+
Unnecessary specification of type arguments<br/>
373+
Method declares 'throws' but exception is not thrown<br/>
334374
</p>
335375
</td>
336376
</tr>

0 commit comments

Comments
 (0)