Skip to content

Commit

Permalink
Merge pull request #17625 from aschackmull/java/collection-neutrals
Browse files Browse the repository at this point in the history
Java: Minor model tweak and comment fix.
  • Loading branch information
aschackmull authored Sep 30, 2024
2 parents 52894f5 + 222ae6a commit d0831eb
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
1 change: 1 addition & 0 deletions java/ql/lib/ext/java.lang.model.yml
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,7 @@ extensions:
- ["java.lang", "ClassLoader", "loadClass", "(String,boolean)", "summary", "df-manual"]
- ["java.lang", "ClassLoader", "setClassAssertionStatus", "(String,boolean)", "summary", "df-manual"]
- ["java.lang", "ClassLoader", "setPackageAssertionStatus", "(String,boolean)", "summary", "df-manual"]
- ["java.lang", "Comparable", "compareTo", "", "summary", "manual"]
- ["java.lang", "Enum", "Enum", "(String,int)", "summary", "manual"]
- ["java.lang", "Enum", "equals", "(Object)", "summary", "manual"]
- ["java.lang", "Enum", "hashCode", "()", "summary", "manual"]
Expand Down
16 changes: 8 additions & 8 deletions java/ql/lib/ext/java.util.model.yml
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ extensions:
- ["java.util", "SequencedMap", True, "sequencedValues", "", "", "Argument[this].MapValue", "ReturnValue.Element", "value", "manual"]
- ["java.util", "SequencedSet", True, "reversed", "", "", "Argument[this].Element", "ReturnValue.Element", "value", "manual"]
- ["java.util", "Set", False, "copyOf", "(Collection)", "", "Argument[0].Element", "ReturnValue.Element", "value", "manual"]
- ["java.util", "Set", False, "clear", "()", "", "Argument[this].WithoutElement", "Argument[this]", "value", "manual"]
- ["java.util", "Set", True, "clear", "()", "", "Argument[this].WithoutElement", "Argument[this]", "value", "manual"]
- ["java.util", "Set", False, "of", "(Object)", "", "Argument[0]", "ReturnValue.Element", "value", "manual"]
- ["java.util", "Set", False, "of", "(Object,Object)", "", "Argument[0..1]", "ReturnValue.Element", "value", "manual"]
- ["java.util", "Set", False, "of", "(Object,Object,Object)", "", "Argument[0..2]", "ReturnValue.Element", "value", "manual"]
Expand Down Expand Up @@ -430,6 +430,8 @@ extensions:
- ["java.util", "Collection", "contains", "(Object)", "summary", "manual"]
- ["java.util", "Collection", "containsAll", "(Collection)", "summary", "manual"]
- ["java.util", "Collection", "isEmpty", "()", "summary", "manual"]
- ["java.util", "Collection", "remove", "(Object)", "summary", "manual"]
- ["java.util", "Collection", "removeIf", "(Predicate)", "summary", "manual"]
- ["java.util", "Collection", "size", "()", "summary", "manual"]
- ["java.util", "Collections", "emptyList", "()", "summary", "manual"]
- ["java.util", "Collections", "emptyMap", "()", "summary", "manual"]
Expand All @@ -451,12 +453,14 @@ extensions:
- ["java.util", "HashMap", "size", "()", "summary", "manual"]
- ["java.util", "HashSet", "HashSet", "(int)", "summary", "manual"]
- ["java.util", "Iterator", "hasNext", "()", "summary", "manual"]
- ["java.util", "Iterator", "remove", "()", "summary", "manual"]
- ["java.util", "List", "contains", "(Object)", "summary", "manual"]
- ["java.util", "List", "equals", "(Object)", "summary", "manual"]
- ["java.util", "List", "hashCode", "()", "summary", "manual"]
- ["java.util", "List", "indexOf", "(Object)", "summary", "manual"]
- ["java.util", "List", "isEmpty", "()", "summary", "manual"]
- ["java.util", "List", "of", "()", "summary", "manual"]
- ["java.util", "List", "remove", "(Object)", "summary", "manual"]
- ["java.util", "List", "sort", "(Comparator)", "summary", "manual"]
- ["java.util", "List", "size", "()", "summary", "manual"]
- ["java.util", "Locale$Builder", "addUnicodeLocaleAttribute", "(String)", "summary", "df-manual"]
Expand Down Expand Up @@ -535,6 +539,8 @@ extensions:
- ["java.util", "Scanner", "locale", "()", "summary", "df-manual"]
- ["java.util", "Set", "contains", "(Object)", "summary", "manual"]
- ["java.util", "Set", "isEmpty", "()", "summary", "manual"]
- ["java.util", "Set", "remove", "(Object)", "summary", "manual"]
- ["java.util", "Set", "removeAll", "(Collection)", "summary", "manual"]
- ["java.util", "Set", "size", "()", "summary", "manual"]
- ["java.util", "TreeMap", "TreeMap", "(Comparator)", "summary", "df-manual"]
- ["java.util", "TreeSet", "TreeSet", "(Comparator)", "summary", "df-manual"]
Expand All @@ -545,14 +551,8 @@ extensions:
- ["java.util", "TimeZone", "getTimeZone", "(String)", "summary", "manual"]
- ["java.util", "Vector", "size", "()", "summary", "manual"]

# The below APIs are currently being stored as neutral models since `WithoutElement` has not yet been implemented for Java.
# When `WithoutElement` is implemented, these should be changed to summary models of the form `Argument[this].WithoutElement -> Argument[this]`.
- ["java.util", "Collection", "removeIf", "(Predicate)", "summary", "manual"]
- ["java.util", "Iterator", "remove", "()", "summary", "manual"]
- ["java.util", "List", "remove", "(Object)", "summary", "manual"]
# The below API is currently being stored as neutral models since `WithoutElement` does not yet have a counterpart for MapValue/MapKey.
- ["java.util", "Map", "clear", "()", "summary", "manual"]
- ["java.util", "Set", "remove", "(Object)", "summary", "manual"]
- ["java.util", "Set", "removeAll", "(Collection)", "summary", "manual"]

# The below APIs have numeric flow and are currently being stored as neutral models.
# These may be changed to summary models with kinds "value-numeric" and "taint-numeric" (or similar) in the future.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ models
| 296 | Summary: java.util; SequencedMap; true; sequencedValues; ; ; Argument[this].MapValue; ReturnValue.Element; value; manual |
| 297 | Summary: java.util; SequencedSet; true; reversed; ; ; Argument[this].Element; ReturnValue.Element; value; manual |
| 298 | Summary: java.util; Set; false; copyOf; (Collection); ; Argument[0].Element; ReturnValue.Element; value; manual |
| 299 | Summary: java.util; Set; false; clear; (); ; Argument[this].WithoutElement; Argument[this]; value; manual |
| 299 | Summary: java.util; Set; true; clear; (); ; Argument[this].WithoutElement; Argument[this]; value; manual |
| 300 | Summary: java.util; Set; false; of; (Object); ; Argument[0]; ReturnValue.Element; value; manual |
| 301 | Summary: java.util; Set; false; of; (Object,Object); ; Argument[0..1]; ReturnValue.Element; value; manual |
| 302 | Summary: java.util; Set; false; of; (Object,Object,Object); ; Argument[0..2]; ReturnValue.Element; value; manual |
Expand Down

0 comments on commit d0831eb

Please sign in to comment.