changeset 8145:96975039c113

Merge jdk7u75-b31
author andrew
date Tue, 27 Jan 2015 00:46:23 +0000
parents e445e197507e (current diff) cc9469a82088 (diff)
children e1bfd77b6e1a
files .hgtags make/common/Defs-linux.gmk make/tools/src/build/tools/generatecurrencydata/GenerateCurrencyData.java src/share/classes/com/sun/jndi/ldap/Connection.java src/share/classes/java/awt/Component.java src/share/classes/java/util/CurrencyData.properties src/share/classes/javax/swing/JComponent.java src/share/classes/sun/awt/dnd/SunDropTargetContextPeer.java src/share/classes/sun/java2d/SunGraphics2D.java src/share/classes/sun/net/www/protocol/http/HttpURLConnection.java src/share/classes/sun/security/krb5/internal/ccache/FileCredentialsCache.java src/share/classes/sun/security/provider/certpath/PKIXCertPathValidator.java src/share/classes/sun/security/ssl/SSLEngineImpl.java src/share/classes/sun/security/ssl/SSLSocketImpl.java src/share/classes/sun/security/ssl/ServerHandshaker.java src/share/lib/security/java.security-linux src/share/lib/security/java.security-macosx src/share/lib/security/java.security-solaris src/share/lib/security/java.security-windows src/solaris/classes/sun/awt/X11/XWindow.java src/solaris/native/java/net/NetworkInterface.c src/solaris/native/java/net/PlainDatagramSocketImpl.c src/solaris/native/sun/security/smartcardio/pcsc_md.c
diffstat 58 files changed, 3108 insertions(+), 166 deletions(-) [+]
line wrap: on
line diff
--- a/.hgtags	Wed Jan 21 03:56:42 2015 +0000
+++ b/.hgtags	Tue Jan 27 00:46:23 2015 +0000
@@ -489,6 +489,11 @@
 ba6cef21c369076be97dd8133fd4a158cd486bd8 jdk7u65-b40
 7b47a34063e94e1ab5636b11231d33fae92754c9 jdk7u65-b31
 4cb63f8ca9ee8c60d6f3d0051b69acc8392bd8de jdk7u65-b33
+5cf343beab2ce73d299d4f1a8f3b95892f9fd818 jdk7u67-b01
+388d34a2e45c2660e7ede2a9d80949b14b5d8df9 jdk7u67-b31
+de2b809bb95904bfd5c2ad47cf0f41c97abd5750 jdk7u67-b32
+193d852a6dce1aaf47f1e6960e1c83936bd0e0a4 jdk7u67-b33
+d425e2aa1a6bcdf909c9ac7f690f3e87dcf6e3f6 jdk7u67-b34
 9ccfe70cee626ac7831cfa7b7a7eb7a88fe1cd42 jdk7u66-b00
 fc87b55d62fc1e81aaf61ff21175129b8ccc302e jdk7u66-b01
 c67e394e49429565540f04c5c2a5544f750658bb jdk7u66-b09
@@ -518,3 +523,35 @@
 cc61d8104f31598a00c2b0208c45ca1c52b0762b icedtea-2.5.4pre02
 4a7c0da7e219ed2d1df27608388951b3dcdff57b icedtea-2.5.4pre03
 1e6db4f8b0f3c654be5d87504122bf776a066ef8 icedtea-2.5.4
+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
+6ef59d24666e8af5428706fc32295a5d088a48c9 jdk7u72-b30
+550c9196d41b566e01f2d164a1b5e0aba9871f5e jdk7u72-b31
+87f9570ca734714f981d4a47477dcc6c80a7d324 jdk7u75-b00
+0fefa48e670a31015be985ba74e35841d0cc66c1 jdk7u75-b01
+e885a036cc5dc0f8fa07dc0a5f55647f819f3fc5 jdk7u75-b02
+4b81833e1c004460c78208c2529775a05f3abf80 jdk7u75-b03
+1964c973dcc1ddb30115b7c7b6183548b3adcdf5 jdk7u75-b04
+ec3e1e179298a41bc6b77a170e2da66efb0bae3b jdk7u75-b05
+e9596c6470c944ff19c5198cfeb7fd979aad9120 jdk7u75-b06
+e0afb6ec0633d18f360f074c5672fa4c2196ea39 jdk7u75-b07
+8268d82995af433655d3db9a51b549032c19537d jdk7u75-b08
+0a1fe04693dd9f65176c35dc0631652086795f01 jdk7u75-b09
+c43642c55cd483f1d270e9ce55b9721fc32f900c jdk7u75-b10
+7bac76091c46f667f69aa9e426c29cc8e3a2d861 jdk7u75-b11
+1a37584734ff241c0c4c4382f7870efedef7e706 jdk7u75-b12
+16043c4cefc3cc5d859d97434abbdf79a7a58e49 jdk7u75-b13
+3778e2621fc972f88ac8a247543ad63527e7d9cd jdk7u75-b30
--- a/make/common/Defs-linux.gmk	Wed Jan 21 03:56:42 2015 +0000
+++ b/make/common/Defs-linux.gmk	Tue Jan 27 00:46:23 2015 +0000
@@ -212,9 +212,9 @@
 CFLAGS_REQUIRED_s390    +=
 CFLAGS_REQUIRED_s390x   += -m64
 CFLAGS_REQUIRED_sh      += -mieee
-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
 ifeq ($(ZERO_BUILD), true)
   CFLAGS_REQUIRED       =  $(ZERO_ARCHFLAG)
--- a/make/tools/src/build/tools/generatecurrencydata/GenerateCurrencyData.java	Wed Jan 21 03:56:42 2015 +0000
+++ b/make/tools/src/build/tools/generatecurrencydata/GenerateCurrencyData.java	Tue Jan 27 00:46:23 2015 +0000
@@ -281,8 +281,8 @@
             checkCurrencyCode(newCurrency);
             String timeString = currencyInfo.substring(4, length - 4);
             long time = format.parse(timeString).getTime();
-            if (Math.abs(time - System.currentTimeMillis()) > ((long) 10) * 365 * 24 * 60 * 60 * 1000) {
-                throw new RuntimeException("time is more than 10 years from present: " + time);
+            if (Math.abs(time - System.currentTimeMillis()) > ((long) 20) * 365 * 24 * 60 * 60 * 1000) {
+                throw new RuntimeException("time is more than 10 years from present: " + time + " " + timeString + " " + currencyInfo);
             }
             specialCaseCutOverTimes[specialCaseCount] = time;
             specialCaseOldCurrencies[specialCaseCount] = oldCurrency;
--- a/src/macosx/classes/sun/lwawt/LWWindowPeer.java	Wed Jan 21 03:56:42 2015 +0000
+++ b/src/macosx/classes/sun/lwawt/LWWindowPeer.java	Tue Jan 27 00:46:23 2015 +0000
@@ -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	Wed Jan 21 03:56:42 2015 +0000
+++ b/src/macosx/classes/sun/lwawt/macosx/CEmbeddedFrame.java	Tue Jan 27 00:46:23 2015 +0000
@@ -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	Wed Jan 21 03:56:42 2015 +0000
+++ b/src/macosx/classes/sun/lwawt/macosx/CPlatformResponder.java	Tue Jan 27 00:46:23 2015 +0000
@@ -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	Wed Jan 21 03:56:42 2015 +0000
+++ b/src/macosx/classes/sun/lwawt/macosx/CPlatformView.java	Tue Jan 27 00:46:23 2015 +0000
@@ -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	Wed Jan 21 03:56:42 2015 +0000
+++ b/src/macosx/classes/sun/lwawt/macosx/event/NSEvent.java	Tue Jan 27 00:46:23 2015 +0000
@@ -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	Wed Jan 21 03:56:42 2015 +0000
+++ b/src/macosx/native/sun/awt/AWTView.m	Tue Jan 27 00:46:23 2015 +0000
@@ -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	Wed Jan 21 03:56:42 2015 +0000
+++ b/src/share/classes/com/sun/jndi/ldap/Connection.java	Tue Jan 27 00:46:23 2015 +0000
@@ -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/java/beans/XMLEncoder.java	Wed Jan 21 03:56:42 2015 +0000
+++ b/src/share/classes/java/beans/XMLEncoder.java	Tue Jan 27 00:46:23 2015 +0000
@@ -377,7 +377,7 @@
             Object arg = args[i];
             mark(arg, true);
         }
-        mark(stm.getTarget(), false);
+        mark(stm.getTarget(), stm instanceof Expression);
     }
 
 
--- a/src/share/classes/javax/accessibility/AccessibleContext.java	Wed Jan 21 03:56:42 2015 +0000
+++ b/src/share/classes/javax/accessibility/AccessibleContext.java	Tue Jan 27 00:46:23 2015 +0000
@@ -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	Wed Jan 21 03:56:42 2015 +0000
+++ b/src/share/classes/javax/swing/JComboBox.java	Tue Jan 27 00:46:23 2015 +0000
@@ -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	Wed Jan 21 03:56:42 2015 +0000
+++ b/src/share/classes/javax/swing/JComponent.java	Tue Jan 27 00:46:23 2015 +0000
@@ -3981,6 +3981,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	Wed Jan 21 03:56:42 2015 +0000
+++ b/src/share/classes/javax/swing/JTable.java	Tue Jan 27 00:46:23 2015 +0000
@@ -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	Wed Jan 21 03:56:42 2015 +0000
+++ b/src/share/classes/javax/swing/JTree.java	Tue Jan 27 00:46:23 2015 +0000
@@ -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	Wed Jan 21 03:56:42 2015 +0000
+++ b/src/share/classes/javax/swing/text/html/parser/Parser.java	Tue Jan 27 00:46:23 2015 +0000
@@ -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	Wed Jan 21 03:56:42 2015 +0000
+++ b/src/share/classes/sun/awt/AWTAccessor.java	Tue Jan 27 00:46:23 2015 +0000
@@ -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	Wed Jan 21 03:56:42 2015 +0000
+++ b/src/share/classes/sun/awt/AppContext.java	Tue Jan 27 00:46:23 2015 +0000
@@ -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	Wed Jan 21 03:56:42 2015 +0000
+++ b/src/share/classes/sun/awt/dnd/SunDropTargetContextPeer.java	Tue Jan 27 00:46:23 2015 +0000
@@ -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	Wed Jan 21 03:56:42 2015 +0000
+++ b/src/share/classes/sun/java2d/SunGraphics2D.java	Tue Jan 27 00:46:23 2015 +0000
@@ -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	Wed Jan 21 03:56:42 2015 +0000
+++ b/src/share/classes/sun/security/provider/SecureRandom.java	Tue Jan 27 00:46:23 2015 +0000
@@ -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/provider/certpath/PKIXCertPathValidator.java	Wed Jan 21 03:56:42 2015 +0000
+++ b/src/share/classes/sun/security/provider/certpath/PKIXCertPathValidator.java	Tue Jan 27 00:46:23 2015 +0000
@@ -234,10 +234,6 @@
         // check trusted certificate's subject
         issuerSelector.setSubject(firstCert.getIssuerX500Principal());
 
-        // check the validity period
-        issuerSelector.setValidityPeriod(firstCert.getNotBefore(),
-                                                firstCert.getNotAfter());
-
         /*
          * Facilitate certification path construction with authority
          * key identifier and subject key identifier.
--- a/src/share/classes/sun/security/ssl/CipherSuite.java	Wed Jan 21 03:56:42 2015 +0000
+++ b/src/share/classes/sun/security/ssl/CipherSuite.java	Tue Jan 27 00:46:23 2015 +0000
@@ -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	Wed Jan 21 03:56:42 2015 +0000
+++ b/src/share/classes/sun/security/tools/JarSigner.java	Tue Jan 27 00:46:23 2015 +0000
@@ -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/instrument/Reentrancy.c	Wed Jan 21 03:56:42 2015 +0000
+++ b/src/share/instrument/Reentrancy.c	Tue Jan 27 00:46:23 2015 +0000
@@ -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	Wed Jan 21 03:56:42 2015 +0000
+++ b/src/share/native/sun/security/smartcardio/pcsc.c	Tue Jan 27 00:46:23 2015 +0000
@@ -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	Wed Jan 21 03:56:42 2015 +0000
+++ b/src/solaris/classes/sun/awt/X11/XWindow.java	Tue Jan 27 00:46:23 2015 +0000
@@ -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	Wed Jan 21 03:56:42 2015 +0000
+++ b/src/solaris/native/sun/security/smartcardio/MUSCLE/pcsclite.h	Tue Jan 27 00:46:23 2015 +0000
@@ -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	Wed Jan 21 03:56:42 2015 +0000
+++ b/src/solaris/native/sun/security/smartcardio/pcsc_md.c	Tue Jan 27 00:46:23 2015 +0000
@@ -110,6 +110,10 @@
     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__
 #endif
 }
--- a/test/com/sun/jndi/ldap/LdapTimeoutTest.java	Wed Jan 21 03:56:42 2015 +0000
+++ b/test/com/sun/jndi/ldap/LdapTimeoutTest.java	Tue Jan 27 00:46:23 2015 +0000
@@ -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	Tue Jan 27 00:46:23 2015 +0000
@@ -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	Tue Jan 27 00:46:23 2015 +0000
@@ -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	Wed Jan 21 03:56:42 2015 +0000
+++ b/test/java/awt/Window/Grab/GrabTest.java	Tue Jan 27 00:46:23 2015 +0000
@@ -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/beans/XMLEncoder/Test8016545.java	Tue Jan 27 00:46:23 2015 +0000
@@ -0,0 +1,106 @@
+/*
+ * 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 8016545
+ * @summary Tests beans with predefined fields
+ * @author Sergey Malenkov
+ */
+
+public class Test8016545 extends AbstractTest {
+    public static void main(String[] args) {
+        new Test8016545().test(true);
+    }
+
+    @Override
+    protected Object getObject() {
+        Bean bean = new Bean();
+        bean.setUndefined(Boolean.FALSE);
+        Info info = new Info();
+        info.setEnabled(Boolean.TRUE);
+        info.setID(1);
+        bean.setInfo(info);
+        return bean;
+    }
+
+    @Override
+    protected Object getAnotherObject() {
+        Bean bean = new Bean();
+        bean.setUndefined(Boolean.TRUE);
+        bean.getInfo().setEnabled(Boolean.FALSE);
+        bean.getInfo().setID(2);
+        return bean;
+    }
+
+    public static class Bean {
+        private Info info = new Info(); // predefined
+        private Boolean defined = Boolean.TRUE;
+        private Boolean undefined;
+
+        public Info getInfo() {
+            return this.info;
+        }
+
+        public void setInfo(Info info) {
+            this.info = info;
+        }
+
+        public Boolean getDefined() {
+            return this.defined;
+        }
+
+        public void setDefined(Boolean defined) {
+            this.defined = defined;
+        }
+
+        public Boolean getUndefined() {
+            return this.undefined;
+        }
+
+        public void setUndefined(Boolean undefined) {
+            this.undefined = undefined;
+        }
+    }
+
+    public static class Info {
+        private Integer id;
+        private Boolean enabled;
+
+        public Integer getID() {
+            return this.id;
+        }
+
+        public void setID(Integer id) {
+            this.id = id;
+        }
+
+        public Boolean getEnabled() {
+            return this.enabled;
+        }
+
+        public void setEnabled(Boolean enabled) {
+            this.enabled = enabled;
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/lang/instrument/DaemonThread/DummyAgent.java	Tue Jan 27 00:46:23 2015 +0000
@@ -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	Tue Jan 27 00:46:23 2015 +0000
@@ -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	Tue Jan 27 00:46:23 2015 +0000
@@ -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	Tue Jan 27 00:46:23 2015 +0000
@@ -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	Tue Jan 27 00:46:23 2015 +0000
@@ -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/JFileChooser/8062561/bug8062561.java	Tue Jan 27 00:46:23 2015 +0000
@@ -0,0 +1,213 @@
+/*
+ * 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.awt.Robot;
+import java.awt.event.KeyEvent;
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.PrintWriter;
+import java.util.concurrent.TimeUnit;
+import javax.swing.JFileChooser;
+import javax.swing.SwingUtilities;
+import javax.swing.filechooser.FileSystemView;
+
+/**
+ * @test
+ * @bug 8062561
+ * @summary File system view returns null default directory
+ * @run main/othervm bug8062561 GENERATE_POLICY
+ * @run main/othervm/policy=security.policy bug8062561 CHECK_DEFAULT_DIR run
+ */
+public class bug8062561 {
+
+    private static final String POLICY_FILE = "security2.policy";
+    private static volatile boolean fileChooserIsShown = false;
+
+    public static void main(String[] args) throws Exception {
+
+        String test = args[0];
+
+        if ("GENERATE_POLICY".equals(test)) {
+            generatePolicyFile();
+        } else if ("CHECK_DEFAULT_DIR".equals(test)) {
+            checkDefaultDirectory();
+        } else if ("CHECK_FILE_CHOOSER".equals(test)) {
+            checkFileChooser();
+        } else {
+            throw new RuntimeException("Wrong argument!");
+        }
+    }
+
+    private static void checkDefaultDirectory() {
+        if (System.getSecurityManager() == null) {
+            throw new RuntimeException("Security manager is not set!");
+        }
+
+        File defaultDirectory = FileSystemView.getFileSystemView().
+                getDefaultDirectory();
+        if (defaultDirectory != null) {
+            throw new RuntimeException("File system default directory is null!");
+        }
+    }
+    private static volatile JFileChooser fileChooser;
+
+    private static void checkFileChooser() throws Exception {
+        if (System.getSecurityManager() == null) {
+            throw new RuntimeException("Security manager is not set!");
+        }
+
+        Robot robot = new Robot();
+        robot.setAutoDelay(50);
+
+        SwingUtilities.invokeLater(new Runnable() {
+
+            public void run() {
+                fileChooser = new JFileChooser();
+                fileChooser.showOpenDialog(null);
+                fileChooserIsShown = true;
+                System.out.println("Start file chooser: " + fileChooserIsShown);
+            }
+        });
+
+        long time = System.currentTimeMillis();
+        while (fileChooser == null) {
+            if (System.currentTimeMillis() - time >= 5000) {
+                System.exit(1);
+            }
+            Thread.sleep(500);
+        }
+
+        Thread.sleep(500);
+        robot.keyPress(KeyEvent.VK_ESCAPE);
+        robot.keyRelease(KeyEvent.VK_ESCAPE);
+        System.exit(0);
+    }
+
+    private static void generatePolicyFile() throws Exception {
+        if (System.getSecurityManager() != null) {
+            throw new RuntimeException("Security manager should be null!");
+        }
+
+        String osName = System.getProperty("os.name");
+        System.out.println("os name: " + osName);
+        if (!osName.startsWith("Windows")) {
+            return;
+        }
+        System.out.println("after OS Check!");
+
+        File defaultDirectory = FileSystemView.getFileSystemView().
+                getDefaultDirectory();
+
+        if (defaultDirectory == null) {
+            throw new RuntimeException("Default directory is null!");
+        }
+
+        File policyFile = new File(POLICY_FILE);
+        if (!policyFile.exists()) {
+            policyFile.createNewFile();
+        }
+
+        PrintWriter writer = new PrintWriter(policyFile, "UTF-8");
+        writer.println("grant {");
+        String documents = defaultDirectory.getCanonicalPath();
+        documents = documents.replace('\\', '/');
+        // user.dir permission
+        writer.print("  permission java.util.PropertyPermission");
+        writer.print(" \"user.dir\",");
+        writer.println(" \"read\";");
+        // Documents permission
+        writer.print("  permission java.io.FilePermission");
+        writer.print(" \"" + documents + "\",");
+        writer.println(" \"read\";");
+        // Desktop permission
+        writer.print("  permission java.io.FilePermission");
+        writer.print(" \"" + documents.replace("Documents", "Desktop") + "\",");
+        writer.println(" \"read\";");
+        // robot permission // "java.awt.AWTPermission" "createRobot"
+        writer.print("  permission java.awt.AWTPermission");
+        writer.println(" \"createRobot\";");
+        writer.println("};");
+        writer.close();
+
+        performTest();
+    }
+
+    private static void performTest() throws Exception {
+        String javaPath = System.getProperty("java.home", "");
+        String command = javaPath + File.separator + "bin" + File.separator + "java"
+                + "  -Djava.security.manager -Djava.security.policy=" + POLICY_FILE
+                + " bug8062561 CHECK_FILE_CHOOSER";
+        System.out.println(command);
+        int processExit = 0;
+
+        Process process = Runtime.getRuntime().exec(command);
+
+        try {
+            processExit = process.waitFor();
+        } catch (IllegalThreadStateException e) {
+            throw new RuntimeException(e);
+        }
+        System.out.println("[RESULT] : "
+                + "The sub process has cleanly exited : PASS");
+
+        InputStream errorStream = process.getErrorStream();
+        System.out.println("========= Child process stderr ========");
+        boolean exception = dumpStream(errorStream);
+        if (exception) {
+            throw new RuntimeException("[RESULT] :"
+                    + " Exception in child process : FAIL");
+        }
+        System.out.println("=======================================");
+
+        InputStream processInputStream = process.getInputStream();
+        System.out.println("========= Child process output ========");
+        dumpStream(processInputStream);
+        System.out.println("=======================================");
+
+        if (processExit != 0) {
+            System.out.println("process exit: " + processExit);
+            process.destroy();
+            throw new RuntimeException("[RESULT] : "
+                    + "The sub process has not exited : FAIL");
+        }
+    }
+
+    public static boolean dumpStream(InputStream in) throws IOException {
+        String tempString;
+        int count = in.available();
+        boolean exception = false;
+        while (count > 0) {
+            byte[] b = new byte[count];
+            in.read(b);
+            tempString = new String(b);
+            if (!exception) {
+                exception = tempString.indexOf("Exception") != -1;
+            }
+            System.out.println(tempString);
+            count = in.available();
+        }
+
+        return exception;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/javax/swing/JFileChooser/8062561/security.policy	Tue Jan 27 00:46:23 2015 +0000
@@ -0,0 +1,5 @@
+grant {
+
+    permission java.util.PropertyPermission  "user.home", "read";
+    permission java.util.PropertyPermission  "user.dir",  "read";
+};
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/javax/swing/JFileChooser/8062561/security2.policy	Tue Jan 27 00:46:23 2015 +0000
@@ -0,0 +1,1 @@
+// Autogenerated file
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/javax/swing/JTable/8032874/bug8032874.java	Tue Jan 27 00:46:23 2015 +0000
@@ -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	Tue Jan 27 00:46:23 2015 +0000
@@ -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	Tue Jan 27 00:46:23 2015 +0000
@@ -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	Tue Jan 27 00:46:23 2015 +0000
@@ -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	Tue Jan 27 00:46:23 2015 +0000
@@ -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	Tue Jan 27 00:46:23 2015 +0000
@@ -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	Tue Jan 27 00:46:23 2015 +0000
@@ -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	Tue Jan 27 00:46:23 2015 +0000
@@ -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	Tue Jan 27 00:46:23 2015 +0000
@@ -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	Tue Jan 27 00:46:23 2015 +0000
@@ -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	Tue Jan 27 00:46:23 2015 +0000
@@ -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);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/sun/security/provider/certpath/PKIXCertPathValidator/Validity.java	Tue Jan 27 00:46:23 2015 +0000
@@ -0,0 +1,134 @@
+/*
+ * 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 8021804
+ * @summary CertPath should validate even if the validity period of the
+ *          root cert does not include the validity period of a subordinate
+ *          cert.
+ */
+
+import java.io.ByteArrayInputStream;
+import java.security.cert.*;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.HashSet;
+import java.util.Set;
+
+public class Validity {
+
+    /*
+     * Subject: OU=TestOrg, CN=TestCA
+     * Issuer: OU=TestOrg, CN=TestCA
+     * Validity
+     *     Not Before: Feb 26 21:33:55 2014 GMT
+           Not After : Feb 26 21:33:55 2024 GMT
+     * Version 1
+     */
+    static String CACertStr =
+        "-----BEGIN CERTIFICATE-----\n" +
+        "MIIBvTCCASYCCQCQRiTo4lBCFjANBgkqhkiG9w0BAQUFADAjMRAwDgYDVQQLDAdU\n" +
+        "ZXN0T3JnMQ8wDQYDVQQDDAZUZXN0Q0EwHhcNMTQwMjI2MjEzMzU1WhcNMjQwMjI2\n" +
+        "MjEzMzU1WjAjMRAwDgYDVQQLDAdUZXN0T3JnMQ8wDQYDVQQDDAZUZXN0Q0EwgZ8w\n" +
+        "DQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAOtKS4ZrsM3ansd61ZxitcrN0w184I+A\n" +
+        "z0kyrSP1eMtlam+cC2U91NpTz11FYV4XUfBhqqxaXW043AWTUer8pS90Pt4sCrUX\n" +
+        "COx1+QA1M3ZhbZ4sTM7XQ90JbGaBJ/sEza9mlQP7hQ2yQO/hATKbP6J5qvgG2sT2\n" +
+        "S2WYjEgwNwmFAgMBAAEwDQYJKoZIhvcNAQEFBQADgYEAQ/CXEpnx2WY4LJtv4jwE\n" +
+        "4jIVirur3pdzV5oBhPyqqHMsyhQBkukCfX7uD7L5wN1+xuM81DfANpIxlnUfybp5\n" +
+        "CpjcmktLpmyK4kJ6XnSd2blbLOIpsr9x6FqxPxpVDlyw/ySHYrIG/GZdsLHgmzGn\n" +
+        "B06jeYzH8OLf879VxAxSsPc=\n" +
+        "-----END CERTIFICATE-----";
+
+    /*
+     * Subject: OU=TestOrg, CN=TestEE0
+     * Issuer: OU=TestOrg, CN=TestCA
+     * Validity
+     *     Not Before: Feb 26 22:55:12 2014 GMT
+     *     Not After : Feb 25 22:55:12 2025 GMT
+     * Version 1
+     */
+    static String EECertStr =
+        "-----BEGIN CERTIFICATE-----\n" +
+        "MIIBtjCCAR8CAQQwDQYJKoZIhvcNAQEFBQAwIzEQMA4GA1UECwwHVGVzdE9yZzEP\n" +
+        "MA0GA1UEAwwGVGVzdENBMB4XDTE0MDIyNjIyNTUxMloXDTI1MDIyNTIyNTUxMlow\n" +
+        "JDEQMA4GA1UECwwHVGVzdE9yZzEQMA4GA1UEAwwHVGVzdEVFMDCBnzANBgkqhkiG\n" +
+        "9w0BAQEFAAOBjQAwgYkCgYEAt8xz9W3ruCTHjSOtTX6cxsUZ0nRP6EavEfzgcOYh\n" +
+        "CXGA0gr+viSHq3c2vQBxiRny2hm5rLcqpPo+2OxZtw/ajxfyrV6d/r8YyQLBvyl3\n" +
+        "xdCZdOkG1DCM1oFAQDaSRt9wN5Zm5kyg7uMig5Y4L45fP9Yee4x6Xyh36qYbsR89\n" +
+        "rFMCAwEAATANBgkqhkiG9w0BAQUFAAOBgQDZrPqSo08va1m9TOWOztTuWilGdjK/\n" +
+        "2Ed2WXg8utIpy6uAV+NaOYtHQ7ULQBVRNmwg9nKghbVbh+E/xpoihjl1x7OXass4\n" +
+        "TbwXA5GKFIFpNtDvATQ/QQZoCuCzw1FW/mH0Q7UEQ/9/iJdDad6ebkapeMwtj/8B\n" +
+        "s2IZV7s85CEOXw==\n" +
+        "-----END CERTIFICATE-----";
+
+    public static void main(String[] args) throws Exception {
+
+        String[] certStrs = {EECertStr};
+        String[] trustedCertStrs = {CACertStr};
+        runTest(certStrs, trustedCertStrs);
+
+        System.out.println("Test passed.");
+    }
+
+    private static void runTest(String[] certStrs,
+                                String[] trustedCertStrs)
+            throws Exception {
+
+        CertificateFactory cf = CertificateFactory.getInstance("X509");
+
+        // Generate the CertPath from the certs named in certStrs
+        ArrayList<X509Certificate> certs = new ArrayList<>();
+        for (String certStr : certStrs) {
+            certs.add(generateCert(certStr, cf));
+        }
+        CertPath cp = cf.generateCertPath(certs);
+
+        // Generate the set of Trust Anchors from the certs named in
+        // trustedCertStrs
+        Set<TrustAnchor> trustAnchors = new HashSet<>();
+        for (String trustedCertStr : trustedCertStrs) {
+            TrustAnchor ta = new TrustAnchor(generateCert(trustedCertStr, cf),
+                                             null);
+            trustAnchors.add(ta);
+        }
+        PKIXParameters params = new PKIXParameters(trustAnchors);
+        params.setDate(new Date(114, 3, 1));   // 2014-03-01
+        params.setRevocationEnabled(false);
+
+        // Attempt to validate the CertPath. If no exception thrown, successful.
+        CertPathValidator cpv = CertPathValidator.getInstance("PKIX");
+        cpv.validate(cp, params);
+        System.out.println("CertPath validation successful.");
+    }
+
+    private static X509Certificate generateCert(String certStr,
+                                                CertificateFactory cf)
+            throws Exception {
+        ByteArrayInputStream stream
+                = new ByteArrayInputStream(certStr.getBytes());
+        return (X509Certificate) cf.generateCertificate(stream);
+
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/sun/security/ssl/sanity/ciphersuites/CipherSuitesInOldOrder.java	Tue Jan 27 00:46:23 2015 +0000
@@ -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	Wed Jan 21 03:56:42 2015 +0000
+++ b/test/sun/security/ssl/sanity/ciphersuites/CipherSuitesInOrder.java	Tue Jan 27 00:46:23 2015 +0000
@@ -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	Tue Jan 27 00:46:23 2015 +0000
@@ -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