changeset 8104:76d3dbc69959

Merge
author asaha
date Thu, 02 Oct 2014 08:31:59 -0700
parents 0495f9261e0b (current diff) 6ef59d24666e (diff)
children 2d3c1f9dc8ff
files .hgtags src/share/classes/sun/awt/AWTAccessor.java
diffstat 57 files changed, 2719 insertions(+), 178 deletions(-) [+]
line wrap: on
line diff
--- a/.hgtags	Thu Sep 11 11:03:44 2014 -0700
+++ b/.hgtags	Thu Oct 02 08:31:59 2014 -0700
@@ -490,3 +490,18 @@
 1108ab8e3dce0318529b4bcda46ce895659bb09b jdk7u71-b11
 ae4e88c495851c43862e2fc3d1ff7b64c68f368c jdk7u71-b12
 a6cbc82d62f915cdcd6037c8b40a4590585553c7 jdk7u71-b13
+78a7e3c7165d4c281d4f90bb2304e95ca2c96969 jdk7u71-b14
+c76a5b2876b98194ccbeffeab76a0326bf163ba2 jdk7u72-b01
+b02c1a8b10cd7338eb808ebfaa5a74b4997fdc8f jdk7u72-b02
+bc98cecdab4cd4a97316a5407c91bdedc92d4bb5 jdk7u72-b03
+b227c93ab2c91ce4b412d1cfb4f7649bff30677b jdk7u72-b04
+dd7983c1586dd9e6e6d53bfa05d7e164329979b0 jdk7u72-b05
+b57a21af9f6d3cd9498099c329063a671b39e3c4 jdk7u72-b06
+9d53e2319954cc1479e190e26b110168c7073b0a jdk7u72-b07
+584b227e8efe21dd47a616afdb4f1f2a2fd630cf jdk7u72-b08
+2ee54b1c7203b9973e0b2ab06cf73e98886ee099 jdk7u72-b09
+d3257f2beb42163afe64adea65b53a18d039eb0d jdk7u72-b10
+4946dc66a0c77133a0a6e3198bd9bd1ec5ef0344 jdk7u72-b11
+e556571078d5c8d24b527ed809d12f37f6e3745b jdk7u72-b12
+13ed37084621a8af551ec46650c07ea96f1a22ba jdk7u72-b13
+f4cf053f2ed3df23b756dd182061876ac9774bc5 jdk7u72-b14
--- a/make/common/Defs-linux.gmk	Thu Sep 11 11:03:44 2014 -0700
+++ b/make/common/Defs-linux.gmk	Thu Oct 02 08:31:59 2014 -0700
@@ -191,9 +191,9 @@
 CFLAGS_REQUIRED_amd64   += -fno-omit-frame-pointer -D_LITTLE_ENDIAN
 CFLAGS_REQUIRED_i586    += -fno-omit-frame-pointer -D_LITTLE_ENDIAN
 CFLAGS_REQUIRED_ia64    += -fno-omit-frame-pointer -D_LITTLE_ENDIAN
-CFLAGS_REQUIRED_sparcv9 += -m64 -mcpu=v9
+CFLAGS_REQUIRED_sparcv9 += -m64 -mcpu=v9 -D_BIG_ENDIAN
 LDFLAGS_COMMON_sparcv9  += -m64 -mcpu=v9
-CFLAGS_REQUIRED_sparc   += -m32 -mcpu=v9
+CFLAGS_REQUIRED_sparc   += -m32 -mcpu=v9 -D_BIG_ENDIAN
 LDFLAGS_COMMON_sparc    += -m32 -mcpu=v9
 CFLAGS_REQUIRED_arm     += -fsigned-char -D_LITTLE_ENDIAN
 CFLAGS_REQUIRED_ppc     += -fsigned-char -D_BIG_ENDIAN
--- a/src/macosx/classes/sun/lwawt/LWWindowPeer.java	Thu Sep 11 11:03:44 2014 -0700
+++ b/src/macosx/classes/sun/lwawt/LWWindowPeer.java	Thu Oct 02 08:31:59 2014 -0700
@@ -755,7 +755,7 @@
     public void notifyNCMouseDown() {
         // Ungrab except for a click on a Dialog with the grabbing owner
         if (grabbingWindow != null &&
-            grabbingWindow != getOwnerFrameDialog(this))
+            !grabbingWindow.isOneOfOwnersOf(this))
         {
             grabbingWindow.ungrab();
         }
@@ -851,7 +851,7 @@
 
                 // Ungrab only if this window is not an owned window of the grabbing one.
                 if (!isGrabbing() && grabbingWindow != null &&
-                    grabbingWindow != getOwnerFrameDialog(this))
+                    !grabbingWindow.isOneOfOwnersOf(this))
                 {
                     grabbingWindow.ungrab();
                 }
@@ -1321,6 +1321,17 @@
         return !(window instanceof Dialog || window instanceof Frame);
     }
 
+    private boolean isOneOfOwnersOf(LWWindowPeer peer) {
+        Window owner = (peer != null ? peer.getTarget().getOwner() : null);
+        while (owner != null) {
+            if ((LWWindowPeer)owner.getPeer() == this) {
+                return true;
+            }
+            owner = owner.getOwner();
+        }
+        return false;
+    }
+
     /*
      * Changes focused window on java level.
      */
@@ -1352,7 +1363,7 @@
         // - when the opposite (gaining focus) window is an owned/owner window.
         // - for a simple window in any case.
         if (!becomesFocused &&
-            (isGrabbing() || getOwnerFrameDialog(grabbingWindow) == this))
+            (isGrabbing() || this.isOneOfOwnersOf(grabbingWindow)))
         {
             focusLog.fine("ungrabbing on " + grabbingWindow);
             // ungrab a simple window if its owner looses activation.
@@ -1369,6 +1380,11 @@
         postEvent(windowEvent);
     }
 
+    /*
+     * Retrieves the owner of the peer.
+     * Note: this method returns the owner which can be activated, (i.e. the instance
+     * of Frame or Dialog may be returned).
+     */
     static LWWindowPeer getOwnerFrameDialog(LWWindowPeer peer) {
         Window owner = (peer != null ? peer.getTarget().getOwner() : null);
         while (owner != null && !(owner instanceof Frame || owner instanceof Dialog)) {
--- a/src/macosx/classes/sun/lwawt/macosx/CEmbeddedFrame.java	Thu Sep 11 11:03:44 2014 -0700
+++ b/src/macosx/classes/sun/lwawt/macosx/CEmbeddedFrame.java	Thu Oct 02 08:31:59 2014 -0700
@@ -98,7 +98,8 @@
     public void handleKeyEvent(int eventType, int modifierFlags, String characters,
                                String charsIgnoringMods, boolean isRepeat, short keyCode,
                                boolean needsKeyTyped) {
-        responder.handleKeyEvent(eventType, modifierFlags, charsIgnoringMods, keyCode, needsKeyTyped, isRepeat);
+        responder.handleKeyEvent(eventType, modifierFlags, characters, charsIgnoringMods,
+                keyCode, needsKeyTyped, isRepeat);
     }
 
     // REMIND: delete this method once 'deploy' changes for 7156194 is pushed
--- a/src/macosx/classes/sun/lwawt/macosx/CPlatformResponder.java	Thu Sep 11 11:03:44 2014 -0700
+++ b/src/macosx/classes/sun/lwawt/macosx/CPlatformResponder.java	Thu Oct 02 08:31:59 2014 -0700
@@ -126,7 +126,7 @@
     /**
      * Handles key events.
      */
-    void handleKeyEvent(int eventType, int modifierFlags, String chars,
+    void handleKeyEvent(int eventType, int modifierFlags, String chars, String charsIgnoringModifiers,
                         short keyCode, boolean needsKeyTyped, boolean needsKeyReleased) {
         boolean isFlagsChangedEvent =
             isNpapiCallback ? (eventType == CocoaConstants.NPCocoaEventFlagsChanged) :
@@ -154,7 +154,10 @@
                 testChar = chars.charAt(0);
             }
 
-            int[] in = new int[] {testChar, isDeadChar ? 1 : 0, modifierFlags, keyCode};
+            char testCharIgnoringModifiers = charsIgnoringModifiers != null && charsIgnoringModifiers.length() > 0 ?
+                    charsIgnoringModifiers.charAt(0) : KeyEvent.CHAR_UNDEFINED;
+
+            int[] in = new int[] {testCharIgnoringModifiers, isDeadChar ? 1 : 0, modifierFlags, keyCode};
             int[] out = new int[3]; // [jkeyCode, jkeyLocation, deadChar]
 
             postsTyped = NSEvent.nsToJavaKeyInfo(in, out);
--- a/src/macosx/classes/sun/lwawt/macosx/CPlatformView.java	Thu Sep 11 11:03:44 2014 -0700
+++ b/src/macosx/classes/sun/lwawt/macosx/CPlatformView.java	Thu Oct 02 08:31:59 2014 -0700
@@ -227,7 +227,7 @@
     }
 
     private void deliverKeyEvent(NSEvent event) {
-        responder.handleKeyEvent(event.getType(), event.getModifierFlags(),
+        responder.handleKeyEvent(event.getType(), event.getModifierFlags(), event.getCharacters(),
                                  event.getCharactersIgnoringModifiers(), event.getKeyCode(), true, false);
     }
 
--- a/src/macosx/classes/sun/lwawt/macosx/event/NSEvent.java	Thu Sep 11 11:03:44 2014 -0700
+++ b/src/macosx/classes/sun/lwawt/macosx/event/NSEvent.java	Thu Oct 02 08:31:59 2014 -0700
@@ -48,12 +48,14 @@
 
     // Key event information
     private short keyCode;
+    private String characters;
     private String charactersIgnoringModifiers;
 
-    public NSEvent(int type, int modifierFlags, short keyCode, String charactersIgnoringModifiers) {
+    public NSEvent(int type, int modifierFlags, short keyCode, String characters, String charactersIgnoringModifiers) {
         this.type = type;
         this.modifierFlags = modifierFlags;
         this.keyCode = keyCode;
+        this.characters = characters;
         this.charactersIgnoringModifiers = charactersIgnoringModifiers;
     }
 
@@ -120,12 +122,16 @@
         return charactersIgnoringModifiers;
     }
 
+    public String getCharacters() {
+        return characters;
+    }
+
     @Override
     public String toString() {
         return "NSEvent[" + getType() + " ," + getModifierFlags() + " ,"
                 + getClickCount() + " ," + getButtonNumber() + " ," + getX() + " ,"
                 + getY() + " ," + getAbsX() + " ," + getAbsY()+ " ," + getKeyCode() + " ,"
-                + getCharactersIgnoringModifiers() + "]";
+                + getCharacters() + " ," + getCharactersIgnoringModifiers() + "]";
     }
 
     /*
--- a/src/macosx/native/sun/awt/AWTView.m	Thu Sep 11 11:03:44 2014 -0700
+++ b/src/macosx/native/sun/awt/AWTView.m	Thu Oct 02 08:31:59 2014 -0700
@@ -421,17 +421,20 @@
     JNIEnv *env = [ThreadUtilities getJNIEnv];
 
     jstring characters = NULL;
+    jstring charactersIgnoringModifiers = NULL;
     if ([event type] != NSFlagsChanged) {
         characters = JNFNSToJavaString(env, [event characters]);
+        charactersIgnoringModifiers = JNFNSToJavaString(env, [event charactersIgnoringModifiers]);
     }
 
     static JNF_CLASS_CACHE(jc_NSEvent, "sun/lwawt/macosx/event/NSEvent");
-    static JNF_CTOR_CACHE(jctor_NSEvent, jc_NSEvent, "(IISLjava/lang/String;)V");
+    static JNF_CTOR_CACHE(jctor_NSEvent, jc_NSEvent, "(IISLjava/lang/String;Ljava/lang/String;)V");
     jobject jevent = JNFNewObject(env, jctor_NSEvent,
                                   [event type],
                                   [event modifierFlags],
                                   [event keyCode],
-                                  characters);
+                                  characters,
+                                  charactersIgnoringModifiers);
 
     static JNF_CLASS_CACHE(jc_PlatformView, "sun/lwawt/macosx/CPlatformView");
     static JNF_MEMBER_CACHE(jm_deliverKeyEvent, jc_PlatformView,
--- a/src/share/classes/com/sun/jndi/ldap/Connection.java	Thu Sep 11 11:03:44 2014 -0700
+++ b/src/share/classes/com/sun/jndi/ldap/Connection.java	Thu Oct 02 08:31:59 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -464,10 +464,10 @@
                             // will be woken up before readTimeout only if reply is
                             // available
                             ldr.wait(readTimeout);
-                            waited = true;
                         } else {
                             ldr.wait(15 * 1000); // 15 second timeout
                         }
+                        waited = true;
                     } else {
                         break;
                     }
@@ -479,7 +479,7 @@
         }
 
         if ((rber == null) && waited) {
-            removeRequest(ldr);
+            abandonRequest(ldr, null);
             throw new NamingException("LDAP response read timed out, timeout used:"
                             + readTimeout + "ms." );
 
--- a/src/share/classes/javax/accessibility/AccessibleContext.java	Thu Sep 11 11:03:44 2014 -0700
+++ b/src/share/classes/javax/accessibility/AccessibleContext.java	Thu Oct 02 08:31:59 2014 -0700
@@ -25,6 +25,9 @@
 
 package javax.accessibility;
 
+import sun.awt.AWTAccessor;
+import sun.awt.AppContext;
+
 import java.util.Locale;
 import java.beans.PropertyChangeListener;
 import java.beans.PropertyChangeSupport;
@@ -79,6 +82,26 @@
  */
 public abstract class AccessibleContext {
 
+    /**
+     * The AppContext that should be used to dispatch events for this
+     * AccessibleContext
+     */
+    private volatile AppContext targetAppContext;
+
+    static {
+        AWTAccessor.setAccessibleContextAccessor(new AWTAccessor.AccessibleContextAccessor() {
+            @Override
+            public void setAppContext(AccessibleContext accessibleContext, AppContext appContext) {
+                accessibleContext.targetAppContext = appContext;
+            }
+
+            @Override
+            public AppContext getAppContext(AccessibleContext accessibleContext) {
+                return accessibleContext.targetAppContext;
+            }
+        });
+    }
+
    /**
     * Constant used to determine when the accessibleName property has
     * changed.  The old value in the PropertyChangeEvent will be the old
--- a/src/share/classes/javax/swing/JComboBox.java	Thu Sep 11 11:03:44 2014 -0700
+++ b/src/share/classes/javax/swing/JComboBox.java	Thu Oct 02 08:31:59 2014 -0700
@@ -1418,6 +1418,28 @@
     }
 
     /**
+     * {@inheritDoc}
+     */
+    @Override
+    protected boolean processKeyBinding(KeyStroke ks, KeyEvent e, int condition, boolean pressed) {
+        if (super.processKeyBinding(ks, e, condition, pressed)) {
+            return true;
+        }
+
+        if (!isEditable() || condition != WHEN_FOCUSED || getEditor() == null
+                || !Boolean.TRUE.equals(getClientProperty("JComboBox.isTableCellEditor"))) {
+            return false;
+        }
+
+        Component editorComponent = getEditor().getEditorComponent();
+        if (editorComponent instanceof JComponent) {
+            JComponent component = (JComponent) editorComponent;
+            return component.processKeyBinding(ks, e, WHEN_FOCUSED, pressed);
+        }
+        return false;
+    }
+
+    /**
      * Sets the object that translates a keyboard character into a list
      * selection. Typically, the first selection with a matching first
      * character becomes the selected item.
--- a/src/share/classes/javax/swing/JComponent.java	Thu Sep 11 11:03:44 2014 -0700
+++ b/src/share/classes/javax/swing/JComponent.java	Thu Oct 02 08:31:59 2014 -0700
@@ -3989,6 +3989,17 @@
          * @since 1.4
          */
         public AccessibleKeyBinding getAccessibleKeyBinding() {
+            // Try to get the linked label's mnemonic if it exists
+            Object o = getClientProperty(JLabel.LABELED_BY_PROPERTY);
+            if (o instanceof Accessible){
+                AccessibleContext ac = ((Accessible) o).getAccessibleContext();
+                if (ac != null){
+                    AccessibleComponent comp = ac.getAccessibleComponent();
+                    if (! (comp instanceof AccessibleExtendedComponent))
+                        return null;
+                    return ((AccessibleExtendedComponent)comp).getAccessibleKeyBinding();
+                }
+            }
             return null;
         }
     } // inner class AccessibleJComponent
--- a/src/share/classes/javax/swing/JTable.java	Thu Sep 11 11:03:44 2014 -0700
+++ b/src/share/classes/javax/swing/JTable.java	Thu Oct 02 08:31:59 2014 -0700
@@ -4041,7 +4041,7 @@
                 }
                 // Restore the lead
                 int viewLeadIndex = modelSelection.getLeadSelectionIndex();
-                if (viewLeadIndex != -1) {
+                if (viewLeadIndex != -1 && !modelSelection.isSelectionEmpty()) {
                     viewLeadIndex = convertRowIndexToView(viewLeadIndex);
                 }
                 SwingUtilities2.setLeadAnchorWithoutSelection(
@@ -6587,8 +6587,8 @@
     TableColumnModelListener, CellEditorListener, PropertyChangeListener,
     AccessibleExtendedTable {
 
-        int lastSelectedRow;
-        int lastSelectedCol;
+        int previousFocusedRow;
+        int previousFocusedCol;
 
         /**
          * AccessibleJTable constructor
@@ -6603,8 +6603,10 @@
             tcm.addColumnModelListener(this);
             tcm.getSelectionModel().addListSelectionListener(this);
             JTable.this.getModel().addTableModelListener(this);
-            lastSelectedRow = JTable.this.getSelectedRow();
-            lastSelectedCol = JTable.this.getSelectedColumn();
+            previousFocusedRow = JTable.this.getSelectionModel().
+                                        getLeadSelectionIndex();
+            previousFocusedCol = JTable.this.getColumnModel().
+                                        getSelectionModel().getLeadSelectionIndex();
         }
 
     // Listeners to track model, etc. changes to as to re-place the other
@@ -6932,18 +6934,21 @@
             firePropertyChange(AccessibleContext.ACCESSIBLE_SELECTION_PROPERTY,
                                Boolean.valueOf(false), Boolean.valueOf(true));
 
-            int selectedRow = JTable.this.getSelectedRow();
-            int selectedCol = JTable.this.getSelectedColumn();
-            if (selectedRow != lastSelectedRow ||
-                selectedCol != lastSelectedCol) {
-                Accessible oldA = getAccessibleAt(lastSelectedRow,
-                                                  lastSelectedCol);
-                Accessible newA = getAccessibleAt(selectedRow, selectedCol);
+            // Using lead selection index to cover both cases: node selected and node
+            // is focused but not selected (Ctrl+up/down)
+            int focusedRow = JTable.this.getSelectionModel().getLeadSelectionIndex();
+            int focusedCol = JTable.this.getColumnModel().getSelectionModel().
+                                                    getLeadSelectionIndex();
+
+            if (focusedRow != previousFocusedRow ||
+                focusedCol != previousFocusedCol){
+                Accessible oldA = getAccessibleAt(previousFocusedRow, previousFocusedCol);
+                Accessible newA = getAccessibleAt(focusedRow, focusedCol);
                 firePropertyChange(AccessibleContext.ACCESSIBLE_ACTIVE_DESCENDANT_PROPERTY,
-                                   oldA, newA);
-                 lastSelectedRow = selectedRow;
-                 lastSelectedCol = selectedCol;
-             }
+                                    oldA, newA);
+                previousFocusedRow = focusedRow;
+                previousFocusedCol = focusedCol;
+            }
         }
 
 
--- a/src/share/classes/javax/swing/JTree.java	Thu Sep 11 11:03:44 2014 -0700
+++ b/src/share/classes/javax/swing/JTree.java	Thu Oct 02 08:31:59 2014 -0700
@@ -1662,6 +1662,11 @@
 
         leadPath = newPath;
         firePropertyChange(LEAD_SELECTION_PATH_PROPERTY, oldValue, newPath);
+
+        if (accessibleContext != null){
+            ((AccessibleJTree)accessibleContext).
+                fireActiveDescendantPropertyChange(oldValue, newPath);
+        }
     }
 
     /**
@@ -4123,23 +4128,6 @@
          *
          */
         public void valueChanged(TreeSelectionEvent e) {
-            // Fixes 4546503 - JTree is sending incorrect active
-            // descendant events
-            TreePath oldLeadSelectionPath = e.getOldLeadSelectionPath();
-            leadSelectionPath = e.getNewLeadSelectionPath();
-
-            if (oldLeadSelectionPath != leadSelectionPath) {
-                // Set parent to null so AccessibleJTreeNode computes
-                // its parent.
-                Accessible oldLSA = leadSelectionAccessible;
-                leadSelectionAccessible = (leadSelectionPath != null)
-                        ? new AccessibleJTreeNode(JTree.this,
-                                                  leadSelectionPath,
-                                                  null) // parent
-                        : null;
-                firePropertyChange(AccessibleContext.ACCESSIBLE_ACTIVE_DESCENDANT_PROPERTY,
-                                   oldLSA, leadSelectionAccessible);
-            }
             firePropertyChange(AccessibleContext.ACCESSIBLE_SELECTION_PROPERTY,
                                Boolean.valueOf(false), Boolean.valueOf(true));
         }
@@ -4243,6 +4231,35 @@
             }
         }
 
+        /**
+        *  Fire an active descendant property change notification.
+        *  The active descendant is used for objects such as list,
+        *  tree, and table, which may have transient children.
+        *  It notifies screen readers the active child of the component
+        *  has been changed so user can be notified from there.
+        *
+        * @param oldPath - lead path of previous active child
+        * @param newPath - lead path of current active child
+        *
+        */
+        void fireActiveDescendantPropertyChange(TreePath oldPath, TreePath newPath){
+            if(oldPath != newPath){
+                Accessible oldLSA = (oldPath != null)
+                                    ? new AccessibleJTreeNode(JTree.this,
+                                                              oldPath,
+                                                              null)
+                                    : null;
+
+                Accessible newLSA = (newPath != null)
+                                    ? new AccessibleJTreeNode(JTree.this,
+                                                              newPath,
+                                                              null)
+                                    : null;
+                firePropertyChange(AccessibleContext.ACCESSIBLE_ACTIVE_DESCENDANT_PROPERTY,
+                                                                oldLSA, newLSA);
+            }
+        }
+
 
         private AccessibleContext getCurrentAccessibleContext() {
             Component c = getCurrentComponent();
--- a/src/share/classes/javax/swing/text/html/parser/Parser.java	Thu Sep 11 11:03:44 2014 -0700
+++ b/src/share/classes/javax/swing/text/html/parser/Parser.java	Thu Oct 02 08:31:59 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -2081,6 +2081,13 @@
                         // null end tag.
                         endTag(false);
                         continue;
+                    } else if (textpos == 0) {
+                        if (!legalElementContext(dtd.pcdata)) {
+                            error("unexpected.pcdata");
+                        }
+                        if (last.breaksFlow()) {
+                            space = false;
+                        }
                     }
                     break;
 
--- a/src/share/classes/sun/awt/AWTAccessor.java	Thu Sep 11 11:03:44 2014 -0700
+++ b/src/share/classes/sun/awt/AWTAccessor.java	Thu Oct 02 08:31:59 2014 -0700
@@ -25,6 +25,7 @@
 
 package sun.awt;
 
+import javax.accessibility.AccessibleContext;
 import java.awt.*;
 import java.awt.KeyboardFocusManager;
 import java.awt.DefaultKeyboardFocusManager;
@@ -728,6 +729,14 @@
 
 
     /*
+     * An accessor object for the AccessibleContext class
+     */
+    public interface AccessibleContextAccessor {
+        void setAppContext(AccessibleContext accessibleContext, AppContext appContext);
+        AppContext getAppContext(AccessibleContext accessibleContext);
+    }
+
+    /*
      * Accessor instances are initialized in the static initializers of
      * corresponding AWT classes by using setters defined below.
      */
@@ -756,6 +765,7 @@
     private static SequencedEventAccessor sequencedEventAccessor;
     private static InvocationEventAccessor invocationEventAccessor;
     private static ToolkitAccessor toolkitAccessor;
+    private static AccessibleContextAccessor accessibleContextAccessor;
 
     /*
      * Set an accessor object for the java.awt.Component class.
@@ -1182,4 +1192,22 @@
     public static InvocationEventAccessor getInvocationEventAccessor() {
         return invocationEventAccessor;
     }
+
+
+    /*
+     * Get the accessor object for the javax.accessibility.AccessibleContext class.
+     */
+    public static AccessibleContextAccessor getAccessibleContextAccessor() {
+        if (accessibleContextAccessor == null) {
+            unsafe.ensureClassInitialized(AccessibleContext.class);
+        }
+        return accessibleContextAccessor;
+    }
+
+    /*
+     * Set the accessor object for the javax.accessibility.AccessibleContext class.
+     */
+    public static void setAccessibleContextAccessor(AccessibleContextAccessor accessor) {
+        AWTAccessor.accessibleContextAccessor = accessor;
+    }
 }
--- a/src/share/classes/sun/awt/AppContext.java	Thu Sep 11 11:03:44 2014 -0700
+++ b/src/share/classes/sun/awt/AppContext.java	Thu Oct 02 08:31:59 2014 -0700
@@ -167,6 +167,9 @@
     */
     private static volatile AppContext mainAppContext = null;
 
+    private static class GetAppContextLock {};
+    private final static Object getAppContextLock = new GetAppContextLock();
+
     /*
      * The hash map associated with this AppContext.  A private delegate
      * is used instead of subclassing HashMap so as to avoid all of
@@ -308,14 +311,16 @@
                     // if no contexts have been created yet. This covers standalone apps
                     // and excludes applets because by the time applet starts
                     // a number of contexts have already been created by the plugin.
-                    if (numAppContexts.get() == 0) {
-                        if (System.getProperty("javaplugin.version") == null &&
-                                System.getProperty("javawebstart.version") == null) {
-                            initMainAppContext();
-                        } else if (System.getProperty("javafx.version") != null &&
-                                threadGroup.getParent() != null) {
-                            // Swing inside JavaFX case
-                            SunToolkit.createNewAppContext();
+                    synchronized (getAppContextLock) {
+                        if (numAppContexts.get() == 0) {
+                            if (System.getProperty("javaplugin.version") == null &&
+                                    System.getProperty("javawebstart.version") == null) {
+                                initMainAppContext();
+                            } else if (System.getProperty("javafx.version") != null &&
+                                    threadGroup.getParent() != null) {
+                                // Swing inside JavaFX case
+                                SunToolkit.createNewAppContext();
+                            }
                         }
                     }
 
--- a/src/share/classes/sun/awt/dnd/SunDropTargetContextPeer.java	Thu Sep 11 11:03:44 2014 -0700
+++ b/src/share/classes/sun/awt/dnd/SunDropTargetContextPeer.java	Thu Oct 02 08:31:59 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -239,6 +239,13 @@
 
         if (localTransferable != null) {
             return localTransferable.getTransferData(df);
+        } else if (df.isMimeTypeEqual(DataFlavor.javaJVMLocalObjectMimeType)) {
+            // Workaround to JDK-8024061: Exception thrown when drag and drop
+            //      between two components is executed quickly.
+            // It is expected localTransferable is not null if javaJVMLocalObjectMimeType
+            // is used. Executing further results in ClassCastException, so null is
+            // returned here as no transfer data is available in this case.
+            return null;
         }
 
         if (dropStatus != STATUS_ACCEPT || dropComplete) {
--- a/src/share/classes/sun/java2d/SunGraphics2D.java	Thu Sep 11 11:03:44 2014 -0700
+++ b/src/share/classes/sun/java2d/SunGraphics2D.java	Thu Oct 02 08:31:59 2014 -0700
@@ -2388,6 +2388,8 @@
                 surfaceData = NullSurfaceData.theInstance;
             }
 
+            invalidatePipe();
+
             // this will recalculate the composite clip
             setDevClip(surfaceData.getBounds());
 
--- a/src/share/classes/sun/security/provider/SecureRandom.java	Thu Sep 11 11:03:44 2014 -0700
+++ b/src/share/classes/sun/security/provider/SecureRandom.java	Thu Oct 02 08:31:59 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -29,6 +29,7 @@
 import java.security.MessageDigest;
 import java.security.SecureRandomSpi;
 import java.security.NoSuchAlgorithmException;
+import java.security.NoSuchProviderException;
 
 /**
  * <p>This class provides a crytpographically strong pseudo-random number
@@ -94,9 +95,19 @@
      */
     private void init(byte[] seed) {
         try {
-            digest = MessageDigest.getInstance ("SHA");
-        } catch (NoSuchAlgorithmException e) {
-            throw new InternalError("internal error: SHA-1 not available.");
+            /*
+             * Use the local SUN implementation to avoid native
+             * performance overhead.
+             */
+            digest = MessageDigest.getInstance("SHA", "SUN");
+        } catch (NoSuchProviderException | NoSuchAlgorithmException e) {
+            // Fallback to any available.
+            try {
+                digest = MessageDigest.getInstance("SHA");
+            } catch (NoSuchAlgorithmException exc) {
+                throw new InternalError(
+                    "internal error: SHA-1 not available.");
+            }
         }
 
         if (seed != null) {
@@ -258,9 +269,19 @@
         s.defaultReadObject ();
 
         try {
-            digest = MessageDigest.getInstance ("SHA");
-        } catch (NoSuchAlgorithmException e) {
-            throw new InternalError("internal error: SHA-1 not available.");
+            /*
+             * Use the local SUN implementation to avoid native
+             * performance overhead.
+             */
+            digest = MessageDigest.getInstance("SHA", "SUN");
+        } catch (NoSuchProviderException | NoSuchAlgorithmException e) {
+            // Fallback to any available.
+            try {
+                digest = MessageDigest.getInstance("SHA");
+            } catch (NoSuchAlgorithmException exc) {
+                throw new InternalError(
+                    "internal error: SHA-1 not available.");
+            }
         }
     }
 }
--- a/src/share/classes/sun/security/smartcardio/CardImpl.java	Thu Sep 11 11:03:44 2014 -0700
+++ b/src/share/classes/sun/security/smartcardio/CardImpl.java	Thu Oct 02 08:31:59 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,9 +26,9 @@
 package sun.security.smartcardio;
 
 import java.nio.ByteBuffer;
-
+import java.security.AccessController;
+import java.security.PrivilegedAction;
 import javax.smartcardio.*;
-
 import static sun.security.smartcardio.PCSC.*;
 
 /**
@@ -62,6 +62,19 @@
     // thread holding exclusive access to the card, or null
     private volatile Thread exclusiveThread;
 
+    // used for platform specific logic
+    private static final boolean isWindows;
+
+    static {
+        final String osName = AccessController.doPrivileged(
+            new PrivilegedAction<String>() {
+                @Override public String run() {
+                    return System.getProperty("os.name");
+                }
+            });
+        isWindows = osName.startsWith("Windows");
+    }
+
     CardImpl(TerminalImpl terminal, String protocol) throws PCSCException {
         this.terminal = terminal;
         int sharingMode = SCARD_SHARE_SHARED;
@@ -74,7 +87,12 @@
             connectProtocol = SCARD_PROTOCOL_T1;
         } else if (protocol.equalsIgnoreCase("direct")) {
             // testing
-            connectProtocol = 0;
+
+            // MSDN states that the preferred protocol can be zero, but doesn't
+            //     specify whether other values are allowed.
+            // pcsc-lite implementation expects the preferred protocol to be non zero.
+            connectProtocol = isWindows ? 0 : SCARD_PROTOCOL_RAW;
+
             sharingMode = SCARD_SHARE_DIRECT;
         } else {
             throw new IllegalArgumentException("Unsupported protocol " + protocol);
@@ -237,7 +255,16 @@
         }
     }
 
+    private static final boolean invertReset =
+        Boolean.parseBoolean(
+            java.security.AccessController.doPrivileged(
+                new sun.security.action.GetPropertyAction(
+                    "sun.security.smartcardio.invertCardReset", "true")));
+
     public void disconnect(boolean reset) throws CardException {
+        if (invertReset) {
+            reset = !reset;
+        }
         if (reset) {
             checkSecurity("reset");
         }
@@ -246,7 +273,7 @@
         }
         checkExclusive();
         try {
-            SCardDisconnect(cardId, (reset ? SCARD_LEAVE_CARD : SCARD_RESET_CARD));
+            SCardDisconnect(cardId, (reset ? SCARD_RESET_CARD : SCARD_LEAVE_CARD));
         } catch (PCSCException e) {
             throw new CardException("disconnect() failed", e);
         } finally {
--- a/src/share/classes/sun/security/ssl/CipherSuite.java	Thu Sep 11 11:03:44 2014 -0700
+++ b/src/share/classes/sun/security/ssl/CipherSuite.java	Thu Oct 02 08:31:59 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -82,6 +82,10 @@
     private final static boolean ALLOW_ECC = Debug.getBooleanProperty
         ("com.sun.net.ssl.enableECC", true);
 
+    // preserve the old order of RC4 preference
+    private final static boolean PRESERVE_RC4 = Debug.getBooleanProperty
+        ("jdk.tls.preserveRC4CipherSuites", false);
+
     // Map Integer(id) -> CipherSuite
     // contains all known CipherSuites
     private final static Map<Integer,CipherSuite> idMap;
@@ -963,16 +967,18 @@
         add("TLS_DHE_DSS_WITH_AES_128_CBC_SHA",
             0x0032, --p, K_DHE_DSS,     B_AES_128, T);
 
-        add("TLS_ECDHE_ECDSA_WITH_RC4_128_SHA",
-            0xC007, --p, K_ECDHE_ECDSA, B_RC4_128, N);
-        add("TLS_ECDHE_RSA_WITH_RC4_128_SHA",
-            0xC011, --p, K_ECDHE_RSA,   B_RC4_128, N);
-        add("SSL_RSA_WITH_RC4_128_SHA",
-            0x0005, --p, K_RSA,         B_RC4_128, N);
-        add("TLS_ECDH_ECDSA_WITH_RC4_128_SHA",
-            0xC002, --p, K_ECDH_ECDSA,  B_RC4_128, N);
-        add("TLS_ECDH_RSA_WITH_RC4_128_SHA",
-            0xC00C, --p, K_ECDH_RSA,    B_RC4_128, N);
+        if (PRESERVE_RC4) {
+            add("TLS_ECDHE_ECDSA_WITH_RC4_128_SHA",
+                0xC007, --p, K_ECDHE_ECDSA, B_RC4_128, N);
+            add("TLS_ECDHE_RSA_WITH_RC4_128_SHA",
+                0xC011, --p, K_ECDHE_RSA,   B_RC4_128, N);
+            add("SSL_RSA_WITH_RC4_128_SHA",
+                0x0005, --p, K_RSA,         B_RC4_128, N);
+            add("TLS_ECDH_ECDSA_WITH_RC4_128_SHA",
+                0xC002, --p, K_ECDH_ECDSA,  B_RC4_128, N);
+            add("TLS_ECDH_RSA_WITH_RC4_128_SHA",
+                0xC00C, --p, K_ECDH_RSA,    B_RC4_128, N);
+        }
 
         add("TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA",
             0xC008, --p, K_ECDHE_ECDSA, B_3DES,    T);
@@ -989,6 +995,18 @@
         add("SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA",
             0x0013, --p, K_DHE_DSS,     B_3DES,    N);
 
+        if (!PRESERVE_RC4) {
+            add("TLS_ECDHE_ECDSA_WITH_RC4_128_SHA",
+                0xC007, --p, K_ECDHE_ECDSA, B_RC4_128, N);
+            add("TLS_ECDHE_RSA_WITH_RC4_128_SHA",
+                0xC011, --p, K_ECDHE_RSA,   B_RC4_128, N);
+            add("SSL_RSA_WITH_RC4_128_SHA",
+                0x0005, --p, K_RSA,         B_RC4_128, N);
+            add("TLS_ECDH_ECDSA_WITH_RC4_128_SHA",
+                0xC002, --p, K_ECDH_ECDSA,  B_RC4_128, N);
+            add("TLS_ECDH_RSA_WITH_RC4_128_SHA",
+                0xC00C, --p, K_ECDH_RSA,    B_RC4_128, N);
+        }
         add("SSL_RSA_WITH_RC4_128_MD5",
             0x0004, --p, K_RSA,         B_RC4_128, N);
 
@@ -1008,7 +1026,7 @@
          * 2. If a cipher suite has been obsoleted, we put it at the end of
          *    the list.
          * 3. Prefer the stronger bulk cipher, in the order of AES_256,
-         *    AES_128, RC-4, 3DES-EDE, DES, RC4_40, DES40, NULL.
+         *    AES_128, 3DES-EDE, RC-4, DES, DES40, RC4_40, NULL.
          * 4. Prefer the stronger MAC algorithm, in the order of SHA384,
          *    SHA256, SHA, MD5.
          * 5. Prefer the better performance of key exchange and digital
@@ -1031,15 +1049,51 @@
         add("TLS_DH_anon_WITH_AES_128_CBC_SHA",
             0x0034, --p, K_DH_ANON,     B_AES_128, N);
 
+        if (!PRESERVE_RC4) {
+            add("TLS_ECDH_anon_WITH_3DES_EDE_CBC_SHA",
+                0xC017, --p, K_ECDH_ANON,   B_3DES,    T);
+            add("SSL_DH_anon_WITH_3DES_EDE_CBC_SHA",
+                0x001b, --p, K_DH_ANON,     B_3DES,    N);
+        }
+
         add("TLS_ECDH_anon_WITH_RC4_128_SHA",
             0xC016, --p, K_ECDH_ANON,   B_RC4_128, N);
         add("SSL_DH_anon_WITH_RC4_128_MD5",
             0x0018, --p, K_DH_ANON,     B_RC4_128, N);
 
-        add("TLS_ECDH_anon_WITH_3DES_EDE_CBC_SHA",
-            0xC017, --p, K_ECDH_ANON,   B_3DES,    T);
-        add("SSL_DH_anon_WITH_3DES_EDE_CBC_SHA",
-            0x001b, --p, K_DH_ANON,     B_3DES,    N);
+        if (!PRESERVE_RC4) {
+            // weak cipher suites obsoleted in TLS 1.2
+            add("SSL_RSA_WITH_DES_CBC_SHA",
+                0x0009, --p, K_RSA,         B_DES,     N, tls12);
+            add("SSL_DHE_RSA_WITH_DES_CBC_SHA",
+                0x0015, --p, K_DHE_RSA,     B_DES,     N, tls12);
+            add("SSL_DHE_DSS_WITH_DES_CBC_SHA",
+                0x0012, --p, K_DHE_DSS,     B_DES,     N, tls12);
+            add("SSL_DH_anon_WITH_DES_CBC_SHA",
+                0x001a, --p, K_DH_ANON,     B_DES,     N, tls12);
+
+            // weak cipher suites obsoleted in TLS 1.1
+            add("SSL_RSA_EXPORT_WITH_RC4_40_MD5",
+                0x0003, --p, K_RSA_EXPORT,  B_RC4_40,  N, tls11);
+            add("SSL_DH_anon_EXPORT_WITH_RC4_40_MD5",
+                0x0017, --p, K_DH_ANON,     B_RC4_40,  N, tls11);
+
+            add("SSL_RSA_EXPORT_WITH_DES40_CBC_SHA",
+                0x0008, --p, K_RSA_EXPORT,  B_DES_40,  N, tls11);
+            add("SSL_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA",
+                0x0014, --p, K_DHE_RSA,     B_DES_40,  N, tls11);
+            add("SSL_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA",
+                0x0011, --p, K_DHE_DSS,     B_DES_40,  N, tls11);
+            add("SSL_DH_anon_EXPORT_WITH_DES40_CBC_SHA",
+                0x0019, --p, K_DH_ANON,     B_DES_40,  N, tls11);
+        }
+
+        if (PRESERVE_RC4) {
+            add("TLS_ECDH_anon_WITH_3DES_EDE_CBC_SHA",
+                0xC017, --p, K_ECDH_ANON,   B_3DES,    T);
+            add("SSL_DH_anon_WITH_3DES_EDE_CBC_SHA",
+                0x001b, --p, K_DH_ANON,     B_3DES,    N);
+        }
 
         add("TLS_RSA_WITH_NULL_SHA256",
             0x003b, --p, K_RSA,         B_NULL,    N, max, tls12, P_SHA256);
@@ -1058,52 +1112,70 @@
         add("SSL_RSA_WITH_NULL_MD5",
             0x0001, --p, K_RSA,         B_NULL,    N);
 
-        // weak cipher suites obsoleted in TLS 1.2
-        add("SSL_RSA_WITH_DES_CBC_SHA",
-            0x0009, --p, K_RSA,         B_DES,     N, tls12);
-        add("SSL_DHE_RSA_WITH_DES_CBC_SHA",
-            0x0015, --p, K_DHE_RSA,     B_DES,     N, tls12);
-        add("SSL_DHE_DSS_WITH_DES_CBC_SHA",
-            0x0012, --p, K_DHE_DSS,     B_DES,     N, tls12);
-        add("SSL_DH_anon_WITH_DES_CBC_SHA",
-            0x001a, --p, K_DH_ANON,     B_DES,     N, tls12);
+        if (PRESERVE_RC4) {
+            // weak cipher suites obsoleted in TLS 1.2
+            add("SSL_RSA_WITH_DES_CBC_SHA",
+                0x0009, --p, K_RSA,         B_DES,     N, tls12);
+            add("SSL_DHE_RSA_WITH_DES_CBC_SHA",
+                0x0015, --p, K_DHE_RSA,     B_DES,     N, tls12);
+            add("SSL_DHE_DSS_WITH_DES_CBC_SHA",
+                0x0012, --p, K_DHE_DSS,     B_DES,     N, tls12);
+            add("SSL_DH_anon_WITH_DES_CBC_SHA",
+                0x001a, --p, K_DH_ANON,     B_DES,     N, tls12);
 
-        // weak cipher suites obsoleted in TLS 1.1
-        add("SSL_RSA_EXPORT_WITH_RC4_40_MD5",
-            0x0003, --p, K_RSA_EXPORT,  B_RC4_40,  N, tls11);
-        add("SSL_DH_anon_EXPORT_WITH_RC4_40_MD5",
-            0x0017, --p, K_DH_ANON,     B_RC4_40,  N, tls11);
+            // weak cipher suites obsoleted in TLS 1.1
+            add("SSL_RSA_EXPORT_WITH_RC4_40_MD5",
+                0x0003, --p, K_RSA_EXPORT,  B_RC4_40,  N, tls11);
+            add("SSL_DH_anon_EXPORT_WITH_RC4_40_MD5",
+                0x0017, --p, K_DH_ANON,     B_RC4_40,  N, tls11);
 
-        add("SSL_RSA_EXPORT_WITH_DES40_CBC_SHA",
-            0x0008, --p, K_RSA_EXPORT,  B_DES_40,  N, tls11);
-        add("SSL_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA",
-            0x0014, --p, K_DHE_RSA,     B_DES_40,  N, tls11);
-        add("SSL_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA",
-            0x0011, --p, K_DHE_DSS,     B_DES_40,  N, tls11);
-        add("SSL_DH_anon_EXPORT_WITH_DES40_CBC_SHA",
-            0x0019, --p, K_DH_ANON,     B_DES_40,  N, tls11);
+            add("SSL_RSA_EXPORT_WITH_DES40_CBC_SHA",
+                0x0008, --p, K_RSA_EXPORT,  B_DES_40,  N, tls11);
+            add("SSL_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA",
+                0x0014, --p, K_DHE_RSA,     B_DES_40,  N, tls11);
+            add("SSL_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA",
+                0x0011, --p, K_DHE_DSS,     B_DES_40,  N, tls11);
+            add("SSL_DH_anon_EXPORT_WITH_DES40_CBC_SHA",
+                0x0019, --p, K_DH_ANON,     B_DES_40,  N, tls11);
+        }
 
         // Supported Kerberos ciphersuites from RFC2712
+        if (!PRESERVE_RC4) {
+            add("TLS_KRB5_WITH_3DES_EDE_CBC_SHA",
+                0x001f, --p, K_KRB5,        B_3DES,    N);
+            add("TLS_KRB5_WITH_3DES_EDE_CBC_MD5",
+                0x0023, --p, K_KRB5,        B_3DES,    N);
+        }
         add("TLS_KRB5_WITH_RC4_128_SHA",
             0x0020, --p, K_KRB5,        B_RC4_128, N);
         add("TLS_KRB5_WITH_RC4_128_MD5",
             0x0024, --p, K_KRB5,        B_RC4_128, N);
-        add("TLS_KRB5_WITH_3DES_EDE_CBC_SHA",
-            0x001f, --p, K_KRB5,        B_3DES,    N);
-        add("TLS_KRB5_WITH_3DES_EDE_CBC_MD5",
-            0x0023, --p, K_KRB5,        B_3DES,    N);
+        if (PRESERVE_RC4) {
+            add("TLS_KRB5_WITH_3DES_EDE_CBC_SHA",
+                0x001f, --p, K_KRB5,        B_3DES,    N);
+            add("TLS_KRB5_WITH_3DES_EDE_CBC_MD5",
+                0x0023, --p, K_KRB5,        B_3DES,    N);
+        }
         add("TLS_KRB5_WITH_DES_CBC_SHA",
             0x001e, --p, K_KRB5,        B_DES,     N, tls12);
         add("TLS_KRB5_WITH_DES_CBC_MD5",
             0x0022, --p, K_KRB5,        B_DES,     N, tls12);
+        if (!PRESERVE_RC4) {
+            add("TLS_KRB5_EXPORT_WITH_DES_CBC_40_SHA",
+                0x0026, --p, K_KRB5_EXPORT, B_DES_40,  N, tls11);
+            add("TLS_KRB5_EXPORT_WITH_DES_CBC_40_MD5",
+                0x0029, --p, K_KRB5_EXPORT, B_DES_40,  N, tls11);
+        }
         add("TLS_KRB5_EXPORT_WITH_RC4_40_SHA",
             0x0028, --p, K_KRB5_EXPORT, B_RC4_40,  N, tls11);
         add("TLS_KRB5_EXPORT_WITH_RC4_40_MD5",
             0x002b, --p, K_KRB5_EXPORT, B_RC4_40,  N, tls11);
-        add("TLS_KRB5_EXPORT_WITH_DES_CBC_40_SHA",
-            0x0026, --p, K_KRB5_EXPORT, B_DES_40,  N, tls11);
-        add("TLS_KRB5_EXPORT_WITH_DES_CBC_40_MD5",
-            0x0029, --p, K_KRB5_EXPORT, B_DES_40,  N, tls11);
+        if (PRESERVE_RC4) {
+            add("TLS_KRB5_EXPORT_WITH_DES_CBC_40_SHA",
+                0x0026, --p, K_KRB5_EXPORT, B_DES_40,  N, tls11);
+            add("TLS_KRB5_EXPORT_WITH_DES_CBC_40_MD5",
+                0x0029, --p, K_KRB5_EXPORT, B_DES_40,  N, tls11);
+        }
 
         /*
          * Other values from the TLS Cipher Suite Registry, as of August 2010.
--- a/src/share/classes/sun/security/tools/JarSigner.java	Thu Sep 11 11:03:44 2014 -0700
+++ b/src/share/classes/sun/security/tools/JarSigner.java	Thu Oct 02 08:31:59 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -1547,8 +1547,7 @@
             first = false;
         }
         try {
-            CertPath cp = certificateFactory.generateCertPath(certs);
-            validator.validate(cp, pkixParameters);
+            validateCertChain(certs);
         } catch (Exception e) {
             if (debug) {
                 e.printStackTrace();
@@ -1859,8 +1858,7 @@
             printCert("", certChain[0], true, null, true);
 
             try {
-                CertPath cp = certificateFactory.generateCertPath(Arrays.asList(certChain));
-                validator.validate(cp, pkixParameters);
+                validateCertChain(Arrays.asList(certChain));
             } catch (Exception e) {
                 if (debug) {
                     e.printStackTrace();
@@ -1925,6 +1923,22 @@
         System.exit(1);
     }
 
+    void validateCertChain(List<? extends Certificate> certs) throws Exception {
+        int cpLen = 0;
+        out: for (; cpLen<certs.size(); cpLen++) {
+            for (TrustAnchor ta: pkixParameters.getTrustAnchors()) {
+                if (ta.getTrustedCert().equals(certs.get(cpLen))) {
+                    break out;
+                }
+            }
+        }
+        if (cpLen > 0) {
+            CertPath cp = certificateFactory.generateCertPath(
+                    (cpLen == certs.size())? certs: certs.subList(0, cpLen));
+            validator.validate(cp, pkixParameters);
+        }
+    }
+
     char[] getPass(String prompt)
     {
         System.err.print(prompt);
--- a/src/share/classes/sun/util/resources/TimeZoneNames_de.java	Thu Sep 11 11:03:44 2014 -0700
+++ b/src/share/classes/sun/util/resources/TimeZoneNames_de.java	Thu Oct 02 08:31:59 2014 -0700
@@ -89,7 +89,7 @@
                                      "Chinesische Sommerzeit", "CDT"};
         String CUBA[] = new String[] {"Kubanische Normalzeit", "CST",
                                       "Kubanische Sommerzeit", "CDT"};
-        String DARWIN[] = new String[] {"Central Normalzeit (Northern Territory)", "CST",
+        String DARWIN[] = new String[] {"Zentrale Normalzeit (Northern Territory)", "CST",
                                         "Zentrale Sommerzeit (Northern Territory)", "CST"};
         String DUBLIN[] = new String[] {"Greenwich Zeit", "GMT",
                                         "Irische Sommerzeit", "IST"};
@@ -103,7 +103,7 @@
                                      "Ostgr\u00f6nl\u00e4ndische Sommerzeit", "EGST"};
         String EST[] = new String[] {"\u00d6stliche Normalzeit", "EST",
                                      "\u00d6stliche Sommerzeit", "EDT"};
-        String EST_NSW[] = new String[] {"Eastern Normalzeit (Neus\u00FCdwales)", "EST",
+        String EST_NSW[] = new String[] {"\u00D6stliche Normalzeit (New South Wales)", "EST",
                                          "\u00D6stliche Sommerzeit (New South Wales)", "EST"};
         String FET[] = new String[] {"Kaliningrader Zeit", "FET",
                                      "Kaliningrader Sommerzeit", "FEST"};
--- a/src/share/classes/sun/util/resources/TimeZoneNames_es.java	Thu Sep 11 11:03:44 2014 -0700
+++ b/src/share/classes/sun/util/resources/TimeZoneNames_es.java	Thu Oct 02 08:31:59 2014 -0700
@@ -77,8 +77,8 @@
                                        "Hora de verano de Chatham", "CHADT"};
         String ChST[] = new String[] {"Hora est\u00e1ndar de Chamorro", "ChST",
                                       "Hora de verano de Chamorro", "ChDT"};
-        String CHUT[] = new String[] {"Chuuk Time", "CHUT",
-                                      "Chuuk Summer Time", "CHUST"};
+        String CHUT[] = new String[] {"Hora de Chuuk", "CHUT",
+                                      "Hora de verano de Chuuk", "CHUST"};
         String CIT[] = new String[] {"Hora de Indonesia Central", "WITA",
                                      "Hora de verano de Indonesia Central", "CIST"};
         String CLT[] = new String[] {"Hora de Chile", "CLT",
@@ -159,8 +159,8 @@
                                           "Hora de verano de Pitcairn", "PDT"};
         String PKT[] = new String[] {"Hora de Pakist\u00e1n", "PKT",
                                      "Hora de verano de Pakist\u00e1n", "PKST"};
-        String PONT[] = new String[] {"Pohnpei Time", "PONT",
-                                      "Pohnpei Summer Time", "PONST"};
+        String PONT[] = new String[] {"Hora de Pohnpei", "PONT",
+                                      "Hora de verano de Pohnpei", "PONST"};
         String PST[] = new String[] {"Hora est\u00e1ndar del Pac\u00edfico", "PST",
                                      "Hora de verano del Pac\u00edfico", "PDT"};
         String SAMOA[] = new String[] {"Hora est\u00e1ndar de Samoa", "SST",
@@ -401,8 +401,8 @@
             {"America/Mendoza", AGT},
             {"America/Menominee", CST},
             {"America/Merida", CST},
-            {"America/Metlakatla", new String[] {"Metlakatla Standard Time", "MeST",
-                                                 "Metlakatla Daylight Time", "MeDT"}},
+            {"America/Metlakatla", new String[] {"Hora de Metlakatla", "MeST",
+                                                 "Hora de verano de Metlakatla", "MeDT"}},
             {"America/Mexico_City", CST},
             {"America/Miquelon", new String[] {"Hora est\u00e1ndar de Pierre & Miquelon", "PMST",
                                                "Hora de verano de Pierre & Miquelon", "PMDT"}},
@@ -466,8 +466,8 @@
                                                "Hora de verano de Davis", "DAVST"}},
             {"Antarctica/DumontDUrville", new String[] {"Hora de Dumont-d'Urville", "DDUT",
                                                         "Hora de verano de Dumont-d'Urville", "DDUST"}},
-            {"Antarctica/Macquarie", new String[] {"Macquarie Island Time", "MIST",
-                                                   "Macquarie Island Summer Time", "MIST"}},
+            {"Antarctica/Macquarie", new String[] {"Hora de Isla Macquarie", "MIST",
+                                                   "Hora de verano de Isla Macquarie", "MIST"}},
             {"Antarctica/Mawson", new String[] {"Hora de Mawson", "MAWT",
                                                 "Hora de verano de Mawson", "MAWST"}},
             {"Antarctica/McMurdo", NZST},
--- a/src/share/classes/sun/util/resources/TimeZoneNames_sv.java	Thu Sep 11 11:03:44 2014 -0700
+++ b/src/share/classes/sun/util/resources/TimeZoneNames_sv.java	Thu Oct 02 08:31:59 2014 -0700
@@ -63,7 +63,7 @@
                                      "Bangladesh, sommartid", "BDST"};
         String BRISBANE[] = new String[] {"\u00D6stlig standardtid (Queensland)", "EST",
                                           "\u00D6stlig sommartid (Queensland)", "EST"};
-        String BROKEN_HILL[] = new String[] {"Central standardtid (Sydaustralien)/New South Wales)", "CST",
+        String BROKEN_HILL[] = new String[] {"Central standardtid (Sydaustralien/New South Wales)", "CST",
                                              "Central sommartid (South Australia/New South Wales)", "CST"};
         String BRT[] = new String[] {"Brasilien, normaltid", "BRT",
                                      "Brasilien, sommartid", "BRST"};
--- a/src/share/instrument/Reentrancy.c	Thu Sep 11 11:03:44 2014 -0700
+++ b/src/share/instrument/Reentrancy.c	Thu Oct 02 08:31:59 2014 -0700
@@ -130,6 +130,7 @@
             error = confirmingTLSSet (  jvmtienv,
                                         thread,
                                         JPLIS_CURRENTLY_INSIDE_TOKEN);
+            check_phase_ret_false(error);
             jplis_assert(error == JVMTI_ERROR_NONE);
             if ( error != JVMTI_ERROR_NONE ) {
                 result = JNI_FALSE;
@@ -158,6 +159,7 @@
     error = confirmingTLSSet(   jvmtienv,
                                 thread,
                                 JPLIS_CURRENTLY_OUTSIDE_TOKEN);
+    check_phase_ret(error);
     jplis_assert(error == JVMTI_ERROR_NONE);
 
 }
--- a/src/share/native/sun/security/smartcardio/pcsc.c	Thu Sep 11 11:03:44 2014 -0700
+++ b/src/share/native/sun/security/smartcardio/pcsc.c	Thu Oct 02 08:31:59 2014 -0700
@@ -93,7 +93,7 @@
 JNIEXPORT jlong JNICALL Java_sun_security_smartcardio_PCSC_SCardEstablishContext
     (JNIEnv *env, jclass thisClass, jint dwScope)
 {
-    SCARDCONTEXT context;
+    SCARDCONTEXT context = 0;
     LONG rv;
     dprintf("-establishContext\n");
     rv = CALL_SCardEstablishContext(dwScope, NULL, NULL, &context);
@@ -147,7 +147,7 @@
     SCARDCONTEXT context = (SCARDCONTEXT)jContext;
     LONG rv;
     LPTSTR mszReaders;
-    DWORD size;
+    DWORD size = 0;
     jobjectArray result;
 
     dprintf1("-context: %x\n", context);
@@ -177,8 +177,8 @@
     SCARDCONTEXT context = (SCARDCONTEXT)jContext;
     LONG rv;
     LPCTSTR readerName;
-    SCARDHANDLE card;
-    DWORD proto;
+    SCARDHANDLE card = 0;
+    DWORD proto = 0;
 
     readerName = (*env)->GetStringUTFChars(env, jReaderName, NULL);
     rv = CALL_SCardConnect(context, readerName, jShareMode, jPreferredProtocols, &card, &proto);
@@ -231,8 +231,8 @@
     DWORD readerLen = READERNAME_BUFFER_SIZE;
     unsigned char atr[ATR_BUFFER_SIZE];
     DWORD atrLen = ATR_BUFFER_SIZE;
-    DWORD state;
-    DWORD protocol;
+    DWORD state = 0;
+    DWORD protocol = 0;
     jbyteArray jArray;
     jbyte tmp;
 
--- a/src/solaris/classes/sun/awt/X11/XWindow.java	Thu Sep 11 11:03:44 2014 -0700
+++ b/src/solaris/classes/sun/awt/X11/XWindow.java	Thu Oct 02 08:31:59 2014 -0700
@@ -455,6 +455,7 @@
             ColorModel cm = getColorModel();
             int pixel = PixelConverter.instance.rgbToPixel(c.getRGB(), cm);
             XlibWrapper.XSetWindowBackground(XToolkit.getDisplay(), getContentWindow(), pixel);
+            XlibWrapper.XClearWindow(XToolkit.getDisplay(), getContentWindow());
         }
         finally {
             XToolkit.awtUnlock();
--- a/src/solaris/native/sun/security/smartcardio/MUSCLE/pcsclite.h	Thu Sep 11 11:03:44 2014 -0700
+++ b/src/solaris/native/sun/security/smartcardio/MUSCLE/pcsclite.h	Thu Oct 02 08:31:59 2014 -0700
@@ -62,6 +62,8 @@
 
 #define MAX_ATR_SIZE                    33      /* Maximum ATR size */
 
+#ifndef __APPLE__
+
 typedef struct
 {
         const char *szReader;
@@ -73,9 +75,6 @@
 }
 SCARD_READERSTATE_A;
 
-typedef SCARD_READERSTATE_A SCARD_READERSTATE, *PSCARD_READERSTATE_A,
-        *LPSCARD_READERSTATE_A;
-
 typedef struct _SCARD_IO_REQUEST
 {
         unsigned long dwProtocol;       /* Protocol identifier */
@@ -83,6 +82,33 @@
 }
 SCARD_IO_REQUEST, *PSCARD_IO_REQUEST, *LPSCARD_IO_REQUEST;
 
+#else // __APPLE__
+
+#pragma pack(1)
+typedef struct
+{
+        const char *szReader;
+        void *pvUserData;
+        uint32_t dwCurrentState;
+        uint32_t dwEventState;
+        uint32_t cbAtr;
+        unsigned char rgbAtr[MAX_ATR_SIZE];
+}
+SCARD_READERSTATE_A;
+
+typedef struct _SCARD_IO_REQUEST
+{
+        uint32_t dwProtocol;            /* Protocol identifier */
+        uint32_t cbPciLength;           /* Protocol Control Inf Length */
+}
+SCARD_IO_REQUEST, *PSCARD_IO_REQUEST, *LPSCARD_IO_REQUEST;
+#pragma pack()
+
+#endif // __APPLE__
+
+typedef SCARD_READERSTATE_A SCARD_READERSTATE, *PSCARD_READERSTATE_A,
+        *LPSCARD_READERSTATE_A;
+
 typedef const SCARD_IO_REQUEST *LPCSCARD_IO_REQUEST;
 
 extern SCARD_IO_REQUEST g_rgSCardT0Pci, g_rgSCardT1Pci,
--- a/src/solaris/native/sun/security/smartcardio/pcsc_md.c	Thu Sep 11 11:03:44 2014 -0700
+++ b/src/solaris/native/sun/security/smartcardio/pcsc_md.c	Thu Oct 02 08:31:59 2014 -0700
@@ -80,5 +80,9 @@
     scardListReaders      = (FPTR_SCardListReaders)     findFunction(env, hModule, "SCardListReaders");
     scardBeginTransaction = (FPTR_SCardBeginTransaction)findFunction(env, hModule, "SCardBeginTransaction");
     scardEndTransaction   = (FPTR_SCardEndTransaction)  findFunction(env, hModule, "SCardEndTransaction");
+#ifndef __APPLE__
     scardControl          = (FPTR_SCardControl)         findFunction(env, hModule, "SCardControl");
+#else
+    scardControl          = (FPTR_SCardControl)         findFunction(env, hModule, "SCardControl132");
+#endif // __APPLE__
 }
--- a/test/com/sun/jndi/ldap/LdapTimeoutTest.java	Thu Sep 11 11:03:44 2014 -0700
+++ b/test/com/sun/jndi/ldap/LdapTimeoutTest.java	Thu Oct 02 08:31:59 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -64,11 +64,12 @@
         env.put(Context.SECURITY_PRINCIPAL, "user");
         env.put(Context.SECURITY_CREDENTIALS, "password");
 
-        env.put("com.sun.jndi.ldap.connect.timeout", "10");
-        env.put("com.sun.jndi.ldap.read.timeout", "3000");
-
         InitialContext ctx = null;
         try {
+            new LdapTimeoutTest().deadServerNoTimeout(env);
+
+            env.put("com.sun.jndi.ldap.connect.timeout", "10");
+            env.put("com.sun.jndi.ldap.read.timeout", "3000");
             new LdapTimeoutTest().ldapReadTimeoutTest(env, false);
             new LdapTimeoutTest().ldapReadTimeoutTest(env, true);
             new LdapTimeoutTest().simpleAuthConnectTest(env);
@@ -84,7 +85,7 @@
     void ldapReadTimeoutTest(Hashtable env, boolean ssl) {
         InitialContext ctx = null;
         if (ssl) env.put(Context.SECURITY_PROTOCOL, "ssl");
-        ScheduledFuture killer = killSwitch();
+        ScheduledFuture killer = killSwitch(5000);
         long start = System.nanoTime();
         try {
             ctx = new InitialDirContext(env);
@@ -112,7 +113,7 @@
 
     void simpleAuthConnectTest(Hashtable env) {
         InitialContext ctx = null;
-        ScheduledFuture killer = killSwitch();
+        ScheduledFuture killer = killSwitch(5000);
         long start = System.nanoTime();
         try {
             ctx = new InitialDirContext(env);
@@ -139,6 +140,32 @@
         }
     }
 
+    void deadServerNoTimeout(Hashtable env) {
+        InitialContext ctx = null;
+        ScheduledFuture killer = killSwitch(30000);
+        long start = System.nanoTime();
+        try {
+            ctx = new InitialDirContext(env);
+            SearchControls scl = new SearchControls();
+            scl.setSearchScope(SearchControls.SUBTREE_SCOPE);
+            NamingEnumeration<SearchResult> answer = ((InitialDirContext)ctx)
+                .search("ou=People,o=JNDITutorial", "(objectClass=*)", scl);
+            // shouldn't reach here
+            fail();
+        } catch (NamingException e) {
+            long end = System.nanoTime();
+            if (TimeUnit.NANOSECONDS.toMillis(end - start) < 14000) {
+                System.err.println("fail: timeout should be at least 15 seconds, actual time: "
+                                   + TimeUnit.NANOSECONDS.toMillis(end - start));
+                fail();
+            } else {
+                pass();
+            }
+        } finally {
+            if (!shutItDown(killer, ctx)) fail();
+        }
+    }
+
     boolean shutItDown(ScheduledFuture killer, InitialContext ctx) {
         killer.cancel(true);
         try {
@@ -149,15 +176,15 @@
         }
     }
 
-    ScheduledFuture killSwitch() {
+    ScheduledFuture killSwitch(int ms) {
         final Thread current = Thread.currentThread();
         return LdapTimeoutTest.pool.schedule(new Callable<Void>() {
             public Void call() throws Exception {
                 System.err.println("Fail: killSwitch()");
-                current.interrupt();
+                System.exit(0);
                 return null;
             }
-        }, 5000, TimeUnit.MILLISECONDS);
+        }, ms, TimeUnit.MILLISECONDS);
     }
 
     static class Server extends Thread {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/awt/Mouse/MouseComboBoxTest/MouseComboBoxTest.java	Thu Oct 02 08:31:59 2014 -0700
@@ -0,0 +1,138 @@
+/*
+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 8032872
+ * @summary Tests JComboBox selection via the mouse
+ * @author Dmitry Markov
+ */
+import sun.awt.SunToolkit;
+
+import javax.swing.*;
+import javax.swing.plaf.basic.BasicComboPopup;
+import javax.swing.plaf.basic.ComboPopup;
+import javax.swing.plaf.metal.MetalComboBoxUI;
+import javax.swing.plaf.metal.MetalLookAndFeel;
+import java.awt.*;
+import java.awt.event.InputEvent;
+import java.awt.event.KeyEvent;
+
+public class MouseComboBoxTest {
+    private static final String[] items = {"One", "Two", "Three", "Four", "Five"};
+
+    private static SunToolkit toolkit = null;
+    private static Robot robot = null;
+    private static JFrame frame = null;
+    private static JComboBox comboBox = null;
+    private static MyComboBoxUI comboBoxUI = null;
+
+    public static void main(String[] args) throws Exception {
+        toolkit = (SunToolkit) Toolkit.getDefaultToolkit();
+        robot = new Robot();
+        robot.setAutoDelay(50);
+
+        UIManager.setLookAndFeel(new MetalLookAndFeel());
+        SwingUtilities.invokeAndWait(new Runnable() {
+            @Override
+            public void run() {
+                createAndShowGUI();
+            }
+        });
+        toolkit.realSync();
+
+        for (int i = 0; i < items.length; i++) {
+            // Open popup
+            robot.keyPress(KeyEvent.VK_DOWN);
+            robot.keyRelease(KeyEvent.VK_DOWN);
+            toolkit.realSync();
+
+            Point point = getItemPointToClick(i);
+            robot.mouseMove(point.x, point.y);
+            robot.mousePress(InputEvent.BUTTON1_DOWN_MASK);
+            robot.mouseRelease(InputEvent.BUTTON1_DOWN_MASK);
+            toolkit.realSync();
+
+            if (i != getSelectedIndex()) {
+                throw new RuntimeException("Test Failed! Incorrect value of selected index = " + getSelectedIndex() +
+                        ", expected value = " + i);
+            }
+        }
+    }
+
+    private static Point getItemPointToClick(final int item) throws Exception {
+        final Point[] result = new Point[1];
+
+        SwingUtilities.invokeAndWait(new Runnable() {
+            @Override
+            public void run() {
+                BasicComboPopup popup = (BasicComboPopup)comboBoxUI.getComboPopup();
+                Point point = popup.getLocationOnScreen();
+                Dimension size = popup.getSize();
+
+                int step = size.height / items.length;
+                point.x += size.width / 2;
+                point.y += step / 2 + step * item;
+                result[0] = point;
+            }
+        });
+        return result[0];
+    }
+
+    private static int getSelectedIndex() throws Exception {
+        final int[] result = new int[1];
+
+        SwingUtilities.invokeAndWait(new Runnable() {
+            @Override
+            public void run() {
+                result[0] = comboBox.getSelectedIndex();
+            }
+        });
+        return result[0];
+    }
+
+    private static void createAndShowGUI() {
+        frame = new JFrame("MouseComboBoxTest");
+
+        comboBox = new JComboBox(items);
+        comboBox.setEditable(true);
+        comboBoxUI = new MyComboBoxUI();
+        comboBox.setUI(comboBoxUI);
+
+        frame.pack();
+        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
+        frame.setVisible(true);
+
+        JWindow window = new JWindow(frame);
+        window.add(comboBox);
+        window.pack();
+        window.setVisible(true);
+    }
+
+    private static class MyComboBoxUI extends MetalComboBoxUI {
+        public ComboPopup getComboPopup() {
+            return popup;
+        }
+    }
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/awt/Window/BackgroundIsNotUpdated/BackgroundIsNotUpdated.java	Thu Oct 02 08:31:59 2014 -0700
@@ -0,0 +1,84 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import java.awt.AWTException;
+import java.awt.Color;
+import java.awt.Frame;
+import java.awt.Graphics;
+import java.awt.Point;
+import java.awt.Robot;
+import java.awt.Toolkit;
+import java.awt.Window;
+
+import sun.awt.SunToolkit;
+
+/**
+ * @test
+ * @bug 8001472
+ * @summary Background of the window should not depend from the paint()/update()
+ * @author Sergey Bylokhov
+ */
+public final class BackgroundIsNotUpdated extends Window {
+
+    public BackgroundIsNotUpdated(final Frame owner) {
+        super(owner);
+    }
+
+    @Override
+    public void paint(final Graphics ignored) {
+        // Intentionally left blank
+    }
+
+    @Override
+    public void update(final Graphics ignored) {
+        // Intentionally left blank
+    }
+
+    public static void main(final String[] args) throws AWTException {
+        final Window window = new BackgroundIsNotUpdated(null);
+        window.setSize(300, 300);
+        window.setLocationRelativeTo(null);
+        window.setVisible(true);
+        sleep();
+        window.setBackground(Color.GREEN);
+        sleep();
+        final Robot robot = new Robot();
+        robot.setAutoDelay(200);
+        Point point = window.getLocationOnScreen();
+        Color color = robot.getPixelColor(point.x + window.getWidth() / 2,
+                                          point.y + window.getHeight() / 2);
+        window.dispose();
+        if (!color.equals(Color.GREEN)) {
+            throw new RuntimeException(
+                    "Expected: " + Color.GREEN + " , Actual: " + color);
+        }
+    }
+
+    private static void sleep() {
+        try {
+            ((SunToolkit) Toolkit.getDefaultToolkit()).realSync();
+            Thread.sleep(1000);
+        } catch (InterruptedException ignored) {
+        }
+    }
+}
--- a/test/java/awt/Window/Grab/GrabTest.java	Thu Sep 11 11:03:44 2014 -0700
+++ b/test/java/awt/Window/Grab/GrabTest.java	Thu Oct 02 08:31:59 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -40,7 +40,10 @@
 public class GrabTest {
     private static Frame f;
     private static Frame f1;
+    private static Frame frame;
     private static Window w;
+    private static Window window1;
+    private static Window window2;
     private static Button b;
 
     private static Robot robot;
@@ -98,6 +101,15 @@
         f.setVisible(true);
         w.setVisible(true);
 
+        frame = new Frame();
+        window1 = new Window(frame);
+        window1.setBounds(0, 0, 100, 100);
+        window1.setBackground(Color.blue);
+
+        window2 = new Window(window1);
+        window2.setBounds(0, 0, 50, 50);
+        window2.setBackground(Color.green);
+
         tk = (sun.awt.SunToolkit)Toolkit.getDefaultToolkit();
 
         try {
@@ -175,7 +187,7 @@
 
         // 6. Check that press on the outside area causes ungrab
         Point loc = f.getLocationOnScreen();
-        robot.mouseMove(loc.x + 100, loc.y + f.getSize().height + 1);
+        robot.mouseMove(loc.x + 100, loc.y + f.getSize().height + 10);
         Util.waitForIdle(robot);
         robot.mousePress(InputEvent.BUTTON1_MASK);
         robot.delay(50);
@@ -196,6 +208,24 @@
             passed = false;
             System.err.println("Failure: [7] Window disposal didn't cause ungrab");
         }
+        ungrabbed = false;
+
+
+        // 8. Check that mouse click on subwindow does not cause ungrab
+        frame.setVisible(true);
+        window1.setVisible(true);
+        window2.setVisible(true);
+        Util.waitForIdle(robot);
+
+        tk.grab(window1);
+
+        Util.clickOnComp(window2, robot);
+        Util.waitForIdle(robot);
+
+        if (ungrabbed) {
+            passed = false;
+            System.err.println("Failure: [8] Press on the subwindow caused ungrab");
+        }
 
         if (passed) {
             System.out.println("Test passed.");
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/lang/instrument/DaemonThread/DummyAgent.java	Thu Oct 02 08:31:59 2014 -0700
@@ -0,0 +1,46 @@
+/*
+ * Copyright 2014 Goldman Sachs.
+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import java.lang.instrument.ClassFileTransformer;
+import java.lang.instrument.IllegalClassFormatException;
+import java.lang.instrument.Instrumentation;
+import java.security.ProtectionDomain;
+
+public class DummyAgent implements ClassFileTransformer {
+    @Override
+    public byte[] transform(ClassLoader loader, String className,
+                            Class<?> classBeingRedefined, ProtectionDomain protectionDomain,
+                            byte[] classfileBuffer) throws IllegalClassFormatException {
+
+        /* The Daemon Thread bug is timing dependent and you want the transform method
+         * to return ASAP - so just return the buffer will be fine
+         */
+        return classfileBuffer;
+    }
+
+    public static void premain(String agentArgs, Instrumentation inst) {
+        inst.addTransformer(new DummyAgent(), false);
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/lang/instrument/DaemonThread/DummyClass.java	Thu Oct 02 08:31:59 2014 -0700
@@ -0,0 +1,27 @@
+/*
+ * Copyright 2014 Goldman Sachs.
+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/* Just a dummy class for loading */
+public class DummyClass {
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/lang/instrument/DaemonThread/TestDaemonThread.java	Thu Oct 02 08:31:59 2014 -0700
@@ -0,0 +1,72 @@
+/*
+ * Copyright 2014 Goldman Sachs.
+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+/* @test
+ * @bug 7142035
+ * @summary Assert in java.lang.instrument agents during shutdown when classloading occurs after shutdown
+ * @library /lib/testlibrary
+ *
+ * @build DummyAgent DummyClass TestDaemonThreadLauncher TestDaemonThread
+ * @run shell ../MakeJAR3.sh DummyAgent
+ * @run main TestDaemonThreadLauncher /timeout=240
+ *
+ */
+import java.io.File;
+import java.net.URL;
+import java.net.URLClassLoader;
+
+public class TestDaemonThread implements Runnable{
+    File classpath;
+
+    public TestDaemonThread(File classpath) {
+        this.classpath = classpath;
+    }
+
+    @Override
+    public void run() {
+
+
+        try {
+            URL u = this.getClass().getClassLoader().getResource("DummyClass.class");
+            String path = u.getPath();
+            String parent = u.getPath().substring(0, path.lastIndexOf('/')+1);
+            URL parentURL = new URL(u, parent);
+            System.out.println(parentURL);
+            /* Load lots of class by creating multiple classloaders */
+            for(;;) {
+                ClassLoader cl = new URLClassLoader(new URL[] {parentURL}, null);
+                cl.loadClass("DummyClass");
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+    }
+
+    public static void main(String[] args) throws Exception {
+           Thread t = new Thread(new TestDaemonThread(new File(args[0])));
+           /* The important part of the bug is that a Daemon thread can continue to load classes after shutdown */
+           t.setDaemon(true);
+           t.start();
+           Thread.sleep(200);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/lang/instrument/DaemonThread/TestDaemonThreadLauncher.java	Thu Oct 02 08:31:59 2014 -0700
@@ -0,0 +1,44 @@
+/*
+ * Copyright 2014 Goldman Sachs.
+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+
+import jdk.testlibrary.JDKToolLauncher;
+import jdk.testlibrary.OutputAnalyzer;
+import jdk.testlibrary.ProcessTools;
+
+import java.io.IOException;
+import java.nio.file.Path;
+
+public class TestDaemonThreadLauncher {
+
+    private static ProcessBuilder processBuilder = new ProcessBuilder();
+
+    public static void main(String args[]) throws Exception {
+        for(int i=0; i<50; i++) {
+            ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("-javaagent:DummyAgent.jar", "TestDaemonThread", ".");
+            OutputAnalyzer analyzer = new OutputAnalyzer(pb.start());
+            analyzer.shouldNotContain("ASSERTION FAILED");
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/javax/swing/JComboBox/8032878/bug8032878.java	Thu Oct 02 08:31:59 2014 -0700
@@ -0,0 +1,136 @@
+/*
+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/* @test
+ * @bug 8032878
+ * @summary Checks that JComboBox as JTable cell editor processes key events
+ *          even where setSurrendersFocusOnKeystroke flag in JTable is false and
+ *          that it does not lose the first key press where the flag is true.
+ * @library ../../regtesthelpers
+ * @build Util
+ * @author Alexey Ivanov
+ */
+
+import java.awt.*;
+import java.awt.event.KeyEvent;
+import javax.swing.*;
+import javax.swing.text.JTextComponent;
+
+import sun.awt.SunToolkit;
+
+public class bug8032878 implements Runnable {
+    private static final String ONE = "one";
+    private static final String TWO = "two";
+    private static final String THREE = "three";
+
+    private static final String EXPECTED = "one123";
+
+    private final Robot robot;
+
+    private JFrame frame;
+    private JComboBox cb;
+
+    private volatile boolean surrender;
+    private volatile String text;
+
+    public static void main(String[] args) throws Exception {
+        final bug8032878 test = new bug8032878();
+
+        test.test(false);
+        test.test(true);
+    }
+
+    public bug8032878() throws AWTException {
+        robot = new Robot();
+        robot.setAutoDelay(100);
+    }
+
+    private void setupUI() {
+        frame = new JFrame();
+        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
+
+        JTable table = new JTable(new String[][] {{ONE}, {TWO}, {THREE}},
+                                  new String[] { "#"});
+        table.setSurrendersFocusOnKeystroke(surrender);
+
+        cb = new JComboBox(new String[]{ONE, TWO, THREE});
+        cb.setEditable(true);
+        DefaultCellEditor comboEditor = new DefaultCellEditor(cb);
+        comboEditor.setClickCountToStart(1);
+        table.getColumnModel().getColumn(0).setCellEditor(comboEditor);
+        frame.add(table);
+
+        frame.pack();
+        frame.setVisible(true);
+    }
+
+    private void test(final boolean flag) throws Exception {
+        try {
+            surrender = flag;
+            SwingUtilities.invokeAndWait(this);
+
+            runTest();
+            checkResult();
+        } finally {
+            if (frame != null) {
+                frame.dispose();
+            }
+        }
+    }
+
+    private void runTest() throws Exception {
+        realSync();
+        // Select 'one'
+        Util.hitKeys(robot, KeyEvent.VK_TAB);
+        realSync();
+        Util.hitKeys(robot, KeyEvent.VK_1);
+        Util.hitKeys(robot, KeyEvent.VK_2);
+        Util.hitKeys(robot, KeyEvent.VK_3);
+        Util.hitKeys(robot, KeyEvent.VK_ENTER);
+        realSync();
+    }
+
+    private void checkResult() throws Exception {
+        SwingUtilities.invokeAndWait(new Runnable() {
+            public void run() {
+                text = ((JTextComponent) cb.getEditor().getEditorComponent()).getText();
+            }
+        });
+        if (text.equals(EXPECTED)) {
+            System.out.println("Test with surrender = " + surrender + " passed");
+        } else {
+            System.out.println("Test with surrender = " + surrender + " failed");
+            throw new RuntimeException("Expected value in JComboBox editor '" +
+                    EXPECTED + "' but found '" + text + "'.");
+        }
+    }
+
+    private static void realSync() {
+        ((SunToolkit) (Toolkit.getDefaultToolkit())).realSync();
+    }
+
+    @Override
+    public void run() {
+        setupUI();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/javax/swing/JTable/8032874/bug8032874.java	Thu Oct 02 08:31:59 2014 -0700
@@ -0,0 +1,145 @@
+/*
+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/* @test
+ * @bug 8032874
+ * @summary Test whether ArrayIndexOutOfBoundsException is thrown or not,
+ *          once selected row is removed from JTable with Sorter and Filter
+ * @author Dmitry Markov
+ * @run main bug8032874
+ */
+
+import java.awt.*;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.swing.*;
+import javax.swing.table.AbstractTableModel;
+import javax.swing.table.TableRowSorter;
+
+import sun.awt.SunToolkit;
+
+public class bug8032874 {
+    private static final int ROW_COUNT = 5;
+    private static JTable table;
+    private static TestTableModel tableModel;
+
+    public static void main(String args[]) throws Exception {
+        SunToolkit toolkit = (SunToolkit) Toolkit.getDefaultToolkit();
+
+        SwingUtilities.invokeAndWait(new Runnable() {
+            @Override
+            public void run() {
+                createAndShowUI();
+            }
+        });
+        toolkit.realSync();
+
+        SwingUtilities.invokeAndWait(new Runnable() {
+            @Override
+            public void run() {
+                table.getRowSorter().toggleSortOrder(0);
+                table.getSelectionModel().setSelectionMode(ListSelectionModel.SINGLE_INTERVAL_SELECTION);
+                table.setRowSelectionInterval(1, 2);
+            }
+        });
+        toolkit.realSync();
+
+        SwingUtilities.invokeAndWait(new Runnable() {
+            @Override
+            public void run() {
+                for (int i = 0; i < ROW_COUNT; i++) {
+                    tableModel.remove(0);
+                    table.getRowSorter().toggleSortOrder(0);
+                }
+            }
+        });
+    }
+
+    public static void createAndShowUI() {
+        try {
+            UIManager.setLookAndFeel("javax.swing.plaf.metal.MetalLookAndFeel");
+        } catch (Exception e) {
+            throw new RuntimeException(e);
+        }
+
+        JFrame frame = new JFrame("bug8032874");
+        frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
+
+        JPanel panel = new JPanel();
+        panel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS));
+
+        tableModel = new TestTableModel();
+        table = new JTable(tableModel);
+        table.setSurrendersFocusOnKeystroke(true);
+
+        final TableRowSorter<TestTableModel> rowSorter = new TableRowSorter<TestTableModel>(tableModel);
+        rowSorter.setRowFilter(new RowFilter<TestTableModel, Integer>() {
+            @Override
+            public boolean include(Entry<? extends TestTableModel, ? extends Integer> entry) {
+                return entry.getIdentifier() % 2 == 0;
+            }
+        });
+        table.setRowSorter(rowSorter);
+
+        JScrollPane jScrollPane = new JScrollPane(table);
+        panel.add(jScrollPane);
+
+        frame.setContentPane(panel);
+        frame.setSize(new Dimension(800, 600));
+        frame.setVisible(true);
+    }
+
+    private static class TestTableModel extends AbstractTableModel {
+        private final List<Integer> data;
+
+        public TestTableModel() {
+            data = new ArrayList<Integer>();
+
+            for (int i = 0; i < ROW_COUNT; i++) {
+                data.add(i);
+            }
+        }
+
+        @Override
+        public int getRowCount() {
+            return data.size();
+        }
+
+        @Override
+        public int getColumnCount() {
+            return 1;
+        }
+
+        @Override
+        public Object getValueAt(int rowIndex, int columnIndex) {
+            return data.get(rowIndex);
+        }
+
+        public void remove(int row) {
+            data.remove(row);
+            fireTableRowsDeleted(row, row);
+        }
+    }
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/javax/swing/JTextField/8036819/bug8036819.java	Thu Oct 02 08:31:59 2014 -0700
@@ -0,0 +1,132 @@
+/*
+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @library ../../regtesthelpers
+ * @build Util
+ * @bug 8036819
+ * @summary JAB: mnemonics not read for textboxes
+ * @author Vivi An
+ * @run main bug8036819
+ */
+
+import javax.swing.*;
+import javax.swing.event.*;
+import java.awt.event.*;
+import java.awt.*;
+import sun.awt.SunToolkit;
+import javax.accessibility.*;
+
+public class bug8036819 {
+
+    public static volatile Boolean passed = false;
+
+    public static void main(String args[]) throws Throwable {
+        SwingUtilities.invokeAndWait(new Runnable() {
+            public void run() {
+                createAndShowGUI();
+            }
+        });
+
+        SunToolkit toolkit = (SunToolkit) Toolkit.getDefaultToolkit();
+        toolkit.realSync();
+
+        Robot robo = new Robot();
+        robo.setAutoDelay(300);
+
+        // Using mnemonic key to focus on the textfield
+        Util.hitMnemonics(robo, KeyEvent.VK_P);
+        toolkit.realSync();
+
+        if (!passed){
+            throw new RuntimeException("Test failed.");
+        }
+    }
+
+    private static void createAndShowGUI() {
+        JFrame mainFrame = new JFrame("bug 8036819");
+
+        JLabel usernameLabel = new JLabel("Username: ");
+        JTextField usernameField = new JTextField(20);
+        usernameLabel.setDisplayedMnemonic(KeyEvent.VK_U);
+        usernameLabel.setLabelFor(usernameField);
+
+        JLabel pwdLabel = new JLabel("Password: ");
+        JTextField pwdField = new JTextField(20);
+        pwdLabel.setDisplayedMnemonic(KeyEvent.VK_P);
+        pwdLabel.setLabelFor(pwdField);
+
+        pwdField.addKeyListener(
+            new KeyListener(){
+                @Override
+                public void keyPressed(KeyEvent keyEvent) {
+                }
+
+                @Override
+                public void keyTyped(KeyEvent keyEvent) {
+                }
+
+                @Override
+                public void keyReleased(KeyEvent keyEvent){
+                    JComponent comp = (JComponent) pwdField;
+                    AccessibleContext ac = comp.getAccessibleContext();
+                    AccessibleExtendedComponent aec = (AccessibleExtendedComponent)ac.getAccessibleComponent();
+                    AccessibleKeyBinding akb = aec.getAccessibleKeyBinding();
+                    if (akb != null){
+                         int count = akb.getAccessibleKeyBindingCount();
+                        if (count != 1){
+                            passed = false;
+                            return;
+                        }
+
+                        // there is 1 accessible key for the text field
+                        System.out.println("Retrieved AccessibleKeyBinding for textfield " + count);
+
+                        // the key code is KeyEvent.VK_P
+                        Object o = akb.getAccessibleKeyBinding(0);
+                        if (o instanceof KeyStroke){
+                            javax.swing.KeyStroke key = (javax.swing.KeyStroke)o;
+                            System.out.println("keystroke is " + key.getKeyCode());
+                            if (key.getKeyCode() == KeyEvent.VK_P)
+                                passed = true;
+                        }
+                    }
+                }
+            }
+        );
+
+        mainFrame.getContentPane().add(usernameLabel);
+        mainFrame.getContentPane().add(usernameField);
+        mainFrame.getContentPane().add(pwdLabel);
+        mainFrame.getContentPane().add(pwdField);
+
+        mainFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
+        mainFrame.setLayout(new FlowLayout(FlowLayout.LEFT));
+
+        mainFrame.setSize(200, 200);
+        mainFrame.setLocation(200, 200);
+        mainFrame.setVisible(true);
+        mainFrame.toFront();
+    }
+ }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/javax/swing/text/html/parser/Parser/8028616/bug8028616.java	Thu Oct 02 08:31:59 2014 -0700
@@ -0,0 +1,77 @@
+/*
+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 8028616
+ * @summary Tests correct parsing of the text with leading slash (/)
+ * @author Dmitry Markov
+ */
+
+import javax.swing.text.html.HTMLDocument;
+import javax.swing.text.html.HTMLEditorKit;
+import java.io.StringReader;
+
+public class bug8028616 {
+    private static final String text = "/ at start is bad";
+    private static Object lock = new Object();
+    private static boolean isCallbackInvoked = false;
+    private static Exception exception = null;
+
+    public static void main(String[] args) throws Exception {
+        ParserCB cb = new ParserCB();
+        HTMLEditorKit htmlKit = new HTMLEditorKit();
+        HTMLDocument htmlDoc = (HTMLDocument) htmlKit.createDefaultDocument();
+
+        htmlDoc.getParser().parse(new StringReader(text), cb, true);
+
+        synchronized (lock) {
+            if (!isCallbackInvoked) {
+                lock.wait(5000);
+            }
+        }
+
+        if (!isCallbackInvoked) {
+            throw new RuntimeException("Test Failed: ParserCallback.handleText() is not invoked for text - " + text);
+        }
+
+        if (exception != null) {
+            throw exception;
+        }
+    }
+
+    private static class ParserCB extends HTMLEditorKit.ParserCallback {
+        @Override
+        public void handleText(char[] data, int pos) {
+            synchronized (lock) {
+                if (!text.equals(new String(data)) || pos != 0) {
+                    exception = new RuntimeException(
+                        "Test Failed: the data passed to ParserCallback.handleText() does not meet the expectation");
+                }
+                isCallbackInvoked = true;
+                lock.notifyAll();
+            }
+        }
+    }
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/javax/xml/bind/xjc/8029837/PreParseGrammarTest.java	Thu Oct 02 08:31:59 2014 -0700
@@ -0,0 +1,58 @@
+/*
+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 8029837
+ * @summary Test simulates the partial call to xjc ant task that fails with
+ *          NullPointer exception
+ * @run main/othervm PreParseGrammarTest
+ */
+
+import com.sun.org.apache.xerces.internal.parsers.XMLGrammarPreparser;
+import com.sun.org.apache.xerces.internal.xni.XNIException;
+import com.sun.org.apache.xerces.internal.xni.grammars.Grammar;
+import com.sun.org.apache.xerces.internal.xni.grammars.XMLGrammarDescription;
+import com.sun.org.apache.xerces.internal.xni.parser.XMLInputSource;
+import java.io.BufferedInputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.InputStream;
+
+public class PreParseGrammarTest {
+
+    public static void main(String[] args) throws FileNotFoundException, XNIException, IOException {
+        File xsdf = new File(System.getProperty("test.src", ".") + "/test.xsd");
+        InputStream is = new BufferedInputStream(new FileInputStream(xsdf));
+        XMLInputSource xis = new XMLInputSource(null, null, null, is, null);
+        XMLGrammarPreparser gp = new XMLGrammarPreparser();
+        gp.registerPreparser(XMLGrammarDescription.XML_SCHEMA, null);
+        //The NullPointerException is observed on next call during ant task
+        // execution
+        Grammar res = gp.preparseGrammar(XMLGrammarDescription.XML_SCHEMA, xis);
+        System.out.println("Grammar preparsed successfully:" + res);
+        return;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/javax/xml/bind/xjc/8029837/test.xsd	Thu Oct 02 08:31:59 2014 -0700
@@ -0,0 +1,4 @@
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+	<xsd:element name="root">
+	</xsd:element>
+</xsd:schema>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/javax/xml/ws/8033113/Organization_List.wsdl	Thu Oct 02 08:31:59 2014 -0700
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<wsdl:definitions targetNamespace="urn:Organization_List" xmlns:s0="urn:Organization_List" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+ <wsdl:types>
+  <xsd:schema elementFormDefault="qualified" targetNamespace="urn:Organization_List">
+   <xsd:element name="OpGetList" type="s0:GetListInputMap"/>
+   <xsd:complexType name="GetListInputMap">
+    <xsd:sequence>
+     <xsd:element name="Qualification" type="xsd:string"/>
+    </xsd:sequence>
+   </xsd:complexType>
+   <xsd:element name="OpGetListResponse" type="s0:GetListOutputMap"/>
+   <xsd:complexType name="GetListOutputMap">
+    <xsd:sequence>
+     <xsd:element maxOccurs="unbounded" name="getListValues">
+      <xsd:complexType>
+       <xsd:sequence>
+        <xsd:element name="Organization_Name" type="xsd:string"/>
+       </xsd:sequence>
+      </xsd:complexType>
+     </xsd:element>
+    </xsd:sequence>
+   </xsd:complexType>
+   <xsd:element name="AuthenticationInfo" type="s0:AuthenticationInfo"/>
+   <xsd:complexType name="AuthenticationInfo">
+    <xsd:sequence>
+     <xsd:element name="userName" type="xsd:string"/>
+     <xsd:element name="password" type="xsd:string"/>
+     <xsd:element minOccurs="0" name="authentication" type="xsd:string"/>
+     <xsd:element minOccurs="0" name="locale" type="xsd:string"/>
+     <xsd:element minOccurs="0" name="timeZone" type="xsd:string"/>
+    </xsd:sequence>
+   </xsd:complexType>
+  </xsd:schema>
+ </wsdl:types>
+
+   <wsdl:message name="ARAuthenticate">
+      <wsdl:part element="s0:AuthenticationInfo" name="param"/>
+   </wsdl:message>
+
+   <wsdl:message name="OpGetListSoapIn">
+      <wsdl:part element="s0:OpGetList" name="param"/>
+   </wsdl:message>
+
+   <wsdl:message name="OpGetListSoapOut">
+      <wsdl:part element="s0:OpGetListResponse" name="param"/>
+   </wsdl:message>
+
+   <wsdl:portType name="Organization_ListPortType">
+      <wsdl:operation name="OpGetList">
+         <wsdl:input message="s0:OpGetListSoapIn"/>
+         <wsdl:output message="s0:OpGetListSoapOut"/>
+      </wsdl:operation>
+   </wsdl:portType>
+
+   <wsdl:binding name="Organization_ListSoapBinding" type="s0:Organization_ListPortType">
+      <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+      <wsdl:operation name="OpGetList">
+         <soap:operation soapAction="urn:Organization_List/OpGetList" style="document"/>
+         <wsdl:input>
+            <soap:header message="s0:ARAuthenticate" part="param" use="literal">
+            </soap:header>
+            <soap:body use="literal"/>
+         </wsdl:input>
+         <wsdl:output>
+            <soap:body use="literal"/>
+         </wsdl:output>
+      </wsdl:operation>
+   </wsdl:binding>
+
+   <wsdl:service name="Organization_ListService">
+      <wsdl:port binding="s0:Organization_ListSoapBinding" name="Organization_ListSoap">
+         <soap:address location="http://bogus:9080/URL"/>
+      </wsdl:port>
+   </wsdl:service>
+
+</wsdl:definitions>
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/javax/xml/ws/8033113/WsImportTest.java	Thu Oct 02 08:31:59 2014 -0700
@@ -0,0 +1,152 @@
+/*
+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 8033113
+ * @summary wsimport fails on WSDL:header parameter name customization
+ * @run main/othervm WsImportTest
+ */
+
+import java.io.InputStreamReader;
+import java.io.IOException;
+import java.io.BufferedReader;
+import java.io.File;
+import java.nio.file.Files;
+import java.nio.file.FileVisitResult;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.nio.file.SimpleFileVisitor;
+import java.nio.file.attribute.BasicFileAttributes;
+
+import static java.nio.file.FileVisitResult.*;
+
+public class WsImportTest {
+
+    public static void main(String[] args) throws IOException {
+
+        String wsimport = getWsImport();
+        String customization = getWSDLFilePath("customization.xml");
+        String wsdl = getWSDLFilePath("Organization_List.wsdl");
+
+        try {
+            log("Importing wsdl: " + wsdl);
+            String[] wsargs = {
+                    wsimport,
+                    "-keep",
+                    "-verbose",
+                    "-extension",
+                    "-XadditionalHeaders",
+                    "-Xdebug",
+                    "-b",
+                    customization,
+                    wsdl
+            };
+
+            ProcessBuilder pb = new ProcessBuilder(wsargs);
+            pb.redirectErrorStream(true);
+            Process p = pb.start();
+            logOutput(p);
+            int result = p.waitFor();
+            p.destroy();
+
+            if (result != 0) {
+                fail("WsImport failed. TEST FAILED.");
+            } else {
+                log("Test PASSED.");
+            }
+
+        } catch (Exception e) {
+            e.printStackTrace();
+            fail(e.getMessage());
+        } finally {
+            deleteGeneratedFiles();
+        }
+    }
+
+    private static void fail(String message) {
+        throw new RuntimeException(message);
+    }
+
+    private static void log(String msg) {
+        System.out.println(msg);
+    }
+
+    private static void logOutput(Process p) throws IOException {
+        BufferedReader r = new BufferedReader(new InputStreamReader(p.getInputStream()));
+        String s = r.readLine();
+        while (s != null) {
+            log(s.trim());
+            s = r.readLine();
+        }
+    }
+
+    private static void deleteGeneratedFiles() {
+        Path p = Paths.get("generated");
+        if (Files.exists(p)) {
+            try {
+                Files.walkFileTree(p, new SimpleFileVisitor<Path>() {
+                    @Override
+                    public FileVisitResult visitFile(Path file,
+                                                     BasicFileAttributes attrs) throws IOException {
+
+                        Files.delete(file);
+                        return CONTINUE;
+                    }
+
+                    @Override
+                    public FileVisitResult postVisitDirectory(Path dir,
+                                                              IOException exc) throws IOException {
+
+                        if (exc == null) {
+                            Files.delete(dir);
+                            return CONTINUE;
+                        } else {
+                            throw exc;
+                        }
+                    }
+                });
+            } catch (IOException ioe) {
+                ioe.printStackTrace();
+            }
+        }
+    }
+
+    private static String getWSDLFilePath(String filename) {
+        String testSrc = System.getProperty("test.src");
+        if (testSrc == null) testSrc = ".";
+        return Paths.get(testSrc).resolve(filename).toString();
+    }
+
+    private static String getWsImport() {
+        String javaHome = System.getProperty("java.home");
+        if (javaHome.endsWith("jre")) {
+            javaHome = new File(javaHome).getParent();
+        }
+        String wsimport = javaHome + File.separator + "bin" + File.separator + "wsimport";
+        if (System.getProperty("os.name").startsWith("Windows")) {
+            wsimport = wsimport.concat(".exe");
+        }
+        return wsimport;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/javax/xml/ws/8033113/customization.xml	Thu Oct 02 08:31:59 2014 -0700
@@ -0,0 +1,23 @@
+<jaxws:bindings wsdlLocation="./Organization_List.wsdl"  xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:jaxws="http://java.sun.com/xml/ns/jaxws">
+   <jaxws:enableWrapperStyle>false</jaxws:enableWrapperStyle>
+   <jaxws:bindings node="wsdl:definitions/wsdl:binding[@name='Organization_ListSoapBinding']/wsdl:operation[@name='OpGetList']">
+     <jaxws:parameter part="wsdl:definitions/wsdl:message[@name='ARAuthenticate']/wsdl:part[@name='param']"  name="authParam"/>
+     <jaxws:parameter part="wsdl:definitions/wsdl:message[@name='OpGetListSoapIn']/wsdl:part[@name='param']"  name="inParam"/>
+     <jaxws:parameter part="wsdl:definitions/wsdl:message[@name='OpGetListSoapOut']/wsdl:part[@name='param']"  name="outParam"/>
+   </jaxws:bindings>
+</jaxws:bindings>
+
+<!--wsdl:message definitions from WSDL whose part names we are trying to override...
+ 
+   <wsdl:message name="ARAuthenticate">
+      <wsdl:part element="s0:AuthenticationInfo" name="param"/>
+   </wsdl:message>
+
+   <wsdl:message name="OpGetListSoapIn">
+      <wsdl:part element="s0:OpGetList" name="param"/>
+   </wsdl:message>
+
+   <wsdl:message name="OpGetListSoapOut">
+      <wsdl:part element="s0:OpGetListResponse" name="param"/>
+   </wsdl:message>
+-->
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/sun/awt/AppContext/MultiThread/MultiThreadTest.java	Thu Oct 02 08:31:59 2014 -0700
@@ -0,0 +1,100 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 8019623
+ * @summary Tests that AppContext.getAppContext() works correctly in multi-threads scenario.
+ * @author Leonid Romanov
+ */
+
+import sun.awt.AppContext;
+
+public class MultiThreadTest {
+    private static final int NUM_THREADS = 2;
+
+    private static AppContextGetter[] getters = new AppContextGetter[NUM_THREADS];
+
+    public static void main(String[] args) {
+        createAndStartThreads();
+        compareAppContexts();
+    }
+
+    private static void createAndStartThreads() {
+        ThreadGroup systemGroup = getSystemThreadGroup();
+        for (int i = 0; i < NUM_THREADS; ++i) {
+            ThreadGroup tg = new ThreadGroup(systemGroup, "AppContextGetter" + i);
+            getters[i] = new AppContextGetter(tg);
+        }
+
+        for (int i = 0; i < NUM_THREADS; ++i) {
+            getters[i].start();
+        }
+
+        for (int i = 0; i < NUM_THREADS; ++i) {
+            try {
+                getters[i].join();
+            } catch (InterruptedException e) {
+                // ignore
+            }
+        }
+    }
+
+    private static ThreadGroup getSystemThreadGroup() {
+        ThreadGroup currentThreadGroup =
+                Thread.currentThread().getThreadGroup();
+        ThreadGroup parentThreadGroup = currentThreadGroup.getParent();
+        while (parentThreadGroup != null) {
+            currentThreadGroup = parentThreadGroup;
+            parentThreadGroup = currentThreadGroup.getParent();
+        }
+
+        return currentThreadGroup;
+    }
+
+    private static void compareAppContexts() {
+        AppContext ctx = getters[0].getAppContext();
+        for (int i = 1; i < NUM_THREADS; ++i) {
+            if (!ctx.equals(getters[i].getAppContext())) {
+                throw new RuntimeException("Unexpected AppContexts difference, could be a race condition");
+            }
+        }
+    }
+
+    private static class AppContextGetter extends Thread {
+        private AppContext appContext;
+
+        public AppContextGetter(ThreadGroup tg) {
+            super(tg, tg.getName());
+        }
+
+        AppContext getAppContext() {
+            return appContext;
+        }
+
+        @Override
+        public void run() {
+            appContext = AppContext.getAppContext();
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/sun/awt/dnd/8024061/bug8024061.java	Thu Oct 02 08:31:59 2014 -0700
@@ -0,0 +1,357 @@
+/*
+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/* @test
+ * @bug 8024061
+ * @summary Checks that no exception is thrown if dragGestureRecognized
+ *          takes a while to complete.
+ */
+import sun.awt.OSInfo;
+import sun.awt.OSInfo.OSType;
+import sun.awt.SunToolkit;
+
+import java.awt.*;
+import java.awt.datatransfer.DataFlavor;
+import java.awt.datatransfer.Transferable;
+import java.awt.datatransfer.UnsupportedFlavorException;
+import java.awt.dnd.DnDConstants;
+import java.awt.dnd.DragGestureEvent;
+import java.awt.dnd.DragGestureListener;
+import java.awt.dnd.DragSource;
+import java.awt.dnd.DragSourceDragEvent;
+import java.awt.dnd.DragSourceDropEvent;
+import java.awt.dnd.DragSourceEvent;
+import java.awt.dnd.DragSourceListener;
+import java.awt.dnd.DropTarget;
+import java.awt.dnd.DropTargetDragEvent;
+import java.awt.dnd.DropTargetDropEvent;
+import java.awt.dnd.DropTargetEvent;
+import java.awt.dnd.DropTargetListener;
+import java.awt.event.InputEvent;
+
+import java.io.IOException;
+import java.lang.reflect.InvocationTargetException;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
+
+import javax.swing.*;
+
+/**
+ * If dragGestureRecognized() takes a while to complete and if user performs a drag quickly,
+ * an exception is thrown from DropTargetListener.dragEnter when it calls
+ * DropTargetDragEvent.getTransferable().
+ * <p>
+ * This class introduces a delay in dragGestureRecognized() to cause the exception.
+ */
+public class bug8024061 {
+    private static final DataFlavor DropObjectFlavor;
+    private static final int DELAY = 1000;
+
+    private final DnDPanel panel1 = new DnDPanel(Color.yellow);
+    private final DnDPanel panel2 = new DnDPanel(Color.pink);
+    private final JFrame frame;
+
+    private static final CountDownLatch lock = new CountDownLatch(1);
+    private static volatile Exception dragEnterException = null;
+
+    static {
+        DataFlavor flavor = null;
+        try {
+            flavor = new DataFlavor(DataFlavor.javaJVMLocalObjectMimeType);
+        } catch (ClassNotFoundException e) {
+            e.printStackTrace();
+        }
+        DropObjectFlavor = flavor;
+    }
+
+    bug8024061() {
+        frame = new JFrame("DnDWithRobot");
+        frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
+
+        Dimension d = new Dimension(100, 100);
+
+        panel1.setPreferredSize(d);
+        panel2.setPreferredSize(d);
+
+        Container content = frame.getContentPane();
+        content.setLayout(new GridLayout(1, 2, 5, 5));
+        content.add(panel1);
+        content.add(panel2);
+
+        frame.pack();
+
+        DropObject drop = new DropObject();
+        drop.place(panel1, new Point(10, 10));
+        frame.setVisible(true);
+    }
+
+    public static void main(String[] args) throws AWTException, InvocationTargetException, InterruptedException {
+        OSType type = OSInfo.getOSType();
+        if (type != OSType.LINUX && type != OSType.SOLARIS) {
+            System.out.println("This test is for Linux and Solaris only... " +
+                               "skipping!");
+            return;
+        }
+
+        final bug8024061[] dnd = {null};
+        SwingUtilities.invokeAndWait(new Runnable() {
+            @Override
+            public void run() {
+                dnd[0] = new bug8024061();
+            }
+        });
+        final Robot robot = new Robot();
+        robot.setAutoDelay(10);
+        SunToolkit toolkit = (SunToolkit) Toolkit.getDefaultToolkit();
+        toolkit.realSync();
+
+        JFrame frame = dnd[0].frame;
+        Point point = frame.getLocationOnScreen();
+        Point here = new Point(point.x + 35, point.y + 45);
+        Point there = new Point(point.x + 120, point.y + 45);
+        here.x += 25;
+        robot.mouseMove(here.x, here.y);
+        robot.mousePress(InputEvent.BUTTON1_MASK);
+        while (here.x < there.x) {
+            here.x += 20;
+            robot.mouseMove(here.x, here.y);
+            System.out.println("x = " + here.x);
+        }
+        robot.mouseRelease(InputEvent.BUTTON1_MASK);
+        toolkit.realSync();
+        robot.mousePress(InputEvent.BUTTON1_MASK);
+        robot.mouseRelease(InputEvent.BUTTON1_MASK);
+        System.out.println("finished");
+
+        try {
+            if (lock.await(5, TimeUnit.SECONDS)) {
+                if (dragEnterException == null) {
+                    System.out.println("Test passed.");
+                } else {
+                    System.out.println("Test failed.");
+                    dragEnterException.printStackTrace();
+                    throw new RuntimeException(dragEnterException);
+                }
+            } else {
+                System.out.println("Test failed. Timeout reached");
+                throw new RuntimeException("Timed out waiting for dragEnter()");
+            }
+        } finally {
+            frame.dispose();
+        }
+    }
+
+    class DropObject implements Transferable {
+        DnDPanel panel;
+        Color color = Color.CYAN;
+        int width = 50;
+        int height = 50;
+        int x;
+        int y;
+
+        void draw(Graphics2D g) {
+            Color savedColor = g.getColor();
+            g.setColor(color);
+            g.fillRect(x, y, width, height);
+            g.setColor(Color.lightGray);
+            g.drawRect(x, y, width, height);
+            g.setColor(savedColor);
+        }
+
+        boolean contains(int x, int y) {
+            return (x > this.x && x < this.x + width)
+                    && (y > this.y && y < this.y + height);
+        }
+
+        @Override
+        public DataFlavor[] getTransferDataFlavors() {
+            return new DataFlavor[]{DropObjectFlavor};
+        }
+
+        void place(DnDPanel panel, Point location) {
+            if (panel != this.panel) {
+                x = location.x;
+                y = location.y;
+                if (this.panel != null) {
+                    this.panel.setDropObject(null);
+                    this.panel.repaint();
+                }
+                this.panel = panel;
+                this.panel.setDropObject(this);
+                this.panel.repaint();
+            }
+        }
+
+        @Override
+        public boolean isDataFlavorSupported(DataFlavor flavor) {
+            return DropObjectFlavor.equals(flavor);
+        }
+
+        @Override
+        public Object getTransferData(DataFlavor flavor)
+                throws UnsupportedFlavorException, IOException {
+            if (isDataFlavorSupported(flavor)) {
+                return this;
+            } else {
+                throw new UnsupportedFlavorException(flavor);
+            }
+        }
+    }
+
+    class DnDPanel extends JPanel {
+        DropObject dropObject;
+        final DragSource dragSource;
+        final DropTarget dropTarget;
+        final Color color;
+        final DragGestureListener dgListener;
+        final DragSourceListener dsListener;
+        final DropTargetListener dtListener;
+
+        DnDPanel(Color color) {
+            this.color = color;
+            this.dragSource = DragSource.getDefaultDragSource();
+            dgListener = new DragGestureListener() {
+                @Override
+                public void dragGestureRecognized(DragGestureEvent dge) {
+                    Point location = dge.getDragOrigin();
+                    if (dropObject != null && dropObject.contains(location.x, location.y)) {
+                        dragSource.startDrag(dge, DragSource.DefaultCopyNoDrop, dropObject, dsListener);
+                        try {
+                            Thread.sleep(DELAY);
+                        } catch (InterruptedException e) {
+                        }
+                    }
+                }
+            };
+
+            dsListener = new DragSourceListener() {
+                @Override
+                public void dragEnter(DragSourceDragEvent dsde) {
+                }
+
+                @Override
+                public void dragOver(DragSourceDragEvent dsde) {
+                }
+
+                @Override
+                public void dropActionChanged(DragSourceDragEvent dsde) {
+                }
+
+                @Override
+                public void dragExit(DragSourceEvent dse) {
+                }
+
+                @Override
+                public void dragDropEnd(DragSourceDropEvent dsde) {
+                }
+            };
+
+            dtListener = new DropTargetListener() {
+                @Override
+                public void dragEnter(DropTargetDragEvent dtde) {
+                    if (dropObject != null) {
+                        dtde.rejectDrag();
+                        return;
+                    }
+                    dtde.acceptDrag(DnDConstants.ACTION_MOVE);
+                    try {
+                        Transferable t = dtde.getTransferable();
+                        Object data = t.getTransferData(DropObjectFlavor);
+                        if (data != null) {
+                            throw new Exception("getTransferData returned non-null");
+                        }
+                    } catch (Exception e) {
+                        dragEnterException = e;
+                        e.printStackTrace();
+                    } finally {
+                        lock.countDown();
+                    }
+                }
+
+                @Override
+                public void dragOver(DropTargetDragEvent dtde) {
+                    if (dropObject != null) {
+                        dtde.rejectDrag();
+                        return;
+                    }
+                    dtde.acceptDrag(DnDConstants.ACTION_MOVE);
+                }
+
+                @Override
+                public void dropActionChanged(DropTargetDragEvent dtde) {
+                }
+
+                @Override
+                public void dragExit(DropTargetEvent dte) {
+                }
+
+                @Override
+                public void drop(DropTargetDropEvent dtde) {
+                    if (dropObject != null) {
+                        dtde.rejectDrop();
+                        return;
+                    }
+                    try {
+                        dtde.acceptDrop(DnDConstants.ACTION_MOVE);
+                        Transferable t = dtde.getTransferable();
+                        DropObject dropObject = (DropObject) t.getTransferData(DropObjectFlavor);
+                        Point location = dtde.getLocation();
+                        dropObject.place(DnDPanel.this, location);
+                        dtde.dropComplete(true);
+                    } catch (Exception e) {
+                        e.printStackTrace();
+                    }
+
+                }
+            };
+
+            dragSource.createDefaultDragGestureRecognizer(this,
+                    DnDConstants.ACTION_MOVE, dgListener);
+
+            dropTarget = new DropTarget(this, DnDConstants.ACTION_MOVE, dtListener, true);
+
+        }
+
+        public void paintComponent(Graphics g) {
+            super.paintComponent(g);
+            Color savedColor = g.getColor();
+            g.setColor(color);
+            g.fillRect(0, 0, getWidth(), getHeight());
+            g.setColor(savedColor);
+            if (dropObject != null) {
+                dropObject.draw((Graphics2D) g);
+            }
+        }
+
+        void setDropObject(DropObject dropObject) {
+            this.dropObject = dropObject;
+        }
+
+        DropObject findDropObject(int x, int y) {
+            if (dropObject != null && dropObject.contains(x, y)) {
+                return dropObject;
+            }
+            return null;
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/sun/java2d/DrawXORModeTest.java	Thu Oct 02 08:31:59 2014 -0700
@@ -0,0 +1,110 @@
+/*
+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug     8036022
+ * @summary Test verifies that drawing shapes with XOR composite
+ *          does not trigger an InternalError in GDI surface data.
+ * @run main/othervm -Dsun.java2d.d3d=True DrawXORModeTest
+ */
+import java.awt.BasicStroke;
+import java.awt.Color;
+import java.awt.Component;
+import java.awt.Dimension;
+import java.awt.Frame;
+import java.awt.Graphics;
+import java.awt.Graphics2D;
+import java.awt.Stroke;
+import java.awt.geom.Line2D;
+import java.util.concurrent.CountDownLatch;
+
+public class DrawXORModeTest extends Component {
+
+    public static void main(String[] args) {
+        final DrawXORModeTest c = new DrawXORModeTest();
+
+        final Frame f = new Frame("XOR mode test");
+        f.add(c);
+        f.pack();
+
+        f.setVisible(true);
+
+        try {
+            c.checkResult();
+        } finally {
+            f.dispose();
+        }
+    }
+
+    @Override
+    public void paint(Graphics g) {
+        if (g == null || !(g instanceof Graphics2D)) {
+            return;
+        }
+        g.setColor(Color.white);
+        g.setXORMode(Color.black);
+        Graphics2D dg = (Graphics2D) g;
+        Stroke stroke = new BasicStroke(1, BasicStroke.CAP_BUTT,
+                BasicStroke.JOIN_MITER,
+                10.0f,
+                new float[]{1.0f, 1.0f},
+                0.0f);
+        dg.setStroke(stroke);
+        try {
+            dg.draw(new Line2D.Float(10, 10, 20, 20));
+        } catch (Throwable e) {
+            synchronized (this) {
+                theError = e;
+            }
+        } finally {
+            didDraw.countDown();
+        }
+    }
+
+    @Override
+    public Dimension getPreferredSize() {
+        return new Dimension(400, 100);
+    }
+
+    public void checkResult() {
+        try {
+            didDraw.await();
+        } catch (InterruptedException e) {
+        }
+
+        synchronized (this) {
+            if (theError != null) {
+                System.out.println("Error: " + theError);
+
+                throw new RuntimeException("Test FAILED.");
+            }
+        }
+        System.out.println("Test PASSED.");
+
+    }
+
+    private Throwable theError = null;
+
+    private final CountDownLatch didDraw = new CountDownLatch(1);
+}
--- a/test/sun/security/smartcardio/TestAll.java	Thu Sep 11 11:03:44 2014 -0700
+++ b/test/sun/security/smartcardio/TestAll.java	Thu Oct 02 08:31:59 2014 -0700
@@ -40,6 +40,7 @@
         TestMultiplePresent.class,
         TestPresent.class,
         TestTransmit.class,
+        TestDirect.class,
     };
 
     public static void main(String[] args) throws Exception {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/sun/security/smartcardio/TestDirect.java	Thu Oct 02 08:31:59 2014 -0700
@@ -0,0 +1,48 @@
+/*
+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * @test
+ * @bug 8046343
+ * @summary Make sure that direct protocol is available
+ * @run main/manual TestDirect
+ */
+
+// This test requires special hardware.
+
+import javax.smartcardio.Card;
+import javax.smartcardio.CardTerminal;
+import javax.smartcardio.CardTerminals;
+import javax.smartcardio.TerminalFactory;
+
+public class TestDirect {
+    public static void main(String[] args) throws Exception {
+        TerminalFactory terminalFactory = TerminalFactory.getDefault();
+        CardTerminals cardTerminals = terminalFactory.terminals();
+        CardTerminal cardTerminal = cardTerminals.list().get(0);
+        Card card = cardTerminal.connect("DIRECT");
+        card.disconnect(true);
+
+        System.out.println("OK.");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/sun/security/ssl/sanity/ciphersuites/CipherSuitesInOldOrder.java	Thu Oct 02 08:31:59 2014 -0700
@@ -0,0 +1,236 @@
+/*
+ * Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 7174244 8043200 8050158
+ * @summary NPE in Krb5ProxyImpl.getServerKeys()
+ *
+ *     SunJSSE does not support dynamic system properties, no way to re-use
+ *     system properties in samevm/agentvm mode.
+ * @run main/othervm -Djdk.tls.preserveRC4CipherSuites=true CipherSuitesInOldOrder
+ */
+
+import java.util.*;
+import javax.net.ssl.*;
+
+public class CipherSuitesInOldOrder {
+
+    // supported ciphersuites
+    private final static List<String> supportedCipherSuites =
+            Arrays.<String>asList(
+        "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384",
+        "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384",
+        "TLS_RSA_WITH_AES_256_CBC_SHA256",
+        "TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384",
+        "TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384",
+        "TLS_DHE_RSA_WITH_AES_256_CBC_SHA256",
+        "TLS_DHE_DSS_WITH_AES_256_CBC_SHA256",
+        "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA",
+        "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA",
+        "TLS_RSA_WITH_AES_256_CBC_SHA",
+        "TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA",
+        "TLS_ECDH_RSA_WITH_AES_256_CBC_SHA",
+        "TLS_DHE_RSA_WITH_AES_256_CBC_SHA",
+        "TLS_DHE_DSS_WITH_AES_256_CBC_SHA",
+        "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256",
+        "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256",
+        "TLS_RSA_WITH_AES_128_CBC_SHA256",
+        "TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256",
+        "TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256",
+        "TLS_DHE_RSA_WITH_AES_128_CBC_SHA256",
+        "TLS_DHE_DSS_WITH_AES_128_CBC_SHA256",
+        "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA",
+        "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA",
+        "TLS_RSA_WITH_AES_128_CBC_SHA",
+        "TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA",
+        "TLS_ECDH_RSA_WITH_AES_128_CBC_SHA",
+        "TLS_DHE_RSA_WITH_AES_128_CBC_SHA",
+        "TLS_DHE_DSS_WITH_AES_128_CBC_SHA",
+        "TLS_ECDHE_ECDSA_WITH_RC4_128_SHA",
+        "TLS_ECDHE_RSA_WITH_RC4_128_SHA",
+        "SSL_RSA_WITH_RC4_128_SHA",
+        "TLS_ECDH_ECDSA_WITH_RC4_128_SHA",
+        "TLS_ECDH_RSA_WITH_RC4_128_SHA",
+        "TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA",
+        "TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA",
+        "SSL_RSA_WITH_3DES_EDE_CBC_SHA",
+        "TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA",
+        "TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA",
+        "SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA",
+        "SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA",
+        "SSL_RSA_WITH_RC4_128_MD5",
+
+        "TLS_EMPTY_RENEGOTIATION_INFO_SCSV",
+
+        "TLS_DH_anon_WITH_AES_256_CBC_SHA256",
+        "TLS_ECDH_anon_WITH_AES_256_CBC_SHA",
+        "TLS_DH_anon_WITH_AES_256_CBC_SHA",
+        "TLS_DH_anon_WITH_AES_128_CBC_SHA256",
+        "TLS_ECDH_anon_WITH_AES_128_CBC_SHA",
+        "TLS_DH_anon_WITH_AES_128_CBC_SHA",
+        "TLS_ECDH_anon_WITH_RC4_128_SHA",
+        "SSL_DH_anon_WITH_RC4_128_MD5",
+        "TLS_ECDH_anon_WITH_3DES_EDE_CBC_SHA",
+        "SSL_DH_anon_WITH_3DES_EDE_CBC_SHA",
+        "TLS_RSA_WITH_NULL_SHA256",
+        "TLS_ECDHE_ECDSA_WITH_NULL_SHA",
+        "TLS_ECDHE_RSA_WITH_NULL_SHA",
+        "SSL_RSA_WITH_NULL_SHA",
+        "TLS_ECDH_ECDSA_WITH_NULL_SHA",
+        "TLS_ECDH_RSA_WITH_NULL_SHA",
+        "TLS_ECDH_anon_WITH_NULL_SHA",
+        "SSL_RSA_WITH_NULL_MD5",
+        "SSL_RSA_WITH_DES_CBC_SHA",
+        "SSL_DHE_RSA_WITH_DES_CBC_SHA",
+        "SSL_DHE_DSS_WITH_DES_CBC_SHA",
+        "SSL_DH_anon_WITH_DES_CBC_SHA",
+        "SSL_RSA_EXPORT_WITH_RC4_40_MD5",
+        "SSL_DH_anon_EXPORT_WITH_RC4_40_MD5",
+        "SSL_RSA_EXPORT_WITH_DES40_CBC_SHA",
+        "SSL_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA",
+        "SSL_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA",
+        "SSL_DH_anon_EXPORT_WITH_DES40_CBC_SHA",
+        "TLS_KRB5_WITH_RC4_128_SHA",
+        "TLS_KRB5_WITH_RC4_128_MD5",
+        "TLS_KRB5_WITH_3DES_EDE_CBC_SHA",
+        "TLS_KRB5_WITH_3DES_EDE_CBC_MD5",
+        "TLS_KRB5_WITH_DES_CBC_SHA",
+        "TLS_KRB5_WITH_DES_CBC_MD5",
+        "TLS_KRB5_EXPORT_WITH_RC4_40_SHA",
+        "TLS_KRB5_EXPORT_WITH_RC4_40_MD5",
+        "TLS_KRB5_EXPORT_WITH_DES_CBC_40_SHA",
+        "TLS_KRB5_EXPORT_WITH_DES_CBC_40_MD5"
+    );
+
+    private final static String[] protocols = {
+        "", "SSL", "TLS", "SSLv3", "TLSv1", "TLSv1.1", "TLSv1.2"
+    };
+
+
+    public static void main(String[] args) throws Exception {
+        // show all of the supported cipher suites
+        showSuites(supportedCipherSuites.toArray(new String[0]),
+                                "All supported cipher suites");
+
+        for (String protocol : protocols) {
+            System.out.println("//");
+            System.out.println("// " +
+                        "Testing for SSLContext of " + protocol);
+            System.out.println("//");
+            checkForProtocols(protocol);
+        }
+    }
+
+    public static void checkForProtocols(String protocol) throws Exception {
+        SSLContext context;
+        if (protocol.isEmpty()) {
+            context = SSLContext.getDefault();
+        } else {
+            context = SSLContext.getInstance(protocol);
+            context.init(null, null, null);
+        }
+
+        // check the order of default cipher suites of SSLContext
+        SSLParameters parameters = context.getDefaultSSLParameters();
+        checkSuites(parameters.getCipherSuites(),
+                "Default cipher suites in SSLContext");
+
+        // check the order of supported cipher suites of SSLContext
+        parameters = context.getSupportedSSLParameters();
+        checkSuites(parameters.getCipherSuites(),
+                "Supported cipher suites in SSLContext");
+
+
+        //
+        // Check the cipher suites order of SSLEngine
+        //
+        SSLEngine engine = context.createSSLEngine();
+
+        // check the order of endabled cipher suites
+        String[] ciphers = engine.getEnabledCipherSuites();
+        checkSuites(ciphers,
+                "Enabled cipher suites in SSLEngine");
+
+        // check the order of supported cipher suites
+        ciphers = engine.getSupportedCipherSuites();
+        checkSuites(ciphers,
+                "Supported cipher suites in SSLEngine");
+
+        //
+        // Check the cipher suites order of SSLSocket
+        //
+        SSLSocketFactory factory = context.getSocketFactory();
+        try (SSLSocket socket = (SSLSocket)factory.createSocket()) {
+
+            // check the order of endabled cipher suites
+            ciphers = socket.getEnabledCipherSuites();
+            checkSuites(ciphers,
+                "Enabled cipher suites in SSLSocket");
+
+            // check the order of supported cipher suites
+            ciphers = socket.getSupportedCipherSuites();
+            checkSuites(ciphers,
+                "Supported cipher suites in SSLSocket");
+        }
+
+        //
+        // Check the cipher suites order of SSLServerSocket
+        //
+        SSLServerSocketFactory serverFactory = context.getServerSocketFactory();
+        try (SSLServerSocket serverSocket =
+                (SSLServerSocket)serverFactory.createServerSocket()) {
+            // check the order of endabled cipher suites
+            ciphers = serverSocket.getEnabledCipherSuites();
+            checkSuites(ciphers,
+                "Enabled cipher suites in SSLServerSocket");
+
+            // check the order of supported cipher suites
+            ciphers = serverSocket.getSupportedCipherSuites();
+            checkSuites(ciphers,
+                "Supported cipher suites in SSLServerSocket");
+        }
+    }
+
+    private static void checkSuites(String[] suites, String title) {
+        showSuites(suites, title);
+
+        int loc = -1;
+        int index = 0;
+        for (String suite : suites) {
+            index = supportedCipherSuites.indexOf(suite);
+            if (index <= loc) {
+                throw new RuntimeException(suite + " is not in order");
+            }
+
+            loc = index;
+        }
+    }
+
+    private static void showSuites(String[] suites, String title) {
+        System.out.println(title + "[" + suites.length + "]:");
+        for (String suite : suites) {
+            System.out.println("  " + suite);
+        }
+    }
+}
--- a/test/sun/security/ssl/sanity/ciphersuites/CipherSuitesInOrder.java	Thu Sep 11 11:03:44 2014 -0700
+++ b/test/sun/security/ssl/sanity/ciphersuites/CipherSuitesInOrder.java	Thu Oct 02 08:31:59 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug 7174244
+ * @bug 7174244 8043200
  * @summary NPE in Krb5ProxyImpl.getServerKeys()
  *
  *     SunJSSE does not support dynamic system properties, no way to re-use
@@ -67,11 +67,6 @@
         "TLS_ECDH_RSA_WITH_AES_128_CBC_SHA",
         "TLS_DHE_RSA_WITH_AES_128_CBC_SHA",
         "TLS_DHE_DSS_WITH_AES_128_CBC_SHA",
-        "TLS_ECDHE_ECDSA_WITH_RC4_128_SHA",
-        "TLS_ECDHE_RSA_WITH_RC4_128_SHA",
-        "SSL_RSA_WITH_RC4_128_SHA",
-        "TLS_ECDH_ECDSA_WITH_RC4_128_SHA",
-        "TLS_ECDH_RSA_WITH_RC4_128_SHA",
         "TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA",
         "TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA",
         "SSL_RSA_WITH_3DES_EDE_CBC_SHA",
@@ -79,6 +74,11 @@
         "TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA",
         "SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA",
         "SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA",
+        "TLS_ECDHE_ECDSA_WITH_RC4_128_SHA",
+        "TLS_ECDHE_RSA_WITH_RC4_128_SHA",
+        "SSL_RSA_WITH_RC4_128_SHA",
+        "TLS_ECDH_ECDSA_WITH_RC4_128_SHA",
+        "TLS_ECDH_RSA_WITH_RC4_128_SHA",
         "SSL_RSA_WITH_RC4_128_MD5",
 
         "TLS_EMPTY_RENEGOTIATION_INFO_SCSV",
@@ -89,18 +89,10 @@
         "TLS_DH_anon_WITH_AES_128_CBC_SHA256",
         "TLS_ECDH_anon_WITH_AES_128_CBC_SHA",
         "TLS_DH_anon_WITH_AES_128_CBC_SHA",
-        "TLS_ECDH_anon_WITH_RC4_128_SHA",
-        "SSL_DH_anon_WITH_RC4_128_MD5",
         "TLS_ECDH_anon_WITH_3DES_EDE_CBC_SHA",
         "SSL_DH_anon_WITH_3DES_EDE_CBC_SHA",
-        "TLS_RSA_WITH_NULL_SHA256",
-        "TLS_ECDHE_ECDSA_WITH_NULL_SHA",
-        "TLS_ECDHE_RSA_WITH_NULL_SHA",
-        "SSL_RSA_WITH_NULL_SHA",
-        "TLS_ECDH_ECDSA_WITH_NULL_SHA",
-        "TLS_ECDH_RSA_WITH_NULL_SHA",
-        "TLS_ECDH_anon_WITH_NULL_SHA",
-        "SSL_RSA_WITH_NULL_MD5",
+        "TLS_ECDH_anon_WITH_RC4_128_SHA",
+        "SSL_DH_anon_WITH_RC4_128_MD5",
         "SSL_RSA_WITH_DES_CBC_SHA",
         "SSL_DHE_RSA_WITH_DES_CBC_SHA",
         "SSL_DHE_DSS_WITH_DES_CBC_SHA",
@@ -111,16 +103,24 @@
         "SSL_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA",
         "SSL_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA",
         "SSL_DH_anon_EXPORT_WITH_DES40_CBC_SHA",
-        "TLS_KRB5_WITH_RC4_128_SHA",
-        "TLS_KRB5_WITH_RC4_128_MD5",
+        "TLS_RSA_WITH_NULL_SHA256",
+        "TLS_ECDHE_ECDSA_WITH_NULL_SHA",
+        "TLS_ECDHE_RSA_WITH_NULL_SHA",
+        "SSL_RSA_WITH_NULL_SHA",
+        "TLS_ECDH_ECDSA_WITH_NULL_SHA",
+        "TLS_ECDH_RSA_WITH_NULL_SHA",
+        "TLS_ECDH_anon_WITH_NULL_SHA",
+        "SSL_RSA_WITH_NULL_MD5",
         "TLS_KRB5_WITH_3DES_EDE_CBC_SHA",
         "TLS_KRB5_WITH_3DES_EDE_CBC_MD5",
+        "TLS_KRB5_WITH_RC4_128_SHA",
+        "TLS_KRB5_WITH_RC4_128_MD5",
         "TLS_KRB5_WITH_DES_CBC_SHA",
         "TLS_KRB5_WITH_DES_CBC_MD5",
+        "TLS_KRB5_EXPORT_WITH_DES_CBC_40_SHA",
+        "TLS_KRB5_EXPORT_WITH_DES_CBC_40_MD5",
         "TLS_KRB5_EXPORT_WITH_RC4_40_SHA",
-        "TLS_KRB5_EXPORT_WITH_RC4_40_MD5",
-        "TLS_KRB5_EXPORT_WITH_DES_CBC_40_SHA",
-        "TLS_KRB5_EXPORT_WITH_DES_CBC_40_MD5"
+        "TLS_KRB5_EXPORT_WITH_RC4_40_MD5"
     );
 
     private final static String[] protocols = {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/sun/security/tools/jarsigner/certpolicy.sh	Thu Oct 02 08:31:59 2014 -0700
@@ -0,0 +1,79 @@
+#
+# Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+# @test
+# @bug 8036709
+# @summary Java 7 jarsigner displays warning about cert policy tree
+#
+# @run shell certpolicy.sh
+#
+
+if [ "${TESTJAVA}" = "" ] ; then
+  JAVAC_CMD=`which javac`
+  TESTJAVA=`dirname $JAVAC_CMD`/..
+fi
+
+KT="$TESTJAVA/bin/keytool $TESTTOOLVMOPTS \
+        -keypass changeit -storepass changeit -keystore ks -keyalg rsa"
+JS="$TESTJAVA/bin/jarsigner $TESTTOOLVMOPTS -storepass changeit -keystore ks"
+JAR="$TESTJAVA/bin/jar $TESTTOOLVMOPTS"
+
+rm ks 2> /dev/null
+$KT -genkeypair -alias ca -dname CN=CA -ext bc
+$KT -genkeypair -alias int -dname CN=Int
+$KT -genkeypair -alias ee -dname CN=EE
+
+# CertificatePolicies [[PolicyId: [1.2.3]], [PolicyId: [1.2.4]]]
+# PolicyConstraints: [Require: 0; Inhibit: unspecified]
+$KT -certreq -alias int | \
+        $KT -gencert -rfc -alias ca \
+                -ext 2.5.29.32="30 0C 30 04 06 02 2A 03 30 04 06 02 2A 04" \
+                -ext "2.5.29.36=30 03 80 01 00" -ext bc | \
+        $KT -import -alias int
+
+# CertificatePolicies [[PolicyId: [1.2.3]]]
+$KT -certreq -alias ee | \
+        $KT -gencert -rfc -alias int \
+                -ext 2.5.29.32="30 06 30 04 06 02 2A 03" | \
+        $KT -import -alias ee
+
+$KT -export -alias ee -rfc > cc
+$KT -export -alias int -rfc >> cc
+$KT -export -alias ca -rfc >> cc
+
+$KT -delete -alias int
+
+ERR=''
+$JAR cvf a.jar cc
+
+# Make sure the certchain in the signed jar contains all 3 certs
+$JS -strict -certchain cc a.jar ee -debug || ERR="sign"
+$JS -strict -verify a.jar -debug || ERR="$ERR verify"
+
+if [ "$ERR" = "" ]; then
+    echo "Success"
+    exit 0
+else
+    echo "Failed: $ERR"
+    exit 1
+fi
--- a/test/sun/util/resources/TimeZone/Bug6317929.java	Thu Sep 11 11:03:44 2014 -0700
+++ b/test/sun/util/resources/TimeZone/Bug6317929.java	Thu Oct 02 08:31:59 2014 -0700
@@ -130,12 +130,12 @@
                                        "(New South Wales)\"");
         tzLocale = locales2Test[1];
         if (!Currie.getDisplayName(false, TimeZone.LONG, tzLocale).equals
-           ("Eastern Normalzeit (Neus\u00fcdwales)"))
+           ("\u00D6stliche Normalzeit (New South Wales)"))
             throw new RuntimeException("\n" + tzLocale + ": LONG, " +
                                        "non-daylight saving name for " +
                                        "Australia/Currie should be " +
-                                       "\"Eastern Normalzeit " +
-                                       "(Neus\u00fcdwales)\"");
+                                       "\"\u00D6stliche Normalzeit " +
+                                       "(New South Wales)\"");
         tzLocale = locales2Test[2];
         if (!Currie.getDisplayName(false, TimeZone.LONG, tzLocale).equals
            ("Hora est\u00e1ndar Oriental (Nueva Gales del Sur)"))