changeset 5469:7a766aa1c65a

7195194: Better data validation for Swing Reviewed-by: art, ahgross
author rupashka
date Tue, 11 Sep 2012 17:27:31 +0400
parents c7d04fc36ee4
children 354650f9cddc
files src/share/classes/javax/swing/text/DefaultFormatter.java
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/javax/swing/text/DefaultFormatter.java	Tue Sep 11 15:58:50 2012 +0400
+++ b/src/share/classes/javax/swing/text/DefaultFormatter.java	Tue Sep 11 17:27:31 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;