A constructor of one class cannot change the state of its argument (new PipedInputStream(pos) connects pos)
維護者通常 1 天內回覆
還沒有人認領這個 Issue。
評估
- 難度
- 5/5
- 預估耗時
- 一週以上
- 新手友好度
- 35/100
- Issue 類型
- 功能
- 描述清晰度
- 描述清楚
- 活躍度
- 活躍
- 技術堆疊
- java
研究方向
The issue identifies the @StateRefinement limitation and gives a reproducer using PipedInputStream and PipedOutputStream, but names no implementation files or tests. First read how @StateRefinement is represented and processed, then trace the constructor-spec handling and related tests. Done means a parameter-state transition can be specified and the reproducer is accepted without breaking existing behavior.
由索引模型根據 Issue 內容生成。
描述
new PipedInputStream(pos) calls pos.connect(this), so afterwards pos is connected. A spec cannot say this: @StateRefinement describes this (and the return value), not the state of an argument of an external constructor.
PipedOutputStream pos = new PipedOutputStream();
InputStream is = new PipedInputStream(pos);
pos.write(1); // correct Java
With the Barista PipedOutputStream spec (connected only via new PipedOutputStream(snk) or connect(snk)), main 321a7321 rejects it: found start(pos) but expected connected(pos). Connecting from the input side is the more common idiom; it is how powsybl-core fixed a real 'Pipe not connected' bug, so the developers' fix is rejected.
Proposal: allow a state transition on a parameter in a constructor or method spec, e.g. @StateRefinement(param = "src", to = "connected(src)") on PipedInputStream(PipedOutputStream src).
We would need Latte for this.
- 主要語言
- Java
- 星號
- 67
- 分支
- 36
- 平均合併
- 2 天 4 小時
- 30 天內合併 PR
- 28
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
liquid-java/liquidjava 的其他 Issue
-
enhancement
難度 2/5 1-3 小時 新手友好度 65/100
liquid-java/liquidjava#373 ·
維護者通常 1 天內回覆
-
bug
難度 2/5 1-3 小時 新手友好度 78/100
liquid-java/liquidjava#321 ·
維護者通常 1 天內回覆
-
enhancement
難度 5/5 一週以上 新手友好度 25/100
liquid-java/liquidjava#381 ·
維護者通常 1 天內回覆
-
An external spec cannot refine methods its class inherits可能已有人在做 關聯的 PR 仍在進行中或已合併。 未關閉bug
難度 4/5 3-5 天 新手友好度 48/100
liquid-java/liquidjava#379 ·
維護者通常 1 天內回覆
-
bug
難度 4/5 3-5 天 新手友好度 55/100
liquid-java/liquidjava#378 ·
維護者通常 1 天內回覆
查看 liquid-java/liquidjava 的全部 Issue
相似的 Issue
-
backend
難度 2/5 1-3 小時 新手友好度 76/100
bcgov/nr-forest-client#2524 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 67/100
維護者通常 1 天內回覆
-
難度 1/5 1 小時以內 新手友好度 74/100
維護者通常 1 天內回覆
-
team:Lumberjack
難度 2/5 1-3 小時 新手友好度 76/100
OpenLiberty/open-liberty#35998 ·
維護者通常 1 天內回覆
-
[BUG] SQS SendMessageBatch accepts more than 10 entries instead of TooManyEntriesInBatchRequest可能已有人在做 關聯的 PR 仍在進行中或已合併。 未關閉
難度 2/5 1-3 小時 新手友好度 67/100
維護者通常 1 天內回覆