8043152: KSS: javax.swing.plaf.synth.SynthContext
authormalenkov
Fri, 16 May 2014 15:51:57 +0400
changeset 25088 8d4b058368f0
parent 25087 dc3f3f90567f
child 25089 e032b0161576
8043152: KSS: javax.swing.plaf.synth.SynthContext Reviewed-by: alexsch, serb
jdk/src/share/classes/javax/swing/plaf/synth/SynthContext.java
--- a/jdk/src/share/classes/javax/swing/plaf/synth/SynthContext.java	Fri May 16 15:46:24 2014 +0400
+++ b/jdk/src/share/classes/javax/swing/plaf/synth/SynthContext.java	Fri May 16 15:51:57 2014 +0400
@@ -26,6 +26,7 @@
 
 import javax.swing.*;
 import java.util.*;
+import sun.reflect.misc.ReflectUtil;
 
 /**
  * An immutable transient object containing contextual information about
@@ -70,7 +71,7 @@
         }
         if (context == null) {
             try {
-                context = (SynthContext)type.newInstance();
+                context = (SynthContext) ReflectUtil.newInstance(type);
             } catch (IllegalAccessException iae) {
             } catch (InstantiationException ie) {
             }