Skip to content

Commit 357c823

Browse files
committed
Changes after feedback
1 parent d03817c commit 357c823

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

docs/codeql/codeql-language-guides/codeql-for-java.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Experiment and learn how to write effective and efficient queries for CodeQL dat
1010

1111
.. pull-quote:: Enabling Kotlin support
1212

13-
To enable Kotlin support, you should enable ``java`` as a language.
13+
CodeQL treats Java and Kotlin as parts of the same language, so to enable Kotlin support you should enable ``java`` as a language.
1414

1515
.. toctree::
1616
:hidden:

docs/codeql/reusables/kotlin-java-differences.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Be careful when you model code elements that don’t exist in Java, such as ``No
1313
1414
In that specific case, you can use the predicate ``Expr.getUnderlyingExpr()``. This goes directly to the underlying ``VarAccess`` to produce a more similar behavior to that in Java.
1515

16-
Nullable elements (``?``) can also produce unexpected behavior. To avoid a ``NullPointerException``, Kotlin may inline calls like ``expr.toString()`` to ``String.valueOf(expr)`` when ``expr`` is nullable. Make sure that you write CodeQL around the extracted code, and do not directly modify the source code in the codebase.
16+
Nullable elements (`?`) can also produce unexpected behavior. To avoid a `NullPointerException`, Kotlin may inline calls like `expr.toString()` to `String.valueOf(expr)` when `expr` is nullable. Make sure that you write CodeQL around the extracted code, which may not exactly match the code as written in the codebase.
1717

1818
Another example is that if-else expressions in Kotlin are translated into ``WhenExprs`` in CodeQL, instead of the more typical ``IfStmt`` seen in Java.
1919

0 commit comments

Comments
 (0)