changeset 6522:1d1fcf0c1ce8

7195194: Better data validation for Swing Reviewed-by: art, ahgross
author rupashka
date Tue, 11 Sep 2012 15:59:24 +0400
parents 9a7e2fa3c9c5
children 3b49bd3c392b
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 12:57:09 2012 +0400
+++ b/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;