Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Java: Update test expectations for JDK24 upgrade #18861

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/codeql/reusables/supported-versions-compilers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
.. [2] Objective-C, Objective-C++, C++/CLI, and C++/CX are not supported.
.. [3] Support for the clang-cl compiler is preliminary.
.. [4] Support for the Arm Compiler (armcc) is preliminary.
.. [5] Builds that execute on Java 7 to 22 can be analyzed. The analysis understands standard language features in Java 8 to 22; "preview" and "incubator" features are not supported. Source code using Java language versions older than Java 8 are analyzed as Java 8 code.
.. [5] Builds that execute on Java 7 to 24 can be analyzed. The analysis understands standard language features in Java 8 to 24; "preview" and "incubator" features are not supported. Source code using Java language versions older than Java 8 are analyzed as Java 8 code.
.. [6] ECJ is supported when the build invokes it via the Maven Compiler plugin or the Takari Lifecycle plugin.
.. [7] JSX and Flow code, YAML, JSON, HTML, and XML files may also be analyzed with JavaScript files.
.. [8] The extractor requires Python 3 to run. To analyze Python 2.7 you should install both versions of Python.
Expand Down
4 changes: 4 additions & 0 deletions java/ql/lib/change-notes/2025-02-27-jdk-24.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
category: feature
---
* The Java extractor and QL libraries now support Java 24.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
| AbstractList$RandomAccessSpliterator | .../AbstractList$RandomAccessSpliterator.class:0:0:0:0 |
| ArrayList | .../ArrayList.class:0:0:0:0 |
| ArrayList$ArrayListSpliterator | .../ArrayList$ArrayListSpliterator.class:0:0:0:0 |
| CleanerImpl$CleanableList | .../CleanerImpl$CleanableList.class:0:0:0:0 |
| CleanerImpl$CleanableList$Node | .../CleanerImpl$CleanableList$Node.class:0:0:0:0 |
| List | .../List.class:0:0:0:0 |
| ListIterator | .../ListIterator.class:0:0:0:0 |
| MemorySessionImpl$ResourceList | .../MemorySessionImpl$ResourceList.class:0:0:0:0 |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,22 @@ methodWithDuplicate
| AbstractCollection<E> | removeAll | Collection<?> |
| AbstractCollection<E> | retainAll | Collection<?> |
| AbstractCollection<E> | toArray | T[] |
| AbstractCollection<Entry<K,V>> | add | Entry<K,V> |
| AbstractCollection<Entry<K,V>> | addAll | Collection<? extends Entry<K,V>> |
| AbstractCollection<Entry<K,V>> | contains | Object |
| AbstractCollection<Entry<K,V>> | containsAll | Collection<?> |
| AbstractCollection<Entry<K,V>> | remove | Object |
| AbstractCollection<Entry<K,V>> | removeAll | Collection<?> |
| AbstractCollection<Entry<K,V>> | retainAll | Collection<?> |
| AbstractCollection<Entry<K,V>> | toArray | T[] |
| AbstractCollection<K> | add | K |
| AbstractCollection<K> | addAll | Collection<? extends K> |
| AbstractCollection<K> | contains | Object |
| AbstractCollection<K> | containsAll | Collection<?> |
| AbstractCollection<K> | remove | Object |
| AbstractCollection<K> | removeAll | Collection<?> |
| AbstractCollection<K> | retainAll | Collection<?> |
| AbstractCollection<K> | toArray | T[] |
| AbstractCollection<Runnable> | add | Runnable |
| AbstractCollection<Runnable> | addAll | Collection<? extends Runnable> |
| AbstractCollection<Runnable> | contains | Object |
Expand All @@ -40,6 +56,14 @@ methodWithDuplicate
| AbstractCollection<T> | removeAll | Collection<?> |
| AbstractCollection<T> | retainAll | Collection<?> |
| AbstractCollection<T> | toArray | T[] |
| AbstractCollection<V> | add | V |
| AbstractCollection<V> | addAll | Collection<? extends V> |
| AbstractCollection<V> | contains | Object |
| AbstractCollection<V> | containsAll | Collection<?> |
| AbstractCollection<V> | remove | Object |
| AbstractCollection<V> | removeAll | Collection<?> |
| AbstractCollection<V> | retainAll | Collection<?> |
| AbstractCollection<V> | toArray | T[] |
| AbstractList | add | E |
| AbstractList | add | int |
| AbstractList | addAll | Collection<? extends E> |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
| AbstractList$RandomAccessSpliterator | .../AbstractList$RandomAccessSpliterator.class:0:0:0:0 |
| ArrayList | .../ArrayList.class:0:0:0:0 |
| ArrayList$ArrayListSpliterator | .../ArrayList$ArrayListSpliterator.class:0:0:0:0 |
| CleanerImpl$CleanableList | .../CleanerImpl$CleanableList.class:0:0:0:0 |
| CleanerImpl$CleanableList$Node | .../CleanerImpl$CleanableList$Node.class:0:0:0:0 |
| List | .../List.class:0:0:0:0 |
| ListIterator | .../ListIterator.class:0:0:0:0 |
| MemorySessionImpl$ResourceList | .../MemorySessionImpl$ResourceList.class:0:0:0:0 |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,22 @@ methodWithDuplicate
| AbstractCollection<E> | removeAll | Collection<?> |
| AbstractCollection<E> | retainAll | Collection<?> |
| AbstractCollection<E> | toArray | T[] |
| AbstractCollection<Entry<K,V>> | add | Entry<K,V> |
| AbstractCollection<Entry<K,V>> | addAll | Collection<? extends Entry<K,V>> |
| AbstractCollection<Entry<K,V>> | contains | Object |
| AbstractCollection<Entry<K,V>> | containsAll | Collection<?> |
| AbstractCollection<Entry<K,V>> | remove | Object |
| AbstractCollection<Entry<K,V>> | removeAll | Collection<?> |
| AbstractCollection<Entry<K,V>> | retainAll | Collection<?> |
| AbstractCollection<Entry<K,V>> | toArray | T[] |
| AbstractCollection<K> | add | K |
| AbstractCollection<K> | addAll | Collection<? extends K> |
| AbstractCollection<K> | contains | Object |
| AbstractCollection<K> | containsAll | Collection<?> |
| AbstractCollection<K> | remove | Object |
| AbstractCollection<K> | removeAll | Collection<?> |
| AbstractCollection<K> | retainAll | Collection<?> |
| AbstractCollection<K> | toArray | T[] |
| AbstractCollection<Runnable> | add | Runnable |
| AbstractCollection<Runnable> | addAll | Collection<? extends Runnable> |
| AbstractCollection<Runnable> | contains | Object |
Expand All @@ -40,6 +56,14 @@ methodWithDuplicate
| AbstractCollection<T> | removeAll | Collection<?> |
| AbstractCollection<T> | retainAll | Collection<?> |
| AbstractCollection<T> | toArray | T[] |
| AbstractCollection<V> | add | V |
| AbstractCollection<V> | addAll | Collection<? extends V> |
| AbstractCollection<V> | contains | Object |
| AbstractCollection<V> | containsAll | Collection<?> |
| AbstractCollection<V> | remove | Object |
| AbstractCollection<V> | removeAll | Collection<?> |
| AbstractCollection<V> | retainAll | Collection<?> |
| AbstractCollection<V> | toArray | T[] |
| AbstractList | add | E |
| AbstractList | add | int |
| AbstractList | addAll | Collection<? extends E> |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,7 @@ compGenerated
| file://<external>/TextStyle.class:0:0:0:0 | getEntries | Default property accessor |
| file://<external>/Thread$State.class:0:0:0:0 | getEntries | Default property accessor |
| file://<external>/TimeUnit.class:0:0:0:0 | getEntries | Default property accessor |
| file://<external>/TypeKind.class:0:0:0:0 | getEntries | Default property accessor |
| file://<external>/VarHandle$AccessMode.class:0:0:0:0 | getEntries | Default property accessor |
| file://<external>/VarHandle$AccessType.class:0:0:0:0 | getEntries | Default property accessor |
| file://<external>/Wrapper.class:0:0:0:0 | getEntries | Default property accessor |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ Test.java:
# 0| [CompilationUnit] Test
# 1| 1: [Class] Test
#-----| -1: (Base Types)
# 1| 0: [TypeAccess] <any>
# 1| 0: [TypeAccess] Unavailable<String>
# 1| 0: [TypeAccess] String
1 change: 1 addition & 0 deletions java/ql/test/library-tests/errortype/Diags.expected
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@
| Test.java:6:23:6:39 | Unexpected symbol for constructor: new NoSuchClass() |
| Test.java:6:23:6:39 | Unknown or erroneous type for expression of kind ClassInstanceCreation |
| Test.java:6:27:6:37 | Unknown or erroneous type for expression of kind TypeAccess |
| Test.java:7:12:7:14 | Unknown or erroneous type for expression of kind VarAccess |
| file://:0:0:0:0 | 2 errors during annotation processing |
1 change: 1 addition & 0 deletions java/ql/test/library-tests/errortype/Test.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@ public NoSuchClass test() {
// Diagnostic Matches: 2 errors during annotation processing
// Diagnostic Matches: Unknown or erroneous type for expression of kind TypeAccess
// Diagnostic Matches: Unknown or erroneous type for expression of kind ClassInstanceCreation
// Diagnostic Matches: Unknown or erroneous type for expression of kind VarAccess
Loading