Skip to content

Commit dcd0be0

Browse files
authored
Merge pull request #11794 from sigfaulterror/main
Update annotations-in-java.rst
2 parents 1092326 + 1dd545e commit dcd0be0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/codeql/codeql-language-guides/annotations-in-java.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ For more information about the class ``Call``, see ":doc:`Navigating the call gr
185185
Improvements
186186
~~~~~~~~~~~~
187187

188-
The Java standard library provides another annotation type ``java.lang.SupressWarnings`` that can be used to suppress certain categories of warnings. In particular, it can be used to turn off warnings about calls to deprecated methods. Therefore, it makes sense to improve our query to ignore calls to deprecated methods from inside methods that are marked with ``@SuppressWarnings("deprecated")``.
188+
The Java standard library provides another annotation type ``java.lang.SupressWarnings`` that can be used to suppress certain categories of warnings. In particular, it can be used to turn off warnings about calls to deprecated methods. Therefore, it makes sense to improve our query to ignore calls to deprecated methods from inside methods that are marked with ``@SuppressWarnings("deprecation")``.
189189

190190
For instance, consider this slightly updated example:
191191

@@ -198,15 +198,15 @@ For instance, consider this slightly updated example:
198198
m();
199199
}
200200
201-
@SuppressWarnings("deprecated")
201+
@SuppressWarnings("deprecation")
202202
void r() {
203203
m();
204204
}
205205
}
206206
207207
Here, the programmer has explicitly suppressed warnings about deprecated calls in ``A.r``, so our query should not flag the call to ``A.m`` any more.
208208

209-
To do so, we first introduce a class for representing all ``@SuppressWarnings`` annotations where the string ``deprecated`` occurs among the list of warnings to suppress:
209+
To do so, we first introduce a class for representing all ``@SuppressWarnings`` annotations where the string ``deprecation`` occurs among the list of warnings to suppress:
210210

211211
.. code-block:: ql
212212

0 commit comments

Comments
 (0)