Skip to content

Commit d3eb9c1

Browse files
committed
Java: Add release note and address review comments.
1 parent ffd1456 commit d3eb9c1

File tree

4 files changed

+9
-4
lines changed

4 files changed

+9
-4
lines changed

docs/codeql/codeql-language-guides/customizing-library-models-for-java.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -397,8 +397,8 @@ The following components are supported:
397397
- **SyntheticGlobal[**\ `name`\ **]** selects the synthetic global with name `name`.
398398
- **ArrayElement** selects the elements of an array.
399399
- **Element** selects the elements of a collection-like container.
400-
- **WithoutElement** selects a collection-like container without its elements (input only).
401-
- **WithElement** selects the elements of a collection-like container but not the container itself (input only).
400+
- **WithoutElement** selects a collection-like container without its elements. This is for input only.
401+
- **WithElement** selects the elements of a collection-like container, but points to the container itself. This is for input only.
402402
- **MapKey** selects the element keys of a map.
403403
- **MapValue** selects the element values of a map.
404404

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
category: minorAnalysis
3+
---
4+
* Add support for `WithElement` and `WithoutElement` for MaD access paths.

java/ql/lib/ext/java.util.model.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@ extensions:
141141
- ["java.util", "LinkedList", False, "LinkedList", "(Collection)", "", "Argument[0].Element", "Argument[this].Element", "value", "manual"]
142142
- ["java.util", "List", True, "add", "(int,Object)", "", "Argument[1]", "Argument[this].Element", "value", "manual"]
143143
- ["java.util", "List", True, "addAll", "(int,Collection)", "", "Argument[1].WithElement", "Argument[this]", "value", "manual"]
144+
- ["java.util", "List", True, "clear", "()", "", "Argument[this].WithoutElement", "Argument[this]", "value", "manual"]
144145
- ["java.util", "List", False, "copyOf", "(Collection)", "", "Argument[0].Element", "ReturnValue.Element", "value", "manual"]
145146
- ["java.util", "List", True, "get", "(int)", "", "Argument[this].Element", "ReturnValue", "value", "manual"]
146147
- ["java.util", "List", True, "listIterator", "", "", "Argument[this].Element", "ReturnValue.Element", "value", "manual"]
@@ -159,7 +160,6 @@ extensions:
159160
- ["java.util", "List", True, "set", "(int,Object)", "", "Argument[this].Element", "ReturnValue", "value", "manual"]
160161
- ["java.util", "List", True, "set", "(int,Object)", "", "Argument[1]", "Argument[this].Element", "value", "manual"]
161162
- ["java.util", "List", True, "subList", "", "", "Argument[this].Element", "ReturnValue.Element", "value", "manual"]
162-
- ["java.util", "List", True, "clear", "()", "", "Argument[this].WithoutElement", "Argument[this]", "value", "manual"]
163163
- ["java.util", "ListIterator", True, "add", "(Object)", "", "Argument[0]", "Argument[this].Element", "value", "manual"]
164164
- ["java.util", "ListIterator", True, "previous", "", "", "Argument[this].Element", "ReturnValue", "value", "manual"]
165165
- ["java.util", "ListIterator", True, "set", "(Object)", "", "Argument[0]", "Argument[this].Element", "value", "manual"]

java/ql/lib/semmle/code/java/dataflow/ExternalFlow.qll

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@
4848
* - "Element": Selects the collection elements of the selected element.
4949
* - "WithoutElement": Selects the selected element but without
5050
* its collection elements.
51-
* - "WithElement": Selects the collection elements of the selected element.
51+
* - "WithElement": Selects the collection elements of the selected element, but
52+
* points to the selected element.
5253
*
5354
* An `output` can be can be a dot separated path consisting of either "",
5455
* "Argument[n]", "Argument[n1..n2]", "Parameter", "Parameter[n]",

0 commit comments

Comments
 (0)