7195194: Better data validation for Swing
authorrupashka
Tue, 11 Sep 2012 15:59:24 +0400
changeset 14220 ba920e7e0ec0
parent 14219 e99355081c6d
child 14221 441a3cd5e5e3
7195194: Better data validation for Swing Reviewed-by: art, ahgross
jdk/src/share/classes/javax/swing/text/DefaultFormatter.java
--- a/jdk/src/share/classes/javax/swing/text/DefaultFormatter.java	Tue Sep 11 12:57:09 2012 +0400
+++ b/jdk/src/share/classes/javax/swing/text/DefaultFormatter.java	Tue Sep 11 15:59:24 2012 +0400
@@ -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 @@
             Constructor cons;
 
             try {
-                cons = vc.getConstructor(new Class[] { String.class });
+                cons = ConstructorUtil.getConstructor(vc, new Class[]{String.class});
 
             } catch (NoSuchMethodException nsme) {
                 cons = null;