7195194: Better data validation for Swing
Reviewed-by: art, ahgross
This commit is contained in:
parent
e539ff810a
commit
41e85e364f
@ -24,6 +24,8 @@
|
||||
*/
|
||||
package javax.swing.text;
|
||||
|
||||
import sun.reflect.misc.ConstructorUtil;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.lang.reflect.*;
|
||||
import java.text.ParseException;
|
||||
@ -245,7 +247,7 @@ public class DefaultFormatter extends JFormattedTextField.AbstractFormatter
|
||||
Constructor cons;
|
||||
|
||||
try {
|
||||
cons = vc.getConstructor(new Class[] { String.class });
|
||||
cons = ConstructorUtil.getConstructor(vc, new Class[]{String.class});
|
||||
|
||||
} catch (NoSuchMethodException nsme) {
|
||||
cons = null;
|
||||
|
Loading…
Reference in New Issue
Block a user