typetools / typetools/checker-framework
Gui Effect Checker: handle field accesses like setters
Open
@csgordon is already working on this.
Since Mar 23, 2017.
enhancement
- Dominant language
- Java
- Stars
- 1.1k
- Forks
- 440
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 134
Description
Consider class
class GBC extends GridBagConstraints{
public GBC(int gridx,int gridy,...){
// Checker issues warning to annotate this constructor using @UIEffect
}
public GBC setweights(int weightx,int weighty){
this.weightx = weightx;
this.weighty = weighty;
return this;
// Checker fails to issue warning for such methods that may access UI elements.
}
}
Gui effect checker correctly issues warning when for constructor of this class. but fails to issue error when we create methods that may access the UI elements.
One should expect
Error - Calling a method with UIEffect effect from a context limited to SafeEffect effects.
public GBC setweights(int weightx, int weighty) {
Contributor 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.
Assessment
This issue has not been assessed yet.