Skip to content

Commit 2ce1c2b

Browse files
jf205max-schaefer
andauthored
Apply suggestions from code review
Co-Authored-By: Max Schaefer <54907921+max-schaefer@users.noreply.github.com>
1 parent d6202da commit 2ce1c2b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/language/learn-ql/writing-queries/debugging-queries.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ For instance, consider the following predicate that checks whether a Java method
3232

3333
The predicate holds if ``m`` contains an access to ``f``, but also conservatively assumes that methods without bodies (for example, native methods) may access *any* field.
3434

35-
However, if ``m`` is a native method, the table computed by ``mayAccess`` will contain a row ``m, f`` for *all* fields ``f`` in the codebase, which could potentially be very large.
35+
However, if ``m`` is a native method, the table computed by ``mayAccess`` will contain a row ``m, f`` for *all* fields ``f`` in the codebase, making it potentially very large.
3636

3737
This example shows a similar mistake in a member predicate::
3838

@@ -45,7 +45,7 @@ This example shows a similar mistake in a member predicate::
4545
...
4646
}
4747

48-
Note that while ``getToString()`` does not declare any parameters, it has two implicit parameters, ``result`` and ``this``, which it fails to relate. Therefore, the table computed by ``getToString()`` contains a row for every combination of ``result`` and ``this``. That is, a row for every combination of a method named ``"ToString"`` that is an instance of ``Foo``.
48+
Note that while ``getToString()`` does not declare any parameters, it has two implicit parameters, ``result`` and ``this``, which it fails to relate. Therefore, the table computed by ``getToString()`` contains a row for every combination of ``result`` and ``this``. That is, a row for every combination of a method named ``"ToString"`` and an instance of ``Foo``.
4949
To avoid making this mistake, ``this`` should be restricted in the member predicate ``getToString()`` on the class ``Foo``.
5050

5151
Use specific types

0 commit comments

Comments
 (0)