Skip to content

Java: Adapt tests to JDK21 #14503

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

Merged
merged 5 commits into from
Oct 17, 2023
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,8 @@ methodWithDuplicate
| List | add | int |
| List | addAll | Collection<? extends E> |
| List | addAll | int |
| List | addFirst | E |
| List | addLast | E |
| List | contains | Object |
| List | containsAll | Collection<?> |
| List | copyOf | Collection<? extends E> |
Expand Down Expand Up @@ -213,6 +215,8 @@ methodWithDuplicate
| List<String> | add | int |
| List<String> | addAll | Collection<? extends String> |
| List<String> | addAll | int |
| List<String> | addFirst | String |
| List<String> | addLast | String |
| List<String> | contains | Object |
| List<String> | containsAll | Collection<?> |
| List<String> | copyOf | Collection<? extends E> |
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
//semmle-extractor-options: --javac-args -cp ${testdir}/../../../stubs/apache-commons-collections4-4.4
//semmle-extractor-options: --javac-args -cp ${testdir}/../../../stubs/apache-commons-collections4-4.4 --release 11
2 changes: 0 additions & 2 deletions java/ql/test/library-tests/sensitive-actions/test.expected
Original file line number Diff line number Diff line change
Expand Up @@ -67,5 +67,3 @@ sensitiveDataMethod
| Test.java:37:18:37:31 | aaCryptAccntaa |
| Test.java:39:18:39:33 | aaCryptTrustedaa |
| Test.java:41:18:41:40 | aaCryptRefreshaaTokenaa |
| file:///modules/java.base/java/lang/invoke/MemberName.class:0:0:0:0 | isTrustedFinalField |
| file:///modules/java.base/java/lang/reflect/Field.class:0:0:0:0 | isTrustedFinal |
2 changes: 1 addition & 1 deletion java/ql/test/library-tests/sensitive-actions/test.ql
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ query predicate sensitiveVariable(Variable v) {
v.getName().regexpMatch(getCommonSensitiveInfoRegex())
}

query predicate sensitiveDataMethod(SensitiveDataMethod m) { any() }
query predicate sensitiveDataMethod(SensitiveDataMethod m) { m.fromSource() }
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import java

from Record r, boolean isFinal, boolean isStatic, string superTypes
where
r.fromSource() and
(if r.isFinal() then isFinal = true else isFinal = false) and
(if r.isStatic() then isStatic = true else isStatic = false) and
superTypes = concat(RefType superType | superType = r.getASupertype() | superType.toString(), ",")
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.