7195194: Better data validation for Swing

Reviewed-by: art, ahgross
This commit is contained in:
Pavel Porvatov 2012-09-11 15:59:24 +04:00
parent e539ff810a
commit 41e85e364f

View File

@ -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;