Removed unnecessary check for type

This commit is contained in:
Timo Mueller
2021-05-04 15:45:30 +02:00
parent 787a4ede85
commit fd52135f29

View File

@@ -19,7 +19,6 @@ import semmle.code.java.dataflow.Nullness
/** Predicate which detects vulnerable Constructors */
predicate isRmiOrJmxServerCreateConstructor(Constructor constructor) {
constructor.getName() = "RMIConnectorServer" and
constructor
.getDeclaringType()
.hasQualifiedName("javax.management.remote.rmi", "RMIConnectorServer")
@@ -38,7 +37,7 @@ predicate isRmiOrJmxServerCreateMethod(Method method) {
class MapToPutCredentialstypeConfiguration extends DataFlow2::Configuration {
MapToPutCredentialstypeConfiguration() { this = "MapToPutCredentialstypeConfiguration" }
override predicate isSource(DataFlow::Node source) {
override predicate isSource(DataFlow2::Node source) {
source.asExpr().(ClassInstanceExpr).getConstructedType() instanceof MapType
}