Skip to content

How to get the RefType without import #4937

Open
@thanatoskira

Description

@thanatoskira

When I used CodeQL to search for Class in the project, I found that only the Class that was loaded in the source code through a similar import method can be successfully searched, so I want to ask if there is any way to include those Class that have not been introduced when generating the database.

For Example,Pom.xml contains the following dependencies:

<dependency>
  <groupId>org.apache.flink</groupId>
  <artifactId>flink-shaded-netty</artifactId>
  <version>4.1.39.Final-11.0</version>
</dependency>

When I use import org.apache.flink.shaded.netty4.io.netty.handler.codec.http.multipart.HttpPostStandardRequestDecoder; to import this class, I can search for HttpPostStandardRequestDecoder through the following CodeQL syntax

import java
from Package package, RefType reftp
where
    package.hasName("org.apache.flink.shaded.netty4.io.netty.handler.codec.http.multipart") and
    reftp.getPackage() = package
select reftp

image

But I still can’t get some other classes under the org.apache.flink.shaded.netty4.io.netty.handler.codec.http.multipart package, such as: MemoryFileUpload

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions