An external spec cannot refine methods its class inherits
維護者通常 2 天內回覆
已經有一個關聯 PR 被合併了。
- #387 來自 @CatarinaGamboa —— 已合併
評估
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 新手友好度
- 48/100
- Issue 類型
- 缺陷
- 描述清晰度
- 基本清楚
- 活躍度
- 活躍
- 技術堆疊
- java
- 領域
- compilers, testing-qa
研究方向
Start by reading the external-refinement method lookup that emits “Could not find method” for pack() and setUndecorated(boolean); the issue does not name its source files or tests. Reproduce the example against the reported main revision, then trace how lookup handles methods inherited from java.awt.Window and java.awt.Frame. Done when an external spec can name those inherited methods and the protocol example is verified as intended.
由索引模型根據 Issue 內容生成。
描述
@StateSet({"displayable", "notDisplayable"})
@ExternalRefinementsFor("javax.swing.JFrame")
public interface JFrameRefinementsExpert {
@StateRefinement(to = "notDisplayable(this)") void JFrame(String title);
@StateRefinement(to = "displayable(this)") void pack();
@StateRefinement(from = "notDisplayable(this)") void setUndecorated(boolean undecorated);
}
public class Repro {
void show() {
JFrame f = new JFrame("x");
f.pack();
f.setUndecorated(true); // throws IllegalComponentStateException: The frame is displayable.
}
}
On main 321a7321:
Warning: Could not find method 'void pack()' for 'javax.swing.JFrame'
Warning: Could not find method 'void setUndecorated(boolean)' for 'javax.swing.JFrame'
Correct! Passed Verification.
pack is declared in java.awt.Window and setUndecorated in java.awt.Frame; a spec can only name methods its own class declares. A protocol that spans a hierarchy (here: displayable, from Window, guarding a Frame method) then has to be split into one interface per declaring class, sharing states by simple name (which also depends on registration order, see the related issue). Expected: an external spec can name inherited methods, applying to calls on receivers of that class.
- 主要語言
- Java
- 星號
- 67
- 分支
- 36
- 平均合併
- 2 天 2 小時
- 30 天內合併 PR
- 34
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
liquid-java/liquidjava 的其他 Issue
-
bug
難度 2/5 1-3 小時 新手友好度 82/100
liquid-java/liquidjava#395 ·
維護者通常 2 天內回覆
-
Verifier crashes on a comparison or other binary operator whose operand types cannot be resolved (classes not on the classpath)可能已有人在做 @CatarinaGamboa 今天認領。 未關閉bug
難度 2/5 1-3 小時 新手友好度 72/100
liquid-java/liquidjava#388 ·
維護者通常 2 天內回覆
-
enhancement
難度 2/5 1-3 小時 新手友好度 65/100
liquid-java/liquidjava#373 ·
維護者通常 2 天內回覆
-
Soundness: a local variable with a constant's name shadows the constant (Format.JPG read as local JPG)可能已有人在做 @CatarinaGamboa 今天認領。 未關閉bug
難度 2/5 1-3 小時 新手友好度 78/100
liquid-java/liquidjava#321 ·
維護者通常 2 天內回覆
-
bug
難度 4/5 3-5 天 新手友好度 40/100
liquid-java/liquidjava#405 ·
維護者通常 2 天內回覆
查看 liquid-java/liquidjava 的全部 Issue
相似的 Issue
-
Flight SQL JDBC parses boolean properties case-sensitively, silently disabling TLS for useEncryption=TRUE可能已有人在做 @Arawoof06 今天認領。 未關閉
難度 2/5 1-3 小時 新手友好度 79/100
apache/arrow-java#1357 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 77/100
apache/rocketmq-dashboard#6610 ·
維護者通常 3 天內回覆
-
難度 2/5 1-3 小時 新手友好度 78/100
MetricsHub/metricshub-community#1396 ·
維護者通常 1 天內回覆
-
L: java:gradle L: java:maven L: ruby:bundler T: bug 🐞
難度 2/5 1-3 小時 新手友好度 76/100
dependabot/dependabot-core#16547 ·
維護者通常 1 天內回覆
-
Citationcount column sorts alphabetically instead of numerically可能已有人在做 @kpunia306 今天認領。 未關閉status: needs-triage
難度 2/5 1-3 小時 新手友好度 68/100
維護者通常 1 天內回覆