GoogleCloudPlatform / GoogleCloudPlatform/cloud-opensource-java

Potential false negatives on protected methods referenced from child class

未關閉
#2,184 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
p3
主要語言
Java
星號
163
分支
80
PR 合併指標
30 天內沒有已合併 PR

描述

https://github.com/GoogleCloudPlatform/cloud-opensource-java/pull/2183#discussion_r688009905 found an interesting case where Linkage Checker cannot report linkage errors for protected methods that are referenced from a child class. For example, the code below shows red for compilation error but Linkage Checker would not detect it if the relationship is in a class files.

Screen Shot 2021-08-12 at 16 18 25

This implies that when
- a method in a library is changing its accessor from public to protected, and
- the caller and callee has child-parent class relationship

Linkage Checker would fail to report the linkage errors. It considers that a protected method is ok to be accessed by child classes.

I'm not sure how to fix it but I think it's worth document here.

貢獻指南

開啟貢獻指南

評估

這個 Issue 還沒有評估資料。

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

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