[java-atk-wrapper] AtkKeyEvent: Use checked operations



commit bf9919f0cec505f7837265807a05b567c31446e0
Author: Magdalen Berns <m berns thismagpie com>
Date:   Sat Nov 1 16:46:05 2014 +0000

    AtkKeyEvent: Use checked operations
    
    There were irregularities in how the HashMap Object was being
    initalised so this needed to be fixed. After that it was just
    a matter of explicitly defining the types that are being used.
    
    Bug: https://bugzilla.gnome.org/show_bug.cgi?id=739503

 wrapper/org/GNOME/Accessibility/AtkKeyEvent.java |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/wrapper/org/GNOME/Accessibility/AtkKeyEvent.java 
b/wrapper/org/GNOME/Accessibility/AtkKeyEvent.java
index 2db5911..b30431b 100644
--- a/wrapper/org/GNOME/Accessibility/AtkKeyEvent.java
+++ b/wrapper/org/GNOME/Accessibility/AtkKeyEvent.java
@@ -25,7 +25,7 @@ import java.util.HashMap;
 
 public class AtkKeyEvent {
 
-  private static HashMap nonAlphaNumericMap = null;
+  private static HashMap<Object,String> nonAlphaNumericMap=null;
 
   public static final int ATK_KEY_EVENT_PRESSED = 0;
   public static final int ATK_KEY_EVENT_RELEASED = 1;
@@ -42,7 +42,6 @@ public class AtkKeyEvent {
 
   static {
     // Non-alphanumeric symbols that need to be mapped to X11 keysym names
-    nonAlphaNumericMap = new HashMap( 40 );
     nonAlphaNumericMap.put("!", "exclam");
     nonAlphaNumericMap.put("@", "at");
     nonAlphaNumericMap.put("#", "numbersign");
@@ -144,7 +143,7 @@ public class AtkKeyEvent {
 
 class GNOMEKeyMapping {
 
-  private static HashMap keyMap = null;
+  private static HashMap<Object,Object> keyMap = null;
 
   public static final class GNOMEKeyInfo {
     private int     gdkKeyCode;
@@ -193,7 +192,6 @@ class GNOMEKeyMapping {
   }
 
   private static void initializeMap() {
-    keyMap = new HashMap( 146 ); // Currently only 110, so allocate 110 / 0.75
 
     keyMap.put( new Integer(KeyEvent.VK_COLON),        new GNOMEKeyInfo( 0x20a1, "ColonSign" ) ); // 
GDK_ColonSign
     keyMap.put( new Integer(KeyEvent.VK_EURO_SIGN),    new GNOMEKeyInfo( 0x20ac, "EuroSign" ) ); // 
GDK_EuroSign


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]