A constructor of one class cannot change the state of its argument (new PipedInputStream(pos) connects pos)
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Anfängerfreundlichkeit
- 35/100
- Issue-Typ
- Feature
- Klarheit
- Klar beschrieben
- Aktivitätsstatus
- Aktiv
- Tech-Stack
- java
- Bereich
- compilers, developer-experience
Rechercherichtung
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.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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.
- Vorherrschende Sprache
- Java
- Sterne
- 73
- Forks
- 38
- Ø Merge
- 12 Std. 32 Min.
- Gemergte PRs (30 T.)
- 45
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus liquid-java/liquidjava
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 90/100
liquid-java/liquidjava#562 ·
Maintainer antworten meist innerhalb von 1 Tag
-
A float ghost crashes the verifier: "Ghost not implemented for type float"Evtl. vergeben @MohammedZaid1740 hat das vor 7 Tagen übernommen. Offenbug good first issue
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
liquid-java/liquidjava#443 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
bug real-world-finding
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
liquid-java/liquidjava#395 ·
Maintainer antworten meist innerhalb von 1 Tag
-
A ternary between arrays crashes: Sorts (Array Int Int) and Bool are incompatibleEvtl. vergeben @CatarinaGamboa hat das vor 4 Tagen übernommen. Offenbug
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 15/100
liquid-java/liquidjava#558 ·
Maintainer antworten meist innerhalb von 1 Tag
-
new T[a][b] gets length b instead of a (unsound)Evtl. vergeben @CatarinaGamboa hat das vor 4 Tagen übernommen. Offenbug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 30/100
liquid-java/liquidjava#557 ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in liquid-java/liquidjava
Ähnliche Issues
-
[BUG] Nightly Build JDK 17: latest-frameworks job red since 2026-11-28 — quarkiverse-langchain4j 2.0.0 pins Quarkus 4.0.0, which requires Java 21Evtl. vergeben @uhhgxg hat das heute übernommen. Offen
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 95/100
langchain4j/langchain4j#7344 ·
Maintainer antworten meist innerhalb von 1 Tag
-
documentation good first issue
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
cristianEncarnacion/ferroreport#149 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 60/100
quelea-projection/Quelea#749 ·
Maintainer antworten meist innerhalb von 1 Tag
-
free_port can hand one port to two callers, so the fixed-port http tests fail in parallel runsEvtl. vergeben Ein verknüpfter Pull Request ist offen oder bereits gemergt. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 92/100
erkamyaman/rust-anything#963 ·
Maintainer antworten meist innerhalb von 1 Tag
-
api-diagnostics bug jdbc
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
ClickHouse/clickhouse-java#3464 ·
Maintainer antworten meist innerhalb von 1 Tag