-
Bug
-
Resolution: Fixed
-
P4
-
1.2.2_05
-
1.3
-
sparc
-
solaris_7
When List.removeAll() is called on an empty java.awt.List, the following message
is generated:
Warning:
Name: slist
Class: XmList
Item(s) to be deleted are not present in the list.
The problem does not occur on the win32 JDK.
Below is a test case. Click on the "remove all" button once to remove the list.
Clicking a second time will then produce the warning message.
--------------------------------------------------------------------------------
import java.awt.*;
import java.awt.event.*;
class Main extends Frame implements ActionListener {
List l = new List(10,
false);
Button b;
Main() {
super("removeAll Example");
for (int i = 0; i < 10; i++) {
l.addItem("item "+i);
}
b = new Button("Remove All " + l.getRows() + " Rows");
add(l, BorderLayout.CENTER);
add(b, BorderLayout.SOUTH);
b.addActionListener(this);
pack();
show();
}
static public void main(String[] args) {
new Main();
}
public void actionPerformed(ActionEvent evt) {
l.removeAll();
}
}
is generated:
Warning:
Name: slist
Class: XmList
Item(s) to be deleted are not present in the list.
The problem does not occur on the win32 JDK.
Below is a test case. Click on the "remove all" button once to remove the list.
Clicking a second time will then produce the warning message.
--------------------------------------------------------------------------------
import java.awt.*;
import java.awt.event.*;
class Main extends Frame implements ActionListener {
List l = new List(10,
false);
Button b;
Main() {
super("removeAll Example");
for (int i = 0; i < 10; i++) {
l.addItem("item "+i);
}
b = new Button("Remove All " + l.getRows() + " Rows");
add(l, BorderLayout.CENTER);
add(b, BorderLayout.SOUTH);
b.addActionListener(this);
pack();
show();
}
static public void main(String[] args) {
new Main();
}
public void actionPerformed(ActionEvent evt) {
l.removeAll();
}
}
- relates to
-
JDK-5078204 Jvm crashes when pressing key in an applet
- Closed