Merge pull request #14503 from smowton/smowton/admin/adapt-tests-to-jdk21

Java: Adapt tests to JDK21
This commit is contained in:
Chris Smowton
2023-10-17 20:07:47 +01:00
committed by GitHub
6 changed files with 9 additions and 4 deletions

View File

@@ -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> |
@@ -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> |

View File

@@ -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

View File

@@ -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 |

View File

@@ -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() }

View File

@@ -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(), ",")

View File

@@ -9,4 +9,6 @@ import org.apache.sshd.common.Closeable;
public interface CloseableExecutorService extends Closeable, ExecutorService
{
default boolean awaitTermination(Duration p0){ return false; }
default void close() { }
}