-
Bug
-
Resolution: Duplicate
-
P4
-
None
-
1.4.0
-
x86
-
windows_2000
Name: sv35042 Date: 10/09/2002
FULL PRODUCT VERSION :
java version "1.4.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-b92)
Java HotSpot(TM) Client VM (build 1.4.0-b92, mixed mode)
Microsoft Windows 2000 [Version 5.00.2195]
A DESCRIPTION OF THE PROBLEM :
If OptionPane.showMessageDialog() is called from within the
verify() method of a InputVerifier class which is attached
to a JTextField component the syetem goes into an infinite
loop and eventually crashes with a Stack overflow.
REGRESSION. Last worked in version 1.3
EXPECTED VERSUS ACTUAL BEHAVIOR :
You would expect the verify method to be able to display a
messsage to the user and continue on normally. This can't
be an unusual thing to do.
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import java.awt.*;
import javax.swing.*;
public class Main extends JApplet
{
int Count = 0;
public void init()
{
JTextField tf = new JTextField("Set focus here", 21);
tf.setInputVerifier(new Verifier());
getContentPane().add(tf);
}
class Verifier extends InputVerifier
{
public boolean verify(JComponent input)
{
System.out.println("Verifier: " + ++Count);
// Un-comment this line to crash
// JOptionPane.showMessageDialog(null, "Verify");
return true;
}
}
} // End Main Class
---------- END SOURCE ----------
(Review ID: 144322)
======================================================================
- duplicates
-
JDK-4518307 InputVerifier is caught in a infinite loop in 1.4beta2
- Resolved