jdk/src/java.desktop/share/classes/java/awt/AWTKeyStroke.java
changeset 26749 b6598aa90114
parent 25859 3317bb8137f4
child 32867 90051b1c4e3d
equal deleted inserted replaced
26748:fba66a2e8961 26749:b6598aa90114
    81     private static AWTKeyStroke APP_CONTEXT_KEYSTROKE_KEY = new AWTKeyStroke();
    81     private static AWTKeyStroke APP_CONTEXT_KEYSTROKE_KEY = new AWTKeyStroke();
    82 
    82 
    83     /*
    83     /*
    84      * Reads keystroke class from AppContext and if null, puts there the
    84      * Reads keystroke class from AppContext and if null, puts there the
    85      * AWTKeyStroke class.
    85      * AWTKeyStroke class.
    86      * Must be called under locked AWTKeyStro
    86      * Must be called under locked AWTKeyStroke
    87      */
    87      */
    88     private static Class<AWTKeyStroke> getAWTKeyStrokeClass() {
    88     private static Class<AWTKeyStroke> getAWTKeyStrokeClass() {
    89         @SuppressWarnings("unchecked")
    89         @SuppressWarnings("unchecked")
    90         Class<AWTKeyStroke> clazz = (Class<AWTKeyStroke>)AppContext.getAppContext().get(AWTKeyStroke.class);
    90         Class<AWTKeyStroke> clazz = (Class<AWTKeyStroke>)AppContext.getAppContext().get(AWTKeyStroke.class);
    91         if (clazz == null) {
    91         if (clazz == null) {
   223             AppContext.getAppContext().remove(APP_CONTEXT_CACHE_KEY);
   223             AppContext.getAppContext().remove(APP_CONTEXT_CACHE_KEY);
   224             AppContext.getAppContext().remove(APP_CONTEXT_KEYSTROKE_KEY);
   224             AppContext.getAppContext().remove(APP_CONTEXT_KEYSTROKE_KEY);
   225         }
   225         }
   226     }
   226     }
   227 
   227 
   228     /* returns noarg Constructor for class with accessible flag. No security
   228     /* returns no-arg Constructor for class with accessible flag. No security
   229        threat as accessible flag is set only for this Constructor object,
   229        threat as accessible flag is set only for this Constructor object,
   230        not for Class constructor.
   230        not for Class constructor.
   231      */
   231      */
   232     private static Constructor<?> getCtor(final Class<?> clazz)
   232     private static Constructor<?> getCtor(final Class<?> clazz)
   233     {
   233     {