typetools / typetools/checker-framework
awt package not annotated
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 1.1k
- Forks
- 440
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 134
Description
In the following code:
import javax.swing.* ;
import java.awt.* ;
import java.awt.event.* ;
class cardTest implements ActionListener
{
JFrame fr;
JPanel pnl1;
JButton b1,b2,b3,b4;
Icon ic1,ic2,ic3,ic4;
CardLayout card;
cardTest()
{
ic1=new ImageIcon("img3.jpg");
ic2=new ImageIcon("img4.jpg");
ic3=new ImageIcon("img2.png");
ic4=new ImageIcon("img1.jpg");
fr=new JFrame("Menu Test");
pnl1=new JPanel();
fr.add(pnl1);
b3=new JButton(ic3);
b4=new JButton(ic4);
b1=new JButton(ic1);
b2=new JButton(ic2);
card=new CardLayout();
pnl1.setLayout(card);
pnl1.add(b1);
b1.addActionListener(this);
pnl1.add(b2);
b2.addActionListener(this);
pnl1.add(b3);
b3.addActionListener(this);
pnl1.add(b4);
b4.addActionListener(this);
fr.setSize(500,500);
fr.setVisible(true);
}
public void actionPerformed(ActionEvent ed)
{
card.next(pnl1);
}
public static void main(String []args)
{
new cardTest();
}
}
If we compile this code with command
javac cardTest.java
It will work properly
But by using
javac -processor NullnessChecker cardTest.java
It is showing error in ActionListener(this)
It is not getting (this)
output:

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.
Research direction
Start by reproducing the report with the provided cardTest.java example and compare javac cardTest.java with javac -processor NullnessChecker cardTest.java. Trace the reported error at each ActionListener(this) call; done means the AWT-related nullness checking no longer rejects this valid listener usage.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100