github / github/codeql

How to get the RefType without import

未關閉
#4,937 4 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
Java question Stale
主要語言
CodeQL
星號
10.1k
分支
2.1k
平均合併
2 天 15 小時
30 天內合併 PR
141

描述

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:

```

org.apache.flink
flink-shaded-netty
4.1.39.Final-11.0

```

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](https://user-images.githubusercontent.com/8370120/104120928-9a4dc880-5375-11eb-92ff-c530b1a37eb5.png)

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`

貢獻指南

開啟貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。