An external spec cannot refine methods its class inherits
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 48/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- java
- Domain
- compilers, testing-qa
Research direction
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.
Written by the indexing model from the issue text.
Description
@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.
- Dominant language
- Java
- Stars
- 67
- Forks
- 36
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 28
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from liquid-java/liquidjava
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
liquid-java/liquidjava#373 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
liquid-java/liquidjava#321 ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 5/5 Over a week Newbie friendliness 25/100
liquid-java/liquidjava#381 ·
Maintainers usually reply within 1 day
-
enhancement future latte
Difficulty 5/5 Over a week Newbie friendliness 35/100
liquid-java/liquidjava#380 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 55/100
liquid-java/liquidjava#378 ·
Maintainers usually reply within 1 day
All issues in liquid-java/liquidjava
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
NationalSecurityAgency/ghidra#9748 ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Maintainers usually reply within 1 day
-
spring-mcp-tools
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
explyt/spring-plugin#591 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
jenkinsci/build-monitor-plugin#1367 ·
Maintainers usually reply within 1 day