8071334: Investigate JAB changes required to support the version string change
authorptbrunet
Thu, 10 Dec 2015 12:16:29 -0600
changeset 34811 ae6bf12ff343
parent 34810 73f1464a9612
child 34812 276e466f4636
8071334: Investigate JAB changes required to support the version string change Summary: remove use of java.version property; no longer needed Reviewed-by: van, alexsch Contributed-by: peter.brunet@oracle.com
jdk/src/jdk.accessibility/share/classes/com/sun/java/accessibility/util/AWTEventMonitor.java
jdk/src/jdk.accessibility/windows/classes/com/sun/java/accessibility/internal/AccessBridge.java
--- a/jdk/src/jdk.accessibility/share/classes/com/sun/java/accessibility/util/AWTEventMonitor.java	Thu Dec 10 16:09:42 2015 +0300
+++ b/jdk/src/jdk.accessibility/share/classes/com/sun/java/accessibility/util/AWTEventMonitor.java	Thu Dec 10 12:16:29 2015 -0600
@@ -48,8 +48,6 @@
 @jdk.Exported
 public class AWTEventMonitor {
 
-    static private boolean runningOnJDK1_4 = false;
-
     /**
      * The current component with keyboard focus.
      *
@@ -638,15 +636,9 @@
          * @see AWTEventMonitor
          */
         public AWTEventsListener() {
-            String version = System.getProperty("java.version");
-            if (version != null) {
-                runningOnJDK1_4 = (version.compareTo("1.4") >= 0);
-            }
             initializeIntrospection();
             installListeners();
-            if (runningOnJDK1_4) {
-                MenuSelectionManager.defaultManager().addChangeListener(this);
-            }
+            MenuSelectionManager.defaultManager().addChangeListener(this);
             EventQueueMonitor.addTopLevelWindowListener(this);
         }
 
@@ -848,15 +840,7 @@
             case EventID.FOCUS:
                 c.removeFocusListener(this);
                 c.addFocusListener(this);
-
-                if (runningOnJDK1_4) {
-                    processFocusGained();
-
-                } else {        // not runningOnJDK1_4
-                    if ((c != componentWithFocus_private) && c.hasFocus()) {
-                        componentWithFocus_private = c;
-                    }
-                }
+                processFocusGained();
                 break;
 
             case EventID.ITEM:
--- a/jdk/src/jdk.accessibility/windows/classes/com/sun/java/accessibility/internal/AccessBridge.java	Thu Dec 10 16:09:42 2015 +0300
+++ b/jdk/src/jdk.accessibility/windows/classes/com/sun/java/accessibility/internal/AccessBridge.java	Thu Dec 10 12:16:29 2015 -0600
@@ -140,10 +140,6 @@
         // initialize AccessibleRole map
         initAccessibleRoleMap();
 
-        // determine which version of the JDK is running
-        String version = getJavaVersionProperty();
-        debugString("JDK version = "+version);
-
         // initialize the methods that map HWNDs and Java top-level
         // windows
         initHWNDcalls();
@@ -215,9 +211,7 @@
         } catch (Exception e) {}
 
     /*
-      Build the extendedVirtualNameSearchRoles array list.  I chose this method
-      because some of the Accessible Roles that need to be added to it are not
-      available in all versions of the J2SE that we want to support.
+      Build the extendedVirtualNameSearchRoles array list.
     */
     extendedVirtualNameSearchRoles.add (AccessibleRole.COMBO_BOX);
     try {
@@ -5919,7 +5913,7 @@
      */
     AccessibleRole.UNKNOWN,
 
-    // These roles are only available in JDK 1.4
+    // These roles are available since JDK 1.4
 
     /**
      * A STATUS_BAR is an simple component that can contain