changeset 10551:99dd9e50f37e

Merge
author henryjen
date Mon, 11 Nov 2013 23:17:30 -0800
parents f82b730c798b (diff) ed09558136be (current diff)
children 2b0c2fc213d6
files .hgtags .jcheck/conf makefiles/CreateJars.gmk makefiles/CreateSecurityJars.gmk src/macosx/native/sun/osxapp/NSApplicationAWT.m src/share/classes/java/awt/EventDispatchThread.java src/share/classes/java/beans/EventHandler.java src/share/classes/java/lang/invoke/InnerClassLambdaMetafactory.java src/share/classes/java/lang/invoke/TypeConvertingMethodAdapter.java src/share/classes/java/util/Arrays.java src/share/classes/java/util/PriorityQueue.java src/share/classes/java/util/concurrent/ArrayBlockingQueue.java src/share/classes/java/util/concurrent/ConcurrentSkipListMap.java src/share/classes/java/util/regex/Pattern.java src/share/classes/java/util/stream/DistinctOps.java src/share/classes/java/util/stream/StreamSpliterators.java src/share/classes/sun/awt/datatransfer/DataTransferer.java src/share/javavm/export/jvm.h src/solaris/classes/sun/nio/fs/UnixPath.java src/windows/classes/sun/nio/fs/WindowsPath.java test/ProblemList.txt test/java/util/stream/test/org/openjdk/tests/java/lang/invoke/SerializedLambdaTest.java
diffstat 915 files changed, 10534 insertions(+), 3345 deletions(-) [+]
line wrap: on
line diff
--- a/.hgtags	Mon Nov 04 10:12:18 2013 -0800
+++ b/.hgtags	Mon Nov 11 23:17:30 2013 -0800
@@ -239,3 +239,4 @@
 719befd87c7b96ae103c05730ca555227bfc0116 jdk8-b111
 f002f5f3a16cca62e139cb8eed05ffaeb373587d jdk8-b112
 5b4261b4b72af53e8e178933ef6bc6c7f8cdbc60 jdk8-b113
+f26a0c8071bde1e3b923713c75156e4a58955623 jdk8-b114
--- a/src/macosx/bundle/JavaAppLauncher/src/JVMArgs.m	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/macosx/bundle/JavaAppLauncher/src/JVMArgs.m	Mon Nov 11 23:17:30 2013 -0800
@@ -163,7 +163,7 @@
     if ([[jvmInfo objectForKey:@"StartOnFirstThread"] boolValue]) {
         self.startOnFirstThread = YES;
     } else if ([[jvmInfo objectForKey:@"StartOnMainThread"] boolValue]) {
-        // for key compatability with the Apple JavaApplicationStub's 'Java' dictionary
+        // for key compatibility with the Apple JavaApplicationStub's 'Java' dictionary
         self.startOnFirstThread = YES;
     }
 
--- a/src/macosx/classes/com/apple/eawt/event/package.html	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/macosx/classes/com/apple/eawt/event/package.html	Mon Nov 11 23:17:30 2013 -0800
@@ -1,5 +1,7 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html>
 <head>
+<title></title>
 </head>
 <body bgcolor="white">
 Classes for receiving gesture events.
--- a/src/macosx/classes/com/apple/eawt/package.html	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/macosx/classes/com/apple/eawt/package.html	Mon Nov 11 23:17:30 2013 -0800
@@ -1,5 +1,7 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html>
 <head>
+<title></title>
 </head>
 <body bgcolor="white">
 Provides classes for integrating Java applications with the native application environment.
--- a/src/macosx/classes/com/apple/laf/AquaLookAndFeel.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/macosx/classes/com/apple/laf/AquaLookAndFeel.java	Mon Nov 11 23:17:30 2013 -0800
@@ -244,7 +244,7 @@
      * used for getting localized defaults.  Also initialize the default
      * locale used when no locale is passed into UIDefaults.get().  The
      * default locale should generally not be relied upon. It is here for
-     * compatability with releases prior to 1.4.
+     * compatibility with releases prior to 1.4.
      */
     private void initResourceBundle(final UIDefaults table) {
         table.setDefaultLocale(Locale.getDefault());
--- a/src/macosx/classes/com/apple/laf/AquaMenuPainter.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/macosx/classes/com/apple/laf/AquaMenuPainter.java	Mon Nov 11 23:17:30 2013 -0800
@@ -406,7 +406,7 @@
     }
 
     /** Draw a string with the graphics g at location (x,y) just like g.drawString() would.
-     *  The first occurence of underlineChar in text will be underlined. The matching is
+     *  The first occurrence of underlineChar in text will be underlined. The matching is
      *  not case sensitive.
      */
     public void drawString(final Graphics g, final JComponent c, final String text, final int underlinedChar, final int x, final int y, final boolean isEnabled, final boolean isSelected) {
--- a/src/macosx/classes/com/apple/laf/AquaTabbedPaneCopyFromBasicUI.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/macosx/classes/com/apple/laf/AquaTabbedPaneCopyFromBasicUI.java	Mon Nov 11 23:17:30 2013 -0800
@@ -3514,7 +3514,7 @@
      * Instantiate it only within subclasses of BasicTabbedPaneUI.
      */
     public class PropertyChangeHandler implements PropertyChangeListener {
-        // NOTE: This class exists only for backward compatability. All
+        // NOTE: This class exists only for backward compatibility. All
         // its functionality has been moved into Handler. If you need to add
         // new functionality add it to the Handler, but make sure this
         // class calls into the Handler.
@@ -3528,7 +3528,7 @@
      * Instantiate it only within subclasses of BasicTabbedPaneUI.
      */
     public class TabSelectionHandler implements ChangeListener {
-        // NOTE: This class exists only for backward compatability. All
+        // NOTE: This class exists only for backward compatibility. All
         // its functionality has been moved into Handler. If you need to add
         // new functionality add it to the Handler, but make sure this
         // class calls into the Handler.
@@ -3542,7 +3542,7 @@
      * Instantiate it only within subclasses of BasicTabbedPaneUI.
      */
     public class MouseHandler extends MouseAdapter {
-        // NOTE: This class exists only for backward compatability. All
+        // NOTE: This class exists only for backward compatibility. All
         // its functionality has been moved into Handler. If you need to add
         // new functionality add it to the Handler, but make sure this
         // class calls into the Handler.
@@ -3556,7 +3556,7 @@
      * Instantiate it only within subclasses of BasicTabbedPaneUI.
      */
     public class FocusHandler extends FocusAdapter {
-        // NOTE: This class exists only for backward compatability. All
+        // NOTE: This class exists only for backward compatibility. All
         // its functionality has been moved into Handler. If you need to add
         // new functionality add it to the Handler, but make sure this
         // class calls into the Handler.
--- a/src/macosx/classes/com/apple/laf/AquaTreeUI.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/macosx/classes/com/apple/laf/AquaTreeUI.java	Mon Nov 11 23:17:30 2013 -0800
@@ -179,7 +179,7 @@
     }
 
     /**
-     * Paints the expand (toggle) part of a row. The reciever should NOT modify <code>clipBounds</code>, or
+     * Paints the expand (toggle) part of a row. The receiver should NOT modify <code>clipBounds</code>, or
      * <code>insets</code>.
      */
     protected void paintExpandControl(final Graphics g, final Rectangle clipBounds, final Insets insets, final Rectangle bounds, final TreePath path, final int row, final boolean isExpanded, final boolean hasBeenExpanded, final boolean isLeaf) {
--- a/src/macosx/classes/com/apple/laf/ScreenMenuItemCheckbox.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/macosx/classes/com/apple/laf/ScreenMenuItemCheckbox.java	Mon Nov 11 23:17:30 2013 -0800
@@ -93,9 +93,9 @@
         }
 
         if (fMenuItem instanceof JCheckBoxMenuItem) {
-            setState(((JCheckBoxMenuItem)fMenuItem).isSelected());
+            forceSetState(fMenuItem.isSelected());
         } else {
-            setState(fMenuItem.getModel().isSelected());
+            forceSetState(fMenuItem.getModel().isSelected());
         }
     }
 
@@ -196,10 +196,10 @@
 
             switch (e.getStateChange()) {
                 case ItemEvent.SELECTED:
-                    setState(true);
+                    forceSetState(true);
                     break;
                 case ItemEvent.DESELECTED:
-                    setState(false);
+                    forceSetState(false);
                     break;
             }
         }
@@ -210,4 +210,20 @@
             ((CCheckboxMenuItem)peer).setIsIndeterminate(indeterminate);
         }
     }
+
+    /*
+     * The CCheckboxMenuItem peer is calling setState unconditionally every time user clicks the menu
+     * However for Swing controls in the screen menu bar it is wrong - the state should be changed only
+     * in response to the ITEM_STATE_CHANGED event. So the setState is overridden to no-op and all the
+     * correct state changes are made with forceSetState
+     */
+
+    @Override
+    public synchronized void setState(boolean b) {
+        // No Op
+    }
+
+    private void forceSetState(boolean b) {
+        super.setState(b);
+    }
 }
--- a/src/macosx/classes/java/net/DefaultInterface.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/macosx/classes/java/net/DefaultInterface.java	Mon Nov 11 23:17:30 2013 -0800
@@ -26,7 +26,7 @@
 package java.net;
 
 /**
- * Choose a network inteface to be the default for
+ * Choose a network interface to be the default for
  * outgoing IPv6 traffic that does not specify a scope_id (and which needs one).
  * We choose the first interface that is up and is (in order of preference):
  * 1. neither loopback nor point to point
--- a/src/macosx/classes/java/util/prefs/MacOSXPreferencesFile.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/macosx/classes/java/util/prefs/MacOSXPreferencesFile.java	Mon Nov 11 23:17:30 2013 -0800
@@ -122,7 +122,7 @@
     long user() { return user; }
     long host() { return host; }
 
-    // private contructor - use factory method getFile() instead
+    // private constructor - use factory method getFile() instead
     private MacOSXPreferencesFile(String newName, long newUser, long newHost)
     {
         appName = newName;
--- a/src/macosx/classes/sun/font/CFontManager.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/macosx/classes/sun/font/CFontManager.java	Mon Nov 11 23:17:30 2013 -0800
@@ -342,7 +342,7 @@
 
     @Override
     public String getFontPath(boolean noType1Fonts) {
-        // In the case of the Cocoa toolkit, since we go through NSFont, we dont need to register /Library/Fonts
+        // In the case of the Cocoa toolkit, since we go through NSFont, we don't need to register /Library/Fonts
         Toolkit tk = Toolkit.getDefaultToolkit();
         if (tk instanceof HeadlessToolkit) {
             tk = ((HeadlessToolkit)tk).getUnderlyingToolkit();
--- a/src/macosx/classes/sun/lwawt/LWWindowPeer.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/macosx/classes/sun/lwawt/LWWindowPeer.java	Mon Nov 11 23:17:30 2013 -0800
@@ -56,15 +56,6 @@
 
     private final PlatformWindow platformWindow;
 
-    // Window bounds reported by the native system (as opposed to
-    // regular bounds inherited from LWComponentPeer which are
-    // requested by user and may haven't been applied yet because
-    // of asynchronous requests to the windowing system)
-    private int sysX;
-    private int sysY;
-    private int sysW;
-    private int sysH;
-
     private static final int MINIMUM_WIDTH = 1;
     private static final int MINIMUM_HEIGHT = 1;
 
@@ -320,10 +311,18 @@
         // Don't post ComponentMoved/Resized and Paint events
         // until we've got a notification from the delegate
         Rectangle cb = constrainBounds(x, y, w, h);
-        setBounds(cb.x, cb.y, cb.width, cb.height, op, false, false);
-        // Get updated bounds, so we don't have to handle 'op' here manually
-        Rectangle r = getBounds();
-        platformWindow.setBounds(r.x, r.y, r.width, r.height);
+
+        Rectangle newBounds = new Rectangle(getBounds());
+        if ((op & (SET_LOCATION | SET_BOUNDS)) != 0) {
+            newBounds.x = cb.x;
+            newBounds.y = cb.y;
+        }
+        if ((op & (SET_SIZE | SET_BOUNDS)) != 0) {
+            newBounds.width = cb.width;
+            newBounds.height = cb.height;
+        }
+        // Native system could constraint bounds, so the peer wold be updated in the callback
+        platformWindow.setBounds(newBounds.x, newBounds.y, newBounds.width, newBounds.height);
     }
 
     public Rectangle constrainBounds(Rectangle bounds) {
@@ -614,17 +613,10 @@
      */
     @Override
     public void notifyReshape(int x, int y, int w, int h) {
-        final boolean moved;
-        final boolean resized;
+        Rectangle oldBounds = getBounds();
         final boolean invalid = updateInsets(platformWindow.getInsets());
-        synchronized (getStateLock()) {
-            moved = (x != sysX) || (y != sysY);
-            resized = (w != sysW) || (h != sysH);
-            sysX = x;
-            sysY = y;
-            sysW = w;
-            sysH = h;
-        }
+        final boolean moved = (x != oldBounds.x) || (y != oldBounds.y);
+        final boolean resized = (w != oldBounds.width) || (h != oldBounds.height);
 
         // Check if anything changed
         if (!moved && !resized && !invalid) {
--- a/src/macosx/classes/sun/lwawt/macosx/CInputMethod.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/macosx/classes/sun/lwawt/macosx/CInputMethod.java	Mon Nov 11 23:17:30 2013 -0800
@@ -620,8 +620,7 @@
                     retString[0] = new String(selectedText);
                 }}
             }, fAwtFocussedComponent);
-        } catch (InterruptedException ie) { ie.printStackTrace(); }
-        catch (InvocationTargetException ite) { ite.printStackTrace(); }
+        } catch (InvocationTargetException ite) { ite.printStackTrace(); }
 
         synchronized(retString) { return retString[0]; }
     }
@@ -669,8 +668,7 @@
 
                 }}
             }, fAwtFocussedComponent);
-        } catch (InterruptedException ie) { ie.printStackTrace(); }
-        catch (InvocationTargetException ite) { ite.printStackTrace(); }
+        } catch (InvocationTargetException ite) { ite.printStackTrace(); }
 
         synchronized(returnValue) { return returnValue; }
     }
@@ -695,8 +693,7 @@
                     returnValue[0] = fIMContext.getInsertPositionOffset();
                 }}
             }, fAwtFocussedComponent);
-        } catch (InterruptedException ie) { ie.printStackTrace(); }
-        catch (InvocationTargetException ite) { ite.printStackTrace(); }
+        } catch (InvocationTargetException ite) { ite.printStackTrace(); }
 
         returnValue[1] = fCurrentTextLength;
         synchronized(returnValue) { return returnValue; }
@@ -743,8 +740,7 @@
                     }
                 }}
             }, fAwtFocussedComponent);
-        } catch (InterruptedException ie) { ie.printStackTrace(); }
-        catch (InvocationTargetException ite) { ite.printStackTrace(); }
+        } catch (InvocationTargetException ite) { ite.printStackTrace(); }
 
         synchronized(rect) { return rect; }
     }
@@ -764,8 +760,7 @@
                     insertPositionOffset[0] = fIMContext.getInsertPositionOffset();
                 }}
             }, fAwtFocussedComponent);
-        } catch (InterruptedException ie) { ie.printStackTrace(); }
-        catch (InvocationTargetException ite) { ite.printStackTrace(); }
+        } catch (InvocationTargetException ite) { ite.printStackTrace(); }
 
         // This bit of gymnastics ensures that the returned location is within the composed text.
         // If it falls outside that region, the input method will commit the text, which is inconsistent with native
--- a/src/macosx/classes/sun/lwawt/macosx/CPlatformLWView.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/macosx/classes/sun/lwawt/macosx/CPlatformLWView.java	Mon Nov 11 23:17:30 2013 -0800
@@ -54,14 +54,6 @@
     }
 
     @Override
-    public void enterFullScreenMode() {
-    }
-
-    @Override
-    public void exitFullScreenMode() {
-    }
-
-    @Override
     public SurfaceData replaceSurfaceData() {
         return null;
     }
--- a/src/macosx/classes/sun/lwawt/macosx/CPlatformView.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/macosx/classes/sun/lwawt/macosx/CPlatformView.java	Mon Nov 11 23:17:30 2013 -0800
@@ -96,14 +96,6 @@
         return peer;
     }
 
-    public void enterFullScreenMode() {
-        CWrapper.NSView.enterFullScreenMode(ptr);
-    }
-
-    public void exitFullScreenMode() {
-        CWrapper.NSView.exitFullScreenMode(ptr);
-    }
-
     public void setToolTip(String msg) {
         CWrapper.NSView.setToolTip(ptr, msg);
     }
--- a/src/macosx/classes/sun/lwawt/macosx/CPlatformWindow.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/macosx/classes/sun/lwawt/macosx/CPlatformWindow.java	Mon Nov 11 23:17:30 2013 -0800
@@ -63,6 +63,8 @@
     private static native void nativeSynthesizeMouseEnteredExitedEvents();
     private static native void nativeDispose(long nsWindowPtr);
     private static native CPlatformWindow nativeGetTopmostPlatformWindowUnderMouse();
+    private static native void nativeEnterFullScreenMode(long nsWindowPtr);
+    private static native void nativeExitFullScreenMode(long nsWindowPtr);
 
     // Loger to report issues happened during execution but that do not affect functionality
     private static final PlatformLogger logger = PlatformLogger.getLogger("sun.lwawt.macosx.CPlatformWindow");
@@ -230,7 +232,14 @@
         contentView.initialize(peer, responder);
 
         final long ownerPtr = owner != null ? owner.getNSWindowPtr() : 0L;
-        Rectangle bounds = _peer.constrainBounds(_target.getBounds());
+        Rectangle bounds;
+        if (!IS(DECORATED, styleBits)) {
+            // For undecorated frames the move/resize event does not come if the frame is centered on the screen
+            // so we need to set a stub location to force an initial move/resize. Real bounds would be set later.
+            bounds = new Rectangle(0, 0, 1, 1);
+        } else {
+            bounds = _peer.constrainBounds(_target.getBounds());
+        }
         final long nativeWindowPtr = nativeCreateNSWindow(contentView.getAWTView(),
                 ownerPtr, styleBits, bounds.x, bounds.y, bounds.width, bounds.height);
         setPtr(nativeWindowPtr);
@@ -433,10 +442,7 @@
 
     @Override // PlatformWindow
     public Insets getInsets() {
-        if (!isFullScreenMode) {
-            return nativeGetNSWindowInsets(getNSWindowPtr());
-        }
-        return new Insets(0, 0, 0, 0);
+        return nativeGetNSWindowInsets(getNSWindowPtr());
     }
 
     @Override // PlatformWindow
@@ -538,6 +544,8 @@
         updateIconImages();
         updateFocusabilityForAutoRequestFocus(false);
 
+        boolean wasMaximized = isMaximized();
+
         // Actually show or hide the window
         LWWindowPeer blocker = (peer == null)? null : peer.getBlocker();
         if (blocker == null || !visible) {
@@ -571,16 +579,21 @@
         if (visible) {
             // Apply the extended state as expected in shared code
             if (target instanceof Frame) {
-                switch (((Frame)target).getExtendedState()) {
-                    case Frame.ICONIFIED:
-                        CWrapper.NSWindow.miniaturize(nsWindowPtr);
-                        break;
-                    case Frame.MAXIMIZED_BOTH:
-                        maximize();
-                        break;
-                    default: // NORMAL
-                        unmaximize(); // in case it was maximized, otherwise this is a no-op
-                        break;
+                if (!wasMaximized && isMaximized()) {
+                    // setVisible could have changed the native maximized state
+                    deliverZoom(true);
+                } else {
+                    switch (((Frame)target).getExtendedState()) {
+                        case Frame.ICONIFIED:
+                            CWrapper.NSWindow.miniaturize(nsWindowPtr);
+                            break;
+                        case Frame.MAXIMIZED_BOTH:
+                            maximize();
+                            break;
+                        default: // NORMAL
+                            unmaximize(); // in case it was maximized, otherwise this is a no-op
+                            break;
+                    }
                 }
             }
         }
@@ -750,18 +763,12 @@
     @Override
     public void enterFullScreenMode() {
         isFullScreenMode = true;
-        contentView.enterFullScreenMode();
-        // the move/size notification from the underlying system comes
-        // but it contains a bounds smaller than the whole screen
-        // and therefore we need to create the synthetic notifications
-        Rectangle screenBounds = getPeer().getGraphicsConfiguration().getBounds();
-        peer.notifyReshape(screenBounds.x, screenBounds.y, screenBounds.width,
-                           screenBounds.height);
+        nativeEnterFullScreenMode(getNSWindowPtr());
     }
 
     @Override
     public void exitFullScreenMode() {
-        contentView.exitFullScreenMode();
+        nativeExitFullScreenMode(getNSWindowPtr());
         isFullScreenMode = false;
     }
 
@@ -884,7 +891,7 @@
                         //Posting an empty to flush the EventQueue without blocking the main thread
                     }
                 }, target);
-            } catch (InterruptedException | InvocationTargetException e) {
+            } catch (InvocationTargetException e) {
                 e.printStackTrace();
             }
         }
@@ -919,13 +926,7 @@
 
     protected void deliverMoveResizeEvent(int x, int y, int width, int height,
                                         boolean byUser) {
-        // when the content view enters the full-screen mode, the native
-        // move/resize notifications contain a bounds smaller than
-        // the whole screen and therefore we ignore the native notifications
-        // and the content view itself creates correct synthetic notifications
-        if (isFullScreenMode) {
-            return;
-        }
+        checkZoom();
 
         final Rectangle oldB = nativeBounds;
         nativeBounds = new Rectangle(x, y, width, height);
@@ -957,6 +958,17 @@
         }
     }
 
+    private void checkZoom() {
+        if (target instanceof Frame && isVisible()) {
+            Frame targetFrame = (Frame)target;
+            if (targetFrame.getExtendedState() != Frame.MAXIMIZED_BOTH && isMaximized()) {
+                deliverZoom(true);
+            } else if (targetFrame.getExtendedState() == Frame.MAXIMIZED_BOTH && !isMaximized()) {
+                deliverZoom(false);
+            }
+        }
+    }
+
     private void deliverNCMouseDown() {
         if (peer != null) {
             peer.notifyNCMouseDown();
--- a/src/macosx/classes/sun/lwawt/macosx/CPrinterJob.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/macosx/classes/sun/lwawt/macosx/CPrinterJob.java	Mon Nov 11 23:17:30 2013 -0800
@@ -233,6 +233,10 @@
 
 
         setAttributes(attributes);
+        // throw exception for invalid destination
+        if (destinationAttr != null) {
+            validateDestination(destinationAttr);
+        }
 
         /* Get the range of pages we are to print. If the
          * last page to print is unknown, then we print to
--- a/src/macosx/classes/sun/lwawt/macosx/CViewEmbeddedFrame.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/macosx/classes/sun/lwawt/macosx/CViewEmbeddedFrame.java	Mon Nov 11 23:17:30 2013 -0800
@@ -97,6 +97,6 @@
                     setVisible(true);
                 }
             }, this);
-        } catch (InterruptedException | InvocationTargetException ex) {}
+        } catch (InvocationTargetException ex) {}
     }
 }
--- a/src/macosx/classes/sun/lwawt/macosx/CWrapper.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/macosx/classes/sun/lwawt/macosx/CWrapper.java	Mon Nov 11 23:17:30 2013 -0800
@@ -82,9 +82,6 @@
         public static native Rectangle2D frame(long view);
         public static native long window(long view);
 
-        public static native void enterFullScreenMode(long view);
-        public static native void exitFullScreenMode(long view);
-
         public static native void setHidden(long view, boolean hidden);
 
         public static native void setToolTip(long view, String msg);
--- a/src/macosx/classes/sun/lwawt/macosx/LWCToolkit.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/macosx/classes/sun/lwawt/macosx/LWCToolkit.java	Mon Nov 11 23:17:30 2013 -0800
@@ -548,22 +548,18 @@
     // Any selector invoked using ThreadUtilities performOnMainThread will be processed in doAWTRunLoop
     // The InvocationEvent will call LWCToolkit.stopAWTRunLoop() when finished, which will stop our manual runloop
     // Does not dispatch native events while in the loop
-    public static void invokeAndWait(Runnable event, Component component) throws InterruptedException, InvocationTargetException {
+    public static void invokeAndWait(Runnable runnable, Component component) throws InvocationTargetException {
         final long mediator = createAWTRunLoopMediator();
 
         InvocationEvent invocationEvent =
-                new InvocationEvent(component != null ? component : Toolkit.getDefaultToolkit(), event) {
-                    @Override
-                    public void dispatch() {
-                        try {
-                            super.dispatch();
-                        } finally {
+                new InvocationEvent(component != null ? component : Toolkit.getDefaultToolkit(),
+                        runnable,
+                        () -> {
                             if (mediator != 0) {
                                 stopAWTRunLoop(mediator);
                             }
-                        }
-                    }
-                };
+                        },
+                        true);
 
         if (component != null) {
             AppContext appContext = SunToolkit.targetToAppContext(component);
--- a/src/macosx/native/sun/awt/AWTView.m	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/macosx/native/sun/awt/AWTView.m	Mon Nov 11 23:17:30 2013 -0800
@@ -272,7 +272,6 @@
  */
 
 - (void) keyDown: (NSEvent *)event {
-
     fProcessingKeystroke = YES;
     fKeyEventsNeeded = YES;
 
@@ -308,6 +307,23 @@
 
 - (BOOL) performKeyEquivalent: (NSEvent *) event {
     [self deliverJavaKeyEventHelper: event];
+
+    // Workaround for 8020209: special case for "Cmd =" and "Cmd ." 
+    // because Cocoa calls performKeyEquivalent twice for these keystrokes  
+    NSUInteger modFlags = [event modifierFlags] & 
+        (NSCommandKeyMask | NSAlternateKeyMask | NSShiftKeyMask | NSControlKeyMask);
+    if (modFlags == NSCommandKeyMask) {
+        NSString *eventChars = [event charactersIgnoringModifiers];
+        if ([eventChars length] == 1) {
+            unichar ch = [eventChars characterAtIndex:0];
+            if (ch == '=' || ch == '.') {
+                [[NSApp mainMenu] performKeyEquivalent: event];
+                return YES;
+            }
+        }
+
+    }
+
     return NO;
 }
 
@@ -580,7 +596,7 @@
 
 // --- Services menu support for lightweights ---
 
-// finds the focused accessable element, and if it's a text element, obtains the text from it
+// finds the focused accessible element, and if it is a text element, obtains the text from it
 - (NSString *)accessibleSelectedText
 {
     id focused = [self accessibilityFocusedUIElement];
@@ -598,7 +614,7 @@
     return rtfdData;
 }
 
-// finds the focused accessable element, and if it's a text element, sets the text in it
+// finds the focused accessible element, and if it is a text element, sets the text in it
 - (BOOL)replaceAccessibleTextSelection:(NSString *)text
 {
     id focused = [self accessibilityFocusedUIElement];
--- a/src/macosx/native/sun/awt/AWTWindow.h	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/macosx/native/sun/awt/AWTWindow.h	Mon Nov 11 23:17:30 2013 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 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
@@ -45,6 +45,7 @@
     BOOL isEnabled;
     NSWindow *nsWindow;
     AWTWindow *ownerWindow;
+    jint preFullScreenLevel;
 }
 
 // An instance of either AWTWindow_Normal or AWTWindow_Panel
@@ -57,6 +58,7 @@
 @property (nonatomic) NSSize javaMaxSize;
 @property (nonatomic) jint styleBits;
 @property (nonatomic) BOOL isEnabled;
+@property (nonatomic) jint preFullScreenLevel;
 
 
 - (id) initWithPlatformWindow:(JNFWeakJObjectWrapper *)javaPlatformWindow
--- a/src/macosx/native/sun/awt/AWTWindow.m	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/macosx/native/sun/awt/AWTWindow.m	Mon Nov 11 23:17:30 2013 -0800
@@ -122,6 +122,7 @@
 @synthesize styleBits;
 @synthesize isEnabled;
 @synthesize ownerWindow;
+@synthesize preFullScreenLevel;
 
 - (void) updateMinMaxSize:(BOOL)resizable {
     if (resizable) {
@@ -501,20 +502,6 @@
     // window exposing in _setVisible:(BOOL)
 }
 
-- (BOOL)windowShouldZoom:(NSWindow *)window toFrame:(NSRect)proposedFrame {
-AWT_ASSERT_APPKIT_THREAD;
-
-    [AWTToolkit eventCountPlusPlus];
-    JNIEnv *env = [ThreadUtilities getJNIEnv];
-    jobject platformWindow = [self.javaPlatformWindow jObjectWithEnv:env];
-    if (platformWindow != NULL) {
-        static JNF_MEMBER_CACHE(jm_deliverZoom, jc_CPlatformWindow, "deliverZoom", "(Z)V");
-        JNFCallVoidMethod(env, platformWindow, jm_deliverZoom, ![window isZoomed]);
-        (*env)->DeleteLocalRef(env, platformWindow);
-    }
-    return YES;
-}
-
 - (void) _deliverIconify:(BOOL)iconify {
 AWT_ASSERT_APPKIT_THREAD;
 
@@ -1226,3 +1213,58 @@
 JNF_COCOA_EXIT(env);
 }
 
+JNIEXPORT void JNICALL Java_sun_lwawt_macosx_CPlatformWindow_nativeEnterFullScreenMode
+(JNIEnv *env, jclass clazz, jlong windowPtr)
+{
+JNF_COCOA_ENTER(env);
+
+    NSWindow *nsWindow = OBJC(windowPtr);
+    [ThreadUtilities performOnMainThreadWaiting:NO block:^(){
+        AWTWindow *window = (AWTWindow*)[nsWindow delegate];
+        NSNumber* screenID = [AWTWindow getNSWindowDisplayID_AppKitThread: nsWindow];
+        CGDirectDisplayID aID = [screenID intValue];
+
+        if (CGDisplayCapture(aID) == kCGErrorSuccess) {
+            // remove window decoration
+            NSUInteger styleMask = [AWTWindow styleMaskForStyleBits:window.styleBits];
+            [nsWindow setStyleMask:(styleMask & ~NSTitledWindowMask) | NSBorderlessWindowMask];
+
+            int shieldLevel = CGShieldingWindowLevel();
+            window.preFullScreenLevel = [nsWindow level];
+            [nsWindow setLevel: shieldLevel];
+
+            NSRect screenRect = [[nsWindow screen] frame];
+            [nsWindow setFrame:screenRect display:YES];
+        } else {
+            [JNFException raise:env as:kRuntimeException reason:"Failed to enter full screen."];            
+        }
+    }];
+
+JNF_COCOA_EXIT(env);
+}
+
+JNIEXPORT void JNICALL Java_sun_lwawt_macosx_CPlatformWindow_nativeExitFullScreenMode
+(JNIEnv *env, jclass clazz, jlong windowPtr)
+{
+JNF_COCOA_ENTER(env);
+
+    NSWindow *nsWindow = OBJC(windowPtr);
+    [ThreadUtilities performOnMainThreadWaiting:NO block:^(){
+        AWTWindow *window = (AWTWindow*)[nsWindow delegate];
+        NSNumber* screenID = [AWTWindow getNSWindowDisplayID_AppKitThread: nsWindow];
+        CGDirectDisplayID aID = [screenID intValue];
+
+        if (CGDisplayRelease(aID) == kCGErrorSuccess) {
+            NSUInteger styleMask = [AWTWindow styleMaskForStyleBits:window.styleBits];
+            [nsWindow setStyleMask:styleMask]; 
+            [nsWindow setLevel: window.preFullScreenLevel];
+
+            // GraphicsDevice takes care of restoring pre full screen bounds
+        } else {
+            [JNFException raise:env as:kRuntimeException reason:"Failed to exit full screen."];
+        }
+    }];
+
+JNF_COCOA_EXIT(env);
+}
+
--- a/src/macosx/native/sun/awt/CPrinterJob.m	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/macosx/native/sun/awt/CPrinterJob.m	Mon Nov 11 23:17:30 2013 -0800
@@ -359,7 +359,11 @@
     static JNF_CLASS_CACHE(jc_Pageable, "java/awt/print/Pageable");
     static JNF_MEMBER_CACHE(jm_getCopies, sjc_CPrinterJob, "getCopiesInt", "()I");
     static JNF_MEMBER_CACHE(jm_isCollated, sjc_CPrinterJob, "isCollated", "()Z");
+    static JNF_MEMBER_CACHE(jm_getFromPage, sjc_CPrinterJob, "getFromPageAttrib", "()I");
+    static JNF_MEMBER_CACHE(jm_getToPage, sjc_CPrinterJob, "getToPageAttrib", "()I");
+    static JNF_MEMBER_CACHE(jm_getSelectAttrib, sjc_CPrinterJob, "getSelectAttrib", "()I");
     static JNF_MEMBER_CACHE(jm_getNumberOfPages, jc_Pageable, "getNumberOfPages", "()I");
+    static JNF_MEMBER_CACHE(jm_getPageFormat, sjc_CPrinterJob, "getPageFormatFromAttributes", "()Ljava/awt/print/PageFormat;");
 
     NSMutableDictionary* printingDictionary = [dst dictionary];
 
@@ -368,19 +372,35 @@
 
     jboolean collated = JNFCallBooleanMethod(env, srcPrinterJob, jm_isCollated); // AWT_THREADING Safe (known object)
     [printingDictionary setObject:[NSNumber numberWithBool:collated ? YES : NO] forKey:NSPrintMustCollate];
-
     jint jNumPages = JNFCallIntMethod(env, srcPageable, jm_getNumberOfPages); // AWT_THREADING Safe (!appKit)
     if (jNumPages != java_awt_print_Pageable_UNKNOWN_NUMBER_OF_PAGES)
     {
-        [printingDictionary setObject:[NSNumber numberWithBool:NO] forKey:NSPrintAllPages];
+        jint selectID = JNFCallIntMethod(env, srcPrinterJob, jm_getSelectAttrib);
+        if (selectID ==0) {
+            [printingDictionary setObject:[NSNumber numberWithBool:YES] forKey:NSPrintAllPages];
+        } else if (selectID == 2) {
+            // In Mac 10.7,  Print ALL is deselected if PrintSelection is YES whether
+            // NSPrintAllPages is YES or NO
+            [printingDictionary setObject:[NSNumber numberWithBool:NO] forKey:NSPrintAllPages];
+            [printingDictionary setObject:[NSNumber numberWithBool:YES] forKey:NSPrintSelectionOnly];
+        } else {
+            [printingDictionary setObject:[NSNumber numberWithBool:NO] forKey:NSPrintAllPages];
+        }
 
-        [printingDictionary setObject:[NSNumber numberWithInteger:1] forKey:NSPrintFirstPage];
-        [printingDictionary setObject:[NSNumber numberWithInteger:jNumPages] forKey:NSPrintLastPage];
+        jint fromPage = JNFCallIntMethod(env, srcPrinterJob, jm_getFromPage);
+        jint toPage = JNFCallIntMethod(env, srcPrinterJob, jm_getToPage);
+        // setting fromPage and toPage will not be shown in the dialog if printing All pages
+        [printingDictionary setObject:[NSNumber numberWithInteger:fromPage] forKey:NSPrintFirstPage];
+        [printingDictionary setObject:[NSNumber numberWithInteger:toPage] forKey:NSPrintLastPage];
     }
     else
     {
         [printingDictionary setObject:[NSNumber numberWithBool:YES] forKey:NSPrintAllPages];
     }
+    jobject page = JNFCallObjectMethod(env, srcPrinterJob, jm_getPageFormat); 
+    if (page != NULL) {
+        javaPageFormatToNSPrintInfo(env, NULL, page, dst);
+    }
 }
 
 /*
--- a/src/macosx/native/sun/awt/CTextPipe.m	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/macosx/native/sun/awt/CTextPipe.m	Mon Nov 11 23:17:30 2013 -0800
@@ -322,7 +322,7 @@
 
     Each stage of the pipeline is responsible for doing only one major thing, like allocating buffers,
     aquiring transform arrays from JNI, filling buffers, or striking glyphs. All resources or memory
-    aquired at a given stage, must be released in that stage. Any error that occurs (like a failed malloc)
+    acquired at a given stage, must be released in that stage. Any error that occurs (like a failed malloc)
     is to be handled in the stage it occurs in, and is to return immediatly after freeing it's resources.
 
 -----------------------------------*/
--- a/src/macosx/native/sun/awt/CWrapper.m	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/macosx/native/sun/awt/CWrapper.m	Mon Nov 11 23:17:30 2013 -0800
@@ -587,46 +587,6 @@
 
 /*
  * Class:     sun_lwawt_macosx_CWrapper$NSView
- * Method:    enterFullScreenMode
- * Signature: (J)V
- */
-JNIEXPORT void JNICALL
-Java_sun_lwawt_macosx_CWrapper_00024NSView_enterFullScreenMode
-(JNIEnv *env, jclass cls, jlong viewPtr)
-{
-JNF_COCOA_ENTER(env);
-
-    NSView *view = (NSView *)jlong_to_ptr(viewPtr);
-    [ThreadUtilities performOnMainThreadWaiting:NO block:^(){
-        NSScreen *screen = [[view window] screen];
-        NSDictionary *opts = [NSDictionary dictionaryWithObjectsAndKeys:[NSNumber numberWithBool:NO], NSFullScreenModeAllScreens, nil];
-        [view enterFullScreenMode:screen withOptions:opts];
-    }];
-
-JNF_COCOA_EXIT(env);
-}
-
-/*
- * Class:     sun_lwawt_macosx_CWrapper$NSView
- * Method:    exitFullScreenMode
- * Signature: (J)V
- */
-JNIEXPORT void JNICALL
-Java_sun_lwawt_macosx_CWrapper_00024NSView_exitFullScreenMode
-(JNIEnv *env, jclass cls, jlong viewPtr)
-{
-JNF_COCOA_ENTER(env);
-
-    NSView *view = (NSView *)jlong_to_ptr(viewPtr);
-    [ThreadUtilities performOnMainThreadWaiting:NO block:^(){
-        [view exitFullScreenModeWithOptions:nil];
-    }];
-
-JNF_COCOA_EXIT(env);
-}
-
-/*
- * Class:     sun_lwawt_macosx_CWrapper$NSView
  * Method:    window
  * Signature: (J)J
  */
--- a/src/macosx/native/sun/awt/awt.m	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/macosx/native/sun/awt/awt.m	Mon Nov 11 23:17:30 2013 -0800
@@ -312,15 +312,17 @@
         if (verbose) AWT_DEBUG_LOG(@"got out of the AppKit startup mutex");
     }
 
-    // Don't set the delegate until the NSApplication has been created and
-    // its finishLaunching has initialized it.
-    //  ApplicationDelegate is the support code for com.apple.eawt.
-    [ThreadUtilities performOnMainThreadWaiting:YES block:^(){
-        id<NSApplicationDelegate> delegate = [ApplicationDelegate sharedDelegate];
-        if (delegate != nil) {
-            OSXAPP_SetApplicationDelegate(delegate);
-        }        
-    }];
+    if (!headless) {
+        // Don't set the delegate until the NSApplication has been created and
+        // its finishLaunching has initialized it.
+        //  ApplicationDelegate is the support code for com.apple.eawt.
+        [ThreadUtilities performOnMainThreadWaiting:YES block:^(){
+            id<NSApplicationDelegate> delegate = [ApplicationDelegate sharedDelegate];
+            if (delegate != nil) {
+                OSXAPP_SetApplicationDelegate(delegate);
+            }        
+        }];
+    }
 }
 
 - (void)starter:(NSArray*)args {
--- a/src/macosx/native/sun/osxapp/NSApplicationAWT.m	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/macosx/native/sun/osxapp/NSApplicationAWT.m	Mon Nov 11 23:17:30 2013 -0800
@@ -341,6 +341,10 @@
     if ([event type] == NSApplicationDefined && TS_EQUAL([event timestamp], dummyEventTimestamp)) {
         [seenDummyEventLock lockWhenCondition:NO];
         [seenDummyEventLock unlockWithCondition:YES];
+    } else if ([event type] == NSKeyUp && ([event modifierFlags] & NSCommandKeyMask)) {
+        // Cocoa won't send us key up event when releasing a key while Cmd is down,
+        // so we have to do it ourselves.
+        [[self keyWindow] sendEvent:event];
     } else {
         [super sendEvent:event];
     }
--- a/src/share/back/commonRef.c	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/back/commonRef.c	Mon Nov 11 23:17:30 2013 -0800
@@ -52,7 +52,7 @@
  * the number times an object has been referenced through
  * commonRef_refToID. A RefNode is freed once the reference
  * count is decremented to 0 (with commonRef_release*), even if the
- * correspoding object has not been collected.
+ * corresponding object has not been collected.
  *
  * One hash table is maintained. The mapping of ID to jobject (or RefNode*)
  * is handled with one hash table that will re-size itself as the number
--- a/src/share/back/eventFilter.c	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/back/eventFilter.c	Mon Nov 11 23:17:30 2013 -0800
@@ -644,7 +644,7 @@
 
             case JDWP_REQUEST_MODIFIER(Count): {
                 /*
-                 * If preceeding filters have determined that events will
+                 * If preceding filters have determined that events will
                  * be filtered out, that is fine and we won't get here.
                  * However, the count must be decremented - even if
                  * subsequent filters will filter these events.  We
--- a/src/share/back/util.c	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/back/util.c	Mon Nov 11 23:17:30 2013 -0800
@@ -1092,7 +1092,7 @@
      * we don't want to consume it.  It came from
      * user code and is intended for user code, not us.
      * So, we will remember that the interrupt has
-     * occured and re-activate it when this thread
+     * occurred and re-activate it when this thread
      * goes back into user code.
      * That being said, what do we do here?  Since
      * we could have been notified too, here we will
--- a/src/share/classes/com/sun/beans/decoder/AccessorElementHandler.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/com/sun/beans/decoder/AccessorElementHandler.java	Mon Nov 11 23:17:30 2013 -0800
@@ -40,7 +40,7 @@
 
     /**
      * Parses attributes of the element.
-     * The following atributes are supported:
+     * The following attributes are supported:
      * <dl>
      * <dt>name
      * <dd>the name of the accessible entity
--- a/src/share/classes/com/sun/beans/decoder/ArrayElementHandler.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/com/sun/beans/decoder/ArrayElementHandler.java	Mon Nov 11 23:17:30 2013 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 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
@@ -57,7 +57,7 @@
  *     &lt;int&gt;456&lt;/int&gt;
  * &lt;/array&gt;</pre>
  * is equivalent to {@code int[] array = {123, 456}} in Java code.
- * <p>The following atributes are supported:
+ * <p>The following attributes are supported:
  * <dl>
  * <dt>length
  * <dd>the array length
@@ -76,7 +76,7 @@
 
     /**
      * Parses attributes of the element.
-     * The following atributes are supported:
+     * The following attributes are supported:
      * <dl>
      * <dt>length
      * <dd>the array length
@@ -110,6 +110,20 @@
     }
 
     /**
+     * Tests whether the value of this element can be used
+     * as an argument of the element that contained in this one.
+     *
+     * @return {@code true} if the value of this element can be used
+     *         as an argument of the element that contained in this one,
+     *         {@code false} otherwise
+     */
+    @Override
+    protected boolean isArgument() {
+        return true; // hack for compatibility
+    }
+
+
+    /**
      * Creates an instance of the array.
      *
      * @param type  the base class
--- a/src/share/classes/com/sun/beans/decoder/BooleanElementHandler.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/com/sun/beans/decoder/BooleanElementHandler.java	Mon Nov 11 23:17:30 2013 -0800
@@ -37,7 +37,7 @@
  *     &lt;string&gt;true&lt;/string&gt;
  * &lt;/method&gt;</pre>
  * which is equivalent to {@code Boolean.valueOf("true")} in Java code.
- * <p>The following atribute is supported:
+ * <p>The following attribute is supported:
  * <dl>
  * <dt>id
  * <dd>the identifier of the variable that is intended to store the result
--- a/src/share/classes/com/sun/beans/decoder/ByteElementHandler.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/com/sun/beans/decoder/ByteElementHandler.java	Mon Nov 11 23:17:30 2013 -0800
@@ -37,7 +37,7 @@
  *     &lt;string&gt;127&lt;/string&gt;
  * &lt;/method&gt;</pre>
  * which is equivalent to {@code Byte.decode("127")} in Java code.
- * <p>The following atribute is supported:
+ * <p>The following attribute is supported:
  * <dl>
  * <dt>id
  * <dd>the identifier of the variable that is intended to store the result
--- a/src/share/classes/com/sun/beans/decoder/CharElementHandler.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/com/sun/beans/decoder/CharElementHandler.java	Mon Nov 11 23:17:30 2013 -0800
@@ -33,7 +33,7 @@
  * For example:<pre>
  * &lt;char&gt;X&lt;/char&gt;</pre>
  * which is equivalent to {@code Character.valueOf('X')} in Java code.
- * <p>The following atributes are supported:
+ * <p>The following attributes are supported:
  * <dl>
  * <dt>code
  * <dd>this attribute specifies character code
@@ -52,7 +52,7 @@
 
     /**
      * Parses attributes of the element.
-     * The following atributes are supported:
+     * The following attributes are supported:
      * <dl>
      * <dt>code
      * <dd>this attribute specifies character code
--- a/src/share/classes/com/sun/beans/decoder/ClassElementHandler.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/com/sun/beans/decoder/ClassElementHandler.java	Mon Nov 11 23:17:30 2013 -0800
@@ -36,7 +36,7 @@
  *     &lt;string&gt;java.lang.Class&lt;/string&gt;
  * &lt;/method&gt;</pre>
  * which is equivalent to {@code Class.forName("java.lang.Class")} in Java code.
- * <p>The following atribute is supported:
+ * <p>The following attribute is supported:
  * <dl>
  * <dt>id
  * <dd>the identifier of the variable that is intended to store the result
--- a/src/share/classes/com/sun/beans/decoder/DoubleElementHandler.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/com/sun/beans/decoder/DoubleElementHandler.java	Mon Nov 11 23:17:30 2013 -0800
@@ -37,7 +37,7 @@
  *     &lt;string&gt;1.23e45&lt;/string&gt;
  * &lt;/method&gt;</pre>
  * which is equivalent to {@code Double.valueOf("1.23e45")} in Java code.
- * <p>The following atribute is supported:
+ * <p>The following attribute is supported:
  * <dl>
  * <dt>id
  * <dd>the identifier of the variable that is intended to store the result
--- a/src/share/classes/com/sun/beans/decoder/ElementHandler.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/com/sun/beans/decoder/ElementHandler.java	Mon Nov 11 23:17:30 2013 -0800
@@ -126,7 +126,7 @@
 
     /**
      * Parses attributes of the element.
-     * By default, the following atribute is supported:
+     * By default, the following attribute is supported:
      * <dl>
      * <dt>id
      * <dd>the identifier of the variable that is intended to store the result
--- a/src/share/classes/com/sun/beans/decoder/FalseElementHandler.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/com/sun/beans/decoder/FalseElementHandler.java	Mon Nov 11 23:17:30 2013 -0800
@@ -31,7 +31,7 @@
  * For example:<pre>
  * &lt;false/&gt;</pre>
  * is equivalent to {@code false} in Java code.
- * <p>The following atribute is supported:
+ * <p>The following attribute is supported:
  * <dl>
  * <dt>id
  * <dd>the identifier of the variable that is intended to store the result
--- a/src/share/classes/com/sun/beans/decoder/FieldElementHandler.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/com/sun/beans/decoder/FieldElementHandler.java	Mon Nov 11 23:17:30 2013 -0800
@@ -43,7 +43,7 @@
  * For example:<pre>
  * &lt;field name="id"&gt;&lt;int&gt;0&lt;/int&gt;&lt;/field&gt;</pre>
  * is equivalent to {@code id = 0} in Java code.
- * <p>The following atributes are supported:
+ * <p>The following attributes are supported:
  * <dl>
  * <dt>name
  * <dd>the field name
@@ -62,7 +62,7 @@
 
     /**
      * Parses attributes of the element.
-     * The following atributes are supported:
+     * The following attributes are supported:
      * <dl>
      * <dt>name
      * <dd>the field name
--- a/src/share/classes/com/sun/beans/decoder/FloatElementHandler.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/com/sun/beans/decoder/FloatElementHandler.java	Mon Nov 11 23:17:30 2013 -0800
@@ -37,7 +37,7 @@
  *     &lt;string&gt;-1.23&lt;/string&gt;
  * &lt;/method&gt;</pre>
  * which is equivalent to {@code Float.valueOf("-1.23")} in Java code.
- * <p>The following atribute is supported:
+ * <p>The following attribute is supported:
  * <dl>
  * <dt>id
  * <dd>the identifier of the variable that is intended to store the result
--- a/src/share/classes/com/sun/beans/decoder/IntElementHandler.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/com/sun/beans/decoder/IntElementHandler.java	Mon Nov 11 23:17:30 2013 -0800
@@ -37,7 +37,7 @@
  *     &lt;string&gt;-1&lt;/string&gt;
  * &lt;/method&gt;</pre>
  * which is equivalent to {@code Integer.decode("-1")} in Java code.
- * <p>The following atribute is supported:
+ * <p>The following attribute is supported:
  * <dl>
  * <dt>id
  * <dd>the identifier of the variable that is intended to store the result
--- a/src/share/classes/com/sun/beans/decoder/JavaElementHandler.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/com/sun/beans/decoder/JavaElementHandler.java	Mon Nov 11 23:17:30 2013 -0800
@@ -32,7 +32,7 @@
  * is evaluated in the context of the decoder itself.
  * Typically this outer context is used to retrieve the owner of the decoder,
  * which can be set before reading the archive.
- * <p>The following atributes are supported:
+ * <p>The following attributes are supported:
  * <dl>
  * <dt>version
  * <dd>the Java version (not supported)
@@ -54,7 +54,7 @@
 
     /**
      * Parses attributes of the element.
-     * The following atributes are supported:
+     * The following attributes are supported:
      * <dl>
      * <dt>version
      * <dd>the Java version (not supported)
--- a/src/share/classes/com/sun/beans/decoder/LongElementHandler.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/com/sun/beans/decoder/LongElementHandler.java	Mon Nov 11 23:17:30 2013 -0800
@@ -37,7 +37,7 @@
  *     &lt;string&gt;0xFFFF&lt;/string&gt;
  * &lt;/method&gt;</pre>
  * which is equivalent to {@code Long.decode("0xFFFF")} in Java code.
- * <p>The following atribute is supported:
+ * <p>The following attribute is supported:
  * <dl>
  * <dt>id
  * <dd>the identifier of the variable that is intended to store the result
--- a/src/share/classes/com/sun/beans/decoder/MethodElementHandler.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/com/sun/beans/decoder/MethodElementHandler.java	Mon Nov 11 23:17:30 2013 -0800
@@ -43,7 +43,7 @@
  *     &lt;string&gt;10&lt;/string&gt;
  * &lt;/method&gt;</pre>
  * is equivalent to {@code Long.valueOf("10")} in Java code.
- * <p>The following atributes are supported:
+ * <p>The following attributes are supported:
  * <dl>
  * <dt>name
  * <dd>the method name
@@ -62,7 +62,7 @@
 
     /**
      * Parses attributes of the element.
-     * The following atributes are supported:
+     * The following attributes are supported:
      * <dl>
      * <dt>name
      * <dd>the method name
--- a/src/share/classes/com/sun/beans/decoder/NewElementHandler.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/com/sun/beans/decoder/NewElementHandler.java	Mon Nov 11 23:17:30 2013 -0800
@@ -43,7 +43,7 @@
  *     &lt;string&gt;10&lt;/string&gt;
  * &lt;/new&gt;</pre>
  * is equivalent to {@code new Long("10")} in Java code.
- * <p>The following atributes are supported:
+ * <p>The following attributes are supported:
  * <dl>
  * <dt>class
  * <dd>the type of object for instantiation
@@ -63,7 +63,7 @@
 
     /**
      * Parses attributes of the element.
-     * The following atributes are supported:
+     * The following attributes are supported:
      * <dl>
      * <dt>class
      * <dd>the type of object for instantiation
--- a/src/share/classes/com/sun/beans/decoder/NullElementHandler.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/com/sun/beans/decoder/NullElementHandler.java	Mon Nov 11 23:17:30 2013 -0800
@@ -31,7 +31,7 @@
  * For example:<pre>
  * &lt;null/&gt;</pre>
  * is equivalent to {@code null} in Java code.
- * <p>The following atribute is supported:
+ * <p>The following attribute is supported:
  * <dl>
  * <dt>id
  * <dd>the identifier of the variable that is intended to store the result
--- a/src/share/classes/com/sun/beans/decoder/ObjectElementHandler.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/com/sun/beans/decoder/ObjectElementHandler.java	Mon Nov 11 23:17:30 2013 -0800
@@ -33,7 +33,7 @@
  * This element looks like &lt;void&gt; element,
  * but its value is always used as an argument for element
  * that contains this one.
- * <p>The following atributes are supported:
+ * <p>The following attributes are supported:
  * <dl>
  * <dt>class
  * <dd>the type is used for static methods and fields
@@ -64,7 +64,7 @@
 
     /**
      * Parses attributes of the element.
-     * The following atributes are supported:
+     * The following attributes are supported:
      * <dl>
      * <dt>class
      * <dd>the type is used for static methods and fields
--- a/src/share/classes/com/sun/beans/decoder/PropertyElementHandler.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/com/sun/beans/decoder/PropertyElementHandler.java	Mon Nov 11 23:17:30 2013 -0800
@@ -63,7 +63,7 @@
  *     &lt;int&gt;0&lt;/int&gt;
  * &lt;/method&gt;</pre>
  * which is equivalent to {@code set(0)} in Java code.
- * <p>The following atributes are supported:
+ * <p>The following attributes are supported:
  * <dl>
  * <dt>name
  * <dd>the property name
@@ -85,7 +85,7 @@
 
     /**
      * Parses attributes of the element.
-     * The following atributes are supported:
+     * The following attributes are supported:
      * <dl>
      * <dt>name
      * <dd>the property name
--- a/src/share/classes/com/sun/beans/decoder/ShortElementHandler.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/com/sun/beans/decoder/ShortElementHandler.java	Mon Nov 11 23:17:30 2013 -0800
@@ -37,7 +37,7 @@
  *     &lt;string&gt;200&lt;/string&gt;
  * &lt;/method&gt;</pre>
  * which is equivalent to {@code Short.decode("200")} in Java code.
- * <p>The following atribute is supported:
+ * <p>The following attribute is supported:
  * <dl>
  * <dt>id
  * <dd>the identifier of the variable that is intended to store the result
--- a/src/share/classes/com/sun/beans/decoder/StringElementHandler.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/com/sun/beans/decoder/StringElementHandler.java	Mon Nov 11 23:17:30 2013 -0800
@@ -40,7 +40,7 @@
  * &lt;string&gt;
  *     &lt;true&gt;
  * &lt;/string&gt;</pre>
- * <p>The following atribute is supported:
+ * <p>The following attribute is supported:
  * <dl>
  * <dt>id
  * <dd>the identifier of the variable that is intended to store the result
--- a/src/share/classes/com/sun/beans/decoder/TrueElementHandler.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/com/sun/beans/decoder/TrueElementHandler.java	Mon Nov 11 23:17:30 2013 -0800
@@ -31,7 +31,7 @@
  * For example:<pre>
  * &lt;true/&gt;</pre>
  * is equivalent to {@code true} in Java code.
- * <p>The following atribute is supported:
+ * <p>The following attribute is supported:
  * <dl>
  * <dt>id
  * <dd>the identifier of the variable that is intended to store the result
--- a/src/share/classes/com/sun/beans/decoder/VarElementHandler.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/com/sun/beans/decoder/VarElementHandler.java	Mon Nov 11 23:17:30 2013 -0800
@@ -30,7 +30,7 @@
  * For example:<pre>
  * &lt;var id="id1" idref="id2"/&gt;</pre>
  * is equivalent to {@code id1 = id2} in Java code.
- * <p>The following atributes are supported:
+ * <p>The following attributes are supported:
  * <dl>
  * <dt>idref
  * <dd>the identifier to refer to the variable
@@ -47,7 +47,7 @@
 
     /**
      * Parses attributes of the element.
-     * The following atributes are supported:
+     * The following attributes are supported:
      * <dl>
      * <dt>idref
      * <dd>the identifier to refer to the variable
--- a/src/share/classes/com/sun/beans/decoder/VoidElementHandler.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/com/sun/beans/decoder/VoidElementHandler.java	Mon Nov 11 23:17:30 2013 -0800
@@ -29,7 +29,7 @@
  * This element looks like &lt;object&gt; element,
  * but its value is not used as an argument for element
  * that contains this one.
- * <p>The following atributes are supported:
+ * <p>The following attributes are supported:
  * <dl>
  * <dt>class
  * <dd>the type is used for static methods and fields
--- a/src/share/classes/com/sun/crypto/provider/PBECipherCore.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/com/sun/crypto/provider/PBECipherCore.java	Mon Nov 11 23:17:30 2013 -0800
@@ -408,7 +408,7 @@
      * no padding has been requested (only in encryption mode), and the total
      * input length of the data processed by this cipher is not a multiple of
      * block size
-     * @exception BadPaddingException if decrypting and padding is choosen,
+     * @exception BadPaddingException if decrypting and padding is chosen,
      * but the last input data does not have proper padding bytes.
      */
     byte[] doFinal(byte[] input, int inputOffset, int inputLen)
@@ -448,7 +448,7 @@
      * block size
      * @exception ShortBufferException if the given output buffer is too small
      * to hold the result
-     * @exception BadPaddingException if decrypting and padding is choosen,
+     * @exception BadPaddingException if decrypting and padding is chosen,
      * but the last input data does not have proper padding bytes.
      */
     int doFinal(byte[] input, int inputOffset, int inputLen,
--- a/src/share/classes/com/sun/crypto/provider/PBES1Core.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/com/sun/crypto/provider/PBES1Core.java	Mon Nov 11 23:17:30 2013 -0800
@@ -408,7 +408,7 @@
      * no padding has been requested (only in encryption mode), and the total
      * input length of the data processed by this cipher is not a multiple of
      * block size
-     * @exception BadPaddingException if decrypting and padding is choosen,
+     * @exception BadPaddingException if decrypting and padding is chosen,
      * but the last input data does not have proper padding bytes.
      */
     byte[] doFinal(byte[] input, int inputOffset, int inputLen)
@@ -448,7 +448,7 @@
      * block size
      * @exception ShortBufferException if the given output buffer is too small
      * to hold the result
-     * @exception BadPaddingException if decrypting and padding is choosen,
+     * @exception BadPaddingException if decrypting and padding is chosen,
      * but the last input data does not have proper padding bytes.
      */
     int doFinal(byte[] input, int inputOffset, int inputLen,
--- a/src/share/classes/com/sun/crypto/provider/PBEWithMD5AndDESCipher.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/com/sun/crypto/provider/PBEWithMD5AndDESCipher.java	Mon Nov 11 23:17:30 2013 -0800
@@ -307,7 +307,7 @@
      * no padding has been requested (only in encryption mode), and the total
      * input length of the data processed by this cipher is not a multiple of
      * block size
-     * @exception BadPaddingException if decrypting and padding is choosen,
+     * @exception BadPaddingException if decrypting and padding is chosen,
      * but the last input data does not have proper padding bytes.
      */
     protected byte[] engineDoFinal(byte[] input, int inputOffset, int inputLen)
@@ -348,7 +348,7 @@
      * block size
      * @exception ShortBufferException if the given output buffer is too small
      * to hold the result
-     * @exception BadPaddingException if decrypting and padding is choosen,
+     * @exception BadPaddingException if decrypting and padding is chosen,
      * but the last input data does not have proper padding bytes.
      */
     protected int engineDoFinal(byte[] input, int inputOffset, int inputLen,
--- a/src/share/classes/com/sun/crypto/provider/PBEWithMD5AndTripleDESCipher.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/com/sun/crypto/provider/PBEWithMD5AndTripleDESCipher.java	Mon Nov 11 23:17:30 2013 -0800
@@ -317,7 +317,7 @@
      * no padding has been requested (only in encryption mode), and the total
      * input length of the data processed by this cipher is not a multiple of
      * block size
-     * @exception BadPaddingException if decrypting and padding is choosen,
+     * @exception BadPaddingException if decrypting and padding is chosen,
      * but the last input data does not have proper padding bytes.
      */
     protected byte[] engineDoFinal(byte[] input, int inputOffset, int inputLen)
@@ -358,7 +358,7 @@
      * block size
      * @exception ShortBufferException if the given output buffer is too small
      * to hold the result
-     * @exception BadPaddingException if decrypting and padding is choosen,
+     * @exception BadPaddingException if decrypting and padding is chosen,
      * but the last input data does not have proper padding bytes.
      */
     protected int engineDoFinal(byte[] input, int inputOffset, int inputLen,
--- a/src/share/classes/com/sun/imageio/plugins/bmp/BMPImageReader.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/com/sun/imageio/plugins/bmp/BMPImageReader.java	Mon Nov 11 23:17:30 2013 -0800
@@ -187,15 +187,24 @@
         return 1;
     }
 
+    @Override
     public int getWidth(int imageIndex) throws IOException {
         checkIndex(imageIndex);
-        readHeader();
+        try {
+            readHeader();
+        } catch (IllegalArgumentException e) {
+            throw new IIOException(I18N.getString("BMPImageReader6"), e);
+        }
         return width;
     }
 
     public int getHeight(int imageIndex) throws IOException {
         checkIndex(imageIndex);
-        readHeader();
+        try {
+            readHeader();
+        } catch (IllegalArgumentException e) {
+            throw new IIOException(I18N.getString("BMPImageReader6"), e);
+        }
         return height;
     }
 
@@ -205,7 +214,18 @@
         }
     }
 
-    public void readHeader() throws IOException {
+    /**
+     * Process the image header.
+     *
+     * @exception IllegalStateException if source stream is not set.
+     *
+     * @exception IOException if image stream is corrupted.
+     *
+     * @exception IllegalArgumentException if the image stream does not contain
+     *             a BMP image, or if a sample model instance to describe the
+     *             image can not be created.
+     */
+    protected void readHeader() throws IOException, IllegalArgumentException {
         if (gotHeader)
             return;
 
@@ -307,6 +327,9 @@
                 case BI_RLE4:  // 4-bit RLE compression
 
                     // Read in the palette
+                    if (bitmapOffset < (size + 14)) {
+                        throw new IIOException(I18N.getString("BMPImageReader7"));
+                    }
                     int numberOfEntries = (int)((bitmapOffset-14-size) / 4);
                     int sizeOfPalette = numberOfEntries * 4;
                     palette = new byte[sizeOfPalette];
@@ -375,7 +398,7 @@
                     break;
                 default:
                     throw new
-                        RuntimeException(I18N.getString("BMPImageReader2"));
+                        IIOException(I18N.getString("BMPImageReader2"));
                 }
             } else if (size == 108 || size == 124) {
                 // Windows 4.x BMP
@@ -478,7 +501,7 @@
                 }
             } else {
                 throw new
-                    RuntimeException(I18N.getString("BMPImageReader3"));
+                    IIOException(I18N.getString("BMPImageReader3"));
             }
         }
 
@@ -660,7 +683,11 @@
     public Iterator getImageTypes(int imageIndex)
       throws IOException {
         checkIndex(imageIndex);
-        readHeader();
+        try {
+            readHeader();
+        } catch (IllegalArgumentException e) {
+            throw new IIOException(I18N.getString("BMPImageReader6"), e);
+        }
         ArrayList list = new ArrayList(1);
         list.add(new ImageTypeSpecifier(originalColorModel,
                                         originalSampleModel));
@@ -675,7 +702,11 @@
       throws IOException {
         checkIndex(imageIndex);
         if (metadata == null) {
-            readHeader();
+            try {
+                readHeader();
+            } catch (IllegalArgumentException e) {
+                throw new IIOException(I18N.getString("BMPImageReader6"), e);
+            }
         }
         return metadata;
     }
@@ -686,7 +717,11 @@
 
     public boolean isRandomAccessEasy(int imageIndex) throws IOException {
         checkIndex(imageIndex);
-        readHeader();
+        try {
+            readHeader();
+        } catch (IllegalArgumentException e) {
+            throw new IIOException(I18N.getString("BMPImageReader6"), e);
+        }
         return metadata.compression == BI_RGB;
     }
 
@@ -705,7 +740,11 @@
             param = getDefaultReadParam();
 
         //read header
-        readHeader();
+        try {
+            readHeader();
+        } catch (IllegalArgumentException e) {
+            throw new IIOException(I18N.getString("BMPImageReader6"), e);
+        }
 
         sourceRegion = new Rectangle(0, 0, 0, 0);
         destinationRegion = new Rectangle(0, 0, 0, 0);
@@ -817,7 +856,7 @@
 
             default:
                 throw new
-                    RuntimeException(I18N.getString("BMPImageReader1"));
+                    IIOException(I18N.getString("BMPImageReader1"));
             }
             break;
 
@@ -833,7 +872,7 @@
 
             default:
                 throw new
-                    RuntimeException(I18N.getString("BMPImageReader1"));
+                    IIOException(I18N.getString("BMPImageReader1"));
             }
 
             break;
@@ -874,7 +913,7 @@
 
             default:
                 throw new
-                    RuntimeException(I18N.getString("BMPImageReader1"));
+                    IIOException(I18N.getString("BMPImageReader1"));
             }
 
         case VERSION_4_8_BIT:
@@ -890,7 +929,7 @@
 
             default:
                 throw new
-                    RuntimeException(I18N.getString("BMPImageReader1"));
+                    IIOException(I18N.getString("BMPImageReader1"));
             }
             break;
 
--- a/src/share/classes/com/sun/imageio/plugins/common/StandardMetadataFormat.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/com/sun/imageio/plugins/common/StandardMetadataFormat.java	Mon Nov 11 23:17:30 2013 -0800
@@ -32,7 +32,7 @@
 
 public class StandardMetadataFormat extends IIOMetadataFormatImpl {
 
-    // Utility method for nodes with a single atttribute named "value"
+    // Utility method for nodes with a single attribute named "value"
     private void addSingleAttributeElement(String elementName,
                                            String parentName,
                                            int dataType) {
--- a/src/share/classes/com/sun/imageio/plugins/common/iio-plugin.properties	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/com/sun/imageio/plugins/common/iio-plugin.properties	Mon Nov 11 23:17:30 2013 -0800
@@ -21,6 +21,8 @@
 BMPImageReader3=New BMP version not implemented yet.
 BMPImageReader4=No ImageIO-style reader is found for
 BMPImageReader5=Input has not been set.
+BMPImageReader6=Unable to read the image header.
+BMPImageReader7=Invalid bitmap offset.
 BMPImageWriter0=Output is not an ImageOutputStream.
 BMPImageWriter1=The image region to be encoded is empty.
 BMPImageWriter2=Only 1 or 3 band image is encoded.
@@ -34,7 +36,7 @@
 BMPMetadata1=Metadata is read-only.
 
 
-# WBMP plugin properties 
+# WBMP plugin properties
 WBMPImageReader0=Only one image exists in the stream.
 WBMPImageReader1=Input has not been set.
 WBMPImageReader2=Bad WBMP header.
--- a/src/share/classes/com/sun/imageio/plugins/gif/GIFImageReader.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/com/sun/imageio/plugins/gif/GIFImageReader.java	Mon Nov 11 23:17:30 2013 -0800
@@ -115,6 +115,8 @@
     // The current interlace pass, starting with 0.
     int interlacePass = 0;
 
+    private byte[] fallbackColorTable = null;
+
     // End per-stream settings
 
     // Constants used to control interlacing.
@@ -239,10 +241,22 @@
         byte[] colorTable;
         if (imageMetadata.localColorTable != null) {
             colorTable = imageMetadata.localColorTable;
+            fallbackColorTable = imageMetadata.localColorTable;
         } else {
             colorTable = streamMetadata.globalColorTable;
         }
 
+        if (colorTable == null) {
+            if (fallbackColorTable == null) {
+                this.processWarningOccurred("Use default color table.");
+
+                // no color table, the spec allows to use any palette.
+                fallbackColorTable = getDefaultPalette();
+            }
+
+            colorTable = fallbackColorTable;
+        }
+
         // Normalize color table length to 2^1, 2^2, 2^4, or 2^8
         int length = colorTable.length/3;
         int bits;
@@ -1036,5 +1050,34 @@
         streamY = -1;
         rowsDone = 0;
         interlacePass = 0;
+
+        fallbackColorTable = null;
+    }
+
+    private static byte[] defaultPalette = null;
+
+    private static synchronized byte[] getDefaultPalette() {
+        if (defaultPalette == null) {
+            BufferedImage img = new BufferedImage(1, 1,
+                    BufferedImage.TYPE_BYTE_INDEXED);
+            IndexColorModel icm = (IndexColorModel) img.getColorModel();
+
+            final int size = icm.getMapSize();
+            byte[] r = new byte[size];
+            byte[] g = new byte[size];
+            byte[] b = new byte[size];
+            icm.getReds(r);
+            icm.getGreens(g);
+            icm.getBlues(b);
+
+            defaultPalette = new byte[size * 3];
+
+            for (int i = 0; i < size; i++) {
+                defaultPalette[3 * i + 0] = r[i];
+                defaultPalette[3 * i + 1] = g[i];
+                defaultPalette[3 * i + 2] = b[i];
+            }
+        }
+        return defaultPalette;
     }
 }
--- a/src/share/classes/com/sun/imageio/plugins/jpeg/JFIFMarkerSegment.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/com/sun/imageio/plugins/jpeg/JFIFMarkerSegment.java	Mon Nov 11 23:17:30 2013 -0800
@@ -1368,7 +1368,7 @@
     /**
      * An APP2 marker segment containing an ICC profile.  In the stream
      * a profile larger than 64K is broken up into a series of chunks.
-     * This inner class represents the complete profile as a single objec,
+     * This inner class represents the complete profile as a single object,
      * combining chunks as necessary.
      */
     class ICCMarkerSegment extends MarkerSegment {
--- a/src/share/classes/com/sun/imageio/plugins/jpeg/MarkerSegment.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/com/sun/imageio/plugins/jpeg/MarkerSegment.java	Mon Nov 11 23:17:30 2013 -0800
@@ -28,6 +28,7 @@
 import javax.imageio.metadata.IIOInvalidTreeException;
 import javax.imageio.metadata.IIOMetadataNode;
 import javax.imageio.stream.ImageOutputStream;
+import javax.imageio.IIOException;
 
 import java.io.IOException;
 
@@ -60,6 +61,10 @@
         length = (buffer.buf[buffer.bufPtr++] & 0xff) << 8;
         length |= buffer.buf[buffer.bufPtr++] & 0xff;
         length -= 2;  // JPEG length includes itself, we don't
+
+        if (length < 0) {
+            throw new IIOException("Invalid segment length: " + length);
+        }
         buffer.bufAvail -= 3;
         // Now that we know the true length, ensure that we've got it,
         // or at least a bufferful if length is too big.
--- a/src/share/classes/com/sun/imageio/plugins/jpeg/SOFMarkerSegment.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/com/sun/imageio/plugins/jpeg/SOFMarkerSegment.java	Mon Nov 11 23:17:30 2013 -0800
@@ -78,7 +78,7 @@
         numLines |= buffer.buf[buffer.bufPtr++] & 0xff;
         samplesPerLine = (buffer.buf[buffer.bufPtr++] & 0xff) << 8;
         samplesPerLine |= buffer.buf[buffer.bufPtr++] & 0xff;
-        int numComponents = buffer.buf[buffer.bufPtr++];
+        int numComponents = buffer.buf[buffer.bufPtr++] & 0xff;
         componentSpecs = new ComponentSpec [numComponents];
         for (int i = 0; i < numComponents; i++) {
             componentSpecs[i] = new ComponentSpec(buffer);
--- a/src/share/classes/com/sun/imageio/plugins/png/PNGImageReader.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/com/sun/imageio/plugins/png/PNGImageReader.java	Mon Nov 11 23:17:30 2013 -0800
@@ -688,6 +688,21 @@
             loop: while (true) {
                 int chunkLength = stream.readInt();
                 int chunkType = stream.readInt();
+                int chunkCRC;
+
+                // verify the chunk length
+                if (chunkLength < 0) {
+                    throw new IIOException("Invalid chunk lenght " + chunkLength);
+                };
+
+                try {
+                    stream.mark();
+                    stream.seek(stream.getStreamPosition() + chunkLength);
+                    chunkCRC = stream.readInt();
+                    stream.reset();
+                } catch (IOException e) {
+                    throw new IIOException("Invalid chunk length " + chunkLength);
+                }
 
                 switch (chunkType) {
                 case IDAT_TYPE:
@@ -762,7 +777,11 @@
                     break;
                 }
 
-                int chunkCRC = stream.readInt();
+                // double check whether all chunk data were consumed
+                if (chunkCRC != stream.readInt()) {
+                    throw new IIOException("Failed to read a chunk of type " +
+                            chunkType);
+                }
                 stream.flushBefore(stream.getStreamPosition());
             }
         } catch (IOException e) {
@@ -1277,6 +1296,16 @@
             is = new BufferedInputStream(is);
             this.pixelStream = new DataInputStream(is);
 
+            /*
+             * NB: the PNG spec declares that valid range for width
+             * and height is [1, 2^31-1], so here we may fail to allocate
+             * a buffer for destination image due to memory limitation.
+             *
+             * However, the recovery strategy for this case should be
+             * defined on the level of application, so we will not
+             * try to estimate the required amount of the memory and/or
+             * handle OOM in any way.
+             */
             theImage = getDestination(param,
                                       getImageTypes(0),
                                       width,
--- a/src/share/classes/com/sun/java/swing/plaf/gtk/GTKColorChooserPanel.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/com/sun/java/swing/plaf/gtk/GTKColorChooserPanel.java	Mon Nov 11 23:17:30 2013 -0800
@@ -1041,7 +1041,7 @@
         }
 
         /**
-         * Rotates the triangle to accomodate the passed in hue.
+         * Rotates the triangle to accommodate the passed in hue.
          */
         private void setAngleFromHue(float hue) {
             setHueAngle((1.0 - hue) * Math.PI * 2);
--- a/src/share/classes/com/sun/java/swing/plaf/gtk/GTKLookAndFeel.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/com/sun/java/swing/plaf/gtk/GTKLookAndFeel.java	Mon Nov 11 23:17:30 2013 -0800
@@ -304,7 +304,7 @@
         table.put("Synth.doNotSetTextAA", true);
 
         initResourceBundle(table);
-        // For compatability with apps expecting certain defaults we'll
+        // For compatibility with apps expecting certain defaults we'll
         // populate the table with the values from basic.
         initSystemColorDefaults(table);
         initComponentDefaults(table);
@@ -332,7 +332,7 @@
     }
 
     protected void initComponentDefaults(UIDefaults table) {
-        // For compatability with apps expecting certain defaults we'll
+        // For compatibility with apps expecting certain defaults we'll
         // populate the table with the values from basic.
         super.initComponentDefaults(table);
 
--- a/src/share/classes/com/sun/java/swing/plaf/gtk/GTKStyle.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/com/sun/java/swing/plaf/gtk/GTKStyle.java	Mon Nov 11 23:17:30 2013 -0800
@@ -131,7 +131,7 @@
      * Returns a <code>SynthPainter</code> that will route the appropriate
      * calls to a <code>GTKEngine</code>.
      *
-     * @param state SynthContext indentifying requestor
+     * @param state SynthContext identifying requestor
      * @return SynthPainter
      */
     @Override
@@ -204,7 +204,7 @@
     /**
      * Returns the color for the specified state.
      *
-     * @param context SynthContext identifying requester
+     * @param context SynthContext identifying requestor
      * @param state to get the color for
      * @param type of the color
      * @return Color to render with
@@ -305,7 +305,7 @@
      * insets will be placed in it, otherwise a new Insets object will be
      * created and returned.
      *
-     * @param context SynthContext indentifying requestor
+     * @param context SynthContext identifying requestor
      * @param insets Where to place Insets
      * @return Insets.
      */
@@ -640,7 +640,7 @@
     /**
      * Convenience method to get a class specific integer value.
      *
-     * @param context SynthContext indentifying requestor
+     * @param context SynthContext identifying requestor
      * @param key Key identifying class specific value
      * @param defaultValue Returned if there is no value for the specified
      *        type
@@ -660,7 +660,7 @@
     /**
      * Convenience method to get a class specific Insets value.
      *
-     * @param context SynthContext indentifying requestor
+     * @param context SynthContext identifying requestor
      * @param key Key identifying class specific value
      * @param defaultValue Returned if there is no value for the specified
      *        type
@@ -680,7 +680,7 @@
     /**
      * Convenience method to get a class specific Boolean value.
      *
-     * @param context SynthContext indentifying requestor
+     * @param context SynthContext identifying requestor
      * @param key Key identifying class specific value
      * @param defaultValue Returned if there is no value for the specified
      *        type
@@ -702,7 +702,7 @@
      * to. A Style should NOT assume the opacity will remain this value, the
      * developer may reset it or override it.
      *
-     * @param context SynthContext indentifying requestor
+     * @param context SynthContext identifying requestor
      * @return opaque Whether or not the JComponent is opaque.
      */
     @Override
@@ -843,7 +843,7 @@
 
         // Is it another kind of value ?
         if (key != "engine") {
-            // For backward compatability we'll fallback to the UIManager.
+            // For backward compatibility we'll fallback to the UIManager.
             // We don't go to the UIManager for engine as the engine is GTK
             // specific.
             Object value = UIManager.get(key);
--- a/src/share/classes/com/sun/java/swing/plaf/gtk/resources/gtk_de.properties	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/com/sun/java/swing/plaf/gtk/resources/gtk_de.properties	Mon Nov 11 23:17:30 2013 -0800
@@ -41,7 +41,7 @@
 FileChooser.openDialogTitle.textAndMnemonic=\u00D6ffnen
 FileChooser.pathLabel.textAndMnemonic=Aus&wahl:
 FileChooser.filterLabel.textAndMnemonic=Filter:
-FileChooser.foldersLabel.textAndMnemonic=Or&dner
+FileChooser.foldersLabel.textAndMnemonic=O&rdner
 FileChooser.filesLabel.textAndMnemonic=&Dateien
 
 FileChooser.cancelButtonToolTip.textAndMnemonic=Dialogfeld f\u00FCr Dateiauswahl schlie\u00DFen.
--- a/src/share/classes/com/sun/java/swing/plaf/motif/MotifInternalFrameTitlePane.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/com/sun/java/swing/plaf/motif/MotifInternalFrameTitlePane.java	Mon Nov 11 23:17:30 2013 -0800
@@ -86,19 +86,19 @@
 
     protected void assembleSystemMenu() {
         systemMenu = new JPopupMenu();
-        JMenuItem mi = systemMenu.add(new JMenuItem(restoreAction));
-        mi.setMnemonic('R');
-        mi = systemMenu.add(new JMenuItem(moveAction));
-        mi.setMnemonic('M');
-        mi = systemMenu.add(new JMenuItem(sizeAction));
-        mi.setMnemonic('S');
-        mi = systemMenu.add(new JMenuItem(iconifyAction));
-        mi.setMnemonic('n');
-        mi = systemMenu.add(new JMenuItem(maximizeAction));
-        mi.setMnemonic('x');
+        JMenuItem mi = systemMenu.add(restoreAction);
+        mi.setMnemonic(getButtonMnemonic("restore"));
+        mi = systemMenu.add(moveAction);
+        mi.setMnemonic(getButtonMnemonic("move"));
+        mi = systemMenu.add(sizeAction);
+        mi.setMnemonic(getButtonMnemonic("size"));
+        mi = systemMenu.add(iconifyAction);
+        mi.setMnemonic(getButtonMnemonic("minimize"));
+        mi = systemMenu.add(maximizeAction);
+        mi.setMnemonic(getButtonMnemonic("maximize"));
         systemMenu.add(new JSeparator());
-        mi = systemMenu.add(new JMenuItem(closeAction));
-        mi.setMnemonic('C');
+        mi = systemMenu.add(closeAction);
+        mi.setMnemonic(getButtonMnemonic("close"));
 
         systemButton = new SystemButton();
         systemButton.addActionListener(new ActionListener() {
@@ -124,6 +124,14 @@
         });
     }
 
+    private static int getButtonMnemonic(String button) {
+        try {
+            return Integer.parseInt(UIManager.getString(
+                    "InternalFrameTitlePane." + button + "Button.mnemonic"));
+        } catch (NumberFormatException e) {
+            return -1;
+        }
+    }
 
     protected void createButtons() {
         minimizeButton = new MinimizeButton();
--- a/src/share/classes/com/sun/java/swing/plaf/windows/WindowsGraphicsUtils.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/com/sun/java/swing/plaf/windows/WindowsGraphicsUtils.java	Mon Nov 11 23:17:30 2013 -0800
@@ -45,7 +45,7 @@
 
     /**
      * Renders a text String in Windows without the mnemonic.
-     * This is here because the WindowsUI hiearchy doesn't match the Component heirarchy. All
+     * This is here because the WindowsUI hierarchy doesn't match the Component hierarchy. All
      * the overriden paintText methods of the ButtonUI delegates will call this static method.
      * <p>
      * @param g Graphics context
--- a/src/share/classes/com/sun/java/swing/plaf/windows/WindowsIconFactory.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/com/sun/java/swing/plaf/windows/WindowsIconFactory.java	Mon Nov 11 23:17:30 2013 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 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
@@ -174,7 +174,7 @@
             XPStyle xp = XPStyle.getXP();
             if (xp != null) {
                 Skin skin = xp.getSkin(c, part);
-                JButton b = (JButton)c;
+                AbstractButton b = (AbstractButton)c;
                 ButtonModel model = b.getModel();
 
                 // Find out if frame is inactive
--- a/src/share/classes/com/sun/java/swing/plaf/windows/WindowsInternalFrameTitlePane.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/com/sun/java/swing/plaf/windows/WindowsInternalFrameTitlePane.java	Mon Nov 11 23:17:30 2013 -0800
@@ -326,18 +326,27 @@
 
     protected void addSystemMenuItems(JPopupMenu menu) {
         JMenuItem mi = menu.add(restoreAction);
-        mi.setMnemonic('R');
+        mi.setMnemonic(getButtonMnemonic("restore"));
         mi = menu.add(moveAction);
-        mi.setMnemonic('M');
+        mi.setMnemonic(getButtonMnemonic("move"));
         mi = menu.add(sizeAction);
-        mi.setMnemonic('S');
+        mi.setMnemonic(getButtonMnemonic("size"));
         mi = menu.add(iconifyAction);
-        mi.setMnemonic('n');
+        mi.setMnemonic(getButtonMnemonic("minimize"));
         mi = menu.add(maximizeAction);
-        mi.setMnemonic('x');
-        systemPopupMenu.add(new JSeparator());
+        mi.setMnemonic(getButtonMnemonic("maximize"));
+        menu.add(new JSeparator());
         mi = menu.add(closeAction);
-        mi.setMnemonic('C');
+        mi.setMnemonic(getButtonMnemonic("close"));
+    }
+
+    private static int getButtonMnemonic(String button) {
+        try {
+            return Integer.parseInt(UIManager.getString(
+                    "InternalFrameTitlePane." + button + "Button.mnemonic"));
+        } catch (NumberFormatException e) {
+            return -1;
+        }
     }
 
     protected void showSystemMenu(){
--- a/src/share/classes/com/sun/java/swing/plaf/windows/WindowsLookAndFeel.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/com/sun/java/swing/plaf/windows/WindowsLookAndFeel.java	Mon Nov 11 23:17:30 2013 -0800
@@ -2012,7 +2012,7 @@
      * results.
      * </p>
      *
-     * @param component Component the error occured in, may be
+     * @param component Component the error occurred in, may be
      *                  null indicating the error condition is
      *                  not directly associated with a
      *                  <code>Component</code>.
--- a/src/share/classes/com/sun/java/swing/plaf/windows/WindowsTextFieldUI.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/com/sun/java/swing/plaf/windows/WindowsTextFieldUI.java	Mon Nov 11 23:17:30 2013 -0800
@@ -50,7 +50,7 @@
  * <li>The cursor blinks at about 1/2 second intervals.
  * <li>The entire value is selected when focus is gained.
  * <li>Shift-left-arrow and shift-right-arrow extend selection
- * <li>Cntrl-left-arrow and cntrl-right-arrow act like home and
+ * <li>Ctrl-left-arrow and ctrl-right-arrow act like home and
  *   end respectively.
  * </ul>
  * <p>
--- a/src/share/classes/com/sun/java/swing/plaf/windows/WindowsTextUI.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/com/sun/java/swing/plaf/windows/WindowsTextUI.java	Mon Nov 11 23:17:30 2013 -0800
@@ -162,7 +162,7 @@
          *        necessarily the region to paint.
          * @param c the editor
          * @param view View painting for
-         * @return region drawing occured in
+         * @return region drawing occurred in
          */
         public Shape paintLayer(Graphics g, int offs0, int offs1,
                                 Shape bounds, JTextComponent c, View view) {
--- a/src/share/classes/com/sun/java/util/jar/pack/NativeUnpack.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/com/sun/java/util/jar/pack/NativeUnpack.java	Mon Nov 11 23:17:30 2013 -0800
@@ -190,7 +190,7 @@
 
         copyInOption(Utils.DEBUG_VERBOSE);
         copyInOption(Pack200.Unpacker.DEFLATE_HINT);
-        if (modtime == Constants.NO_MODTIME)  // Dont pass KEEP && NOW
+        if (modtime == Constants.NO_MODTIME)  // Don't pass KEEP && NOW
             copyInOption(Utils.UNPACK_MODIFICATION_TIME);
         updateProgress();  // reset progress bar
         for (;;) {
--- a/src/share/classes/com/sun/java/util/jar/pack/PackageWriter.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/com/sun/java/util/jar/pack/PackageWriter.java	Mon Nov 11 23:17:30 2013 -0800
@@ -106,7 +106,7 @@
 
     Set<Entry>                       requiredEntries;  // for the CP
     Map<Attribute.Layout, int[]>     backCountTable;   // for layout callables
-    int[][]     attrCounts;       // count attr. occurences
+    int[][]     attrCounts;       // count attr. occurrences
 
     void setup() {
         requiredEntries = new HashSet<>();
--- a/src/share/classes/com/sun/jdi/connect/ListeningConnector.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/com/sun/jdi/connect/ListeningConnector.java	Mon Nov 11 23:17:30 2013 -0800
@@ -70,7 +70,7 @@
      * method).
      * <p>
      * If <code>arguments</code> contains addressing information. and
-     * only one conection will be accepted, the {@link #accept accept} method
+     * only one connection will be accepted, the {@link #accept accept} method
      * can be called immediately without calling this method.
      *
      * @return the address at which the connector is listening
--- a/src/share/classes/com/sun/jdi/connect/spi/TransportService.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/com/sun/jdi/connect/spi/TransportService.java	Mon Nov 11 23:17:30 2013 -0800
@@ -250,7 +250,7 @@
      *
      * @param   address
      *          The address to start listening for connections,
-     *          or <tt>null</tt> to listen on an address choosen
+     *          or <tt>null</tt> to listen on an address chosen
      *          by the transport service.
      *
      * @return  a listen key to be used in subsequent calls to be
@@ -266,7 +266,7 @@
     public abstract ListenKey startListening(String address) throws IOException;
 
     /**
-     * Listens on an address choosen by the transport service.
+     * Listens on an address chosen by the transport service.
      *
      * <p> This convenience method works as if by invoking {@link
      * #startListening(String) startListening(<tt>null</tt>)}. </p>
--- a/src/share/classes/com/sun/jmx/mbeanserver/DefaultMXBeanMappingFactory.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/com/sun/jmx/mbeanserver/DefaultMXBeanMappingFactory.java	Mon Nov 11 23:17:30 2013 -0800
@@ -1291,7 +1291,7 @@
              * ambiguous set.  If this set itself corresponds to a constructor,
              * there is no ambiguity for that pair.  In the usual case, one
              * of the constructors is a superset of the other so the union is
-             * just the bigger constuctor.
+             * just the bigger constructor.
              *
              * The algorithm here is quadratic in the number of constructors
              * with a @ConstructorProperties annotation.  Typically this corresponds
--- a/src/share/classes/com/sun/jmx/mbeanserver/Introspector.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/com/sun/jmx/mbeanserver/Introspector.java	Mon Nov 11 23:17:30 2013 -0800
@@ -644,7 +644,7 @@
         /**
          * Returns the list of "getter" methods for the given class. The list
          * is ordered so that isXXX methods appear before getXXX methods - this
-         * is for compatability with the JavaBeans Introspector.
+         * is for compatibility with the JavaBeans Introspector.
          */
         static List<Method> getReadMethods(Class<?> clazz) {
             // return cached result if available
@@ -682,7 +682,7 @@
          * {@code null} if no method is found.
          */
         static Method getReadMethod(Class<?> clazz, String property) {
-            // first character in uppercase (compatability with JavaBeans)
+            // first character in uppercase (compatibility with JavaBeans)
             property = property.substring(0, 1).toUpperCase(Locale.ENGLISH) +
                 property.substring(1);
             String getMethod = GET_METHOD_PREFIX + property;
--- a/src/share/classes/com/sun/jmx/snmp/IPAcl/TokenMgrError.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/com/sun/jmx/snmp/IPAcl/TokenMgrError.java	Mon Nov 11 23:17:30 2013 -0800
@@ -35,7 +35,7 @@
     */
 
    /**
-    * Lexical error occured.
+    * Lexical error occurred.
     */
    static final int LEXICAL_ERROR = 0;
 
@@ -114,10 +114,10 @@
     * token manager to indicate a lexical error.
     * Parameters :
     *    EOFSeen     : indicates if EOF caused the lexicl error
-    *    curLexState : lexical state in which this error occured
-    *    errorLine   : line number when the error occured
-    *    errorColumn : column number when the error occured
-    *    errorAfter  : prefix that was seen before this error occured
+    *    curLexState : lexical state in which this error occurred
+    *    errorLine   : line number when the error occurred
+    *    errorColumn : column number when the error occurred
+    *    errorAfter  : prefix that was seen before this error occurred
     *    curchar     : the offending character
     * Note: You can customize the lexical error message by modifying this method.
     */
--- a/src/share/classes/com/sun/jmx/snmp/agent/SnmpErrorHandlerAgent.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/com/sun/jmx/snmp/agent/SnmpErrorHandlerAgent.java	Mon Nov 11 23:17:30 2013 -0800
@@ -70,7 +70,7 @@
      * @param server The MBean server to register the service with.
      * @param name The object name.
      *
-     * @return The passed name paramter.
+     * @return The passed name parameter.
      *
      * @exception java.lang.Exception
      */
@@ -99,7 +99,7 @@
      *
      * @param inRequest The SnmpMibRequest object holding the list of variable to be retrieved.
      *
-     * @exception SnmpStatusException An error occured during the operation.
+     * @exception SnmpStatusException An error occurred during the operation.
      */
 
     @Override
@@ -147,7 +147,7 @@
      *
      * @param inRequest The SnmpMibRequest object holding the list of variable to be set.
      *
-     * @exception SnmpStatusException An error occured during the operation.
+     * @exception SnmpStatusException An error occurred during the operation.
      */
 
     @Override
@@ -165,7 +165,7 @@
      *
      * @param inRequest The SnmpMibRequest object holding the list of variables to be retrieved.
      *
-     * @exception SnmpStatusException An error occured during the operation.
+     * @exception SnmpStatusException An error occurred during the operation.
      */
 
     @Override
@@ -190,7 +190,7 @@
      *
      * @param inRequest The SnmpMibRequest object holding the list of variable to be retrieved.
      *
-     * @exception SnmpStatusException An error occured during the operation.
+     * @exception SnmpStatusException An error occurred during the operation.
      */
 
     @Override
--- a/src/share/classes/com/sun/jmx/snmp/agent/SnmpMibAgent.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/com/sun/jmx/snmp/agent/SnmpMibAgent.java	Mon Nov 11 23:17:30 2013 -0800
@@ -127,7 +127,7 @@
      *            be retrieved. This list is composed of
      *            <CODE>SnmpVarBind</CODE> objects.
      *
-     * @exception SnmpStatusException An error occured during the operation.
+     * @exception SnmpStatusException An error occurred during the operation.
      */
     @Override
     public abstract void get(SnmpMibRequest req)
@@ -142,7 +142,7 @@
      *            OIDs from which the next variables should be retrieved.
      *            This list is composed of <CODE>SnmpVarBind</CODE> objects.
      *
-     * @exception SnmpStatusException An error occured during the operation.
+     * @exception SnmpStatusException An error occurred during the operation.
      */
     @Override
     public abstract void getNext(SnmpMibRequest req)
@@ -166,7 +166,7 @@
      *    following the first <CODE>nonRepeat</CODE> variables for which
      *    multiple lexicographic successors are requested.
      *
-     * @exception SnmpStatusException An error occured during the operation.
+     * @exception SnmpStatusException An error occurred during the operation.
      */
     @Override
     public abstract void getBulk(SnmpMibRequest req, int nonRepeat,
@@ -184,7 +184,7 @@
      *            be set. This list is composed of
      *            <CODE>SnmpVarBind</CODE> objects.
      *
-     * @exception SnmpStatusException An error occured during the operation.
+     * @exception SnmpStatusException An error occurred during the operation.
      *            Throwing an exception in this method will break the
      *            atomicity of the SET operation. Care must be taken so that
      *            the exception is thrown in the {@link #check(SnmpMibRequest)}
@@ -643,7 +643,7 @@
      *
      * @return The variable list containing returned values.
      *
-     * @exception SnmpStatusException An error occured during the operation.
+     * @exception SnmpStatusException An error occurred during the operation.
      */
     void getBulkWithGetNext(SnmpMibRequest req, int nonRepeat, int maxRepeat)
         throws SnmpStatusException {
--- a/src/share/classes/com/sun/jmx/snmp/agent/SnmpMibAgentMBean.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/com/sun/jmx/snmp/agent/SnmpMibAgentMBean.java	Mon Nov 11 23:17:30 2013 -0800
@@ -62,7 +62,7 @@
      *            be retrieved. This list is composed of
      *            <CODE>SnmpVarBind</CODE> objects.
      *
-     * @exception SnmpStatusException An error occured during the operation.
+     * @exception SnmpStatusException An error occurred during the operation.
      * @see SnmpMibAgent#get(SnmpMibRequest)
      */
     public void get(SnmpMibRequest req) throws SnmpStatusException;
@@ -75,7 +75,7 @@
      *            be retrieved. This list is composed of
      *            <CODE>SnmpVarBind</CODE> objects.
      *
-     * @exception SnmpStatusException An error occured during the operation.
+     * @exception SnmpStatusException An error occurred during the operation.
      * @see SnmpMibAgent#getNext(SnmpMibRequest)
      */
     public void getNext(SnmpMibRequest req) throws SnmpStatusException;
@@ -97,7 +97,7 @@
      *    following the first <CODE>nonRepeat</CODE> variables for which
      *    multiple lexicographic successors are requested.
      *
-     * @exception SnmpStatusException An error occured during the operation.
+     * @exception SnmpStatusException An error occurred during the operation.
      * @see SnmpMibAgent#getBulk(SnmpMibRequest,int,int)
      */
     public void getBulk(SnmpMibRequest req, int nonRepeat, int maxRepeat)
@@ -111,7 +111,7 @@
      *            be set. This list is composed of
      *            <CODE>SnmpVarBind</CODE> objects.
      *
-     * @exception SnmpStatusException An error occured during the operation.
+     * @exception SnmpStatusException An error occurred during the operation.
      * @see SnmpMibAgent#set(SnmpMibRequest)
      */
     public void set(SnmpMibRequest req) throws SnmpStatusException;
--- a/src/share/classes/com/sun/jmx/snmp/agent/SnmpMibGroup.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/com/sun/jmx/snmp/agent/SnmpMibGroup.java	Mon Nov 11 23:17:30 2013 -0800
@@ -119,7 +119,7 @@
     // needed...
     // For instance, the subclass could provide a generated isNestedArc()
     // method in which the subgroup OID arcs would be hardcoded.
-    // However, the generic approach was prefered because at this time
+    // However, the generic approach was preferred because at this time
     // groups and subgroups are dynamically registered in the MIB.
     //
     /**
--- a/src/share/classes/com/sun/jmx/snmp/agent/SnmpMibTable.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/com/sun/jmx/snmp/agent/SnmpMibTable.java	Mon Nov 11 23:17:30 2013 -0800
@@ -435,7 +435,7 @@
      * If the entry is going to be registered, or if ObjectName's are
      * required, then
      * {@link com.sun.jmx.snmp.agent.SnmpMibTable#addEntry(SnmpOid,
-     * ObjectName, Object)} should be prefered.
+     * ObjectName, Object)} should be preferred.
      * <br> This function is mainly provided for backward compatibility.
      *
      * <p>
@@ -1088,7 +1088,7 @@
      * @return <code>true</code> if the row can be placed in
      *         <i>notInService</i> state.
      *
-     * @exception SnmpStatusException An error occured while trying
+     * @exception SnmpStatusException An error occurred while trying
      *            to retrieve the row status, and the operation should
      *            be aborted.
      *
@@ -2444,7 +2444,7 @@
                                                l1+1,l2);
 
             } else if (pos < tablecount) {
-                // Vector is large enough to accomodate one additional
+                // Vector is large enough to accommodate one additional
                 // entry.
                 //
                 // Shift vector, making an empty room at `pos'
--- a/src/share/classes/com/sun/jmx/snmp/agent/SnmpRequestTree.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/com/sun/jmx/snmp/agent/SnmpRequestTree.java	Mon Nov 11 23:17:30 2013 -0800
@@ -581,7 +581,7 @@
 
 
             } else if (pos < entrycount) {
-                // Vectors are large enough to accomodate one additional
+                // Vectors are large enough to accommodate one additional
                 // entry.
                 //
                 // Shift vectors, making an empty room at `pos'
--- a/src/share/classes/com/sun/jmx/snmp/agent/SnmpTableSupport.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/com/sun/jmx/snmp/agent/SnmpTableSupport.java	Mon Nov 11 23:17:30 2013 -0800
@@ -480,7 +480,7 @@
      * associated  SnmpIndex.
      * <p>
      * If the entry is going to be registered, then
-     * {@link com.sun.jmx.snmp.agent.SnmpTableSupport#addEntry(SnmpIndex, ObjectName, Object)} should be prefered.
+     * {@link com.sun.jmx.snmp.agent.SnmpTableSupport#addEntry(SnmpIndex, ObjectName, Object)} should be preferred.
      * <br> This function is mainly provided for backward compatibility.
      *
      * @param index The SnmpIndex built from the given entry.
--- a/src/share/classes/com/sun/jmx/snmp/daemon/SnmpAdaptorServerMBean.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/com/sun/jmx/snmp/daemon/SnmpAdaptorServerMBean.java	Mon Nov 11 23:17:30 2013 -0800
@@ -473,7 +473,7 @@
      * @param specific The specific number of the trap.
      * @param varBindList A list of <CODE>SnmpVarBind</CODE> instances or null.
      *
-     * @exception IOException An I/O error occured while sending the trap.
+     * @exception IOException An I/O error occurred while sending the trap.
      * @exception SnmpStatusException If the trap exceeds the limit defined by <CODE>bufferSize</CODE>.
      */
     public void snmpV1Trap(int generic, int specific, SnmpVarBindList varBindList) throws IOException, SnmpStatusException;
@@ -563,7 +563,7 @@
      * @param trapOid The OID identifying the trap.
      * @param varBindList A list of <CODE>SnmpVarBind</CODE> instances or null.
      *
-     * @exception IOException An I/O error occured while sending the trap.
+     * @exception IOException An I/O error occurred while sending the trap.
      * @exception SnmpStatusException If the trap exceeds the limit defined by <CODE>bufferSize</CODE>.
      */
     public void snmpV2Trap(SnmpOid trapOid, SnmpVarBindList varBindList) throws IOException, SnmpStatusException;
--- a/src/share/classes/com/sun/jmx/snmp/daemon/SnmpRequestHandler.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/com/sun/jmx/snmp/daemon/SnmpRequestHandler.java	Mon Nov 11 23:17:30 2013 -0800
@@ -559,7 +559,7 @@
         //
         SnmpPduPacket result= executeSubRequest(req,userData);
         if (result != null)
-            // It means that an error occured. The error is already
+            // It means that an error occurred. The error is already
             // formatted by the executeSubRequest
             // method.
             return result;
--- a/src/share/classes/com/sun/jmx/snmp/daemon/SnmpSubBulkRequestHandler.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/com/sun/jmx/snmp/daemon/SnmpSubBulkRequestHandler.java	Mon Nov 11 23:17:30 2013 -0800
@@ -52,7 +52,7 @@
     private SnmpAdaptorServer server = null;
 
     /**
-     * The constuctor initialize the subrequest with the whole varbind list contained
+     * The constructor initialize the subrequest with the whole varbind list contained
      * in the original request.
      */
     protected SnmpSubBulkRequestHandler(SnmpEngine engine,
@@ -68,7 +68,7 @@
     }
 
     /**
-     * The constuctor initialize the subrequest with the whole varbind list contained
+     * The constructor initialize the subrequest with the whole varbind list contained
      * in the original request.
      */
     protected SnmpSubBulkRequestHandler(SnmpAdaptorServer server,
--- a/src/share/classes/com/sun/jmx/snmp/daemon/SnmpSubNextRequestHandler.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/com/sun/jmx/snmp/daemon/SnmpSubNextRequestHandler.java	Mon Nov 11 23:17:30 2013 -0800
@@ -55,7 +55,7 @@
 class SnmpSubNextRequestHandler extends SnmpSubRequestHandler {
     private SnmpAdaptorServer server = null;
     /**
-     * The constuctor initialize the subrequest with the whole varbind
+     * The constructor initialize the subrequest with the whole varbind
      * list contained in the original request.
      */
     protected SnmpSubNextRequestHandler(SnmpAdaptorServer server,
--- a/src/share/classes/com/sun/jmx/snmp/daemon/SnmpSubRequestHandler.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/com/sun/jmx/snmp/daemon/SnmpSubRequestHandler.java	Mon Nov 11 23:17:30 2013 -0800
@@ -99,7 +99,7 @@
     }
 
     /**
-     * SNMP V1/V2 The constuctor initialize the subrequest with the whole varbind list contained
+     * SNMP V1/V2 The constructor initialize the subrequest with the whole varbind list contained
      * in the original request.
      */
     @SuppressWarnings("unchecked")  // cast to NonSyncVector<SnmpVarBind>
--- a/src/share/classes/com/sun/jndi/ldap/Connection.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/com/sun/jndi/ldap/Connection.java	Mon Nov 11 23:17:30 2013 -0800
@@ -568,7 +568,7 @@
             //System.err.println("ldap.abandon: " + ex);
         }
 
-        // Dont expect any response for the abandon request.
+        // Don't expect any response for the abandon request.
     }
 
     synchronized void abandonOutstandingReqs(Control[] reqCtls) {
@@ -623,7 +623,7 @@
             //System.err.println("ldap.unbind: " + ex);
         }
 
-        // Dont expect any response for the unbind request.
+        // Don't expect any response for the unbind request.
     }
 
     /**
--- a/src/share/classes/com/sun/jndi/ldap/Filter.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/com/sun/jndi/ldap/Filter.java	Mon Nov 11 23:17:30 2013 -0800
@@ -191,7 +191,7 @@
 
     /**
      * convert character 'c' that represents a hexadecimal digit to an integer.
-     * if 'c' is not a hexidecimal digit [0-9A-Fa-f], -1 is returned.
+     * if 'c' is not a hexadecimal digit [0-9A-Fa-f], -1 is returned.
      * otherwise the converted value is returned.
      */
     private static int hexchar2int( byte c ) {
--- a/src/share/classes/com/sun/jndi/ldap/LdapCtx.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/com/sun/jndi/ldap/LdapCtx.java	Mon Nov 11 23:17:30 2013 -0800
@@ -176,7 +176,7 @@
         "com.sun.jndi.ldap.netscape.schemaBugs";
     // deprecated
     private static final String OLD_NETSCAPE_SCHEMA_BUG =
-        "com.sun.naming.netscape.schemaBugs";   // for backward compatability
+        "com.sun.naming.netscape.schemaBugs";   // for backward compatibility
 
     // Timeout for socket connect
     private static final String CONNECT_TIMEOUT =
--- a/src/share/classes/com/sun/jndi/ldap/LdapName.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/com/sun/jndi/ldap/LdapName.java	Mon Nov 11 23:17:30 2013 -0800
@@ -862,7 +862,7 @@
                 --end;
             }
 
-            // Add back the trailing whitespace with a preceeding '\'
+            // Add back the trailing whitespace with a preceding '\'
             // (escaped or unescaped) that was taken off in the above
             // loop. Whether or not to retain this whitespace is
             // decided below.
@@ -918,7 +918,7 @@
             }
 
             // Get rid of the unescaped trailing whitespace with the
-            // preceeding '\' character that was previously added back.
+            // preceding '\' character that was previously added back.
             int len = buf.length();
             if (isWhitespace(buf.charAt(len - 1)) && esc != (end - 1)) {
                 buf.setLength(len - 1);
--- a/src/share/classes/com/sun/jndi/toolkit/ctx/PartialCompositeContext.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/com/sun/jndi/toolkit/ctx/PartialCompositeContext.java	Mon Nov 11 23:17:30 2013 -0800
@@ -109,7 +109,7 @@
 
     /**
      * A cheap way of getting the environment.
-     * Default implemenation is NOT cheap because it simply calls
+     * Default implementation is NOT cheap because it simply calls
      * getEnvironment(), which most implementations clone before returning.
      * Subclass should ALWAYS override this with the cheapest possible way.
      * The toolkit knows to clone when necessary.
--- a/src/share/classes/com/sun/jndi/toolkit/dir/ContextEnumerator.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/com/sun/jndi/toolkit/dir/ContextEnumerator.java	Mon Nov 11 23:17:30 2013 -0800
@@ -82,7 +82,7 @@
             return ctx.listBindings("");
     }
 
-    // Subclass should overrride so that instance is of same type as subclass
+    // Subclass should override so that instance is of same type as subclass
     protected ContextEnumerator newEnumerator(Context ctx, int scope,
         String contextName, boolean returnSelf) throws NamingException {
             return new ContextEnumerator(ctx, scope, contextName, returnSelf);
--- a/src/share/classes/com/sun/media/sound/AbstractMidiDevice.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/com/sun/media/sound/AbstractMidiDevice.java	Mon Nov 11 23:17:30 2013 -0800
@@ -106,7 +106,7 @@
         return info;
     }
 
-    /** Open the device from an aplication program.
+    /** Open the device from an application program.
      * Setting the open reference count to -1 here prevents Transmitters and Receivers that
      * opened the the device implicitly from closing it. The only way to close the device after
      * this call is a call to close().
--- a/src/share/classes/com/sun/media/sound/AiffFileReader.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/com/sun/media/sound/AiffFileReader.java	Mon Nov 11 23:17:30 2013 -0800
@@ -51,15 +51,6 @@
 
     private static final int MAX_READ_LENGTH = 8;
 
-    /**
-     * Constructs a new AiffParser object.
-     */
-    public AiffFileReader() {
-    }
-
-
-
-
     // METHODS TO IMPLEMENT AudioFileReader
 
     /**
@@ -292,9 +283,15 @@
                     throw new UnsupportedAudioFileException("Invalid AIFF/COMM chunksize");
                 }
                 // Read header info.
-                int channels = dis.readShort();
-                dis.readInt();
-                int sampleSizeInBits = dis.readShort();
+                int channels = dis.readUnsignedShort();
+                if (channels <= 0) {
+                    throw new UnsupportedAudioFileException("Invalid number of channels");
+                }
+                dis.readInt(); // numSampleFrames
+                int sampleSizeInBits = dis.readUnsignedShort();
+                if (sampleSizeInBits < 1 || sampleSizeInBits > 32) {
+                    throw new UnsupportedAudioFileException("Invalid AIFF/COMM sampleSize");
+                }
                 float sampleRate = (float) read_ieee_extended(dis);
                 chunkRead += (2 + 4 + 2 + 10);
 
@@ -438,7 +435,4 @@
 
         return f;
     }
-
-
-
 }
--- a/src/share/classes/com/sun/media/sound/AuFileReader.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/com/sun/media/sound/AuFileReader.java	Mon Nov 11 23:17:30 2013 -0800
@@ -49,13 +49,6 @@
  */
 public final class AuFileReader extends SunFileReader {
 
-    /**
-     * Constructs a new AuFileReader object.
-     */
-    public AuFileReader() {
-    }
-
-
     // METHODS TO IMPLEMENT AudioFileReader
 
     /**
@@ -90,7 +83,7 @@
         int frameRate      = -1;
         int frameSize      = -1;
         int channels       = -1;
-        int sampleSizeInBits = 0;
+        final int sampleSizeInBits;
         int length = 0;
         int nread = 0;
         AudioFormat.Encoding encoding = null;
@@ -118,6 +111,10 @@
         encoding_local = (bigendian==true ? dis.readInt() : rllong(dis) );  nread += 4;
         sampleRate     = (bigendian==true ? dis.readInt() : rllong(dis) );  nread += 4;
         channels       = (bigendian==true ? dis.readInt() : rllong(dis) );  nread += 4;
+        if (channels <= 0) {
+            dis.reset();
+            throw new UnsupportedAudioFileException("Invalid number of channels");
+        }
 
         frameRate = sampleRate;
 
@@ -372,7 +369,4 @@
 
         return result;
     }
-
-
-
 }
--- a/src/share/classes/com/sun/media/sound/AudioSynthesizerPropertyInfo.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/com/sun/media/sound/AudioSynthesizerPropertyInfo.java	Mon Nov 11 23:17:30 2013 -0800
@@ -34,7 +34,7 @@
     /**
      * Constructs a <code>AudioSynthesizerPropertyInfo</code> object with a given
      * name and value. The <code>description</code> and <code>choices</code>
-     * are intialized by <code>null</code> values.
+     * are initialized by <code>null</code> values.
      *
      * @param name the name of the property
      * @param value the current value or class used for values.
--- a/src/share/classes/com/sun/media/sound/DirectAudioDevice.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/com/sun/media/sound/DirectAudioDevice.java	Mon Nov 11 23:17:30 2013 -0800
@@ -378,7 +378,7 @@
         protected final boolean isSource;         // true for SourceDataLine, false for TargetDataLine
         protected volatile long bytePosition;
         protected volatile boolean doIO = false;     // true in between start() and stop() calls
-        protected volatile boolean stoppedWritten = false; // true if a write occured in stopped state
+        protected volatile boolean stoppedWritten = false; // true if a write occurred in stopped state
         protected volatile boolean drained = false; // set to true when drain function returns, set to false in write()
         protected boolean monitoring = false;
 
@@ -642,7 +642,7 @@
         public void drain() {
             noService = true;
             // additional safeguard against draining forever
-            // this occured on Solaris 8 x86, probably due to a bug
+            // this occurred on Solaris 8 x86, probably due to a bug
             // in the audio driver
             int counter = 0;
             long startPos = getLongFramePosition();
--- a/src/share/classes/com/sun/media/sound/SoftMixingSourceDataLine.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/com/sun/media/sound/SoftMixingSourceDataLine.java	Mon Nov 11 23:17:30 2013 -0800
@@ -37,7 +37,7 @@
 import javax.sound.sampled.SourceDataLine;
 
 /**
- * SourceDataLine implemention for the SoftMixingMixer.
+ * SourceDataLine implementation for the SoftMixingMixer.
  *
  * @author Karl Helgason
  */
--- a/src/share/classes/com/sun/media/sound/WaveFileReader.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/com/sun/media/sound/WaveFileReader.java	Mon Nov 11 23:17:30 2013 -0800
@@ -53,13 +53,6 @@
     private static final int MAX_READ_LENGTH = 12;
 
     /**
-     * Constructs a new WaveFileReader object.
-     */
-    public WaveFileReader() {
-    }
-
-
-    /**
      * Obtains the audio file format of the input stream provided.  The stream must
      * point to valid audio file data.  In general, audio file providers may
      * need to read some data from the stream before determining whether they
@@ -304,6 +297,9 @@
         }
         // channels
         channels = rlshort(dis); nread += 2;
+        if (channels <= 0) {
+            throw new UnsupportedAudioFileException("Invalid number of channels");
+        }
 
         // sample rate.
         sampleRate = rllong(dis); nread += 4;
@@ -316,6 +312,9 @@
 
         // this is the PCM-specific value bitsPerSample
         sampleSizeInBits = (int)rlshort(dis); nread += 2;
+        if (sampleSizeInBits <= 0) {
+            throw new UnsupportedAudioFileException("Invalid bitsPerSample");
+        }
 
         // if sampleSizeInBits==8, we need to use PCM_UNSIGNED
         if ((sampleSizeInBits==8) && encoding.equals(AudioFormat.Encoding.PCM_SIGNED))
@@ -373,5 +372,4 @@
                                   format,
                                   dataLength / format.getFrameSize());
     }
-
 }
--- a/src/share/classes/com/sun/net/httpserver/Headers.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/com/sun/net/httpserver/Headers.java	Mon Nov 11 23:17:30 2013 -0800
@@ -33,7 +33,7 @@
  * {@link java.lang.String},{@link java.util.List}&lt;{@link java.lang.String}&gt;&gt;.
  * The keys are case-insensitive Strings representing the header names and
  * the value associated with each key is a {@link List}&lt;{@link String}&gt; with one
- * element for each occurence of the header name in the request or response.
+ * element for each occurrence of the header name in the request or response.
  * <p>
  * For example, if a response header instance contains one key "HeaderName" with two values "value1 and value2"
  * then this object is output as two header lines:
--- a/src/share/classes/com/sun/net/httpserver/HttpExchange.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/com/sun/net/httpserver/HttpExchange.java	Mon Nov 11 23:17:30 2013 -0800
@@ -170,7 +170,7 @@
      * then no response body is being sent.
      * <p>
      * If the content-length response header has not already been set then
-     * this is set to the apropriate value depending on the response length parameter.
+     * this is set to the appropriate value depending on the response length parameter.
      * <p>
      * This method must be called prior to calling {@link #getResponseBody()}.
      * @param rCode the response code to send
--- a/src/share/classes/com/sun/net/ssl/internal/ssl/Provider.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/com/sun/net/ssl/internal/ssl/Provider.java	Mon Nov 11 23:17:30 2013 -0800
@@ -41,7 +41,7 @@
         super();
     }
 
-    // prefered constructor to enable FIPS mode at runtime
+    // preferred constructor to enable FIPS mode at runtime
     public Provider(java.security.Provider cryptoProvider) {
         super(cryptoProvider);
     }
--- a/src/share/classes/com/sun/org/apache/xml/internal/security/encryption/EncryptionMethod.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/com/sun/org/apache/xml/internal/security/encryption/EncryptionMethod.java	Mon Nov 11 23:17:30 2013 -0800
@@ -110,7 +110,7 @@
      * Returns an iterator over all the additional elements contained in the
      * <code>EncryptionMethod</code>.
      *
-     * @return an <code>Iterator</code> over all the additional infomation
+     * @return an <code>Iterator</code> over all the additional information
      *   about the <code>EncryptionMethod</code>.
      */
     Iterator<Element> getEncryptionMethodInformation();
--- a/src/share/classes/com/sun/org/apache/xml/internal/security/signature/Reference.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/com/sun/org/apache/xml/internal/security/signature/Reference.java	Mon Nov 11 23:17:30 2013 -0800
@@ -63,7 +63,7 @@
  *
  * This includes:
  *
- * Constuct a <CODE>ds:Reference</CODE> from an {@link org.w3c.dom.Element}.
+ * Constructs a <CODE>ds:Reference</CODE> from an {@link org.w3c.dom.Element}.
  *
  * <p>Create a new reference</p>
  * <pre>
--- a/src/share/classes/com/sun/org/apache/xml/internal/security/signature/XMLSignature.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/com/sun/org/apache/xml/internal/security/signature/XMLSignature.java	Mon Nov 11 23:17:30 2013 -0800
@@ -846,7 +846,7 @@
     }
 
     /**
-     * Signal wether Manifest should be automatically validated.
+     * Signal whether Manifest should be automatically validated.
      * Checking the digests in References in a Signature are mandatory, but for
      * References inside a Manifest it is application specific. This boolean is
      * to indicate that the References inside Manifests should be validated.
--- a/src/share/classes/com/sun/rowset/CachedRowSetImpl.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/com/sun/rowset/CachedRowSetImpl.java	Mon Nov 11 23:17:30 2013 -0800
@@ -41,7 +41,7 @@
 /**
  * The standard implementation of the <code>CachedRowSet</code> interface.
  *
- * See interface defintion for full behaviour and implementation requirements.
+ * See interface definition for full behavior and implementation requirements.
  * This reference implementation has made provision for a one-to-one write back
  * facility and it is curremtly be possible to change the peristence provider
  * during the life-time of any CachedRowSetImpl.
@@ -119,14 +119,14 @@
     private Vector<Object> rvh;
 
     /**
-     * The current postion of the cursor in this <code>CachedRowSetImpl</code>
+     * The current position of the cursor in this <code>CachedRowSetImpl</code>
      * object.
      * @serial
      */
     private int cursorPos;
 
     /**
-     * The current postion of the cursor in this <code>CachedRowSetImpl</code>
+     * The current position of the cursor in this <code>CachedRowSetImpl</code>
      * object not counting rows that have been deleted, if any.
      * <P>
      * For example, suppose that the cursor is on the last row of a rowset
@@ -236,7 +236,7 @@
     private int startPos;
 
     /**
-     * The integer value indicating the positon from where the page prior to this
+     * The integer value indicating the position from where the page prior to this
      * was populated.
      */
     private int startPrev;
@@ -3730,7 +3730,7 @@
 
         /*
          * Each call to internalPrevious may move the cursor
-         * over multiple rows, the absolute postion moves one one row
+         * over multiple rows, the absolute position moves one one row
          */
         if (ret == true)
             --absolutePos;
@@ -6265,7 +6265,7 @@
     /**
      * Returns a result set containing the original value of the rowset. The
      * original value is the state of the <code>CachedRowSetImpl</code> after the
-     * last population or synchronization (whichever occured most recently) with
+     * last population or synchronization (whichever occurred most recently) with
      * the data source.
      * <p>
      * The cursor is positioned before the first row in the result set.
@@ -6300,7 +6300,7 @@
      * Returns a result set containing the original value of the current
      * row only.
      * The original value is the state of the <code>CachedRowSetImpl</code> after
-     * the last population or synchronization (whichever occured most recently)
+     * the last population or synchronization (whichever occurred most recently)
      * with the data source.
      *
      * @return the original result set of the row
@@ -9061,7 +9061,7 @@
 
 
    /**
-  * Sets the designated paramter to the given <code>String</code> object.
+  * Sets the designated parameter to the given <code>String</code> object.
   * The driver converts this to a SQL <code>NCHAR</code> or
   * <code>NVARCHAR</code> or <code>LONGNVARCHAR</code> value
   * (depending on the argument's
@@ -9081,7 +9081,7 @@
 
 
  /**
-  * Sets the designated paramter to the given <code>String</code> object.
+  * Sets the designated parameter to the given <code>String</code> object.
   * The driver converts this to a SQL <code>NCHAR</code> or
   * <code>NVARCHAR</code> or <code>LONGNVARCHAR</code>
   * @param parameterName the name of the column to be set
@@ -9421,7 +9421,7 @@
     * if parameterIndex does not correspond
     * to a parameter marker in the SQL statement,  if the length specified
     * is less than zero or if the number of bytes in the inputstream does not match
-    * the specfied length.
+    * the specified length.
     * @throws SQLFeatureNotSupportedException  if the JDBC driver does not support this method
     *
     * @since 1.6
@@ -9481,7 +9481,7 @@
      * @throws SQLException  if parameterIndex does not correspond
      * to a parameter marker in the SQL statement,  or if the length specified
      * is less than zero; if the number of bytes in the inputstream does not match
-     * the specfied length; if a database access error occurs or
+     * the specified length; if a database access error occurs or
      * this method is called on a closed <code>CallableStatement</code>
      * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
      * this method
--- a/src/share/classes/com/sun/rowset/FilteredRowSetImpl.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/com/sun/rowset/FilteredRowSetImpl.java	Mon Nov 11 23:17:30 2013 -0800
@@ -39,7 +39,7 @@
 
 /**
  * The standard implementation of the <code>FilteredRowSet</code> interface. See the interface
- * defintion for full behaviour and implementation requirements.
+ * definition for full behavior and implementation requirements.
  *
  * @see javax.sql.rowset.Predicate
  * @author Jonathan Bruce, Amit Handa
--- a/src/share/classes/com/sun/rowset/JdbcRowSetImpl.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/com/sun/rowset/JdbcRowSetImpl.java	Mon Nov 11 23:17:30 2013 -0800
@@ -36,7 +36,7 @@
 
 /**
  * The standard implementation of the <code>JdbcRowSet</code> interface. See the interface
- * defintion for full behavior and implementation requirements.
+ * definition for full behavior and implementation requirements.
  *
  * @author Jonathan Bruce, Amit Handa
  */
@@ -67,7 +67,7 @@
     private ResultSet rs;
 
     /**
-     * The <code>RowSetMetaDataImpl</code> object that is contructed when
+     * The <code>RowSetMetaDataImpl</code> object that is constructed when
      * a <code>ResultSet</code> object is passed to the <code>JdbcRowSet</code>
      * constructor. This helps in constructing all metadata associated
      * with the <code>ResultSet</code> object using the setter methods of
@@ -3152,7 +3152,7 @@
      * <code>DatabaseMetaData</code> method, this method returns
      * <code>null</code>.
      *
-     * @return the <code>Statment</code> object that produced
+     * @return the <code>Statement</code> object that produced
      * this rowset's <code>ResultSet</code> object or <code>null</code>
      * if the result set was produced some other way
      * @throws SQLException if a database access error occurs
@@ -4748,7 +4748,7 @@
 
 
    /**
-     * Sets the designated paramter to the given <code>String</code> object.
+     * Sets the designated parameter to the given <code>String</code> object.
      * The driver converts this to a SQL <code>NCHAR</code> or
      * <code>NVARCHAR</code> or <code>LONGNVARCHAR</code> value
      * (depending on the argument's
@@ -5883,7 +5883,7 @@
 
 
  /**
-  * Sets the designated paramter to the given <code>String</code> object.
+  * Sets the designated parameter to the given <code>String</code> object.
   * The driver converts this to a SQL <code>NCHAR</code> or
   * <code>NVARCHAR</code> or <code>LONGNVARCHAR</code>
   * @param parameterName the name of the column to be set
@@ -6222,7 +6222,7 @@
     * if parameterIndex does not correspond
     * to a parameter marker in the SQL statement,  if the length specified
     * is less than zero or if the number of bytes in the inputstream does not match
-    * the specfied length.
+    * the specified length.
     * @throws SQLFeatureNotSupportedException  if the JDBC driver does not support this method
     *
     * @since 1.6
@@ -6283,7 +6283,7 @@
       * @throws SQLException  if parameterIndex does not correspond
       * to a parameter marker in the SQL statement,  or if the length specified
       * is less than zero; if the number of bytes in the inputstream does not match
-      * the specfied length; if a database access error occurs or
+      * the specified length; if a database access error occurs or
       * this method is called on a closed <code>CallableStatement</code>
       * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
       * this method
--- a/src/share/classes/com/sun/rowset/WebRowSetImpl.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/com/sun/rowset/WebRowSetImpl.java	Mon Nov 11 23:17:30 2013 -0800
@@ -42,7 +42,7 @@
 
 /**
  * The standard implementation of the <code>WebRowSet</code> interface. See the interface
- * defintion for full behaviour and implementation requirements.
+ * definition for full behavior and implementation requirements.
  *
  * @author Jonathan Bruce, Amit Handa
  */
--- a/src/share/classes/com/sun/rowset/internal/SyncResolverImpl.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/com/sun/rowset/internal/SyncResolverImpl.java	Mon Nov 11 23:17:30 2013 -0800
@@ -4109,7 +4109,7 @@
     /**
      * Returns a result set containing the original value of the rowset. The
      * original value is the state of the <code>CachedRowSetImpl</code> after the
-     * last population or synchronization (whichever occured most recently) with
+     * last population or synchronization (whichever occurred most recently) with
      * the data source.
      * <p>
      * The cursor is positioned before the first row in the result set.
@@ -4128,7 +4128,7 @@
      * Returns a result set containing the original value of the current
      * row only.
      * The original value is the state of the <code>CachedRowSetImpl</code> after
-     * the last population or synchronization (whichever occured most recently)
+     * the last population or synchronization (whichever occurred most recently)
      * with the data source.
      *
      * @return the original result set of the row
--- a/src/share/classes/com/sun/rowset/package.html	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/com/sun/rowset/package.html	Mon Nov 11 23:17:30 2013 -0800
@@ -74,7 +74,7 @@
 <h3>3.0 Extending the JDBC RowSet Implementations</h3>
 
 The JDBC <code>RowSet</code> reference implementations are provided as non-final
-classess so that any developer can extend them to provider additional features
+classes so that any developer can extend them to provide additional features
 while maintaining the core required standard functionality and compatibility. It
 is anticipated that many vendors and developers will extend the standard feature
 set to their their particular needs. The website for JDBC Technology will
--- a/src/share/classes/com/sun/security/auth/module/LdapLoginModule.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/com/sun/security/auth/module/LdapLoginModule.java	Mon Nov 11 23:17:30 2013 -0800
@@ -153,7 +153,7 @@
  *      If the attribute cannot be found then the option is ignored.
  *      When this option is supplied and the user has been successfully
  *      authenticated then an additional {@link UserPrincipal}
- *      is created using the authorization identity and it is assocated with
+ *      is created using the authorization identity and it is associated with
  *      the current {@link Subject}. </dd>
  *
  * <dt> <code>useSSL</code> </dt>
--- a/src/share/classes/com/sun/security/sasl/ntlm/NTLMServer.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/com/sun/security/sasl/ntlm/NTLMServer.java	Mon Nov 11 23:17:30 2013 -0800
@@ -62,7 +62,7 @@
   *      LMv2: NTLM v2, LM only
   *      NTLMv2: NTLM v2, NTLM only
   *    If not specified, use system property "ntlm.version". If also
-  *    not specfied, all versions are accepted.
+  *    not specified, all versions are accepted.
   *
   * com.sun.security.sasl.ntlm.domain
   *    String, the domain of the server, default is server name (fqdn parameter)
--- a/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic.properties	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic.properties	Mon Nov 11 23:17:30 2013 -0800
@@ -144,12 +144,12 @@
 InternalFrame.closeButtonToolTip=Close
 
 ############ Internal Frame Title Pane Strings ############
-InternalFrameTitlePane.restoreButton.textAndMnemonic=Restore
-InternalFrameTitlePane.moveButton.textAndMnemonic=Move
-InternalFrameTitlePane.sizeButton.textAndMnemonic=Size
-InternalFrameTitlePane.minimizeButton.textAndMnemonic=Minimize
-InternalFrameTitlePane.maximizeButton.textAndMnemonic=Maximize
-InternalFrameTitlePane.closeButton.textAndMnemonic=Close
+InternalFrameTitlePane.restoreButton.textAndMnemonic=&Restore
+InternalFrameTitlePane.moveButton.textAndMnemonic=&Move
+InternalFrameTitlePane.sizeButton.textAndMnemonic=&Size
+InternalFrameTitlePane.minimizeButton.textAndMnemonic=Mi&nimize
+InternalFrameTitlePane.maximizeButton.textAndMnemonic=Ma&ximize
+InternalFrameTitlePane.closeButton.textAndMnemonic=&Close
 
 ############ Text strings #############
 # Used for html forms
--- a/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_de.properties	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_de.properties	Mon Nov 11 23:17:30 2013 -0800
@@ -143,12 +143,12 @@
 InternalFrame.closeButtonToolTip=Schlie\u00DFen
 
 ############ Internal Frame Title Pane Strings ############
-InternalFrameTitlePane.restoreButton.textAndMnemonic=Wiederherstellen
-InternalFrameTitlePane.moveButton.textAndMnemonic=Verschieben
-InternalFrameTitlePane.sizeButton.textAndMnemonic=Gr\u00F6\u00DFe
-InternalFrameTitlePane.minimizeButton.textAndMnemonic=Minimieren
-InternalFrameTitlePane.maximizeButton.textAndMnemonic=Maximieren
-InternalFrameTitlePane.closeButton.textAndMnemonic=Schlie\u00DFen
+InternalFrameTitlePane.restoreButton.textAndMnemonic=Wiede&rherstellen
+InternalFrameTitlePane.moveButton.textAndMnemonic=Verschieben(&M)
+InternalFrameTitlePane.sizeButton.textAndMnemonic=Gr\u00F6\u00DFe(&S)
+InternalFrameTitlePane.minimizeButton.textAndMnemonic=Mi&nimieren
+InternalFrameTitlePane.maximizeButton.textAndMnemonic=Ma&ximieren
+InternalFrameTitlePane.closeButton.textAndMnemonic=S&chlie\u00DFen
 
 ############ Text strings #############
 # Used for html forms
--- a/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_es.properties	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_es.properties	Mon Nov 11 23:17:30 2013 -0800
@@ -143,12 +143,12 @@
 InternalFrame.closeButtonToolTip=Cerrar
 
 ############ Internal Frame Title Pane Strings ############
-InternalFrameTitlePane.restoreButton.textAndMnemonic=Restaurar
-InternalFrameTitlePane.moveButton.textAndMnemonic=Mover
-InternalFrameTitlePane.sizeButton.textAndMnemonic=Tama\u00F1o
-InternalFrameTitlePane.minimizeButton.textAndMnemonic=Minimizar
-InternalFrameTitlePane.maximizeButton.textAndMnemonic=Maximizar
-InternalFrameTitlePane.closeButton.textAndMnemonic=Cerrar
+InternalFrameTitlePane.restoreButton.textAndMnemonic=&Restaurar
+InternalFrameTitlePane.moveButton.textAndMnemonic=&Mover
+InternalFrameTitlePane.sizeButton.textAndMnemonic=Tama\u00F1o(&S)
+InternalFrameTitlePane.minimizeButton.textAndMnemonic=Mi&nimizar
+InternalFrameTitlePane.maximizeButton.textAndMnemonic=Ma&ximizar
+InternalFrameTitlePane.closeButton.textAndMnemonic=&Cerrar
 
 ############ Text strings #############
 # Used for html forms
--- a/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_fr.properties	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_fr.properties	Mon Nov 11 23:17:30 2013 -0800
@@ -143,12 +143,12 @@
 InternalFrame.closeButtonToolTip=Fermer
 
 ############ Internal Frame Title Pane Strings ############
-InternalFrameTitlePane.restoreButton.textAndMnemonic=Restaurer
-InternalFrameTitlePane.moveButton.textAndMnemonic=D\u00E9placer
-InternalFrameTitlePane.sizeButton.textAndMnemonic=Taille
-InternalFrameTitlePane.minimizeButton.textAndMnemonic=R\u00E9duire
-InternalFrameTitlePane.maximizeButton.textAndMnemonic=Agrandir
-InternalFrameTitlePane.closeButton.textAndMnemonic=Fermer
+InternalFrameTitlePane.restoreButton.textAndMnemonic=&Restaurer
+InternalFrameTitlePane.moveButton.textAndMnemonic=D\u00E9placer(&M)
+InternalFrameTitlePane.sizeButton.textAndMnemonic=Taille(&S)
+InternalFrameTitlePane.minimizeButton.textAndMnemonic=R\u00E9duire(&N)
+InternalFrameTitlePane.maximizeButton.textAndMnemonic=Agrandir(&X)
+InternalFrameTitlePane.closeButton.textAndMnemonic=Fermer(&C)
 
 ############ Text strings #############
 # Used for html forms
--- a/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_it.properties	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_it.properties	Mon Nov 11 23:17:30 2013 -0800
@@ -143,12 +143,12 @@
 InternalFrame.closeButtonToolTip=Chiudi
 
 ############ Internal Frame Title Pane Strings ############
-InternalFrameTitlePane.restoreButton.textAndMnemonic=Ripristina
-InternalFrameTitlePane.moveButton.textAndMnemonic=Sposta
-InternalFrameTitlePane.sizeButton.textAndMnemonic=Dimensioni
-InternalFrameTitlePane.minimizeButton.textAndMnemonic=Riduci a icona
-InternalFrameTitlePane.maximizeButton.textAndMnemonic=Ingrandisci
-InternalFrameTitlePane.closeButton.textAndMnemonic=Chiudi
+InternalFrameTitlePane.restoreButton.textAndMnemonic=&Ripristina
+InternalFrameTitlePane.moveButton.textAndMnemonic=Sposta(&M)
+InternalFrameTitlePane.sizeButton.textAndMnemonic=Dimen&sioni
+InternalFrameTitlePane.minimizeButton.textAndMnemonic=Riduci a ico&na
+InternalFrameTitlePane.maximizeButton.textAndMnemonic=Ingrandisci(&X)
+InternalFrameTitlePane.closeButton.textAndMnemonic=&Chiudi
 
 ############ Text strings #############
 # Used for html forms
--- a/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_ja.properties	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_ja.properties	Mon Nov 11 23:17:30 2013 -0800
@@ -143,12 +143,12 @@
 InternalFrame.closeButtonToolTip=\u9589\u3058\u308B
 
 ############ Internal Frame Title Pane Strings ############
-InternalFrameTitlePane.restoreButton.textAndMnemonic=\u5FA9\u5143
-InternalFrameTitlePane.moveButton.textAndMnemonic=\u79FB\u52D5
-InternalFrameTitlePane.sizeButton.textAndMnemonic=\u30B5\u30A4\u30BA
-InternalFrameTitlePane.minimizeButton.textAndMnemonic=\u6700\u5C0F\u5316
-InternalFrameTitlePane.maximizeButton.textAndMnemonic=\u6700\u5927\u5316
-InternalFrameTitlePane.closeButton.textAndMnemonic=\u9589\u3058\u308B
+InternalFrameTitlePane.restoreButton.textAndMnemonic=\u5FA9\u5143(&R)
+InternalFrameTitlePane.moveButton.textAndMnemonic=\u79FB\u52D5(&M)
+InternalFrameTitlePane.sizeButton.textAndMnemonic=\u30B5\u30A4\u30BA(&S)
+InternalFrameTitlePane.minimizeButton.textAndMnemonic=\u6700\u5C0F\u5316(&N)
+InternalFrameTitlePane.maximizeButton.textAndMnemonic=\u6700\u5927\u5316(&X)
+InternalFrameTitlePane.closeButton.textAndMnemonic=\u9589\u3058\u308B(&C)
 
 ############ Text strings #############
 # Used for html forms
--- a/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_ko.properties	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_ko.properties	Mon Nov 11 23:17:30 2013 -0800
@@ -143,12 +143,12 @@
 InternalFrame.closeButtonToolTip=\uB2EB\uAE30
 
 ############ Internal Frame Title Pane Strings ############
-InternalFrameTitlePane.restoreButton.textAndMnemonic=\uBCF5\uC6D0
-InternalFrameTitlePane.moveButton.textAndMnemonic=\uC774\uB3D9
-InternalFrameTitlePane.sizeButton.textAndMnemonic=\uD06C\uAE30
-InternalFrameTitlePane.minimizeButton.textAndMnemonic=\uCD5C\uC18C\uD654
-InternalFrameTitlePane.maximizeButton.textAndMnemonic=\uCD5C\uB300\uD654
-InternalFrameTitlePane.closeButton.textAndMnemonic=\uB2EB\uAE30
+InternalFrameTitlePane.restoreButton.textAndMnemonic=\uBCF5\uC6D0(&R)
+InternalFrameTitlePane.moveButton.textAndMnemonic=\uC774\uB3D9(&M)
+InternalFrameTitlePane.sizeButton.textAndMnemonic=\uD06C\uAE30(&S)
+InternalFrameTitlePane.minimizeButton.textAndMnemonic=\uCD5C\uC18C\uD654(&N)
+InternalFrameTitlePane.maximizeButton.textAndMnemonic=\uCD5C\uB300\uD654(&X)
+InternalFrameTitlePane.closeButton.textAndMnemonic=\uB2EB\uAE30(&C)
 
 ############ Text strings #############
 # Used for html forms
--- a/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_pt_BR.properties	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_pt_BR.properties	Mon Nov 11 23:17:30 2013 -0800
@@ -143,12 +143,12 @@
 InternalFrame.closeButtonToolTip=Fechar
 
 ############ Internal Frame Title Pane Strings ############
-InternalFrameTitlePane.restoreButton.textAndMnemonic=Restaurar
-InternalFrameTitlePane.moveButton.textAndMnemonic=Mover
-InternalFrameTitlePane.sizeButton.textAndMnemonic=Tamanho
-InternalFrameTitlePane.minimizeButton.textAndMnemonic=Minimizar
-InternalFrameTitlePane.maximizeButton.textAndMnemonic=Maximizar
-InternalFrameTitlePane.closeButton.textAndMnemonic=Fechar
+InternalFrameTitlePane.restoreButton.textAndMnemonic=&Restaurar
+InternalFrameTitlePane.moveButton.textAndMnemonic=&Mover
+InternalFrameTitlePane.sizeButton.textAndMnemonic=Tamanho(&S)
+InternalFrameTitlePane.minimizeButton.textAndMnemonic=Mi&nimizar
+InternalFrameTitlePane.maximizeButton.textAndMnemonic=Ma&ximizar
+InternalFrameTitlePane.closeButton.textAndMnemonic=Fe&char
 
 ############ Text strings #############
 # Used for html forms
--- a/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_sv.properties	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_sv.properties	Mon Nov 11 23:17:30 2013 -0800
@@ -143,12 +143,12 @@
 InternalFrame.closeButtonToolTip=St\u00E4ng
 
 ############ Internal Frame Title Pane Strings ############
-InternalFrameTitlePane.restoreButton.textAndMnemonic=\u00C5terst\u00E4ll
-InternalFrameTitlePane.moveButton.textAndMnemonic=Flytta
-InternalFrameTitlePane.sizeButton.textAndMnemonic=Storlek
-InternalFrameTitlePane.minimizeButton.textAndMnemonic=Minimera
-InternalFrameTitlePane.maximizeButton.textAndMnemonic=Maximera
-InternalFrameTitlePane.closeButton.textAndMnemonic=St\u00E4ng
+InternalFrameTitlePane.restoreButton.textAndMnemonic=\u00C5terst\u00E4ll(&R)
+InternalFrameTitlePane.moveButton.textAndMnemonic=Flytta(&M)
+InternalFrameTitlePane.sizeButton.textAndMnemonic=&Storlek
+InternalFrameTitlePane.minimizeButton.textAndMnemonic=Mi&nimera
+InternalFrameTitlePane.maximizeButton.textAndMnemonic=Ma&ximera
+InternalFrameTitlePane.closeButton.textAndMnemonic=St\u00E4ng(&C)
 
 ############ Text strings #############
 # Used for html forms
--- a/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_zh_CN.properties	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_zh_CN.properties	Mon Nov 11 23:17:30 2013 -0800
@@ -143,12 +143,12 @@
 InternalFrame.closeButtonToolTip=\u5173\u95ED
 
 ############ Internal Frame Title Pane Strings ############
-InternalFrameTitlePane.restoreButton.textAndMnemonic=\u8FD8\u539F
-InternalFrameTitlePane.moveButton.textAndMnemonic=\u79FB\u52A8
-InternalFrameTitlePane.sizeButton.textAndMnemonic=\u5927\u5C0F
-InternalFrameTitlePane.minimizeButton.textAndMnemonic=\u6700\u5C0F\u5316
-InternalFrameTitlePane.maximizeButton.textAndMnemonic=\u6700\u5927\u5316
-InternalFrameTitlePane.closeButton.textAndMnemonic=\u5173\u95ED
+InternalFrameTitlePane.restoreButton.textAndMnemonic=\u8FD8\u539F(&R)
+InternalFrameTitlePane.moveButton.textAndMnemonic=\u79FB\u52A8(&M)
+InternalFrameTitlePane.sizeButton.textAndMnemonic=\u5927\u5C0F(&S)
+InternalFrameTitlePane.minimizeButton.textAndMnemonic=\u6700\u5C0F\u5316(&N)
+InternalFrameTitlePane.maximizeButton.textAndMnemonic=\u6700\u5927\u5316(&X)
+InternalFrameTitlePane.closeButton.textAndMnemonic=\u5173\u95ED(&C)
 
 ############ Text strings #############
 # Used for html forms
--- a/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_zh_TW.properties	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_zh_TW.properties	Mon Nov 11 23:17:30 2013 -0800
@@ -143,12 +143,12 @@
 InternalFrame.closeButtonToolTip=\u95DC\u9589
 
 ############ Internal Frame Title Pane Strings ############
-InternalFrameTitlePane.restoreButton.textAndMnemonic=\u5FA9\u539F
-InternalFrameTitlePane.moveButton.textAndMnemonic=\u79FB\u52D5
-InternalFrameTitlePane.sizeButton.textAndMnemonic=\u5927\u5C0F
-InternalFrameTitlePane.minimizeButton.textAndMnemonic=\u6700\u5C0F\u5316
-InternalFrameTitlePane.maximizeButton.textAndMnemonic=\u6700\u5927\u5316
-InternalFrameTitlePane.closeButton.textAndMnemonic=\u95DC\u9589
+InternalFrameTitlePane.restoreButton.textAndMnemonic=\u5FA9\u539F(&R)
+InternalFrameTitlePane.moveButton.textAndMnemonic=\u79FB\u52D5(&M)
+InternalFrameTitlePane.sizeButton.textAndMnemonic=\u5927\u5C0F(&S)
+InternalFrameTitlePane.minimizeButton.textAndMnemonic=\u6700\u5C0F\u5316(&N)
+InternalFrameTitlePane.maximizeButton.textAndMnemonic=\u6700\u5927\u5316(&X)
+InternalFrameTitlePane.closeButton.textAndMnemonic=\u95DC\u9589(&C)
 
 ############ Text strings #############
 # Used for html forms
--- a/src/share/classes/com/sun/tools/example/debug/expr/TokenMgrError.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/com/sun/tools/example/debug/expr/TokenMgrError.java	Mon Nov 11 23:17:30 2013 -0800
@@ -44,7 +44,7 @@
     private static final long serialVersionUID = -6236440836177601522L;
 
    /**
-    * Lexical error occured.
+    * Lexical error occurred.
     */
    static final int LEXICAL_ERROR = 0;
 
@@ -123,10 +123,10 @@
     * token manager to indicate a lexical error.
     * Parameters :
     *    EOFSeen     : indicates if EOF caused the lexicl error
-    *    curLexState : lexical state in which this error occured
-    *    errorLine   : line number when the error occured
-    *    errorColumn : column number when the error occured
-    *    errorAfter  : prefix that was seen before this error occured
+    *    curLexState : lexical state in which this error occurred
+    *    errorLine   : line number when the error occurred
+    *    errorColumn : column number when the error occurred
+    *    errorAfter  : prefix that was seen before this error occurred
     *    curchar     : the offending character
     * Note: You can customize the lexical error message by modifying this method.
     */
--- a/src/share/classes/com/sun/tools/hat/resources/hat.js	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/com/sun/tools/hat/resources/hat.js	Mon Nov 11 23:17:30 2013 -0800
@@ -33,7 +33,7 @@
 
 /**
  * This is JavaScript interface for heap analysis using HAT
- * (Heap Analysis Tool). HAT classes are refered from
+ * (Heap Analysis Tool). HAT classes are referred from
  * this file. In particular, refer to classes in hat.model 
  * package.
  * 
--- a/src/share/classes/com/sun/tools/jdi/SocketAttachingConnector.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/com/sun/tools/jdi/SocketAttachingConnector.java	Mon Nov 11 23:17:30 2013 -0800
@@ -68,7 +68,7 @@
 
         transport = new Transport() {
             public String name() {
-                return "dt_socket";     // for compatability reasons
+                return "dt_socket";     // for compatibility reasons
             }
         };
 
--- a/src/share/classes/com/sun/tools/jdi/SocketListeningConnector.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/com/sun/tools/jdi/SocketListeningConnector.java	Mon Nov 11 23:17:30 2013 -0800
@@ -58,7 +58,7 @@
 
         transport = new Transport() {
             public String name() {
-                return "dt_socket";     // for compatability reasons
+                return "dt_socket";     // for compatibility reasons
             }
         };
     }
--- a/src/share/classes/com/sun/tools/jdi/ThreadListener.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/com/sun/tools/jdi/ThreadListener.java	Mon Nov 11 23:17:30 2013 -0800
@@ -31,7 +31,7 @@
 interface ThreadListener extends EventListener {
     boolean threadResumable(ThreadAction action);
     /*
-     * Not needed for current implemenation, and hard to implement
+     * Not needed for current implementation, and hard to implement
      * correctly. (See TargetVM.handleEventCmdSet)
      *   void threadSuspended(ThreadAction action);
      */
--- a/src/share/classes/com/sun/tools/jdi/ThreadReferenceImpl.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/com/sun/tools/jdi/ThreadReferenceImpl.java	Mon Nov 11 23:17:30 2013 -0800
@@ -62,7 +62,7 @@
 
     // This is cached only while this one thread is suspended.  Each time
     // the thread is resumed, we abandon the current cache object and
-    // create a new intialized one.
+    // create a new initialized one.
     private static class LocalCache {
         JDWP.ThreadReference.Status status = null;
         List<StackFrame> frames = null;
--- a/src/share/classes/java/awt/AWTEventMulticaster.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/awt/AWTEventMulticaster.java	Mon Nov 11 23:17:30 2013 -0800
@@ -998,7 +998,7 @@
      * If a <code>null</code> listener is specified, this method returns an
      * empty array. If the specified listener is not an instance of
      * <code>AWTEventMulticaster</code>, this method returns an array which
-     * contains only the specified listener. If no such listeners are chanined,
+     * contains only the specified listener. If no such listeners are chained,
      * this method returns an empty array.
      *
      * @param l the specified <code>java.util.EventListener</code>
--- a/src/share/classes/java/awt/AlphaComposite.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/awt/AlphaComposite.java	Mon Nov 11 23:17:30 2013 -0800
@@ -197,7 +197,7 @@
  * <h3>Performance Considerations</h3>
  *
  * <p>
- * For performance reasons, it is preferrable that
+ * For performance reasons, it is preferable that
  * <code>Raster</code> objects passed to the <code>compose</code>
  * method of a {@link CompositeContext} object created by the
  * <code>AlphaComposite</code> class have premultiplied data.
--- a/src/share/classes/java/awt/BasicStroke.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/awt/BasicStroke.java	Mon Nov 11 23:17:30 2013 -0800
@@ -88,7 +88,7 @@
  * but also by the transform attribute of the
  * <code>Graphics2D</code> object.  Consider this code:
  * <blockquote><tt>
- *      // sets the Graphics2D object's Tranform attribute
+ *      // sets the Graphics2D object's Transform attribute
  *      g2d.scale(10, 10);
  *      // sets the Graphics2D object's Stroke attribute
  *      g2d.setStroke(new BasicStroke(1.5f));
--- a/src/share/classes/java/awt/BorderLayout.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/awt/BorderLayout.java	Mon Nov 11 23:17:30 2013 -0800
@@ -69,7 +69,7 @@
  * components, the latter constants are preferred.
  * <p>
  * Mixing both absolute and relative positioning constants can lead to
- * unpredicable results.  If
+ * unpredictable results.  If
  * you use both types, the relative constants will take precedence.
  * For example, if you add components using both the <code>NORTH</code>
  * and <code>PAGE_START</code> constants in a container whose
@@ -206,7 +206,7 @@
      *
      * A relative positioning constant, that can be used instead of
      * north, south, east, west or center.
-     * mixing the two types of constants can lead to unpredicable results.  If
+     * mixing the two types of constants can lead to unpredictable results.  If
      * you use both types, the relative constants will take precedence.
      * For example, if you add components using both the <code>NORTH</code>
      * and <code>BEFORE_FIRST_LINE</code> constants in a container whose
--- a/src/share/classes/java/awt/CheckboxMenuItem.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/awt/CheckboxMenuItem.java	Mon Nov 11 23:17:30 2013 -0800
@@ -180,7 +180,7 @@
     }
 
     /**
-     * Sets this check box menu item to the specifed state.
+     * Sets this check box menu item to the specified state.
      * The boolean value <code>true</code> indicates "on" while
      * <code>false</code> indicates "off."
      *
--- a/src/share/classes/java/awt/Choice.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/awt/Choice.java	Mon Nov 11 23:17:30 2013 -0800
@@ -418,7 +418,7 @@
      * an <code>ItemEvent</code>.  The only way to trigger an
      * <code>ItemEvent</code> is by user interaction.
      *
-     * @param      pos      the positon of the selected item
+     * @param      pos      the position of the selected item
      * @exception  IllegalArgumentException if the specified
      *                            position is greater than the
      *                            number of items or less than zero
--- a/src/share/classes/java/awt/Component.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/awt/Component.java	Mon Nov 11 23:17:30 2013 -0800
@@ -276,7 +276,7 @@
      * @see #getFont
      * @see #setFont
      */
-    Font        font;
+    volatile Font font;
 
     /**
      * The font which the peer is currently using.
@@ -1885,10 +1885,8 @@
     public void setFont(Font f) {
         Font oldFont, newFont;
         synchronized(getTreeLock()) {
-            synchronized (this) {
-                oldFont = font;
-                newFont = font = f;
-            }
+            oldFont = font;
+            newFont = font = f;
             ComponentPeer peer = this.peer;
             if (peer != null) {
                 f = getFont();
@@ -2684,7 +2682,7 @@
     }
 
     /**
-     * Gets the mininimum size of this component.
+     * Gets the minimum size of this component.
      * @return a dimension object indicating this component's minimum size
      * @see #getPreferredSize
      * @see LayoutManager
@@ -5254,7 +5252,7 @@
      * Returns an array of all the component listeners
      * registered on this component.
      *
-     * @return all of this comonent's <code>ComponentListener</code>s
+     * @return all <code>ComponentListener</code>s of this component
      *         or an empty array if no component
      *         listeners are currently registered
      *
--- a/src/share/classes/java/awt/Container.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/awt/Container.java	Mon Nov 11 23:17:30 2013 -0800
@@ -959,7 +959,7 @@
      *
      * @param     comp the component to be added
      * @param     constraints an object expressing
-     *                  layout contraints for this component
+     *                  layout constraints for this component
      * @exception NullPointerException if {@code comp} is {@code null}
      * @see #addImpl
      * @see #invalidate
@@ -986,7 +986,7 @@
      *
      *
      * @param comp the component to be added
-     * @param constraints an object expressing layout contraints for this
+     * @param constraints an object expressing layout constraints for this
      * @param index the position in the container's list at which to insert
      * the component; <code>-1</code> means insert at the end
      * component
--- a/src/share/classes/java/awt/Dialog.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/awt/Dialog.java	Mon Nov 11 23:17:30 2013 -0800
@@ -338,7 +338,7 @@
      *
      * @param owner the owner of the dialog or <code>null</code> if
      *     this dialog has no owner
-     * @param modal specifes whether dialog blocks user input to other top-level
+     * @param modal specifies whether dialog blocks user input to other top-level
      *     windows when shown. If <code>false</code>, the dialog is <code>MODELESS</code>;
      *     if <code>true</code>, the modality type property is set to
      *     <code>DEFAULT_MODALITY_TYPE</code>
@@ -387,7 +387,7 @@
      *     this dialog has no owner
      * @param title the title of the dialog or <code>null</code> if this dialog
      *     has no title
-     * @param modal specifes whether dialog blocks user input to other top-level
+     * @param modal specifies whether dialog blocks user input to other top-level
      *     windows when shown. If <code>false</code>, the dialog is <code>MODELESS</code>;
      *     if <code>true</code>, the modality type property is set to
      *     <code>DEFAULT_MODALITY_TYPE</code>
@@ -416,7 +416,7 @@
      *     has no owner
      * @param title the title of the dialog or <code>null</code> if this dialog
      *     has no title
-     * @param modal specifes whether dialog blocks user input to other top-level
+     * @param modal specifies whether dialog blocks user input to other top-level
      *     windows when shown. If <code>false</code>, the dialog is <code>MODELESS</code>;
      *     if <code>true</code>, the modality type property is set to
      *     <code>DEFAULT_MODALITY_TYPE</code>
@@ -488,7 +488,7 @@
      *     dialog has no owner
      * @param title the title of the dialog or <code>null</code> if this
      *     dialog has no title
-     * @param modal specifes whether dialog blocks user input to other top-level
+     * @param modal specifies whether dialog blocks user input to other top-level
      *     windows when shown. If <code>false</code>, the dialog is <code>MODELESS</code>;
      *     if <code>true</code>, the modality type property is set to
      *     <code>DEFAULT_MODALITY_TYPE</code>
@@ -519,7 +519,7 @@
      *     dialog has no owner
      * @param title the title of the dialog or <code>null</code> if this
      *     dialog has no title
-     * @param modal specifes whether dialog blocks user input to other top-level
+     * @param modal specifies whether dialog blocks user input to other top-level
      *     windows when shown. If <code>false</code>, the dialog is <code>MODELESS</code>;
      *     if <code>true</code>, the modality type property is set to
      *     <code>DEFAULT_MODALITY_TYPE</code>
@@ -764,7 +764,7 @@
     /**
      * Indicates whether the dialog is modal.
      * <p>
-     * This method is obsolete and is kept for backwards compatiblity only.
+     * This method is obsolete and is kept for backwards compatibility only.
      * Use {@link #getModalityType getModalityType()} instead.
      *
      * @return    <code>true</code> if this dialog window is modal;
--- a/src/share/classes/java/awt/Event.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/awt/Event.java	Mon Nov 11 23:17:30 2013 -0800
@@ -29,14 +29,14 @@
 
 /**
  * <b>NOTE:</b> The <code>Event</code> class is obsolete and is
- * available only for backwards compatilibility.  It has been replaced
+ * available only for backwards compatibility.  It has been replaced
  * by the <code>AWTEvent</code> class and its subclasses.
  * <p>
  * <code>Event</code> is a platform-independent class that
  * encapsulates events from the platform's Graphical User
  * Interface in the Java&nbsp;1.0 event model. In Java&nbsp;1.1
  * and later versions, the <code>Event</code> class is maintained
- * only for backwards compatibilty. The information in this
+ * only for backwards compatibility. The information in this
  * class description is provided to assist programmers in
  * converting Java&nbsp;1.0 programs to the new event model.
  * <p>
@@ -390,7 +390,7 @@
     /**
      * The user has moved the bubble (thumb) in a scroll bar,
      * moving to an "absolute" position, rather than to
-     * an offset from the last postion.
+     * an offset from the last position.
      */
     public static final int SCROLL_ABSOLUTE     = 5 + SCROLL_EVENT;
 
@@ -609,7 +609,7 @@
 
     /**
      * <b>NOTE:</b> The <code>Event</code> class is obsolete and is
-     * available only for backwards compatilibility.  It has been replaced
+     * available only for backwards compatibility.  It has been replaced
      * by the <code>AWTEvent</code> class and its subclasses.
      * <p>
      * Creates an instance of <code>Event</code> with the specified target
@@ -660,7 +660,7 @@
 
     /**
      * <b>NOTE:</b> The <code>Event</code> class is obsolete and is
-     * available only for backwards compatilibility.  It has been replaced
+     * available only for backwards compatibility.  It has been replaced
      * by the <code>AWTEvent</code> class and its subclasses.
      * <p>
      * Creates an instance of <code>Event</code>, with the specified target
@@ -681,7 +681,7 @@
 
     /**
      * <b>NOTE:</b> The <code>Event</code> class is obsolete and is
-     * available only for backwards compatilibility.  It has been replaced
+     * available only for backwards compatibility.  It has been replaced
      * by the <code>AWTEvent</code> class and its subclasses.
      * <p>
      * Creates an instance of <code>Event</code> with the specified
@@ -696,7 +696,7 @@
 
     /**
      * <b>NOTE:</b> The <code>Event</code> class is obsolete and is
-     * available only for backwards compatilibility.  It has been replaced
+     * available only for backwards compatibility.  It has been replaced
      * by the <code>AWTEvent</code> class and its subclasses.
      * <p>
      * Translates this event so that its <i>x</i> and <i>y</i>
@@ -717,7 +717,7 @@
 
     /**
      * <b>NOTE:</b> The <code>Event</code> class is obsolete and is
-     * available only for backwards compatilibility.  It has been replaced
+     * available only for backwards compatibility.  It has been replaced
      * by the <code>AWTEvent</code> class and its subclasses.
      * <p>
      * Checks if the Shift key is down.
@@ -733,7 +733,7 @@
 
     /**
      * <b>NOTE:</b> The <code>Event</code> class is obsolete and is
-     * available only for backwards compatilibility.  It has been replaced
+     * available only for backwards compatibility.  It has been replaced
      * by the <code>AWTEvent</code> class and its subclasses.
      * <p>
      * Checks if the Control key is down.
@@ -749,7 +749,7 @@
 
     /**
      * <b>NOTE:</b> The <code>Event</code> class is obsolete and is
-     * available only for backwards compatilibility.  It has been replaced
+     * available only for backwards compatibility.  It has been replaced
      * by the <code>AWTEvent</code> class and its subclasses.
      * <p>
      * Checks if the Meta key is down.
@@ -766,7 +766,7 @@
 
     /**
      * <b>NOTE:</b> The <code>Event</code> class is obsolete and is
-     * available only for backwards compatilibility.  It has been replaced
+     * available only for backwards compatibility.  It has been replaced
      * by the <code>AWTEvent</code> class and its subclasses.
      */
     void consume() {
@@ -784,7 +784,7 @@
 
     /**
      * <b>NOTE:</b> The <code>Event</code> class is obsolete and is
-     * available only for backwards compatilibility.  It has been replaced
+     * available only for backwards compatibility.  It has been replaced
      * by the <code>AWTEvent</code> class and its subclasses.
      */
     boolean isConsumed() {
@@ -793,7 +793,7 @@
 
     /*
      * <b>NOTE:</b> The <code>Event</code> class is obsolete and is
-     * available only for backwards compatilibility.  It has been replaced
+     * available only for backwards compatibility.  It has been replaced
      * by the <code>AWTEvent</code> class and its subclasses.
      * <p>
      * Returns the integer key-code associated with the key in this event,
@@ -811,7 +811,7 @@
 
     /*
      * <b>NOTE:</b> The <code>Event</code> class is obsolete and is
-     * available only for backwards compatilibility.  It has been replaced
+     * available only for backwards compatibility.  It has been replaced
      * by the <code>AWTEvent</code> class and its subclasses.
      * <p>
      * Returns a new KeyEvent char which corresponds to the int key
@@ -828,7 +828,7 @@
 
     /**
      * <b>NOTE:</b> The <code>Event</code> class is obsolete and is
-     * available only for backwards compatilibility.  It has been replaced
+     * available only for backwards compatibility.  It has been replaced
      * by the <code>AWTEvent</code> class and its subclasses.
      * <p>
      * Returns a string representing the state of this <code>Event</code>.
@@ -864,7 +864,7 @@
 
     /**
      * <b>NOTE:</b> The <code>Event</code> class is obsolete and is
-     * available only for backwards compatilibility.  It has been replaced
+     * available only for backwards compatibility.  It has been replaced
      * by the <code>AWTEvent</code> class and its subclasses.
      * <p>
      * Returns a representation of this event's values as a string.
--- a/src/share/classes/java/awt/EventDispatchThread.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/awt/EventDispatchThread.java	Mon Nov 11 23:17:30 2013 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 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
@@ -25,19 +25,11 @@
 
 package java.awt;
 
-import java.awt.event.InputEvent;
 import java.awt.event.MouseEvent;
 import java.awt.event.ActionEvent;
 import java.awt.event.WindowEvent;
-import java.lang.reflect.Method;
-import java.security.AccessController;
-import sun.security.action.GetPropertyAction;
-import sun.awt.AWTAutoShutdown;
-import sun.awt.SunToolkit;
-import sun.awt.AppContext;
 
 import java.util.ArrayList;
-import java.util.List;
 import sun.util.logging.PlatformLogger;
 
 import sun.awt.dnd.SunDragSourceContextPeer;
@@ -67,8 +59,7 @@
     private static final PlatformLogger eventLog = PlatformLogger.getLogger("java.awt.event.EventDispatchThread");
 
     private EventQueue theQueue;
-    private boolean doDispatch = true;
-    private volatile boolean shutdown = false;
+    private volatile boolean doDispatch = true;
 
     private static final int ANY_EVENT = -1;
 
@@ -86,24 +77,15 @@
         doDispatch = false;
     }
 
-    public void interrupt() {
-        shutdown = true;
-        super.interrupt();
-    }
-
     public void run() {
-        while (true) {
-            try {
-                pumpEvents(new Conditional() {
-                    public boolean evaluate() {
-                        return true;
-                    }
-                });
-            } finally {
-                if(getEventQueue().detachDispatchThread(this, shutdown)) {
-                    break;
+        try {
+            pumpEvents(new Conditional() {
+                public boolean evaluate() {
+                    return true;
                 }
-            }
+            });
+        } finally {
+            getEventQueue().detachDispatchThread(this);
         }
     }
 
@@ -130,8 +112,7 @@
     void pumpEventsForFilter(int id, Conditional cond, EventFilter filter) {
         addEventFilter(filter);
         doDispatch = true;
-        shutdown |= isInterrupted();
-        while (doDispatch && !shutdown && cond.evaluate()) {
+        while (doDispatch && !isInterrupted() && cond.evaluate()) {
             pumpOneEventForFilters(id);
         }
         removeEventFilter(filter);
@@ -223,12 +204,12 @@
             }
         }
         catch (ThreadDeath death) {
-            shutdown = true;
+            doDispatch = false;
             throw death;
         }
         catch (InterruptedException interruptedException) {
-            shutdown = true; // AppContext.dispose() interrupts all
-                             // Threads in the AppContext
+            doDispatch = false; // AppContext.dispose() interrupts all
+                                // Threads in the AppContext
         }
         catch (Throwable e) {
             processException(e);
--- a/src/share/classes/java/awt/EventQueue.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/awt/EventQueue.java	Mon Nov 11 23:17:30 2013 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 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
@@ -1074,7 +1074,7 @@
         }
     }
 
-    final boolean detachDispatchThread(EventDispatchThread edt, boolean forceDetach) {
+    final void detachDispatchThread(EventDispatchThread edt) {
         /*
          * Minimize discard possibility for non-posted events
          */
@@ -1090,17 +1090,9 @@
         pushPopLock.lock();
         try {
             if (edt == dispatchThread) {
-                /*
-                 * Don't detach the thread if any events are pending. Not
-                 * sure if it's a possible scenario, though.
-                 */
-                if (!forceDetach && (peekEvent() != null)) {
-                    return false;
-                }
                 dispatchThread = null;
             }
             AWTAutoShutdown.getInstance().notifyThreadFree(edt);
-            return true;
         } finally {
             pushPopLock.unlock();
         }
@@ -1159,6 +1151,10 @@
                         if (entry.event instanceof SentEvent) {
                             ((SentEvent)entry.event).dispose();
                         }
+                        if (entry.event instanceof InvocationEvent) {
+                            AWTAccessor.getInvocationEventAccessor()
+                                    .dispose((InvocationEvent)entry.event);
+                        }
                         if (prev == null) {
                             queues[i].head = entry.next;
                         } else {
--- a/src/share/classes/java/awt/Font.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/awt/Font.java	Mon Nov 11 23:17:30 2013 -0800
@@ -1334,7 +1334,7 @@
      * Indicates whether or not this <code>Font</code> object's style is
      * PLAIN.
      * @return    <code>true</code> if this <code>Font</code> has a
-     *            PLAIN sytle;
+     *            PLAIN style;
      *            <code>false</code> otherwise.
      * @see       java.awt.Font#getStyle
      * @since     JDK1.0
--- a/src/share/classes/java/awt/Graphics.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/awt/Graphics.java	Mon Nov 11 23:17:30 2013 -0800
@@ -105,7 +105,7 @@
 
     /**
      * Constructs a new <code>Graphics</code> object.
-     * This constructor is the default contructor for a graphics
+     * This constructor is the default constructor for a graphics
      * context.
      * <p>
      * Since <code>Graphics</code> is an abstract class, applications
--- a/src/share/classes/java/awt/Graphics2D.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/awt/Graphics2D.java	Mon Nov 11 23:17:30 2013 -0800
@@ -305,7 +305,7 @@
  * aliasing or antialiasing is being used.
  * <ul>
  * <li> Device coordinates are defined to be between device pixels which
- * avoids any inconsistent results between aliased and antaliased
+ * avoids any inconsistent results between aliased and antialiased
  * rendering.  If coordinates were defined to be at a pixel's center, some
  * of the pixels covered by a shape, such as a rectangle, would only be
  * half covered.
@@ -806,7 +806,7 @@
      * @param s the <code>Shape</code> to check for a hit
      * @param onStroke flag used to choose between testing the
      * stroked or the filled shape.  If the flag is <code>true</code>, the
-     * <code>Stroke</code> oultine is tested.  If the flag is
+     * <code>Stroke</code> outline is tested.  If the flag is
      * <code>false</code>, the filled <code>Shape</code> is tested.
      * @return <code>true</code> if there is a hit; <code>false</code>
      * otherwise.
@@ -1162,7 +1162,7 @@
      * <code>Component</code>.  To change the background
      * of the <code>Component</code>, use appropriate methods of
      * the <code>Component</code>.
-     * @param color the background color that isused in
+     * @param color the background color that is used in
      * subsequent calls to <code>clearRect</code>
      * @see #getBackground
      * @see java.awt.Graphics#clearRect
--- a/src/share/classes/java/awt/GraphicsDevice.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/awt/GraphicsDevice.java	Mon Nov 11 23:17:30 2013 -0800
@@ -162,7 +162,7 @@
      * <code>GraphicsEnvironment</code>.  Although there is
      * no public method to set this <code>String</code>, a programmer can
      * use the <code>String</code> for debugging purposes.  Vendors of
-     * the Java<sup><font size=-2>TM</font></sup> Runtime Environment can
+     * the Java&trade; Runtime Environment can
      * format the return value of the <code>String</code>.  To determine
      * how to interpret the value of the <code>String</code>, contact the
      * vendor of your Java Runtime.  To find out who the vendor is, from
@@ -325,7 +325,14 @@
             // Note that we use the graphics configuration of the device,
             // not the window's, because we're setting the fs window for
             // this device.
-            Rectangle screenBounds = getDefaultConfiguration().getBounds();
+            final GraphicsConfiguration gc = getDefaultConfiguration();
+            final Rectangle screenBounds = gc.getBounds();
+            if (SunToolkit.isDispatchThreadForAppContext(fullScreenWindow)) {
+                // Update graphics configuration here directly and do not wait
+                // asynchronous notification from the peer. Note that
+                // setBounds() will reset a GC, if it was set incorrectly.
+                fullScreenWindow.setGraphicsConfiguration(gc);
+            }
             fullScreenWindow.setBounds(screenBounds.x, screenBounds.y,
                                        screenBounds.width, screenBounds.height);
             fullScreenWindow.setVisible(true);
--- a/src/share/classes/java/awt/GraphicsEnvironment.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/awt/GraphicsEnvironment.java	Mon Nov 11 23:17:30 2013 -0800
@@ -263,7 +263,7 @@
      * available in this <code>GraphicsEnvironment</code>.  Typical usage
      * would be to allow a user to select a particular font.  Then, the
      * application can size the font and set various font attributes by
-     * calling the <code>deriveFont</code> method on the choosen instance.
+     * calling the <code>deriveFont</code> method on the chosen instance.
      * <p>
      * This method provides for the application the most precise control
      * over which <code>Font</code> instance is used to render text.
--- a/src/share/classes/java/awt/GridBagLayout.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/awt/GridBagLayout.java	Mon Nov 11 23:17:30 2013 -0800
@@ -125,9 +125,9 @@
  * <center><table BORDER=0 WIDTH=800
  *        SUMMARY="absolute, relative and baseline values as described above">
  * <tr>
- * <th><P STYLE="TEXT-ALIGN:LEFT">Absolute Values</th>
- * <th><P STYLE="TEXT-ALIGN:LEFT">Orientation Relative Values</th>
- * <th><P STYLE="TEXT-ALIGN:LEFT">Baseline Relative Values</th>
+ * <th><P style="text-align:left">Absolute Values</th>
+ * <th><P style="text-align:left">Orientation Relative Values</th>
+ * <th><P style="text-align:left">Baseline Relative Values</th>
  * </tr>
  * <tr>
  * <td>
@@ -255,10 +255,10 @@
  * <center><table WIDTH=600 summary="layout">
  * <tr ALIGN=CENTER>
  * <td>
- * <img src="doc-files/GridBagLayout-1.gif" alt="The preceeding text describes this graphic (Figure 1)." style="float:center; margin: 7px 10px;">
+ * <img src="doc-files/GridBagLayout-1.gif" alt="The preceding text describes this graphic (Figure 1)." style="float:center; margin: 7px 10px;">
  * </td>
  * <td>
- * <img src="doc-files/GridBagLayout-2.gif" alt="The preceeding text describes this graphic (Figure 2)." style="float:center; margin: 7px 10px;">
+ * <img src="doc-files/GridBagLayout-2.gif" alt="The preceding text describes this graphic (Figure 2)." style="float:center; margin: 7px 10px;">
  * </td>
  * <tr ALIGN=CENTER>
  * <td>Figure 2: Horizontal, Left-to-Right</td>
@@ -366,7 +366,7 @@
 
     static final int EMPIRICMULTIPLIER = 2;
     /**
-     * This field is no longer used to reserve arrays and keeped for backward
+     * This field is no longer used to reserve arrays and kept for backward
      * compatibility. Previously, this was
      * the maximum number of grid positions (both horizontal and
      * vertical) that could be laid out by the grid bag layout.
@@ -444,7 +444,7 @@
      * applied to the gridbag after all of the minimum row
      * heights have been calculated.
      * If <code>rowHeights</code> has more elements than the number of
-     * rows, rowa are added to the gridbag to match
+     * rows, rows are added to the gridbag to match
      * the number of elements in <code>rowHeights</code>.
      *
      * @serial
@@ -533,7 +533,7 @@
      * and returns <code>null</code>.
      *
      * @param       comp the component to be queried
-     * @return      the contraints for the specified component
+     * @return      the constraints for the specified component
      */
     protected GridBagConstraints lookupConstraints(Component comp) {
         GridBagConstraints constraints = comptable.get(comp);
@@ -800,7 +800,7 @@
     /**
      * Lays out the specified container using this grid bag layout.
      * This method reshapes components in the specified container in
-     * order to satisfy the contraints of this <code>GridBagLayout</code>
+     * order to satisfy the constraints of this <code>GridBagLayout</code>
      * object.
      * <p>
      * Most applications do not call this method directly.
@@ -897,7 +897,7 @@
      * <ol>
      * <li>Figure out the dimensions of the layout grid.
      * <li>Determine which cells the components occupy.
-     * <li>Distribute the weights and min sizes amoung the rows/columns.
+     * <li>Distribute the weights and min sizes among the rows/columns.
      * </ol>
      *
      * This also caches the minsizes for all the children when they are
@@ -979,7 +979,7 @@
 
     /**
      * This method is obsolete and supplied for backwards
-     * compatability only; new code should call {@link
+     * compatibility only; new code should call {@link
      * #getLayoutInfo(java.awt.Container, int) getLayoutInfo} instead.
      * This method is the same as <code>getLayoutInfo</code>;
      * refer to <code>getLayoutInfo</code> for details on parameters
@@ -1612,7 +1612,7 @@
 
     /**
      * This method is obsolete and supplied for backwards
-     * compatability only; new code should call {@link
+     * compatibility only; new code should call {@link
      * #adjustForGravity(java.awt.GridBagConstraints, java.awt.Rectangle)
      * adjustForGravity} instead.
      * This method is the same as <code>adjustForGravity</code>;
@@ -1993,7 +1993,7 @@
 
     /**
      * This method is obsolete and supplied for backwards
-     * compatability only; new code should call {@link
+     * compatibility only; new code should call {@link
      * #getMinSize(java.awt.Container, GridBagLayoutInfo) getMinSize} instead.
      * This method is the same as <code>getMinSize</code>;
      * refer to <code>getMinSize</code> for details on parameters
@@ -2033,7 +2033,7 @@
 
     /**
      * This method is obsolete and supplied for backwards
-     * compatability only; new code should call {@link
+     * compatibility only; new code should call {@link
      * #arrangeGrid(Container) arrangeGrid} instead.
      * This method is the same as <code>arrangeGrid</code>;
      * refer to <code>arrangeGrid</code> for details on the
@@ -2229,6 +2229,6 @@
         }
     }
 
-    // Added for serial backwards compatability (4348425)
+    // Added for serial backwards compatibility (4348425)
     static final long serialVersionUID = 8838754796412211005L;
 }
--- a/src/share/classes/java/awt/KeyEventDispatcher.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/awt/KeyEventDispatcher.java	Mon Nov 11 23:17:30 2013 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2001, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 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
@@ -51,6 +51,7 @@
  * @see KeyboardFocusManager#removeKeyEventDispatcher
  * @since 1.4
  */
+@FunctionalInterface
 public interface KeyEventDispatcher {
 
     /**
--- a/src/share/classes/java/awt/KeyEventPostProcessor.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/awt/KeyEventPostProcessor.java	Mon Nov 11 23:17:30 2013 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 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
@@ -54,6 +54,7 @@
  * @see KeyboardFocusManager#removeKeyEventPostProcessor
  * @since 1.4
  */
+@FunctionalInterface
 public interface KeyEventPostProcessor {
 
     /**
--- a/src/share/classes/java/awt/KeyboardFocusManager.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/awt/KeyboardFocusManager.java	Mon Nov 11 23:17:30 2013 -0800
@@ -2663,7 +2663,7 @@
                      * only if we have the last request to dispatch. If the last request
                      * fails, focus will be restored to either the component of the last
                      * previously succedded request, or to to the focus owner that was
-                     * before this clearing proccess.
+                     * before this clearing process.
                      */
                     if (!iter.hasNext()) {
                         disableRestoreFocus = false;
--- a/src/share/classes/java/awt/LinearGradientPaint.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/awt/LinearGradientPaint.java	Mon Nov 11 23:17:30 2013 -0800
@@ -94,7 +94,8 @@
  * of the three cycle methods:
  * <p>
  * <center>
- * <img src = "doc-files/LinearGradientPaint.png" alt="LinearGradientPaint">
+ * <img src = "doc-files/LinearGradientPaint.png"
+ * alt="image showing the output of the example code">
  * </center>
  *
  * @see java.awt.Paint
--- a/src/share/classes/java/awt/List.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/awt/List.java	Mon Nov 11 23:17:30 2013 -0800
@@ -797,7 +797,7 @@
     }
 
     /**
-     * Gets the minumum dimensions for a list with the specified
+     * Gets the minimum dimensions for a list with the specified
      * number of rows.
      * @param      rows    number of rows in the list
      * @return     the minimum dimensions for displaying this scrolling list
@@ -1164,7 +1164,7 @@
 
     /*
      * Serialization support.  Since the value of the selected
-     * field isn't neccessarily up to date we sync it up with the
+     * field isn't necessarily up to date, we sync it up with the
      * peer before serializing.
      */
 
--- a/src/share/classes/java/awt/MediaTracker.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/awt/MediaTracker.java	Mon Nov 11 23:17:30 2013 -0800
@@ -744,7 +744,7 @@
      * All instances of <code>Image</code> being tracked
      * under the specified ID are removed regardless of scale.
      * @param      image the image to be removed
-     * @param      id the tracking ID frrom which to remove the image
+     * @param      id the tracking ID from which to remove the image
      * @see        java.awt.MediaTracker#removeImage(java.awt.Image)
      * @see        java.awt.MediaTracker#removeImage(java.awt.Image, int, int, int)
      * @since      JDK1.1
--- a/src/share/classes/java/awt/MenuComponent.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/awt/MenuComponent.java	Mon Nov 11 23:17:30 2013 -0800
@@ -402,7 +402,7 @@
 
     /**
      * Gets this component's locking object (the object that owns the thread
-     * sychronization monitor) for AWT component-tree and layout
+     * synchronization monitor) for AWT component-tree and layout
      * operations.
      * @return this component's locking object
      */
@@ -686,7 +686,7 @@
         /**
          * Gets the <code>Cursor</code> of this object.
          *
-         * @return the <code>Curso</code>, if supported, of the object;
+         * @return the <code>Cursor</code>, if supported, of the object;
          *     otherwise, <code>null</code>
          */
         public Cursor getCursor() {
--- a/src/share/classes/java/awt/MultipleGradientPaintContext.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/awt/MultipleGradientPaintContext.java	Mon Nov 11 23:17:30 2013 -0800
@@ -81,7 +81,7 @@
     protected float a00, a01, a10, a11, a02, a12;
 
     /**
-     * This boolean specifies wether we are in simple lookup mode, where an
+     * This boolean specifies whether we are in simple lookup mode, where an
      * input value between 0 and 1 may be used to directly index into a single
      * array of gradient colors.  If this boolean value is false, then we have
      * to use a 2-step process where we have to determine which gradient array
--- a/src/share/classes/java/awt/Polygon.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/awt/Polygon.java	Mon Nov 11 23:17:30 2013 -0800
@@ -246,7 +246,7 @@
     }
 
     /*
-     * Resizes the bounding box to accomodate the specified coordinates.
+     * Resizes the bounding box to accommodate the specified coordinates.
      * @param x,&nbsp;y the specified coordinates
      */
     void updateBounds(int x, int y) {
--- a/src/share/classes/java/awt/PopupMenu.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/awt/PopupMenu.java	Mon Nov 11 23:17:30 2013 -0800
@@ -150,7 +150,7 @@
      * @exception IllegalArgumentException  if this <code>PopupMenu</code>
      *                has a non-<code>Component</code> parent
      * @exception IllegalArgumentException if the origin is not in the
-     *                parent's heirarchy
+     *                parent's hierarchy
      * @exception RuntimeException if the parent is not showing on screen
      */
     public void show(Component origin, int x, int y) {
--- a/src/share/classes/java/awt/RadialGradientPaint.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/awt/RadialGradientPaint.java	Mon Nov 11 23:17:30 2013 -0800
@@ -80,14 +80,16 @@
  * from the focus point. The following figure shows that the distance AB
  * is equal to the distance BC, and the distance AD is equal to the distance DE.
  * <center>
- * <img src = "doc-files/RadialGradientPaint-3.png" alt="RadialGradientPaint-3">
+ * <img src = "doc-files/RadialGradientPaint-3.png" alt="image showing the
+ * distance AB=BC, and AD=DE">
  * </center>
  * If the gradient and graphics rendering transforms are uniformly scaled and
  * the user sets the focus so that it coincides with the center of the circle,
  * the gradient color proportions are equal for any line drawn from the center.
  * The following figure shows the distances AB, BC, AD, and DE. They are all equal.
  * <center>
- * <img src = "doc-files/RadialGradientPaint-4.png" alt="RadialGradientPaint-4">
+ * <img src = "doc-files/RadialGradientPaint-4.png" alt="image showing the
+ * distance of AB, BC, AD, and DE are all equal">
  * </center>
  * Note that some minor variations in distances may occur due to sampling at
  * the granularity of a pixel.
@@ -117,7 +119,8 @@
  * (centered) focus for each of the three cycle methods:
  * <p>
  * <center>
- * <img src = "doc-files/RadialGradientPaint-1.png" alt="RadialGradientPaint-1">
+ * <img src = "doc-files/RadialGradientPaint-1.png" alt="image showing the
+ * output of the sameple code">
  * </center>
  *
  * <p>
@@ -141,7 +144,8 @@
  * focus for each of the three cycle methods:
  * <p>
  * <center>
- * <img src = "doc-files/RadialGradientPaint-2.png" alt="RadialGradientPaint-2">
+ * <img src = "doc-files/RadialGradientPaint-2.png" alt="image showing the
+ * output of the sample code">
  * </center>
  *
  * @see java.awt.Paint
--- a/src/share/classes/java/awt/RenderingHints.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/awt/RenderingHints.java	Mon Nov 11 23:17:30 2013 -0800
@@ -101,7 +101,7 @@
             //     - the integer key of the Key
             // It is theoretically possible for 2 distinct keys to collide
             // along all 3 of those attributes in the context of multiple
-            // class loaders, but that occurence will be extremely rare and
+            // class loaders, but that occurrence will be extremely rare and
             // we account for that possibility below in the recordIdentity
             // method by slightly relaxing our uniqueness guarantees if we
             // end up in that situation.
@@ -729,7 +729,7 @@
      * from one side of a sample to the other.
      * As the image is scaled down, more image pixels have their
      * color samples represented in the resulting output since each
-     * output pixel recieves color information from up to 4 image
+     * output pixel receives color information from up to 4 image
      * pixels.
      *
      * @see #KEY_INTERPOLATION
--- a/src/share/classes/java/awt/ScrollPane.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/awt/ScrollPane.java	Mon Nov 11 23:17:30 2013 -0800
@@ -425,8 +425,8 @@
 
     /**
      * Determine the size to allocate the child component.
-     * If the viewport area is bigger than the childs
-     * preferred size then the child is allocated enough
+     * If the viewport area is bigger than the preferred size
+     * of the child then the child is allocated enough
      * to fill the viewport, otherwise the child is given
      * it's preferred size.
      */
--- a/src/share/classes/java/awt/ScrollPaneAdjustable.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/awt/ScrollPaneAdjustable.java	Mon Nov 11 23:17:30 2013 -0800
@@ -336,7 +336,7 @@
      * the AdjustementEvent with specified type and value.
      *
      * @param v the new value of the scrollbar
-     * @param type the type of the scrolling operation occured
+     * @param type the type of the scrolling operation occurred
      */
     private void setTypedValue(int v, int type) {
         v = Math.max(v, minimum);
--- a/src/share/classes/java/awt/Shape.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/awt/Shape.java	Mon Nov 11 23:17:30 2013 -0800
@@ -269,7 +269,7 @@
      * Tests if the interior of the <code>Shape</code> entirely contains
      * the specified rectangular area.  All coordinates that lie inside
      * the rectangular area must lie within the <code>Shape</code> for the
-     * entire rectanglar area to be considered contained within the
+     * entire rectangular area to be considered contained within the
      * <code>Shape</code>.
      * <p>
      * The {@code Shape.contains()} method allows a {@code Shape}
--- a/src/share/classes/java/awt/TextComponent.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/awt/TextComponent.java	Mon Nov 11 23:17:30 2013 -0800
@@ -1000,7 +1000,7 @@
          * Return 0 if the text is empty, or the caret position
          * if no selection.
          *
-         * @return the index into teh text of the end of the selection &gt;= 0
+         * @return the index into the text of the end of the selection &gt;= 0
          */
         public int getSelectionEnd() {
             return TextComponent.this.getSelectionEnd();
--- a/src/share/classes/java/awt/TextField.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/awt/TextField.java	Mon Nov 11 23:17:30 2013 -0800
@@ -405,7 +405,7 @@
     }
 
     /**
-     * Gets the minumum dimensions for a text field with
+     * Gets the minimum dimensions for a text field with
      * the specified number of columns.
      * @param    columns   the number of columns in
      *                          this text field.
@@ -430,7 +430,7 @@
     }
 
     /**
-     * Gets the minumum dimensions for this text field.
+     * Gets the minimum dimensions for this text field.
      * @return     the minimum dimensions for
      *                  displaying this text field.
      * @since      JDK1.1
--- a/src/share/classes/java/awt/Toolkit.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/awt/Toolkit.java	Mon Nov 11 23:17:30 2013 -0800
@@ -1457,7 +1457,7 @@
      * <p>Note that multi-frame images are invalid and may cause this
      * method to hang.
      *
-     * @param cursor the image to display when the cursor is actived
+     * @param cursor the image to display when the cursor is activated
      * @param hotSpot the X and Y of the large cursor's hot spot; the
      *   hotSpot values must be less than the Dimension returned by
      *   <code>getBestCursorSize</code>
@@ -1809,8 +1809,7 @@
 
         // This property should never be cached
         if (propertyName.equals("awt.dynamicLayoutSupported")) {
-            value = lazilyLoadDesktopProperty(propertyName);
-            return value;
+            return getDefaultToolkit().lazilyLoadDesktopProperty(propertyName);
         }
 
         value = desktopProperties.get(propertyName);
--- a/src/share/classes/java/awt/Window.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/awt/Window.java	Mon Nov 11 23:17:30 2013 -0800
@@ -1656,7 +1656,7 @@
      * effect until it is hidden and then shown again.
      *
      * @param exclusionType the modal exclusion type for this window; a {@code null}
-     *     value is equivivalent to {@link Dialog.ModalExclusionType#NO_EXCLUDE
+     *     value is equivalent to {@link Dialog.ModalExclusionType#NO_EXCLUDE
      *     NO_EXCLUDE}
      * @throws SecurityException if the calling thread does not have permission
      *     to set the modal exclusion property to the window with the given
@@ -2079,7 +2079,7 @@
     }
 
     /**
-     * Processes window focus event occuring on this window by
+     * Processes window focus event occurring on this window by
      * dispatching them to any registered WindowFocusListener objects.
      * NOTE: this method will not be called unless window focus events
      * are enabled for this window. This happens when one of the
@@ -2114,7 +2114,7 @@
     }
 
     /**
-     * Processes window state event occuring on this window by
+     * Processes window state event occurring on this window by
      * dispatching them to any registered {@code WindowStateListener}
      * objects.
      * NOTE: this method will not be called unless window state events
@@ -2191,13 +2191,11 @@
      * When the window is later shown, it will be always-on-top.
      *
      * <p> When this method is called on a window with a value of
-     * {@code false} the always-on-top state is set to normal. The
-     * window remains in the top-most position but it`s z-order can be
-     * changed as for any other window.  Calling this method with a value
-     * of {@code false} on a window that has a normal state has no
-     * effect.  Setting the always-on-top state to false has no effect on
-     * the relative z-order of the windows if there are no other
-     * always-on-top windows.
+     * {@code false} the always-on-top state is set to normal. It may also
+     * cause an unspecified, platform-dependent change in the z-order of
+     * top-level windows, but other always-on-top windows will remain in
+     * top-most position. Calling this method with a value of {@code false}
+     * on a window that has a normal state has no effect.
      *
      * <p><b>Note</b>: some platforms might not support always-on-top
      * windows.  To detect if always-on-top windows are supported by the
@@ -2978,11 +2976,11 @@
 
         addToWindowList();
         initGC(null);
+        ownedWindowList = new Vector<>();
     }
 
     private void deserializeResources(ObjectInputStream s)
         throws ClassNotFoundException, IOException, HeadlessException {
-            ownedWindowList = new Vector<>();
 
             if (windowSerializedDataVersion < 2) {
                 // Translate old-style focus tracking to new model. For 1.4 and
@@ -3678,7 +3676,7 @@
      * and either the {@code UnsupportedOperationException} or {@code
      * IllegalComponentStateException} will be thrown.
      * <p>
-     * The tranlucency levels of individual pixels may also be effected by the
+     * The translucency levels of individual pixels may also be effected by the
      * alpha component of their color (see {@link Window#setBackground(Color)}) and the
      * opacity value (see {@link #setOpacity(float)}). See {@link
      * GraphicsDevice.WindowTranslucency} for more details.
@@ -3749,7 +3747,7 @@
      * <p>
      * If the windowing system supports the {@link
      * GraphicsDevice.WindowTranslucency#PERPIXEL_TRANSLUCENT PERPIXEL_TRANSLUCENT}
-     * tranclucency, the alpha component of the given background color
+     * translucency, the alpha component of the given background color
      * may effect the mode of operation for this window: it indicates whether
      * this window must be opaque (alpha equals {@code 1.0f}) or per-pixel translucent
      * (alpha is less than {@code 1.0f}). If the given background color is
--- a/src/share/classes/java/awt/color/package.html	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/awt/color/package.html	Mon Nov 11 23:17:30 2013 -0800
@@ -25,6 +25,7 @@
 
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
 <html>
+<head><title></title></head>
 <body bgcolor="white">
 
 Provides classes for color spaces.  It contains an
--- a/src/share/classes/java/awt/datatransfer/DataFlavor.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/awt/datatransfer/DataFlavor.java	Mon Nov 11 23:17:30 2013 -0800
@@ -104,7 +104,7 @@
 public class DataFlavor implements Externalizable, Cloneable {
 
     private static final long serialVersionUID = 8367026044764648243L;
-    private static final Class ioInputStreamClass = java.io.InputStream.class;
+    private static final Class<InputStream> ioInputStreamClass = InputStream.class;
 
     /**
      * Tries to load a class from: the bootstrap loader, the system loader,
@@ -151,7 +151,7 @@
     /*
      * private initializer
      */
-    static private DataFlavor createConstant(Class rc, String prn) {
+    static private DataFlavor createConstant(Class<?> rc, String prn) {
         try {
             return new DataFlavor(rc, prn);
         } catch (Exception e) {
@@ -323,7 +323,7 @@
      * @exception NullPointerException if either <code>primaryType</code>,
      *            <code>subType</code> or <code>representationClass</code> is null
      */
-    private DataFlavor(String primaryType, String subType, MimeTypeParameterList params, Class representationClass, String humanPresentableName) {
+    private DataFlavor(String primaryType, String subType, MimeTypeParameterList params, Class<?> representationClass, String humanPresentableName) {
         super();
         if (primaryType == null) {
             throw new NullPointerException("primaryType");
@@ -340,7 +340,7 @@
         params.set("class", representationClass.getName());
 
         if (humanPresentableName == null) {
-            humanPresentableName = (String)params.get("humanPresentableName");
+            humanPresentableName = params.get("humanPresentableName");
 
             if (humanPresentableName == null)
                 humanPresentableName = primaryType + "/" + subType;
@@ -741,7 +741,7 @@
         return bestFlavor;
     }
 
-    private static Comparator textFlavorComparator;
+    private static Comparator<DataFlavor> textFlavorComparator;
 
     static class TextFlavorComparator
         extends DataTransferer.DataFlavorComparator {
@@ -1447,6 +1447,6 @@
 
     /** Java class of objects this DataFlavor represents **/
 
-    private Class       representationClass;
+    private Class<?>       representationClass;
 
 } // class DataFlavor
--- a/src/share/classes/java/awt/datatransfer/FlavorMap.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/awt/datatransfer/FlavorMap.java	Mon Nov 11 23:17:30 2013 -0800
@@ -30,7 +30,7 @@
 
 /**
  * A two-way Map between "natives" (Strings), which correspond to platform-
- * specfic data formats, and "flavors" (DataFlavors), which corerspond to
+ * specific data formats, and "flavors" (DataFlavors), which correspond to
  * platform-independent MIME types. FlavorMaps need not be symmetric, but
  * typically are.
  *
--- a/src/share/classes/java/awt/datatransfer/MimeTypeParameterList.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/awt/datatransfer/MimeTypeParameterList.java	Mon Nov 11 23:17:30 2013 -0800
@@ -33,7 +33,7 @@
 
 
 /**
- * An object that encapsualtes the parameter list of a MimeType
+ * An object that encapsulates the parameter list of a MimeType
  * as defined in RFC 2045 and 2046.
  *
  * @author jeff.dunn@eng.sun.com
@@ -44,13 +44,13 @@
      * Default constructor.
      */
     public MimeTypeParameterList() {
-        parameters = new Hashtable();
+        parameters = new Hashtable<>();
     }
 
     public MimeTypeParameterList(String rawdata)
         throws MimeTypeParseException
     {
-        parameters = new Hashtable();
+        parameters = new Hashtable<>();
 
         //    now parse rawdata
         parse(rawdata);
@@ -59,10 +59,10 @@
     public int hashCode() {
         int code = Integer.MAX_VALUE/45; // "random" value for empty lists
         String paramName = null;
-        Enumeration enum_ = this.getNames();
+        Enumeration<String> enum_ = this.getNames();
 
         while (enum_.hasMoreElements()) {
-            paramName = (String)enum_.nextElement();
+            paramName = enum_.nextElement();
             code += paramName.hashCode();
             code += this.get(paramName).hashCode();
         }
@@ -87,14 +87,14 @@
         String name = null;
         String thisValue = null;
         String thatValue = null;
-        Set entries = parameters.entrySet();
-        Iterator iterator = entries.iterator();
-        Map.Entry entry = null;
+        Set<Map.Entry<String, String>> entries = parameters.entrySet();
+        Iterator<Map.Entry<String, String>> iterator = entries.iterator();
+        Map.Entry<String, String> entry = null;
         while (iterator.hasNext()) {
-            entry = (Map.Entry)iterator.next();
-            name = (String)entry.getKey();
-            thisValue = (String)entry.getValue();
-            thatValue = (String)that.parameters.get(name);
+            entry = iterator.next();
+            name = entry.getKey();
+            thisValue = entry.getValue();
+            thatValue = that.parameters.get(name);
             if ((thisValue == null) || (thatValue == null)) {
                 // both null -> equal, only one null -> not equal
                 if (thisValue != thatValue) {
@@ -250,7 +250,7 @@
      * is no current association.
      */
     public String get(String name) {
-        return (String)parameters.get(name.trim().toLowerCase());
+        return parameters.get(name.trim().toLowerCase());
     }
 
     /**
@@ -271,7 +271,7 @@
     /**
      * Retrieve an enumeration of all the names in this list.
      */
-    public Enumeration getNames() {
+    public Enumeration<String> getNames() {
         return parameters.keys();
     }
 
@@ -279,15 +279,15 @@
         // Heuristic: 8 characters per field
         StringBuilder buffer = new StringBuilder(parameters.size() * 16);
 
-        Enumeration keys = parameters.keys();
+        Enumeration<String> keys = parameters.keys();
         while(keys.hasMoreElements())
         {
             buffer.append("; ");
 
-            String key = (String)keys.nextElement();
+            String key = keys.nextElement();
             buffer.append(key);
             buffer.append('=');
-               buffer.append(quote((String)parameters.get(key)));
+               buffer.append(quote(parameters.get(key)));
         }
 
         return buffer.toString();
@@ -307,7 +307,7 @@
          return newObj;
      }
 
-    private Hashtable parameters;
+    private Hashtable<String, String> parameters;
 
     //    below here be scary parsing related things
 
--- a/src/share/classes/java/awt/datatransfer/SystemFlavorMap.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/awt/datatransfer/SystemFlavorMap.java	Mon Nov 11 23:17:30 2013 -0800
@@ -1324,7 +1324,7 @@
         List<String> retval = null;
         for (DataFlavor dataFlavor : convertMimeTypeToDataFlavors(type)) {
             List<String> natives = getFlavorToNative().get(dataFlavor);
-            if (!natives.isEmpty()) {
+            if (natives != null && !natives.isEmpty()) {
                 if (retval == null) {
                     retval = new ArrayList<>();
                 }
--- a/src/share/classes/java/awt/datatransfer/package.html	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/awt/datatransfer/package.html	Mon Nov 11 23:17:30 2013 -0800
@@ -25,6 +25,7 @@
 
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
 <html>
+<head><title></title></head>
 <body bgcolor="white">
 
 Provides interfaces and classes for transferring data
--- a/src/share/classes/java/awt/dnd/DragGestureListener.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/awt/dnd/DragGestureListener.java	Mon Nov 11 23:17:30 2013 -0800
@@ -50,8 +50,8 @@
     /**
      * This method is invoked by the {@code DragGestureRecognizer}
      * when the {@code DragGestureRecognizer} detects a platform-dependent
-     * drag initiating gesture. To intiate the drag and drop operation,
-     * if approtiate, {@link DragGestureEvent#startDrag startDrag()} method on
+     * drag initiating gesture. To initiate the drag and drop operation,
+     * if appropriate, {@link DragGestureEvent#startDrag startDrag()} method on
      * the {@code DragGestureEvent} has to be invoked.
      * <P>
      * @see java.awt.dnd.DragGestureRecognizer
--- a/src/share/classes/java/awt/dnd/DragGestureRecognizer.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/awt/dnd/DragGestureRecognizer.java	Mon Nov 11 23:17:30 2013 -0800
@@ -46,7 +46,7 @@
  * <p>
  * The appropriate <code>DragGestureRecognizer</code>
  * subclass instance is obtained from the
- * {@link DragSource} asssociated with
+ * {@link DragSource} associated with
  * a particular <code>Component</code>, or from the <code>Toolkit</code> object via its
  * {@link java.awt.Toolkit#createDragGestureRecognizer createDragGestureRecognizer()}
  * method.
--- a/src/share/classes/java/awt/dnd/DragSourceContext.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/awt/dnd/DragSourceContext.java	Mon Nov 11 23:17:30 2013 -0800
@@ -474,7 +474,7 @@
 
     protected synchronized void updateCurrentCursor(int sourceAct, int targetAct, int status) {
 
-        // if the cursor has been previously set then dont do any defaults
+        // if the cursor has been previously set then don't do any defaults
         // processing.
 
         if (useCustomCursor) {
--- a/src/share/classes/java/awt/dnd/DragSourceEvent.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/awt/dnd/DragSourceEvent.java	Mon Nov 11 23:17:30 2013 -0800
@@ -38,7 +38,7 @@
  * over, or exits a drop site, when the drop action changes, and when the drag
  * ends. The location for the generated <code>DragSourceEvent</code> specifies
  * the mouse cursor location in screen coordinates at the moment this event
- * occured.
+ * occurred.
  * <p>
  * In a multi-screen environment without a virtual device, the cursor location is
  * specified in the coordinate system of the <i>initiator</i>
@@ -71,7 +71,7 @@
 
     /**
      * The horizontal coordinate for the cursor location at the moment this
-     * event occured if the cursor location is specified for this event;
+     * event occurred if the cursor location is specified for this event;
      * otherwise zero.
      *
      * @serial
@@ -80,7 +80,7 @@
 
     /**
      * The vertical coordinate for the cursor location at the moment this event
-     * occured if the cursor location is specified for this event;
+     * occurred if the cursor location is specified for this event;
      * otherwise zero.
      *
      * @serial
@@ -141,7 +141,7 @@
 
     /**
      * This method returns a <code>Point</code> indicating the cursor
-     * location in screen coordinates at the moment this event occured, or
+     * location in screen coordinates at the moment this event occurred, or
      * <code>null</code> if the cursor location is not specified for this
      * event.
      *
@@ -159,7 +159,7 @@
 
     /**
      * This method returns the horizontal coordinate of the cursor location in
-     * screen coordinates at the moment this event occured, or zero if the
+     * screen coordinates at the moment this event occurred, or zero if the
      * cursor location is not specified for this event.
      *
      * @return an integer indicating the horizontal coordinate of the cursor
@@ -172,7 +172,7 @@
 
     /**
      * This method returns the vertical coordinate of the cursor location in
-     * screen coordinates at the moment this event occured, or zero if the
+     * screen coordinates at the moment this event occurred, or zero if the
      * cursor location is not specified for this event.
      *
      * @return an integer indicating the vertical coordinate of the cursor
--- a/src/share/classes/java/awt/dnd/DropTarget.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/awt/dnd/DropTarget.java	Mon Nov 11 23:17:30 2013 -0800
@@ -612,7 +612,7 @@
             dropTargetContext =
                 (DropTargetContext)f.get("dropTargetContext", null);
         } catch (IllegalArgumentException e) {
-            // Pre-1.4 support. 'dropTargetContext' was previoulsy transient
+            // Pre-1.4 support. 'dropTargetContext' was previously transient
         }
         if (dropTargetContext == null) {
             dropTargetContext = createDropTargetContext();
@@ -789,7 +789,7 @@
     }
 
     /**
-     * update autoscrolling with current cursor locn
+     * update autoscrolling with current cursor location
      * <P>
      * @param dragCursorLocn the <code>Point</code>
      */
--- a/src/share/classes/java/awt/dnd/InvalidDnDOperationException.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/awt/dnd/InvalidDnDOperationException.java	Mon Nov 11 23:17:30 2013 -0800
@@ -29,7 +29,7 @@
  * This exception is thrown by various methods in the java.awt.dnd package.
  * It is usually thrown to indicate that the target in question is unable
  * to undertake the requested operation that the present time, since the
- * undrelying DnD system is not in the appropriate state.
+ * underlying DnD system is not in the appropriate state.
  *
  * @since 1.2
  */
--- a/src/share/classes/java/awt/dnd/package.html	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/awt/dnd/package.html	Mon Nov 11 23:17:30 2013 -0800
@@ -25,6 +25,7 @@
 
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
 <html>
+<head><title></title></head>
 <body bgcolor="white">
 
 Drag and Drop is a direct manipulation gesture found in many Graphical
@@ -51,18 +52,18 @@
 associated with some presentation
 element (<code>Component</code>) in the GUI, to initiate a Drag and Drop of
 some potentially <code>Transferable</code> data. 
-<P>
+<br><br>
 <LI>1 or more <code>DropTarget</code>(s) come into/go out of 
 existence, associated
 with presentation elements in the GUI (Components), potentially
 capable of consuming <code>Transferable</code> data types. 
-<P>
+<br><br>
 <LI> A <code>DragGestureRecognizer</code> is 
 obtained from the <code>DragSource</code> and is
 associated with a <code>Component</code> in order 
 to track and identify any Drag
 initiating gesture by the user over the <code>Component</code>. 
-<P>
+<br><br>
 <LI> A user makes a Drag gesture over the <code>Component</code>, 
 which the registered
 <code>DragGestureRecognizer</code> detects, and notifies its
@@ -76,13 +77,13 @@
 recognizing mouse device gestures. Other abstract subclasses may be
 provided by the platform to support other input devices or
 particular <code>Component</code> class semantics. 
-    <P>
+<br><br>
 <LI> The <code>DragGestureListener</code> causes the 
 <code>DragSource</code> to initiate the Drag
 and Drop operation on behalf of the user, perhaps animating the
 GUI Cursor and/or rendering an <code>Image</code> of the item(s) that are the
 subject of the operation.
-<P>
+<br><br>
 <LI> As the user gestures navigate over <code>Component</code>(s) 
 in the GUI with
 associated <code>DropTarget</code>(s), the <code>DragSource</code> 
@@ -111,11 +112,11 @@
 <UL>
 <LI> By the transfer "operation" selected by the user, and supported by
 both the <code>DragSource</code> and <code>DropTarget</code>: Copy, Move or Reference(link). 
-<P>
+<br><br>
 <LI> By the intersection of the set of data types provided by the
 <code>DragSource</code> and the set of data types comprehensible by the 
 <code>DropTarget</code>. 
-<P>
+<br><br>
 <LI>When the user terminates the drag operation, normally resulting in a
 successful Drop, both the <code>DragSource</code> and <code>DropTarget</code>
 receive
--- a/src/share/classes/java/awt/doc-files/AWTThreadIssues.html	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/awt/doc-files/AWTThreadIssues.html	Mon Nov 11 23:17:30 2013 -0800
@@ -23,7 +23,11 @@
  questions.
 -->
 
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html>
+<head>
+<title></title>
+</head>
 <body bgcolor=white>
 
 <h1 align=center>AWT Threading Issues</h1>
@@ -81,13 +85,13 @@
        dispatched:
        <ul>
            <li> Sequentially.
-           <dd> That is, it is not permitted that several events from
-	        this queue are dispatched simultaneously. 
+           <dl><dd> That is, it is not permitted that several events from
+	        this queue are dispatched simultaneously. </dd></dl>
            <li> In the same order as they are enqueued.
-           <dd> That is, if <code>AWTEvent</code>&nbsp;A is enqueued
+           <dl><dd> That is, if <code>AWTEvent</code>&nbsp;A is enqueued
 	        to the <code>EventQueue</code> before
 		<code>AWTEvent</code>&nbsp;B then event B will not be 
-                dispatched before event A.
+                dispatched before event A.</dd></dl>
        </ul>
   <li> There is at least one alive non-daemon thread while there is at
        least one displayable AWT or Swing component within the
--- a/src/share/classes/java/awt/doc-files/DesktopProperties.html	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/awt/doc-files/DesktopProperties.html	Mon Nov 11 23:17:30 2013 -0800
@@ -23,7 +23,11 @@
  questions.
 -->
 
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html>
+<head>
+<title></title>
+</head>
 <body bgcolor=white>
 
 <h1 align=center>AWT Desktop Properties</h1>
@@ -51,8 +55,8 @@
 <p>
 The following table summarizes the desktop properties documented
 here, and their value types.
-<p>
-<table align="center" border="0" cellspacing="0" cellpadding="2" width="%95
+<br><br>
+<table align="center" border="0" cellspacing="0" cellpadding="2"
   summary="Standard AWT Desktop Properties">
 <tr bgcolor="#ccccff">
 <th valign="TOP" align="LEFT">Property Name</th>
@@ -60,17 +64,17 @@
 <th valign="TOP" align="LEFT">Summary Description</th>
 </tr>
 <tr>
-<td valign="TOP"><A href=#awt.font.desktophints>awt.font.desktophints</A</td>
-<td valign="TOP"><a href="../../util/Map.html">java.util.Map<a/></td>
-<td valign="TOP">Font smoothing (text antialiasing) settings.<a/></td>
+<td valign="TOP"><A href="#awt.font.desktophints">awt.font.desktophints</A></td>
+<td valign="TOP"><a href="../../util/Map.html">java.util.Map</a></td>
+<td valign="TOP">Font smoothing (text antialiasing) settings.</td>
 </tr>
 <tr>
-<td valign="TOP"><A href=#"sun.awt.enableExtraMouseButtons">sun.awt.enableExtraMouseButtons</A</td>
-<td valign="TOP"><a href="../../lang/Boolean.html">java.lang.Boolean<a/></td>
-<td valign="TOP">Controls if mouse events from extra buttons are to be generated or not<a/></td>
+<td valign="TOP"><A href="#sun.awt.enableExtraMouseButtons">sun.awt.enableExtraMouseButtons</A></td>
+<td valign="TOP"><a href="../../lang/Boolean.html">java.lang.Boolean</a></td>
+<td valign="TOP">Controls if mouse events from extra buttons are to be generated or not</td>
 </tr>
 </table>
-<p>
+
 <h2>Desktop Font Rendering Hints</h2>
 <b>Desktop Property: <A name="awt.font.desktophints">"awt.font.desktophints"</A></b>
 <p>
@@ -84,14 +88,14 @@
 <a href="../../../javax/swing/JComponent.html"> Swing components</a> which
 are required to appear consistent with native desktop components or other
 Swing components.
-<p>
+
 <h3>Basic Usage</h3>
 The standard desktop property named
 <b>"awt.font.desktophints"</b>
 can be used to obtain the rendering hints that best match the desktop settings.
 
 The return value is a
-<a href="../../util/Map.html"> Map<a/> of
+<a href="../../util/Map.html"> Map</a> of
 <a href="../RenderingHints.html"> <code>RenderingHints</code></a> which
 can be directly applied to a <code>Graphics2D</code>.
 <p>
@@ -105,7 +109,7 @@
 }
 </code></pre>
 <h3>Advanced Usage Tips</h3>
-<p>
+
 <h4>Listening for changes</h4>
 <p>
 An application can listen for changes in the property
@@ -161,7 +165,7 @@
      if (hintsToSave.size() == 0) {
          return savedHints;
      }
-     /* RenderingHints.keySet() returns Set<Object> */
+     /* RenderingHints.keySet() returns Set&lt;Object&gt; */
      for (Object o : hintsToSave.keySet()) {
          RenderingHints.Key key = (RenderingHints.Key)o;
          Object value = g2d.getRenderingHint(key);
@@ -185,17 +189,17 @@
 <h3>Details</h3>
 <ul>
 <li>The return value will always be null or a <code>Map</code>
-<p>
+<br><br>
 <li>If the return value is null, then no desktop properties are available,
 and dynamic updates will not be available. This is a typical behaviour if
 the JDK does not recognise the desktop environment, or it is one which
 has no such settings. The <b>Headless</b> toolkit is one such example.
 Therefore it is important to test against null before using the map. 
-<p>
+<br><br>
 <li>If non-null the value will be a <code>Map</code> of
 <code>RenderingHints</code> such that every key is an instance of
 <code>RenderingHints.Key</code> and the value is a legal value for that key.
-<p>
+<br><br>
 <li>The map may contain the default value for a hint. This is
 needed in the event there is a previously a non-default value for the hint
 set on the <code>Graphics2D</code>. If the map did not contain
@@ -204,7 +208,7 @@
 <p>
 An application can use <code>setRenderingHints(Map)</code> to reinitialise
 all hints, but this would affect unrelated hints too.
-<p>
+<br><br>
 <li>A multi-screen desktop may support per-screen device settings in which
 case the returned value is for the default screen of the desktop.
 An application may want to use the settings for the screen on
--- a/src/share/classes/java/awt/doc-files/FocusSpec.html	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/awt/doc-files/FocusSpec.html	Mon Nov 11 23:17:30 2013 -0800
@@ -27,7 +27,7 @@
 
 <html>
     <head>
-       <title align=center>The AWT Focus Subsystem</title>
+       <title>The AWT Focus Subsystem</title>
     </head>
 
     <body bgcolor="white">
@@ -660,16 +660,16 @@
   FocusTraversalPolicy of its own. To do so, one needs to set Container's focus
   traversal policy provider property to <code>true</code> with the call to
 
-  <ul>
+  <blockquote>
     <code>Container.setFocusTraversalPolicyProvider(boolean)</code>
-  </ul>
+  </blockquote>
 
   To determine whether a Container is a focus traversal policy provider, the
   following method should be used:
 
-  <ul>
+  <blockquote>
     <code>Container.isFocusTraversalPolicyProvider()</code>
-  </ul>
+  </blockquote>
 
   If focus traversal policy provider property is set on a focus cycle root, it
   isn't considered a focus traversal policy provider and behaves just like any
@@ -750,10 +750,10 @@
 to use one of the following methods on <code>KeyboardFocusManager</code>:
 
   <ul>
-    <code>KeyboardFocusManager.focusNextComponent()</code>
-    <code>KeyboardFocusManager.focusPreviousComponent()</code>
-    <code>KeyboardFocusManager.upFocusCycle()</code>
-    <code>KeyboardFocusManager.downFocusCycle()</code>
+    <li><code>KeyboardFocusManager.focusNextComponent()</code>
+    <li><code>KeyboardFocusManager.focusPreviousComponent()</code>
+    <li><code>KeyboardFocusManager.upFocusCycle()</code>
+    <li><code>KeyboardFocusManager.downFocusCycle()</code>
   </ul>
 
 <p>
@@ -1149,7 +1149,7 @@
         <b>Microsoft Windows</b>: The Window is moved to front and becomes the focused
         Window.
       <br>
-        </b>Solaris</b>: The Window is moved to front. In a point-to-focus focus
+        <b>Solaris</b>: The Window is moved to front. In a point-to-focus focus
         window manager, the Window will be focused if it is now the
         top-most Window under the cursor. In a click-to-focus window
         manager, the Window will become the focused Window.
--- a/src/share/classes/java/awt/doc-files/Modality.html	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/awt/doc-files/Modality.html	Mon Nov 11 23:17:30 2013 -0800
@@ -43,7 +43,7 @@
       modality features and how to use them. It contains the following sections:
     </p><ul>
       <li><a href="#Definitions">Definitions</a></li>
-      </li><li><a href="#ModalityTypes">Modality types</a></li>
+      <li><a href="#ModalityTypes">Modality types</a></li>
       <li><a href="#ShowHideBlocking">Show/hide blocking</a></li>
       <li><a href="#ModalExclusion">Modal exclusion</a></li>
       <li><a href="#Related">Related AWT features</a></li>
@@ -54,13 +54,13 @@
     </ul>
 
     <a name="Definitions"></a>
-    </p><h3>Definitions</h3>
+    <h3>Definitions</h3>
 
     <p>
       <u>Document</u> - a window without an owner that, together with
       all its child hierarchy, may be operated on as a single self-contained
       document.
-      Every window belongs to some document &#151; its root can be found as
+      Every window belongs to some document &mdash; its root can be found as
       the closest ancestor window without an owner.
     </p><p>
       <a name="ModalBlocked"></a>
@@ -73,7 +73,7 @@
       <blockquote>
         <hr>
           <b>Warning!</b> Some window managers allow users to change the window
-          Z-order in an arbitrary way &#151; in that case the last requirement 
+          Z-order in an arbitrary way &mdash; in that case the last requirement 
           may not be met.
         <hr>
       </blockquote>
@@ -92,12 +92,12 @@
     </p><p>
      <blockquote><hr>
       <b>Note</b>: Everywhere in this document the notion of "window" is equal
-      to a top-level window in the Java programming language &#151; in other words
+      to a top-level window in the Java programming language &mdash; in other words
       an instance of <code>java.awt.Window</code> or any descendant class.
       <hr></blockquote>
 
     <a name="ModalityTypes"></a>
-    </p><h3>Modality types</h3>
+    <h3>Modality types</h3>
 
     <p>
       There are four supported modality types :
@@ -163,11 +163,11 @@
       <hr></blockquote>
 
     <a name="ShowHideBlocking"></a>
-    </p><h3>Show/hide blocking</h3>
+    <h3>Show/hide blocking</h3>
 
     <p>
       <u>Showing the window or modeless dialog: "F"</u><br>
-      All the visible modal dialogs are looked through &#151; if F is from the SB
+      All the visible modal dialogs are looked through &mdash; if F is from the SB
       of one of them, it becomes blocked by it. If there are several such
       dialogs, the first shown is used. If no such dialogs exist, F remains
       unblocked.
@@ -185,7 +185,7 @@
       dialogs outside M's SB and modal dialogs outside M's SB that do not
       block M).
       </ul>
-      </p><p>
+      <p>
       After the modal dialog M is shown, it becomes blocked by the first shown
       dialog from the first group (if there are any), all the windows from the
       second one become blocked by M, and all the windows from the third group
@@ -197,12 +197,12 @@
       </p><p>
       <u>Showing the document-modal dialog: "M"</u><br>
       All the visible application- and toolkit-modal dialogs are looked
-      through &#151; if M is from the SB of one of them,
+      through &mdash; if M is from the SB of one of them,
       it becomes blocked by it. If there are several such dialogs,
       the first shown is used. If no such dialogs exist, M remains unblocked.
       </p><p>
       <u>Showing the application-modal dialog: "M"</u><br>
-      All the visible toolkit-modal dialogs are looked through &#151;
+      All the visible toolkit-modal dialogs are looked through &mdash;
       if M is from the SB of one of them, it becomes blocked by it.
       If there are several such dialogs, the first shown is used.
       If no such dialogs exist, M remains unblocked.
@@ -212,7 +212,7 @@
       </p><p>
 <!--        <center> -->
           </p>
-          <table border="1" cols="5" rows="5">
+          <table border="1">
 	  <caption>The Standard Blocking Matrix</caption>
             <tbody><tr align="center">
               <td align="center">current/shown</td>
@@ -293,11 +293,10 @@
       <hr>
         <b>Implementation note</b>: Changing the modal exclusion type for a visible window
         may have no effect until it is hidden and then shown again.
-      </hr>
     </blockquote>
 
-    <a name="Related"</a>
-    </p><h3>Related AWT features</h3>
+    <a name="Related"></a>
+    <h3>Related AWT features</h3>
 
     <p>
       <u>Always-On-Top</u><br>
@@ -315,16 +314,16 @@
     <p>
       <u>Minimizing, maximizing and closing blocked windows</u><br>
       When a modal dialog blocks a window, the user may not be able to maximize or
-      minimize the blocked window&#151; however, the actual behavior is unspecified
+      minimize the blocked window&mdash; however, the actual behavior is unspecified
       and platform-dependent. In any case, the user can't close the blocked window
-      interactively&#151; but it can be closed programmatically by calling the
+      interactively&mdash; but it can be closed programmatically by calling the
       <code>setVisible(false)</code> or <code>dispose()</code> methods on the blocked
       window.
     </p>
     <p>
       <u>Blocked windows activations</u><br>
       When the user selects a blocked window, it may be brought to the front, along
-      with the blocking modal dialog which would then become the active window&#151;
+      with the blocking modal dialog which would then become the active window&mdash;
       however, the actual behavior is unspecified and platform-dependent.
     </p>
     <p>
@@ -339,9 +338,9 @@
       </li></ol>
       If the modal dialog to be hidden does not have focus, the active window remains
       unchanged.
-    </p>
+    
     <a name="Security"></a>
-    </p><h3>Security</h3>
+    <h3>Security</h3>
 
     <p>
       A special <code>AWTPermission</code>, <code>"toolkitModality"</code>,
@@ -386,35 +385,35 @@
     <a name="Examples"></a>
     </p><h3>Examples</h3>
 
-    <table cols="2" border="0">
+    <table border="0">
       <tbody><tr>
-        <td align="left" valign="center">
+        <td align="left" >
 	<ol>
           <li>Frame "F" is shown<br>
           <li>Document-modal dialog "D<sub>i</sub>" is shown<br>
-          <li>F becomes blocked by D<sub>i</sub> &#151; it's in the same document<br>
+          <li>F becomes blocked by D<sub>i</sub> &mdash; it's in the same document<br>
           <li>Document-modal dialog "D<sub>ii</sub>" is shown<br>
-          <li>D<sub>i</sub> becomes blocked by D<sub>ii</sub> &#151; it's in the
+          <li>D<sub>i</sub> becomes blocked by D<sub>ii</sub> &mdash; it's in the
 	      same document<br>
 	  </ol>
           <br>
         </td>
-        <td align="center" valign="center">
+        <td align="center">
           <img src="modal-example1.gif">
           <br>
         </td>
       </tr>
       <tr>
-        <td align="left" valign="center">
+        <td align="left">
 	<ol>
          <li>Frame "F" is shown<br>
          <li>Document-modal dialog "D<sub>i</sub>" is shown<br>
-         <li>F becomes blocked by D<sub>i</sub> &#151; it's in the same document<br>
+         <li>F becomes blocked by D<sub>i</sub> &mdash; it's in the same document<br>
          <li>Document-modal dialog "D<sub>ii</sub>" is shown<br>
-         <li>D<sub>i</sub> becomes blocked by D<sub>ii</sub> &#151;
+         <li>D<sub>i</sub> becomes blocked by D<sub>ii</sub> &mdash;
 	     it's in the same document<br>
          <li>D<sub>i</sub> is hidden<br>
-         <li>F becomes blocked by D<sub>ii</sub> &#151; it's in the same document<br>
+         <li>F becomes blocked by D<sub>ii</sub> &mdash; it's in the same document<br>
          </ol>
 	 <br>
         </td>
@@ -424,45 +423,45 @@
         </td>
       </tr>
       <tr>
-        <td align="left" valign="center">
+        <td align="left">
 	<ol>
           <li>Frame "F" is shown<br>
           <li>Toolkit-modal dialog "D<sub>i</sub>" is created, but not shown<br>
           <li>Document-modal dialog "D<sub>ii</sub>" is shown<br>
-          <li>F becomes blocked by D<sub>ii</sub> &#151; it's in the same document<br>
+          <li>F becomes blocked by D<sub>ii</sub> &mdash; it's in the same document<br>
           <li>Application-modal dialog "D<sub>iii</sub>" is shown<br>
-          <li>D<sub>ii</sub> becomes blocked by D<sub>iii</sub> &#151;
+          <li>D<sub>ii</sub> becomes blocked by D<sub>iii</sub> &mdash;
 	      it's in the same application<br>
           <li>D<sub>i</sub> is shown<br>
-          <li>D<sub>i</sub> becomes blocked by D<sub>ii</sub> &#151; it's its owner<br>
-          <li>D<sub>iii</sub> remains unblocked &#151; it blocks D<sub>ii</sub> and 
+          <li>D<sub>i</sub> becomes blocked by D<sub>ii</sub> &mdash; it's its owner<br>
+          <li>D<sub>iii</sub> remains unblocked &mdash; it blocks D<sub>ii</sub> and 
 	      D<sub>ii</sub> blocks D<sub>i</sub><br>
 	  </ol>
           <br>
         </td>
-        <td align="center" valign="center">
+        <td align="center">
           <img src="modal-example3.gif">
           <br>
         </td>
       </tr>
       <tr>
-        <td align="left" valign="center">
+        <td align="left">
 	<ol>
           <li>Frame "F" is shown<br>
           <li>Toolkit-modal dialog "D<sub>i</sub>" is created, but not shown<br>
           <li>Document-modal dialog "D<sub>ii</sub>" is shown<br>
-          <li>F becomes blocked by D<sub>ii</sub> &#151; it's in the same document<br>
+          <li>F becomes blocked by D<sub>ii</sub> &mdash; it's in the same document<br>
           <li>Application-modal dialog "D<sub>iii</sub>" is shown<br>
-          <li>D<sub>ii</sub> becomes blocked by D<sub>iii</sub> &#151; it's in the
+          <li>D<sub>ii</sub> becomes blocked by D<sub>iii</sub> &mdash; it's in the
 	      same application<br>
           <li>D<sub>i</sub> is shown<br>
-          <li>D<sub>iii</sub> becomes blocked by D<sub>i</sub> &#151; D<sub>i</sub>
+          <li>D<sub>iii</sub> becomes blocked by D<sub>i</sub> &mdash; D<sub>i</sub>
 	      is not blocked<br>
           <li>D<sub>i</sub> remains unblocked<br>
 	  </ol>
           <br>
         </td>
-        <td align="center" valign="center">
+        <td align="center">
           <img src="modal-example4.gif">
           <br>
         </td>
--- a/src/share/classes/java/awt/event/ActionEvent.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/awt/event/ActionEvent.java	Mon Nov 11 23:17:30 2013 -0800
@@ -95,7 +95,7 @@
     public static final int ACTION_LAST                 = 1001;
 
     /**
-     * This event id indicates that a meaningful action occured.
+     * This event id indicates that a meaningful action occurred.
      */
     @Native public static final int ACTION_PERFORMED    = ACTION_FIRST; //Event.ACTION_EVENT
 
--- a/src/share/classes/java/awt/event/InvocationEvent.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/awt/event/InvocationEvent.java	Mon Nov 11 23:17:30 2013 -0800
@@ -25,6 +25,8 @@
 
 package java.awt.event;
 
+import sun.awt.AWTAccessor;
+
 import java.awt.ActiveEvent;
 import java.awt.AWTEvent;
 
@@ -56,6 +58,15 @@
  */
 public class InvocationEvent extends AWTEvent implements ActiveEvent {
 
+    static {
+        AWTAccessor.setInvocationEventAccessor(new AWTAccessor.InvocationEventAccessor() {
+            @Override
+            public void dispose(InvocationEvent invocationEvent) {
+                invocationEvent.finishedDispatching(false);
+            }
+        });
+    }
+
     /**
      * Marks the first integer id for the range of invocation event ids.
      */
@@ -78,11 +89,21 @@
 
     /**
      * The (potentially null) Object whose notifyAll() method will be called
-     * immediately after the Runnable.run() method has returned or thrown an exception.
+     * immediately after the Runnable.run() method has returned or thrown an exception
+     * or after the event was disposed.
      *
      * @see #isDispatched
      */
-    protected Object notifier;
+    protected volatile Object notifier;
+
+    /**
+     * The (potentially null) Runnable whose run() method will be called
+     * immediately after the event was dispatched or disposed.
+     *
+     * @see #isDispatched
+     * @since 1.8
+     */
+    private final Runnable listener;
 
     /**
      * Indicates whether the <code>run()</code> method of the <code>runnable</code>
@@ -147,7 +168,7 @@
      * @see #InvocationEvent(Object, Runnable, Object, boolean)
      */
     public InvocationEvent(Object source, Runnable runnable) {
-        this(source, runnable, null, false);
+        this(source, INVOCATION_DEFAULT, runnable, null, null, false);
     }
 
     /**
@@ -171,7 +192,8 @@
      * @param notifier          The {@code Object} whose <code>notifyAll</code>
      *                          method will be called after
      *                          <code>Runnable.run</code> has returned or
-     *                          thrown an exception
+     *                          thrown an exception or after the event was
+     *                          disposed
      * @param catchThrowables   Specifies whether <code>dispatch</code>
      *                          should catch Throwable when executing
      *                          the <code>Runnable</code>'s <code>run</code>
@@ -185,7 +207,39 @@
      */
     public InvocationEvent(Object source, Runnable runnable, Object notifier,
                            boolean catchThrowables) {
-        this(source, INVOCATION_DEFAULT, runnable, notifier, catchThrowables);
+        this(source, INVOCATION_DEFAULT, runnable, notifier, null, catchThrowables);
+    }
+
+    /**
+     * Constructs an <code>InvocationEvent</code> with the specified
+     * source which will execute the runnable's <code>run</code>
+     * method when dispatched.  If listener is non-<code>null</code>,
+     * <code>listener.run()</code> will be called immediately after
+     * <code>run</code> has returned, thrown an exception or the event
+     * was disposed.
+     * <p>This method throws an <code>IllegalArgumentException</code>
+     * if <code>source</code> is <code>null</code>.
+     *
+     * @param source            The <code>Object</code> that originated
+     *                          the event
+     * @param runnable          The <code>Runnable</code> whose
+     *                          <code>run</code> method will be
+     *                          executed
+     * @param listener          The <code>Runnable</code>Runnable whose
+     *                          <code>run()</code> method will be called
+     *                          after the {@code InvocationEvent}
+     *                          was dispatched or disposed
+     * @param catchThrowables   Specifies whether <code>dispatch</code>
+     *                          should catch Throwable when executing
+     *                          the <code>Runnable</code>'s <code>run</code>
+     *                          method, or should instead propagate those
+     *                          Throwables to the EventDispatchThread's
+     *                          dispatch loop
+     * @throws IllegalArgumentException if <code>source</code> is null
+     */
+    public InvocationEvent(Object source, Runnable runnable, Runnable listener,
+                           boolean catchThrowables)  {
+        this(source, INVOCATION_DEFAULT, runnable, null, listener, catchThrowables);
     }
 
     /**
@@ -208,7 +262,8 @@
      * @param notifier          The <code>Object</code> whose <code>notifyAll</code>
      *                          method will be called after
      *                          <code>Runnable.run</code> has returned or
-     *                          thrown an exception
+     *                          thrown an exception or after the event was
+     *                          disposed
      * @param catchThrowables   Specifies whether <code>dispatch</code>
      *                          should catch Throwable when executing the
      *                          <code>Runnable</code>'s <code>run</code>
@@ -221,13 +276,18 @@
      */
     protected InvocationEvent(Object source, int id, Runnable runnable,
                               Object notifier, boolean catchThrowables) {
+        this(source, id, runnable, notifier, null, catchThrowables);
+    }
+
+    private InvocationEvent(Object source, int id, Runnable runnable,
+                            Object notifier, Runnable listener, boolean catchThrowables) {
         super(source, id);
         this.runnable = runnable;
         this.notifier = notifier;
+        this.listener = listener;
         this.catchExceptions = catchThrowables;
         this.when = System.currentTimeMillis();
     }
-
     /**
      * Executes the Runnable's <code>run()</code> method and notifies the
      * notifier (if any) when <code>run()</code> has returned or thrown an exception.
@@ -251,13 +311,7 @@
                 runnable.run();
             }
         } finally {
-            dispatched = true;
-
-            if (notifier != null) {
-                synchronized (notifier) {
-                    notifier.notifyAll();
-                }
-            }
+            finishedDispatching(true);
         }
     }
 
@@ -331,6 +385,25 @@
     }
 
     /**
+     * Called when the event was dispatched or disposed
+     * @param dispatched true if the event was dispatched
+     *                   false if the event was disposed
+     */
+    private void finishedDispatching(boolean dispatched) {
+        this.dispatched = dispatched;
+
+        if (notifier != null) {
+            synchronized (notifier) {
+                notifier.notifyAll();
+            }
+        }
+
+        if (listener != null) {
+            listener.run();
+        }
+    }
+
+    /**
      * Returns a parameter string identifying this event.
      * This method is useful for event-logging and for debugging.
      *
--- a/src/share/classes/java/awt/event/KeyEvent.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/awt/event/KeyEvent.java	Mon Nov 11 23:17:30 2013 -0800
@@ -133,7 +133,7 @@
  * WARNING: Aside from those keys that are defined by the Java language
  * (VK_ENTER, VK_BACK_SPACE, and VK_TAB), do not rely on the values of the VK_
  * constants.  Sun reserves the right to change these values as needed
- * to accomodate a wider range of keyboards in the future.
+ * to accommodate a wider range of keyboards in the future.
  * <p>
  * An unspecified behavior will be caused if the {@code id} parameter
  * of any particular {@code KeyEvent} instance is not
--- a/src/share/classes/java/awt/event/WindowEvent.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/awt/event/WindowEvent.java	Mon Nov 11 23:17:30 2013 -0800
@@ -79,8 +79,10 @@
     @Native public static final int WINDOW_CLOSING      = 1 + WINDOW_FIRST; //Event.WINDOW_DESTROY
 
     /**
-     * The window closed event. This event is delivered after
-     * the window has been closed as the result of a call to dispose.
+     * The window closed event. This event is delivered after the displayable
+     * window has been closed as the result of a call to dispose.
+     * @see java.awt.Component#isDisplayable
+     * @see Window#dispose
      */
     @Native public static final int WINDOW_CLOSED       = 2 + WINDOW_FIRST;
 
--- a/src/share/classes/java/awt/event/package.html	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/awt/event/package.html	Mon Nov 11 23:17:30 2013 -0800
@@ -25,6 +25,7 @@
 
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
 <html>
+<head><title></title></head>
 <body bgcolor="white">
 
 Provides interfaces and classes for dealing with different
--- a/src/share/classes/java/awt/font/FontRenderContext.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/awt/font/FontRenderContext.java	Mon Nov 11 23:17:30 2013 -0800
@@ -126,7 +126,7 @@
      * anti-aliasing or fractional metrics.
      * @param tx the transform which is used to scale typographical points
      * to pixels in this <code>FontRenderContext</code>.  If null, an
-     * identity tranform is used.
+     * identity transform is used.
      * @param aaHint - one of the text antialiasing rendering hint values
      * defined in {@link java.awt.RenderingHints java.awt.RenderingHints}.
      * Any other value will throw <code>IllegalArgumentException</code>.
--- a/src/share/classes/java/awt/font/GlyphMetrics.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/awt/font/GlyphMetrics.java	Mon Nov 11 23:17:30 2013 -0800
@@ -43,7 +43,7 @@
 import java.awt.geom.Rectangle2D;
 
 /**
- * The <code>GlyphMetrics</code> class represents infomation for a
+ * The <code>GlyphMetrics</code> class represents information for a
  * single glyph.   A glyph is the visual representation of one or more
  * characters.  Many different glyphs can be used to represent a single
  * character or combination of characters.  <code>GlyphMetrics</code>
@@ -143,24 +143,24 @@
      * as a ligature, for example 'fi' or 'ffi'.  It is followed by
      * filler glyphs for the remaining characters. Filler and combining
      * glyphs can be intermixed to control positioning of accent marks
-     * on the logically preceeding ligature.
+     * on the logically preceding ligature.
      */
     public static final byte LIGATURE = 1;
 
     /**
      * Indicates a glyph that represents a combining character,
      * such as an umlaut.  There is no caret position between this glyph
-     * and the preceeding glyph.
+     * and the preceding glyph.
      */
     public static final byte COMBINING = 2;
 
     /**
      * Indicates a glyph with no corresponding character in the
      * backing store.  The glyph is associated with the character
-     * represented by the logicaly preceeding non-component glyph.  This
+     * represented by the logically preceding non-component glyph.  This
      * is used for kashida justification or other visual modifications to
      * existing glyphs.  There is no caret position between this glyph
-     * and the preceeding glyph.
+     * and the preceding glyph.
      */
     public static final byte COMPONENT = 3;
 
--- a/src/share/classes/java/awt/font/GlyphVector.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/awt/font/GlyphVector.java	Mon Nov 11 23:17:30 2013 -0800
@@ -395,7 +395,7 @@
      * indicates that no special transform is applied for the specified
      * glyph.
      * This method can be used to rotate, mirror, translate and scale the
-     * glyph.  Adding a transform can result in signifant performance changes.
+     * glyph.  Adding a transform can result in significant performance changes.
      * @param glyphIndex the index into this <code>GlyphVector</code>
      * @param newTX the new transform of the glyph at <code>glyphIndex</code>
      * @throws IndexOutOfBoundsException if <code>glyphIndex</code>
--- a/src/share/classes/java/awt/font/LineBreakMeasurer.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/awt/font/LineBreakMeasurer.java	Mon Nov 11 23:17:30 2013 -0800
@@ -112,7 +112,7 @@
  * <strong>Examples</strong>:<p>
  * Rendering a paragraph in a component
  * <blockquote>
- * <pre>
+ * <pre>{@code
  * public void paint(Graphics graphics) {
  *
  *     Point2D pen = new Point2D(10, 20);
@@ -137,13 +137,13 @@
  *         pen.y += layout.getDescent() + layout.getLeading();
  *     }
  * }
- * </pre>
+ * }</pre>
  * </blockquote>
  * <p>
  * Rendering text with tabs.  For simplicity, the overall text
  * direction is assumed to be left-to-right
  * <blockquote>
- * <pre>
+ * <pre>{@code
  * public void paint(Graphics graphics) {
  *
  *     float leftMargin = 10, rightMargin = 310;
@@ -240,7 +240,7 @@
  *         verticalPos += maxDescent;
  *     }
  * }
- * </pre>
+ * }</pre>
  * </blockquote>
  * @see TextLayout
  */
--- a/src/share/classes/java/awt/font/MultipleMaster.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/awt/font/MultipleMaster.java	Mon Nov 11 23:17:30 2013 -0800
@@ -41,7 +41,7 @@
   public  int getNumDesignAxes();
 
   /**
-   * Returns an array of design limits interleaved in the form [from->to]
+   * Returns an array of design limits interleaved in the form [from&rarr;to]
    * for each axis.  For example,
    * design limits for weight could be from 0.1 to 1.0. The values are
    * returned in the same order returned by
--- a/src/share/classes/java/awt/font/NumericShaper.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/awt/font/NumericShaper.java	Mon Nov 11 23:17:30 2013 -0800
@@ -1212,7 +1212,7 @@
      * For example, to check if a shaper shapes to Arabic, you would use the
      * following:
      * <blockquote>
-     *   <code>if ((shaper.getRanges() & shaper.ARABIC) != 0) { ... </code>
+     *   <code>if ((shaper.getRanges() &amp; shaper.ARABIC) != 0) { ... </code>
      * </blockquote>
      *
      * <p>Note that this method supports only the bit mask-based
--- a/src/share/classes/java/awt/font/OpenType.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/awt/font/OpenType.java	Mon Nov 11 23:17:30 2013 -0800
@@ -33,7 +33,7 @@
  * <p>
  * For more information on TrueType and OpenType fonts, see the
  * OpenType specification.
- * ( <a href=http://www.microsoft.com/typography/otspec/">http://www.microsoft.com/typography/otspec/l</a> ).
+ * ( <a href="http://www.microsoft.com/typography/otspec/">http://www.microsoft.com/typography/otspec/</a> ).
  */
 public interface OpenType {
 
@@ -268,7 +268,7 @@
   public final static int       TAG_ACNT        = 0x61636e74;
 
   /**
-   * Axis variaiton.  Table tag "avar" in the Open
+   * Axis variation.  Table tag "avar" in the Open
    * Type Specification.
    */
   public final static int       TAG_AVAR        = 0x61766172;
--- a/src/share/classes/java/awt/font/TextLayout.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/awt/font/TextLayout.java	Mon Nov 11 23:17:30 2013 -0800
@@ -223,7 +223,7 @@
  * baseline-relative coordinates map the 'x' coordinate to the
  * distance along the baseline, (positive x is forward along the
  * baseline), and the 'y' coordinate to a distance along the
- * perpendicular to the baseline at 'x' (postitive y is 90 degrees
+ * perpendicular to the baseline at 'x' (positive y is 90 degrees
  * clockwise from the baseline vector).  Values in standard
  * coordinates are measured along the x and y axes, with 0,0 at the
  * origin of the TextLayout.  Documentation for each relevant API
@@ -337,7 +337,7 @@
                                           TextHitInfo hit2,
                                           TextLayout layout) {
 
-            // default implmentation just calls private method on layout
+            // default implementation just calls private method on layout
             return layout.getStrongHit(hit1, hit2);
         }
     }
@@ -912,7 +912,7 @@
      * The ascent is the distance from the top (right) of the
      * <code>TextLayout</code> to the baseline.  It is always either
      * positive or zero.  The ascent is sufficient to
-     * accomodate superscripted text and is the maximum of the sum of the
+     * accommodate superscripted text and is the maximum of the sum of the
      * ascent, offset, and baseline of each glyph.  The ascent is
      * the maximum ascent from the baseline of all the text in the
      * TextLayout.  It is in baseline-relative coordinates.
@@ -927,7 +927,7 @@
      * Returns the descent of this <code>TextLayout</code>.
      * The descent is the distance from the baseline to the bottom (left) of
      * the <code>TextLayout</code>.  It is always either positive or zero.
-     * The descent is sufficient to accomodate subscripted text and is the
+     * The descent is sufficient to accommodate subscripted text and is the
      * maximum of the sum of the descent, offset, and baseline of each glyph.
      * This is the maximum descent from the baseline of all the text in
      * the TextLayout.  It is in baseline-relative coordinates.
--- a/src/share/classes/java/awt/font/TransformAttribute.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/awt/font/TransformAttribute.java	Mon Nov 11 23:17:30 2013 -0800
@@ -120,7 +120,7 @@
         return this;
     }
 
-    // Added for serial backwards compatability (4348425)
+    // Added for serial backwards compatibility (4348425)
     static final long serialVersionUID = 3356247357827709530L;
 
     /**
--- a/src/share/classes/java/awt/font/package.html	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/awt/font/package.html	Mon Nov 11 23:17:30 2013 -0800
@@ -25,6 +25,7 @@
 
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
 <html>
+<head><title></title></head>
 <body bgcolor="white">
 
 Provides classes and interface relating to fonts.  It
--- a/src/share/classes/java/awt/geom/AffineTransform.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/awt/geom/AffineTransform.java	Mon Nov 11 23:17:30 2013 -0800
@@ -47,7 +47,7 @@
  *      [ 1 ]   [   0    0    1   ] [ 1 ]   [         1         ]
  * </pre>
  * <p>
- * <a name="quadrantapproximation"></a><h4>Handling 90-Degree Rotations</h4>
+ * <h4><a name="quadrantapproximation">Handling 90-Degree Rotations</a></h4>
  * <p>
  * In some variations of the <code>rotate</code> methods in the
  * <code>AffineTransform</code> class, a double-precision argument
@@ -525,7 +525,7 @@
     /**
      * Constructs a new <code>AffineTransform</code> from an array of
      * floating point values representing either the 4 non-translation
-     * enries or the 6 specifiable entries of the 3x3 transformation
+     * entries or the 6 specifiable entries of the 3x3 transformation
      * matrix.  The values are retrieved from the array as
      * {&nbsp;m00&nbsp;m10&nbsp;m01&nbsp;m11&nbsp;[m02&nbsp;m12]}.
      * @param flatmatrix the float array containing the values to be set
@@ -715,7 +715,7 @@
 
     /**
      * Returns a transform that rotates coordinates around an anchor
-     * point accordinate to a rotation vector.
+     * point according to a rotation vector.
      * All coordinates rotate about the specified anchor coordinates
      * by the same amount.
      * The amount of rotation is such that coordinates along the former
@@ -845,7 +845,7 @@
      * this transform.
      * The return value is either one of the constants TYPE_IDENTITY
      * or TYPE_GENERAL_TRANSFORM, or a combination of the
-     * appriopriate flag bits.
+     * appropriate flag bits.
      * A valid combination of flag bits is an exclusive OR operation
      * that can combine
      * the TYPE_TRANSLATION flag bit
@@ -2876,7 +2876,7 @@
      * @param ptDst the specified <code>Point2D</code> that stores the
      * result of transforming <code>ptSrc</code>
      * @return the <code>ptDst</code> after transforming
-     * <code>ptSrc</code> and stroring the result in <code>ptDst</code>.
+     * <code>ptSrc</code> and storing the result in <code>ptDst</code>.
      * @since 1.2
      */
     public Point2D transform(Point2D ptSrc, Point2D ptDst) {
--- a/src/share/classes/java/awt/geom/Line2D.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/awt/geom/Line2D.java	Mon Nov 11 23:17:30 2013 -0800
@@ -477,7 +477,7 @@
      * direction is clockwise.
      * <p>A return value of 0 indicates that the point lies
      * exactly on the line segment.  Note that an indicator value
-     * of 0 is rare and not useful for determining colinearity
+     * of 0 is rare and not useful for determining collinearity
      * because of floating point rounding issues.
      * <p>If the point is colinear with the line segment, but
      * not between the end points, then the value will be -1 if the point
--- a/src/share/classes/java/awt/geom/Path2D.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/awt/geom/Path2D.java	Mon Nov 11 23:17:30 2013 -0800
@@ -2064,7 +2064,7 @@
      * @param w the width of the specified rectangular area
      * @param h the height of the specified rectangular area
      * @return {@code true} if the specified {@code PathIterator} contains
-     *         the specified rectangluar area; {@code false} otherwise.
+     *         the specified rectangular area; {@code false} otherwise.
      * @since 1.6
      */
     public static boolean contains(PathIterator pi,
--- a/src/share/classes/java/awt/geom/QuadCurve2D.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/awt/geom/QuadCurve2D.java	Mon Nov 11 23:17:30 2013 -0800
@@ -511,7 +511,7 @@
     /**
      * Returns the X coordinate of the end point in
      * <code>double</code> precision.
-     * @return the x coordiante of the end point.
+     * @return the x coordinate of the end point.
      * @since 1.2
      */
     public abstract double getX2();
--- a/src/share/classes/java/awt/geom/package.html	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/awt/geom/package.html	Mon Nov 11 23:17:30 2013 -0800
@@ -25,6 +25,7 @@
 
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
 <html>
+<head><title></title></head>
 <body bgcolor="white">
 
 Provides the Java 2D classes for defining and performing operations
--- a/src/share/classes/java/awt/im/InputContext.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/awt/im/InputContext.java	Mon Nov 11 23:17:30 2013 -0800
@@ -98,7 +98,6 @@
      * an input method or keyboard layout has been successfully selected. The
      * following steps are taken until an input method has been selected:
      *
-     * <p>
      * <ul>
      * <li>
      * If the currently selected input method or keyboard layout supports the
--- a/src/share/classes/java/awt/im/InputMethodRequests.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/awt/im/InputMethodRequests.java	Mon Nov 11 23:17:30 2013 -0800
@@ -83,7 +83,7 @@
      * For example, for horizontal left-to-right text (such as English), the
      * location to the left of the left-most character on the last line
      * containing selected text is returned. For vertical top-to-bottom text,
-     * with lines proceding from right to left, the location to the top of the
+     * with lines proceeding from right to left, the location to the top of the
      * left-most line containing selected text is returned.
      *
      * <p>
--- a/src/share/classes/java/awt/image/BandedSampleModel.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/awt/image/BandedSampleModel.java	Mon Nov 11 23:17:30 2013 -0800
@@ -39,7 +39,7 @@
  *  This class represents image data which is stored in a band interleaved
  *  fashion and for
  *  which each sample of a pixel occupies one data element of the DataBuffer.
- *  It subclasses ComponentSampleModel but provides a more efficent
+ *  It subclasses ComponentSampleModel but provides a more efficient
  *  implementation for accessing band interleaved image data than is provided
  *  by ComponentSampleModel.  This class should typically be used when working
  *  with images which store sample data for each band in a different bank of the
--- a/src/share/classes/java/awt/image/BufferStrategy.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/awt/image/BufferStrategy.java	Mon Nov 11 23:17:30 2013 -0800
@@ -34,7 +34,7 @@
  * to organize complex memory on a particular <code>Canvas</code> or
  * <code>Window</code>.  Hardware and software limitations determine whether and
  * how a particular buffer strategy can be implemented.  These limitations
- * are detectible through the capabilities of the
+ * are detectable through the capabilities of the
  * <code>GraphicsConfiguration</code> used when creating the
  * <code>Canvas</code> or <code>Window</code>.
  * <p>
--- a/src/share/classes/java/awt/image/BufferedImage.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/awt/image/BufferedImage.java	Mon Nov 11 23:17:30 2013 -0800
@@ -1336,7 +1336,7 @@
     /**
      * Returns the minimum tile index in the y direction.
      * This is always zero.
-     * @return the mininum tile index in the y direction.
+     * @return the minimum tile index in the y direction.
      */
     public int getMinTileY() {
         return 0;
--- a/src/share/classes/java/awt/image/ComponentColorModel.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/awt/image/ComponentColorModel.java	Mon Nov 11 23:17:30 2013 -0800
@@ -2318,7 +2318,7 @@
      * and is not large enough to hold all the color and alpha components
      * (starting at <code>normOffset</code>).
      * <p>
-     * This method must be overrridden by a subclass if that subclass
+     * This method must be overridden by a subclass if that subclass
      * is designed to translate pixel sample values to color component values
      * in a non-default way.  The default translations implemented by this
      * class is described in the class comments.  Any subclass implementing
--- a/src/share/classes/java/awt/image/ComponentSampleModel.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/awt/image/ComponentSampleModel.java	Mon Nov 11 23:17:30 2013 -0800
@@ -167,6 +167,7 @@
         for (int i=0; i<numBands; i++) {
             bankIndices[i] = 0;
         }
+        verify();
     }
 
 
@@ -244,24 +245,53 @@
             throw new IllegalArgumentException("Length of bandOffsets must "+
                                                "equal length of bankIndices.");
         }
+        verify();
+    }
+
+    private void verify() {
+        int requiredSize = getBufferSize();
     }
 
     /**
      * Returns the size of the data buffer (in data elements) needed
      * for a data buffer that matches this ComponentSampleModel.
      */
-     private long getBufferSize() {
+     private int getBufferSize() {
          int maxBandOff=bandOffsets[0];
-         for (int i=1; i<bandOffsets.length; i++)
+         for (int i=1; i<bandOffsets.length; i++) {
              maxBandOff = Math.max(maxBandOff,bandOffsets[i]);
+         }
+
+         if (maxBandOff < 0 || maxBandOff > (Integer.MAX_VALUE - 1)) {
+             throw new IllegalArgumentException("Invalid band offset");
+         }
+
+         if (pixelStride < 0 || pixelStride > (Integer.MAX_VALUE / width)) {
+             throw new IllegalArgumentException("Invalid pixel stride");
+         }
+
+         if (scanlineStride < 0 || scanlineStride > (Integer.MAX_VALUE / height)) {
+             throw new IllegalArgumentException("Invalid scanline stride");
+         }
 
-         long size = 0;
-         if (maxBandOff >= 0)
-             size += maxBandOff+1;
-         if (pixelStride > 0)
-             size += pixelStride * (width-1);
-         if (scanlineStride > 0)
-             size += scanlineStride*(height-1);
+         int size = maxBandOff + 1;
+
+         int val = pixelStride * (width - 1);
+
+         if (val > (Integer.MAX_VALUE - size)) {
+             throw new IllegalArgumentException("Invalid pixel stride");
+         }
+
+         size += val;
+
+         val = scanlineStride * (height - 1);
+
+         if (val > (Integer.MAX_VALUE - size)) {
+             throw new IllegalArgumentException("Invalid scan stride");
+         }
+
+         size += val;
+
          return size;
      }
 
@@ -409,7 +439,7 @@
     public DataBuffer createDataBuffer() {
         DataBuffer dataBuffer = null;
 
-        int size = (int)getBufferSize();
+        int size = getBufferSize();
         switch (dataType) {
         case DataBuffer.TYPE_BYTE:
             dataBuffer = new DataBufferByte(size, numBanks);
@@ -584,7 +614,7 @@
      *
      * @throws NullPointerException if data is null.
      * @throws ArrayIndexOutOfBoundsException if the coordinates are
-     * not in bounds, or if obj is too small to hold the ouput.
+     * not in bounds, or if obj is too small to hold the output.
      */
     public Object getDataElements(int x, int y, Object obj, DataBuffer data) {
         if ((x < 0) || (y < 0) || (x >= width) || (y >= height)) {
--- a/src/share/classes/java/awt/image/ImageConsumer.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/awt/image/ImageConsumer.java	Mon Nov 11 23:17:30 2013 -0800
@@ -191,7 +191,7 @@
      * finished delivering all of the pixels that the source image
      * contains, or when a single frame of a multi-frame animation has
      * been completed, or when an error in loading or producing the
-     * image has occured.  The ImageConsumer should remove itself from the
+     * image has occurred.  The ImageConsumer should remove itself from the
      * list of consumers registered with the ImageProducer at this time,
      * unless it is interested in successive frames.
      * @param status the status of image loading
--- a/src/share/classes/java/awt/image/IndexColorModel.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/awt/image/IndexColorModel.java	Mon Nov 11 23:17:30 2013 -0800
@@ -1152,7 +1152,7 @@
      * @throws ClassCastException if <code>pixel</code> is not a
      *            primitive array of type <code>transferType</code>
      * @throws UnsupportedOperationException if <code>transferType</code>
-     *         is not one of the supported transer types
+     *         is not one of the supported transfer types
      * @see ColorModel#hasAlpha
      * @see ColorModel#getNumComponents
      */
@@ -1271,7 +1271,7 @@
      *  array is not large enough to hold all of the color and alpha
      *  components starting at <code>offset</code>
      * @throws UnsupportedOperationException if <code>transferType</code>
-     *         is not one of the supported transer types
+     *         is not one of the supported transfer types
      * @see WritableRaster#setDataElements
      * @see SampleModel#setDataElements
      */
--- a/src/share/classes/java/awt/image/PixelInterleavedSampleModel.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/awt/image/PixelInterleavedSampleModel.java	Mon Nov 11 23:17:30 2013 -0800
@@ -29,7 +29,7 @@
  *  This class represents image data which is stored in a pixel interleaved
  *  fashion and for
  *  which each sample of a pixel occupies one data element of the DataBuffer.
- *  It subclasses ComponentSampleModel but provides a more efficent
+ *  It subclasses ComponentSampleModel but provides a more efficient
  *  implementation for accessing pixel interleaved image data than is provided
  *  by ComponentSampleModel.  This class
  *  stores sample data for all bands in a single bank of the
--- a/src/share/classes/java/awt/image/package.html	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/awt/image/package.html	Mon Nov 11 23:17:30 2013 -0800
@@ -25,6 +25,7 @@
 
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
 <html>
+<head><title></title></head>
 <body bgcolor="white">
 
 Provides classes for creating and modifying images.
--- a/src/share/classes/java/awt/image/renderable/RenderableImage.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/awt/image/renderable/RenderableImage.java	Mon Nov 11 23:17:30 2013 -0800
@@ -65,7 +65,7 @@
      * String constant that can be used to identify a property on
      * a RenderedImage obtained via the createRendering or
      * createScaledRendering methods.  If such a property exists,
-     * the value of the propoery will be a RenderingHints object
+     * the value of the property will be a RenderingHints object
      * specifying which hints were observed in creating the rendering.
      */
      static final String HINTS_OBSERVED = "HINTS_OBSERVED";
@@ -162,7 +162,7 @@
      *
      * @param w the width of rendered image in pixels, or 0.
      * @param h the height of rendered image in pixels, or 0.
-     * @param hints a RenderingHints object containg hints.
+     * @param hints a RenderingHints object containing hints.
      * @return a RenderedImage containing the rendered data.
      */
     RenderedImage createScaledRendering(int w, int h, RenderingHints hints);
--- a/src/share/classes/java/awt/image/renderable/RenderableImageOp.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/awt/image/renderable/RenderableImageOp.java	Mon Nov 11 23:17:30 2013 -0800
@@ -236,7 +236,7 @@
      *
      * @param w the width of rendered image in pixels, or 0.
      * @param h the height of rendered image in pixels, or 0.
-     * @param hints a RenderingHints object containg hints.
+     * @param hints a RenderingHints object containing hints.
      * @return a RenderedImage containing the rendered data.
      */
     public RenderedImage createScaledRendering(int w, int h,
--- a/src/share/classes/java/awt/image/renderable/package.html	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/awt/image/renderable/package.html	Mon Nov 11 23:17:30 2013 -0800
@@ -25,6 +25,7 @@
 
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
 <html>
+<head><title></title></head>
 <body bgcolor="white">
 
 Provides classes and interfaces for producing
--- a/src/share/classes/java/awt/package.html	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/awt/package.html	Mon Nov 11 23:17:30 2013 -0800
@@ -25,6 +25,7 @@
 
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
 <html>
+<head><title></title></head>
 <body bgcolor="white">
 
 Contains all of the classes for creating user
@@ -53,7 +54,7 @@
 there is no way to properly arrange them within a Container object.
 The object's bounds are defined by any object's coordinate
 in combination with its size on a respective axis. 
-<p>
+
 
 <h2>Additional Specification</h2>
 <ul>
--- a/src/share/classes/java/awt/print/package.html	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/awt/print/package.html	Mon Nov 11 23:17:30 2013 -0800
@@ -25,6 +25,7 @@
 
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
 <html>
+<head><title></title></head>
 <body bgcolor="white">
 
 Provides classes and interfaces for a general printing API.  The
--- a/src/share/classes/java/beans/AppletInitializer.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/beans/AppletInitializer.java	Mon Nov 11 23:17:30 2013 -0800
@@ -32,7 +32,7 @@
 /**
  * <p>
  * This interface is designed to work in collusion with java.beans.Beans.instantiate.
- * The interafce is intended to provide mechanism to allow the proper
+ * The interface is intended to provide mechanism to allow the proper
  * initialization of JavaBeans that are also Applets, during their
  * instantiation by java.beans.Beans.instantiate().
  * </p>
--- a/src/share/classes/java/beans/DefaultPersistenceDelegate.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/beans/DefaultPersistenceDelegate.java	Mon Nov 11 23:17:30 2013 -0800
@@ -273,7 +273,7 @@
         TableModelListener (the JTable itself in this case) to the supplied
         table model.
 
-        We do not need to explictly add these listeners to the model in an
+        We do not need to explicitly add these listeners to the model in an
         archive as they will be added automatically by, in the above case,
         the JTable's "setModel" method. In some cases, we must specifically
         avoid trying to do this since the listener may be an inner class
--- a/src/share/classes/java/beans/EventHandler.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/beans/EventHandler.java	Mon Nov 11 23:17:30 2013 -0800
@@ -611,7 +611,7 @@
      * the empty string.
      * The format of the <code>eventPropertyName</code> string is a sequence of
      * methods or properties where each method or
-     * property is applied to the value returned by the preceeding method
+     * property is applied to the value returned by the preceding method
      * starting from the incoming event object.
      * The syntax is: <code>propertyName{.propertyName}*</code>
      * where <code>propertyName</code> matches a method or
--- a/src/share/classes/java/beans/MethodDescriptor.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/beans/MethodDescriptor.java	Mon Nov 11 23:17:30 2013 -0800
@@ -76,7 +76,7 @@
     }
 
     /**
-     * Gets the method that this MethodDescriptor encapsualtes.
+     * Gets the method that this MethodDescriptor encapsulates.
      *
      * @return The low-level description of the method
      */
--- a/src/share/classes/java/beans/PropertyDescriptor.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/beans/PropertyDescriptor.java	Mon Nov 11 23:17:30 2013 -0800
@@ -335,7 +335,7 @@
      */
     void setClass0(Class<?> clz) {
         if (getClass0() != null && clz.isAssignableFrom(getClass0())) {
-            // dont replace a subclass with a superclass
+            // don't replace a subclass with a superclass
             return;
         }
         super.setClass0(clz);
--- a/src/share/classes/java/beans/PropertyEditorSupport.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/beans/PropertyEditorSupport.java	Mon Nov 11 23:17:30 2013 -0800
@@ -30,7 +30,7 @@
 /**
  * This is a support class to help build property editors.
  * <p>
- * It can be used either as a base class or as a delagatee.
+ * It can be used either as a base class or as a delegate.
  */
 
 public class PropertyEditorSupport implements PropertyEditor {
--- a/src/share/classes/java/beans/beancontext/BeanContextChildSupport.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/beans/beancontext/BeanContextChildSupport.java	Mon Nov 11 23:17:30 2013 -0800
@@ -302,7 +302,7 @@
 
     /**
      * This method may be overridden by subclasses to provide their own
-     * initialization behaviors. When invoked any resources requried by the
+     * initialization behaviors. When invoked any resources required by the
      * BeanContextChild should be obtained from the current BeanContext.
      */
 
@@ -317,7 +317,7 @@
     private void writeObject(ObjectOutputStream oos) throws IOException {
 
         /*
-         * dont serialize if we are delegated and the delegator isnt also
+         * don't serialize if we are delegated and the delegator is not also
          * serializable.
          */
 
--- a/src/share/classes/java/beans/beancontext/BeanContextServiceRevokedListener.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/beans/beancontext/BeanContextServiceRevokedListener.java	Mon Nov 11 23:17:30 2013 -0800
@@ -38,7 +38,7 @@
 
     /**
      * The service named has been revoked. getService requests for
-     * this service will no longer be satisifed.
+     * this service will no longer be satisfied.
      * @param bcsre the <code>BeanContextServiceRevokedEvent</code> received
      * by this listener.
      */
--- a/src/share/classes/java/beans/beancontext/BeanContextServicesSupport.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/beans/beancontext/BeanContextServicesSupport.java	Mon Nov 11 23:17:30 2013 -0800
@@ -620,7 +620,7 @@
 
         /**
          * subclasses can override this method to create new subclasses of
-         * BCSSServiceProvider without having to overrride addService() in
+         * BCSSServiceProvider without having to override addService() in
          * order to instantiate.
          * @param sc the class
          * @param bcsp the service provider
--- a/src/share/classes/java/beans/beancontext/BeanContextSupport.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/beans/beancontext/BeanContextSupport.java	Mon Nov 11 23:17:30 2013 -0800
@@ -183,7 +183,7 @@
      * into a <tt>BeanContext</tt>.
      * </p>
      * <p>
-     * The semantics of the beanName parameter are defined by java.beans.Beans.instantate.
+     * The semantics of the beanName parameter are defined by java.beans.Beans.instantiate.
      * </p>
      *
      * @param beanName the name of the Bean to instantiate within this BeanContext
--- a/src/share/classes/java/io/File.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/io/File.java	Mon Nov 11 23:17:30 2013 -0800
@@ -1685,7 +1685,7 @@
      *           operation will fail if the user does not have permission to
      *           change the access permissions of this abstract pathname.  If
      *           <code>executable</code> is <code>false</code> and the underlying
-     *           file system does not implement an excute permission, then the
+     *           file system does not implement an execute permission, then the
      *           operation will fail.
      *
      * @throws  SecurityException
--- a/src/share/classes/java/io/ObjectStreamConstants.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/io/ObjectStreamConstants.java	Mon Nov 11 23:17:30 2013 -0800
@@ -219,7 +219,7 @@
     * This protocol is written by JVM 1.2.
     *
     * Externalizable data is written in block data mode and is
-    * terminated with TC_ENDBLOCKDATA. Externalizable classdescriptor
+    * terminated with TC_ENDBLOCKDATA. Externalizable class descriptor
     * flags has SC_BLOCK_DATA enabled. JVM 1.1.6 and greater can
     * read this format change.
     *
--- a/src/share/classes/java/io/PrintStream.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/io/PrintStream.java	Mon Nov 11 23:17:30 2013 -0800
@@ -303,7 +303,7 @@
      *          creating the file
      *
      * @throws  SecurityException
-     *          If a security manager is presentand {@link
+     *          If a security manager is present and {@link
      *          SecurityManager#checkWrite checkWrite(file.getPath())}
      *          denies write access to the file
      *
--- a/src/share/classes/java/lang/invoke/InnerClassLambdaMetafactory.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/lang/invoke/InnerClassLambdaMetafactory.java	Mon Nov 11 23:17:30 2013 -0800
@@ -26,10 +26,12 @@
 package java.lang.invoke;
 
 import jdk.internal.org.objectweb.asm.*;
+import sun.invoke.util.BytecodeDescriptor;
 import sun.misc.Unsafe;
 import sun.security.action.GetPropertyAction;
 
 import java.io.FilePermission;
+import java.io.Serializable;
 import java.lang.reflect.Constructor;
 import java.security.AccessController;
 import java.security.PrivilegedAction;
@@ -53,11 +55,17 @@
     private static final String METHOD_DESCRIPTOR_VOID = Type.getMethodDescriptor(Type.VOID_TYPE);
     private static final String JAVA_LANG_OBJECT = "java/lang/Object";
     private static final String NAME_CTOR = "<init>";
+    private static final String NAME_FACTORY = "get$Lambda";
 
     //Serialization support
     private static final String NAME_SERIALIZED_LAMBDA = "java/lang/invoke/SerializedLambda";
+    private static final String NAME_NOT_SERIALIZABLE_EXCEPTION = "java/io/NotSerializableException";
     private static final String DESCR_METHOD_WRITE_REPLACE = "()Ljava/lang/Object;";
+    private static final String DESCR_METHOD_WRITE_OBJECT = "(Ljava/io/ObjectOutputStream;)V";
+    private static final String DESCR_METHOD_READ_OBJECT = "(Ljava/io/ObjectInputStream;)V";
     private static final String NAME_METHOD_WRITE_REPLACE = "writeReplace";
+    private static final String NAME_METHOD_READ_OBJECT = "readObject";
+    private static final String NAME_METHOD_WRITE_OBJECT = "writeObject";
     private static final String DESCR_CTOR_SERIALIZED_LAMBDA
             = MethodType.methodType(void.class,
                                     Class.class,
@@ -65,6 +73,12 @@
                                     int.class, String.class, String.class, String.class,
                                     String.class,
                                     Object[].class).toMethodDescriptorString();
+    private static final String DESCR_CTOR_NOT_SERIALIZABLE_EXCEPTION
+            = MethodType.methodType(void.class, String.class).toMethodDescriptorString();
+    private static final String[] SER_HOSTILE_EXCEPTIONS = new String[] {NAME_NOT_SERIALIZABLE_EXCEPTION};
+
+
+    private static final String[] EMPTY_STRING_ARRAY = new String[0];
 
     // Used to ensure that each spun class name is unique
     private static final AtomicInteger counter = new AtomicInteger(0);
@@ -84,15 +98,12 @@
     private final String implMethodClassName;        // Name of type containing implementation "CC"
     private final String implMethodName;             // Name of implementation method "impl"
     private final String implMethodDesc;             // Type descriptor for implementation methods "(I)Ljava/lang/String;"
-    private final Type[] implMethodArgumentTypes;    // ASM types for implementation method parameters
-    private final Type implMethodReturnType;         // ASM type for implementation method return type "Ljava/lang/String;"
+    private final Class<?> implMethodReturnClass;    // class for implementaion method return type "Ljava/lang/String;"
     private final MethodType constructorType;        // Generated class constructor type "(CC)void"
-    private final String constructorDesc;            // Type descriptor for constructor "(LCC;)V"
     private final ClassWriter cw;                    // ASM class writer
-    private final Type[] argTypes;                   // ASM types for the constructor arguments
     private final String[] argNames;                 // Generated names for the constructor arguments
+    private final String[] argDescs;                 // Type descriptors for the constructor arguments
     private final String lambdaClassName;            // Generated name for the generated class "X$$Lambda$1"
-    private final Type[] instantiatedArgumentTypes;  // ASM types for the functional interface arguments
 
     /**
      * General meta-factory constructor, supporting both standard cases and
@@ -147,22 +158,23 @@
         implMethodClassName = implDefiningClass.getName().replace('.', '/');
         implMethodName = implInfo.getName();
         implMethodDesc = implMethodType.toMethodDescriptorString();
-        Type implMethodAsmType = Type.getMethodType(implMethodDesc);
-        implMethodArgumentTypes = implMethodAsmType.getArgumentTypes();
-        implMethodReturnType = (implKind == MethodHandleInfo.REF_newInvokeSpecial)
-                ? Type.getObjectType(implMethodClassName)
-                : implMethodAsmType.getReturnType();
+        implMethodReturnClass = (implKind == MethodHandleInfo.REF_newInvokeSpecial)
+                ? implDefiningClass
+                : implMethodType.returnType();
         constructorType = invokedType.changeReturnType(Void.TYPE);
-        constructorDesc = constructorType.toMethodDescriptorString();
         lambdaClassName = targetClass.getName().replace('.', '/') + "$$Lambda$" + counter.incrementAndGet();
         cw = new ClassWriter(ClassWriter.COMPUTE_MAXS);
-        argTypes = Type.getArgumentTypes(constructorDesc);
-        argNames = new String[argTypes.length];
-        for (int i = 0; i < argTypes.length; i++) {
-            argNames[i] = "arg$" + (i + 1);
+        int parameterCount = invokedType.parameterCount();
+        if (parameterCount > 0) {
+            argNames = new String[parameterCount];
+            argDescs = new String[parameterCount];
+            for (int i = 0; i < parameterCount; i++) {
+                argNames[i] = "arg$" + (i + 1);
+                argDescs[i] = BytecodeDescriptor.unparse(invokedType.parameterType(i));
+            }
+        } else {
+            argNames = argDescs = EMPTY_STRING_ARRAY;
         }
-        instantiatedArgumentTypes = Type.getArgumentTypes(
-                instantiatedMethodType.toMethodDescriptorString());
     }
 
     /**
@@ -185,22 +197,20 @@
                     new PrivilegedAction<Constructor[]>() {
                 @Override
                 public Constructor[] run() {
-                    return innerClass.getDeclaredConstructors();
+                    Constructor<?>[] ctrs = innerClass.getDeclaredConstructors();
+                    if (ctrs.length == 1) {
+                        // The lambda implementing inner class constructor is private, set
+                        // it accessible (by us) before creating the constant sole instance
+                        ctrs[0].setAccessible(true);
+                    }
+                    return ctrs;
                 }
-            });
+                    });
             if (ctrs.length != 1) {
                 throw new LambdaConversionException("Expected one lambda constructor for "
                         + innerClass.getCanonicalName() + ", got " + ctrs.length);
             }
-            // The lambda implementing inner class constructor is private, set
-            // it accessible (by us) before creating the constant sole instance
-            AccessController.doPrivileged(new PrivilegedAction<Void>() {
-                @Override
-                public Void run() {
-                    ctrs[0].setAccessible(true);
-                    return null;
-                }
-            });
+
             try {
                 Object inst = ctrs[0].newInstance();
                 return new ConstantCallSite(MethodHandles.constant(samBase, inst));
@@ -210,10 +220,10 @@
             }
         } else {
             try {
+                UNSAFE.ensureClassInitialized(innerClass);
                 return new ConstantCallSite(
                         MethodHandles.Lookup.IMPL_LOOKUP
-                             .findConstructor(innerClass, constructorType)
-                             .asType(constructorType.changeReturnType(samBase)));
+                             .findStatic(innerClass, NAME_FACTORY, invokedType));
             }
             catch (ReflectiveOperationException e) {
                 throw new LambdaConversionException("Exception finding constructor", e);
@@ -239,14 +249,16 @@
     private Class<?> spinInnerClass() throws LambdaConversionException {
         String[] interfaces;
         String samIntf = samBase.getName().replace('.', '/');
+        boolean accidentallySerializable = !isSerializable && Serializable.class.isAssignableFrom(samBase);
         if (markerInterfaces.length == 0) {
             interfaces = new String[]{samIntf};
         } else {
             // Assure no duplicate interfaces (ClassFormatError)
             Set<String> itfs = new LinkedHashSet<>(markerInterfaces.length + 1);
             itfs.add(samIntf);
-            for (int i = 0; i < markerInterfaces.length; i++) {
-                itfs.add(markerInterfaces[i].getName().replace('.', '/'));
+            for (Class<?> markerInterface : markerInterfaces) {
+                itfs.add(markerInterface.getName().replace('.', '/'));
+                accidentallySerializable |= !isSerializable && Serializable.class.isAssignableFrom(markerInterface);
             }
             interfaces = itfs.toArray(new String[itfs.size()]);
         }
@@ -256,34 +268,38 @@
                  JAVA_LANG_OBJECT, interfaces);
 
         // Generate final fields to be filled in by constructor
-        for (int i = 0; i < argTypes.length; i++) {
+        for (int i = 0; i < argDescs.length; i++) {
             FieldVisitor fv = cw.visitField(ACC_PRIVATE + ACC_FINAL,
                                             argNames[i],
-                                            argTypes[i].getDescriptor(),
+                                            argDescs[i],
                                             null, null);
             fv.visitEnd();
         }
 
         generateConstructor();
 
+        if (invokedType.parameterCount() != 0) {
+            generateFactory();
+        }
+
         // Forward the SAM method
-        String methodDescriptor = samMethodType.toMethodDescriptorString();
         MethodVisitor mv = cw.visitMethod(ACC_PUBLIC, samMethodName,
-                                          methodDescriptor, null, null);
-        new ForwardingMethodGenerator(mv).generate(methodDescriptor);
+                                          samMethodType.toMethodDescriptorString(), null, null);
+        new ForwardingMethodGenerator(mv).generate(samMethodType);
 
         // Forward the bridges
         if (additionalBridges != null) {
             for (MethodType mt : additionalBridges) {
-                methodDescriptor = mt.toMethodDescriptorString();
                 mv = cw.visitMethod(ACC_PUBLIC|ACC_BRIDGE, samMethodName,
-                                    methodDescriptor, null, null);
-                new ForwardingMethodGenerator(mv).generate(methodDescriptor);
+                                    mt.toMethodDescriptorString(), null, null);
+                new ForwardingMethodGenerator(mv).generate(mt);
             }
         }
 
         if (isSerializable)
-            generateWriteReplace();
+            generateSerializationFriendlyMethods();
+        else if (accidentallySerializable)
+            generateSerializationHostileMethods();
 
         cw.visitEnd();
 
@@ -309,23 +325,43 @@
     }
 
     /**
+     * Generate the factory method for the class
+     */
+    private void generateFactory() {
+        MethodVisitor m = cw.visitMethod(ACC_PRIVATE | ACC_STATIC, NAME_FACTORY, invokedType.toMethodDescriptorString(), null, null);
+        m.visitCode();
+        m.visitTypeInsn(NEW, lambdaClassName);
+        m.visitInsn(Opcodes.DUP);
+        int parameterCount = invokedType.parameterCount();
+        for (int typeIndex = 0, varIndex = 0; typeIndex < parameterCount; typeIndex++) {
+            Class<?> argType = invokedType.parameterType(typeIndex);
+            m.visitVarInsn(getLoadOpcode(argType), varIndex);
+            varIndex += getParameterSize(argType);
+        }
+        m.visitMethodInsn(INVOKESPECIAL, lambdaClassName, NAME_CTOR, constructorType.toMethodDescriptorString());
+        m.visitInsn(ARETURN);
+        m.visitMaxs(-1, -1);
+        m.visitEnd();
+    }
+
+    /**
      * Generate the constructor for the class
      */
     private void generateConstructor() {
         // Generate constructor
         MethodVisitor ctor = cw.visitMethod(ACC_PRIVATE, NAME_CTOR,
-                                            constructorDesc, null, null);
+                                            constructorType.toMethodDescriptorString(), null, null);
         ctor.visitCode();
         ctor.visitVarInsn(ALOAD, 0);
         ctor.visitMethodInsn(INVOKESPECIAL, JAVA_LANG_OBJECT, NAME_CTOR,
                              METHOD_DESCRIPTOR_VOID);
-        int lvIndex = 0;
-        for (int i = 0; i < argTypes.length; i++) {
+        int parameterCount = invokedType.parameterCount();
+        for (int i = 0, lvIndex = 0; i < parameterCount; i++) {
             ctor.visitVarInsn(ALOAD, 0);
-            ctor.visitVarInsn(argTypes[i].getOpcode(ILOAD), lvIndex + 1);
-            lvIndex += argTypes[i].getSize();
-            ctor.visitFieldInsn(PUTFIELD, lambdaClassName, argNames[i],
-                                argTypes[i].getDescriptor());
+            Class<?> argType = invokedType.parameterType(i);
+            ctor.visitVarInsn(getLoadOpcode(argType), lvIndex + 1);
+            lvIndex += getParameterSize(argType);
+            ctor.visitFieldInsn(PUTFIELD, lambdaClassName, argNames[i], argDescs[i]);
         }
         ctor.visitInsn(RETURN);
         // Maxs computed by ClassWriter.COMPUTE_MAXS, these arguments ignored
@@ -334,9 +370,9 @@
     }
 
     /**
-     * Generate the writeReplace method (if needed for serialization)
+     * Generate a writeReplace method that supports serialization
      */
-    private void generateWriteReplace() {
+    private void generateSerializationFriendlyMethods() {
         TypeConvertingMethodAdapter mv
                 = new TypeConvertingMethodAdapter(
                     cw.visitMethod(ACC_PRIVATE + ACC_FINAL,
@@ -355,16 +391,14 @@
         mv.visitLdcInsn(implInfo.getName());
         mv.visitLdcInsn(implInfo.getMethodType().toMethodDescriptorString());
         mv.visitLdcInsn(instantiatedMethodType.toMethodDescriptorString());
-
-        mv.iconst(argTypes.length);
+        mv.iconst(argDescs.length);
         mv.visitTypeInsn(ANEWARRAY, JAVA_LANG_OBJECT);
-        for (int i = 0; i < argTypes.length; i++) {
+        for (int i = 0; i < argDescs.length; i++) {
             mv.visitInsn(DUP);
             mv.iconst(i);
             mv.visitVarInsn(ALOAD, 0);
-            mv.visitFieldInsn(GETFIELD, lambdaClassName, argNames[i],
-                              argTypes[i].getDescriptor());
-            mv.boxIfTypePrimitive(argTypes[i]);
+            mv.visitFieldInsn(GETFIELD, lambdaClassName, argNames[i], argDescs[i]);
+            mv.boxIfTypePrimitive(Type.getType(argDescs[i]));
             mv.visitInsn(AASTORE);
         }
         mv.visitMethodInsn(INVOKESPECIAL, NAME_SERIALIZED_LAMBDA, NAME_CTOR,
@@ -376,6 +410,37 @@
     }
 
     /**
+     * Generate a readObject/writeObject method that is hostile to serialization
+     */
+    private void generateSerializationHostileMethods() {
+        MethodVisitor mv = cw.visitMethod(ACC_PRIVATE + ACC_FINAL,
+                                          NAME_METHOD_WRITE_OBJECT, DESCR_METHOD_WRITE_OBJECT,
+                                          null, SER_HOSTILE_EXCEPTIONS);
+        mv.visitCode();
+        mv.visitTypeInsn(NEW, NAME_NOT_SERIALIZABLE_EXCEPTION);
+        mv.visitInsn(DUP);
+        mv.visitLdcInsn("Non-serializable lambda");
+        mv.visitMethodInsn(INVOKESPECIAL, NAME_NOT_SERIALIZABLE_EXCEPTION, NAME_CTOR,
+                           DESCR_CTOR_NOT_SERIALIZABLE_EXCEPTION);
+        mv.visitInsn(ATHROW);
+        mv.visitMaxs(-1, -1);
+        mv.visitEnd();
+
+        mv = cw.visitMethod(ACC_PRIVATE + ACC_FINAL,
+                            NAME_METHOD_READ_OBJECT, DESCR_METHOD_READ_OBJECT,
+                            null, SER_HOSTILE_EXCEPTIONS);
+        mv.visitCode();
+        mv.visitTypeInsn(NEW, NAME_NOT_SERIALIZABLE_EXCEPTION);
+        mv.visitInsn(DUP);
+        mv.visitLdcInsn("Non-serializable lambda");
+        mv.visitMethodInsn(INVOKESPECIAL, NAME_NOT_SERIALIZABLE_EXCEPTION, NAME_CTOR,
+                           DESCR_CTOR_NOT_SERIALIZABLE_EXCEPTION);
+        mv.visitInsn(ATHROW);
+        mv.visitMaxs(-1, -1);
+        mv.visitEnd();
+    }
+
+    /**
      * This class generates a method body which calls the lambda implementation
      * method, converting arguments, as needed.
      */
@@ -385,20 +450,19 @@
             super(mv);
         }
 
-        void generate(String methodDescriptor) {
+        void generate(MethodType methodType) {
             visitCode();
 
             if (implKind == MethodHandleInfo.REF_newInvokeSpecial) {
                 visitTypeInsn(NEW, implMethodClassName);
                 visitInsn(DUP);
             }
-            for (int i = 0; i < argTypes.length; i++) {
+            for (int i = 0; i < argNames.length; i++) {
                 visitVarInsn(ALOAD, 0);
-                visitFieldInsn(GETFIELD, lambdaClassName, argNames[i],
-                               argTypes[i].getDescriptor());
+                visitFieldInsn(GETFIELD, lambdaClassName, argNames[i], argDescs[i]);
             }
 
-            convertArgumentTypes(Type.getArgumentTypes(methodDescriptor));
+            convertArgumentTypes(methodType);
 
             // Invoke the method we want to forward to
             visitMethodInsn(invocationOpcode(), implMethodClassName, implMethodName, implMethodDesc);
@@ -406,46 +470,36 @@
             // Convert the return value (if any) and return it
             // Note: if adapting from non-void to void, the 'return'
             // instruction will pop the unneeded result
-            Type samReturnType = Type.getReturnType(methodDescriptor);
-            convertType(implMethodReturnType, samReturnType, samReturnType);
-            visitInsn(samReturnType.getOpcode(Opcodes.IRETURN));
+            Class<?> samReturnClass = methodType.returnType();
+            convertType(implMethodReturnClass, samReturnClass, samReturnClass);
+            visitInsn(getReturnOpcode(samReturnClass));
             // Maxs computed by ClassWriter.COMPUTE_MAXS,these arguments ignored
             visitMaxs(-1, -1);
             visitEnd();
         }
 
-        private void convertArgumentTypes(Type[] samArgumentTypes) {
+        private void convertArgumentTypes(MethodType samType) {
             int lvIndex = 0;
             boolean samIncludesReceiver = implIsInstanceMethod &&
-                                                   argTypes.length == 0;
+                                                   invokedType.parameterCount() == 0;
             int samReceiverLength = samIncludesReceiver ? 1 : 0;
             if (samIncludesReceiver) {
                 // push receiver
-                Type rcvrType = samArgumentTypes[0];
-                Type instantiatedRcvrType = instantiatedArgumentTypes[0];
-
-                visitVarInsn(rcvrType.getOpcode(ILOAD), lvIndex + 1);
-                lvIndex += rcvrType.getSize();
-                convertType(rcvrType, Type.getType(implDefiningClass), instantiatedRcvrType);
+                Class<?> rcvrType = samType.parameterType(0);
+                visitVarInsn(getLoadOpcode(rcvrType), lvIndex + 1);
+                lvIndex += getParameterSize(rcvrType);
+                convertType(rcvrType, implDefiningClass, instantiatedMethodType.parameterType(0));
             }
-            int argOffset = implMethodArgumentTypes.length - samArgumentTypes.length;
-            for (int i = samReceiverLength; i < samArgumentTypes.length; i++) {
-                Type argType = samArgumentTypes[i];
-                Type targetType = implMethodArgumentTypes[argOffset + i];
-                Type instantiatedArgType = instantiatedArgumentTypes[i];
-
-                visitVarInsn(argType.getOpcode(ILOAD), lvIndex + 1);
-                lvIndex += argType.getSize();
-                convertType(argType, targetType, instantiatedArgType);
+            int samParametersLength = samType.parameterCount();
+            int argOffset = implMethodType.parameterCount() - samParametersLength;
+            for (int i = samReceiverLength; i < samParametersLength; i++) {
+                Class<?> argType = samType.parameterType(i);
+                visitVarInsn(getLoadOpcode(argType), lvIndex + 1);
+                lvIndex += getParameterSize(argType);
+                convertType(argType, implMethodType.parameterType(argOffset + i), instantiatedMethodType.parameterType(i));
             }
         }
 
-        private void convertType(Type argType, Type targetType, Type functionalType) {
-            convertType(argType.getDescriptor(),
-                        targetType.getDescriptor(),
-                        functionalType.getDescriptor());
-        }
-
         private int invocationOpcode() throws InternalError {
             switch (implKind) {
                 case MethodHandleInfo.REF_invokeStatic:
@@ -463,4 +517,43 @@
             }
         }
     }
+
+    static int getParameterSize(Class<?> c) {
+        if (c == Void.TYPE) {
+            return 0;
+        } else if (c == Long.TYPE || c == Double.TYPE) {
+            return 2;
+        }
+        return 1;
+    }
+
+    static int getLoadOpcode(Class<?> c) {
+        if(c == Void.TYPE) {
+            throw new InternalError("Unexpected void type of load opcode");
+        }
+        return ILOAD + getOpcodeOffset(c);
+    }
+
+    static int getReturnOpcode(Class<?> c) {
+        if(c == Void.TYPE) {
+            return RETURN;
+        }
+        return IRETURN + getOpcodeOffset(c);
+    }
+
+    private static int getOpcodeOffset(Class<?> c) {
+        if (c.isPrimitive()) {
+            if (c == Long.TYPE) {
+                return 1;
+            } else if (c == Float.TYPE) {
+                return 2;
+            } else if (c == Double.TYPE) {
+                return 3;
+            }
+            return 0;
+        } else {
+            return 4;
+        }
+    }
+
 }
--- a/src/share/classes/java/lang/invoke/MethodType.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/lang/invoke/MethodType.java	Mon Nov 11 23:17:30 2013 -0800
@@ -813,7 +813,7 @@
      * So this method returns {@link #parameterCount() parameterCount} plus the
      * number of long and double parameters (if any).
      * <p>
-     * This method is included for the benfit of applications that must
+     * This method is included for the benefit of applications that must
      * generate bytecodes that process method handles and invokedynamic.
      * @return the number of JVM stack slots for this type's parameters
      */
@@ -844,7 +844,7 @@
      * <em>plus</em> the number of long or double arguments
      * at or after after the argument for the given parameter.
      * <p>
-     * This method is included for the benfit of applications that must
+     * This method is included for the benefit of applications that must
      * generate bytecodes that process method handles and invokedynamic.
      * @param num an index (zero-based, inclusive) within the parameter types
      * @return the index of the (shallowest) JVM stack slot transmitting the
@@ -862,7 +862,7 @@
      * If the {@link #returnType() return type} is void, it will be zero,
      * else if the return type is long or double, it will be two, else one.
      * <p>
-     * This method is included for the benfit of applications that must
+     * This method is included for the benefit of applications that must
      * generate bytecodes that process method handles and invokedynamic.
      * @return the number of JVM stack slots (0, 1, or 2) for this type's return value
      * Will be removed for PFD.
@@ -882,7 +882,7 @@
      * constructed by this method, because their component types are
      * not all reachable from a common class loader.
      * <p>
-     * This method is included for the benfit of applications that must
+     * This method is included for the benefit of applications that must
      * generate bytecodes that process method handles and {@code invokedynamic}.
      * @param descriptor a bytecode-level type descriptor string "(T...)T"
      * @param loader the class loader in which to look up the types
@@ -912,7 +912,7 @@
      * Two distinct classes which share a common name but have different class loaders
      * will appear identical when viewed within descriptor strings.
      * <p>
-     * This method is included for the benfit of applications that must
+     * This method is included for the benefit of applications that must
      * generate bytecodes that process method handles and {@code invokedynamic}.
      * {@link #fromMethodDescriptorString(java.lang.String, java.lang.ClassLoader) fromMethodDescriptorString},
      * because the latter requires a suitable class loader argument.
--- a/src/share/classes/java/lang/invoke/TypeConvertingMethodAdapter.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/lang/invoke/TypeConvertingMethodAdapter.java	Mon Nov 11 23:17:30 2013 -0800
@@ -28,6 +28,7 @@
 import jdk.internal.org.objectweb.asm.MethodVisitor;
 import jdk.internal.org.objectweb.asm.Opcodes;
 import jdk.internal.org.objectweb.asm.Type;
+import sun.invoke.util.BytecodeDescriptor;
 import sun.invoke.util.Wrapper;
 import static sun.invoke.util.Wrapper.*;
 
@@ -204,27 +205,27 @@
     }
 
     /**
-     * Convert an argument of type 'argType' to be passed to 'targetType' assuring that it is 'functionalType'.
+     * Convert an argument of type 'arg' to be passed to 'target' assuring that it is 'functional'.
      * Insert the needed conversion instructions in the method code.
-     * @param argType
-     * @param targetType
-     * @param functionalType
+     * @param arg
+     * @param target
+     * @param functional
      */
-    void convertType(String dArg, String dTarget, String dFunctional) {
-        if (dArg.equals(dTarget)) {
+    void convertType(Class<?> arg, Class<?> target, Class<?> functional) {
+        if (arg.equals(target)) {
             return;
         }
-        Wrapper wArg = toWrapper(dArg);
-        Wrapper wTarget = toWrapper(dTarget);
-        if (wArg == VOID || wTarget == VOID) {
+        if (arg == Void.TYPE || target == Void.TYPE) {
             return;
         }
-        if (isPrimitive(wArg)) {
-            if (isPrimitive(wTarget)) {
+        if (arg.isPrimitive()) {
+            Wrapper wArg = Wrapper.forPrimitiveType(arg);
+            if (target.isPrimitive()) {
                 // Both primitives: widening
-                widen(wArg, wTarget);
+                widen(wArg, Wrapper.forPrimitiveType(target));
             } else {
                 // Primitive argument to reference target
+                String dTarget = BytecodeDescriptor.unparse(target);
                 Wrapper wPrimTarget = wrapperOrNullFromDescriptor(dTarget);
                 if (wPrimTarget != null) {
                     // The target is a boxed primitive type, widen to get there before boxing
@@ -237,16 +238,18 @@
                 }
             }
         } else {
+            String dArg = BytecodeDescriptor.unparse(arg);
             String dSrc;
-            Wrapper wFunctional = toWrapper(dFunctional);
-            if (isPrimitive(wFunctional)) {
+            if (functional.isPrimitive()) {
                 dSrc = dArg;
             } else {
                 // Cast to convert to possibly more specific type, and generate CCE for invalid arg
-                dSrc = dFunctional;
-                cast(dArg, dFunctional);
+                dSrc = BytecodeDescriptor.unparse(functional);
+                cast(dArg, dSrc);
             }
-            if (isPrimitive(wTarget)) {
+            String dTarget = BytecodeDescriptor.unparse(target);
+            if (target.isPrimitive()) {
+                Wrapper wTarget = toWrapper(dTarget);
                 // Reference argument to primitive target
                 Wrapper wps = wrapperOrNullFromDescriptor(dSrc);
                 if (wps != null) {
--- a/src/share/classes/java/lang/management/CompilationMXBean.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/lang/management/CompilationMXBean.java	Mon Nov 11 23:17:30 2013 -0800
@@ -74,7 +74,7 @@
     public boolean isCompilationTimeMonitoringSupported();
 
     /**
-     * Returns the approximate accumlated elapsed time (in milliseconds)
+     * Returns the approximate accumulated elapsed time (in milliseconds)
      * spent in compilation.
      * If multiple threads are used for compilation, this value is
      * summation of the approximate time that each thread spent in compilation.
--- a/src/share/classes/java/lang/management/MemoryPoolMXBean.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/lang/management/MemoryPoolMXBean.java	Mon Nov 11 23:17:30 2013 -0800
@@ -147,7 +147,7 @@
  *       by calling either the {@link #getUsage} method for all
  *       memory pools or the {@link #isUsageThresholdExceeded} method
  *       for those memory pools that support a usage threshold.
- *       Below is example code that has a thread delicated for
+ *       Below is example code that has a thread dedicated for
  *       task distribution and processing.  At every interval,
  *       it will determine if it should receive and process new tasks based
  *       on its memory usage.  If the memory usage exceeds its usage threshold,
@@ -191,7 +191,7 @@
  * <hr>
  *       The above example does not differentiate the case where
  *       the memory usage has temporarily dropped below the usage threshold
- *       from the case where the memory usage remains above the threshould
+ *       from the case where the memory usage remains above the threshold
  *       between two iterations.  The usage threshold count returned by
  *       the {@link #getUsageThresholdCount} method
  *       can be used to determine
--- a/src/share/classes/java/lang/management/ThreadInfo.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/lang/management/ThreadInfo.java	Mon Nov 11 23:17:30 2013 -0800
@@ -492,7 +492,7 @@
      * @return the thread ID of the owner thread of the object
      * this thread is blocked on;
      * <tt>-1</tt> if this thread is not blocked
-     * or if the object lis not owned by any thread.
+     * or if the object is not owned by any thread.
      *
      * @see #getLockInfo
      */
--- a/src/share/classes/java/lang/management/ThreadMXBean.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/lang/management/ThreadMXBean.java	Mon Nov 11 23:17:30 2013 -0800
@@ -646,7 +646,7 @@
      *         exists and the caller does not have
      *         ManagementPermission("monitor").
      * @throws java.lang.UnsupportedOperationException if the Java virtual
-     * machine does not support monitoriing of ownable synchronizer usage.
+     * machine does not support monitoring of ownable synchronizer usage.
      *
      * @see #isSynchronizerUsageSupported
      * @see #findMonitorDeadlockedThreads
--- a/src/share/classes/java/lang/reflect/AnnotatedElement.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/lang/reflect/AnnotatedElement.java	Mon Nov 11 23:17:30 2013 -0800
@@ -27,6 +27,15 @@
 
 import java.lang.annotation.Annotation;
 import java.lang.annotation.AnnotationFormatError;
+import java.lang.annotation.Repeatable;
+import java.util.Arrays;
+import java.util.LinkedHashMap;
+import java.util.Map;
+import java.util.Objects;
+import java.util.function.Function;
+import java.util.stream.Collectors;
+import sun.reflect.annotation.AnnotationSupport;
+import sun.reflect.annotation.AnnotationType;
 
 /**
  * Represents an annotated element of the program currently running in this
@@ -222,6 +231,18 @@
      * The caller of this method is free to modify the returned array; it will
      * have no effect on the arrays returned to other callers.
      *
+     * @implSpec The default implementation first calls {@link
+     * #getDeclaredAnnotationsByType(Class)} passing {@code
+     * annotationClass} as the argument. If the returned array has
+     * length greater than zero, the array is returned. If the returned
+     * array is zero-length and this {@code AnnotatedElement} is a
+     * class and the argument type is an inheritable annotation type,
+     * and the superclass of this {@code AnnotatedElement} is non-null,
+     * then the returned result is the result of calling {@link
+     * #getAnnotationsByType(Class)} on the superclass with {@code
+     * annotationClass} as the argument. Otherwise, a zero-length
+     * array is returned.
+     *
      * @param <T> the type of the annotation to query for and return if present
      * @param annotationClass the Class object corresponding to the
      *        annotation type
@@ -230,7 +251,29 @@
      * @throws NullPointerException if the given annotation class is null
      * @since 1.8
      */
-    <T extends Annotation> T[] getAnnotationsByType(Class<T> annotationClass);
+    default <T extends Annotation> T[] getAnnotationsByType(Class<T> annotationClass) {
+         /*
+          * Definition of associated: directly or indirectly present OR
+          * neither directly nor indirectly present AND the element is
+          * a Class, the annotation type is inheritable, and the
+          * annotation type is associated with the superclass of the
+          * element.
+          */
+         T[] result = getDeclaredAnnotationsByType(annotationClass);
+
+         if (result.length == 0 && // Neither directly nor indirectly present
+             this instanceof Class && // the element is a class
+             AnnotationType.getInstance(annotationClass).isInherited()) { // Inheritable
+             Class<?> superClass = ((Class<?>) this).getSuperclass();
+             if (superClass != null) {
+                 // Determine if the annotation is associated with the
+                 // superclass
+                 result = superClass.getAnnotationsByType(annotationClass);
+             }
+         }
+
+         return result;
+     }
 
     /**
      * Returns this element's annotation for the specified type if
@@ -239,6 +282,11 @@
      * This method ignores inherited annotations. (Returns null if no
      * annotations are directly present on this element.)
      *
+     * @implSpec The default implementation first performs a null check
+     * and then loops over the results of {@link
+     * #getDeclaredAnnotations} returning the first annotation whose
+     * annotation type matches the argument type.
+     *
      * @param <T> the type of the annotation to query for and return if directly present
      * @param annotationClass the Class object corresponding to the
      *        annotation type
@@ -247,7 +295,18 @@
      * @throws NullPointerException if the given annotation class is null
      * @since 1.8
      */
-    <T extends Annotation> T getDeclaredAnnotation(Class<T> annotationClass);
+    default <T extends Annotation> T getDeclaredAnnotation(Class<T> annotationClass) {
+         Objects.requireNonNull(annotationClass);
+         // Loop over all directly-present annotations looking for a matching one
+         for (Annotation annotation : getDeclaredAnnotations()) {
+             if (annotationClass.equals(annotation.annotationType())) {
+                 // More robust to do a dynamic cast at runtime instead
+                 // of compile-time only.
+                 return annotationClass.cast(annotation);
+             }
+         }
+         return null;
+     }
 
     /**
      * Returns this element's annotation(s) for the specified type if
@@ -268,6 +327,22 @@
      * The caller of this method is free to modify the returned array; it will
      * have no effect on the arrays returned to other callers.
      *
+     * @implSpec The default implementation may call {@link
+     * #getDeclaredAnnotation(Class)} one or more times to find a
+     * directly present annotation and, if the annotation type is
+     * repeatable, to find a container annotation. If annotations of
+     * the annotation type {@code annotationClass} are found to be both
+     * directly and indirectly present, then {@link
+     * #getDeclaredAnnotations()} will get called to determine the
+     * order of the elements in the returned array.
+     *
+     * <p>Alternatively, the default implementation may call {@link
+     * #getDeclaredAnnotations()} a single time and the returned array
+     * examined for both directly and indirectly present
+     * annotations. The results of calling {@link
+     * #getDeclaredAnnotations()} are assumed to be consistent with the
+     * results of calling {@link #getDeclaredAnnotation(Class)}.
+     *
      * @param <T> the type of the annotation to query for and return
      * if directly or indirectly present
      * @param annotationClass the Class object corresponding to the
@@ -277,7 +352,16 @@
      * @throws NullPointerException if the given annotation class is null
      * @since 1.8
      */
-    <T extends Annotation> T[] getDeclaredAnnotationsByType(Class<T> annotationClass);
+    default <T extends Annotation> T[] getDeclaredAnnotationsByType(Class<T> annotationClass) {
+        Objects.requireNonNull(annotationClass);
+        return AnnotationSupport.
+            getDirectlyAndIndirectlyPresent(Arrays.stream(getDeclaredAnnotations()).
+                                            collect(Collectors.toMap(Annotation::annotationType,
+                                                                     Function.identity(),
+                                                                     ((first,second) -> first),
+                                                                     LinkedHashMap::new)),
+                                            annotationClass);
+    }
 
     /**
      * Returns annotations that are <em>directly present</em> on this element.
--- a/src/share/classes/java/math/BigInteger.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/math/BigInteger.java	Mon Nov 11 23:17:30 2013 -0800
@@ -97,6 +97,21 @@
  * {@code NullPointerException} when passed
  * a null object reference for any input parameter.
  *
+ * BigInteger must support values in the range
+ * -2<sup>{@code Integer.MAX_VALUE}</sup> (exclusive) to
+ * +2<sup>{@code Integer.MAX_VALUE}</sup> (exclusive)
+ * and may support values outside of that range.
+ *
+ * The range of probable prime values is limited and may be less than
+ * the full supported positive range of {@code BigInteger}.
+ * The range must be at least 1 to 2<sup>500000000</sup>.
+ *
+ * @implNote
+ * BigInteger constructors and operations throw {@code ArithmeticException} when
+ * the result is out of the supported range of
+ * -2<sup>{@code Integer.MAX_VALUE}</sup> (exclusive) to
+ * +2<sup>{@code Integer.MAX_VALUE}</sup> (exclusive).
+ *
  * @see     BigDecimal
  * @author  Josh Bloch
  * @author  Michael McCloskey
@@ -183,6 +198,18 @@
     final static long LONG_MASK = 0xffffffffL;
 
     /**
+     * This constant limits {@code mag.length} of BigIntegers to the supported
+     * range.
+     */
+    private static final int MAX_MAG_LENGTH = Integer.MAX_VALUE / Integer.SIZE + 1; // (1 << 26)
+
+    /**
+     * Bit lengths larger than this constant can cause overflow in searchLen
+     * calculation and in BitSieve.singleSearch method.
+     */
+    private static final  int PRIME_SEARCH_BIT_LENGTH_LIMIT = 500000000;
+
+    /**
      * The threshold value for using Karatsuba multiplication.  If the number
      * of ints in both mag arrays are greater than this number, then
      * Karatsuba multiplication will be used.   This value is found
@@ -256,6 +283,9 @@
             mag = stripLeadingZeroBytes(val);
             signum = (mag.length == 0 ? 0 : 1);
         }
+        if (mag.length >= MAX_MAG_LENGTH) {
+            checkRange();
+        }
     }
 
     /**
@@ -275,6 +305,9 @@
             mag = trustedStripLeadingZeroInts(val);
             signum = (mag.length == 0 ? 0 : 1);
         }
+        if (mag.length >= MAX_MAG_LENGTH) {
+            checkRange();
+        }
     }
 
     /**
@@ -306,6 +339,9 @@
                 throw(new NumberFormatException("signum-magnitude mismatch"));
             this.signum = signum;
         }
+        if (mag.length >= MAX_MAG_LENGTH) {
+            checkRange();
+        }
     }
 
     /**
@@ -327,6 +363,9 @@
                 throw(new NumberFormatException("signum-magnitude mismatch"));
             this.signum = signum;
         }
+        if (mag.length >= MAX_MAG_LENGTH) {
+            checkRange();
+        }
     }
 
     /**
@@ -359,17 +398,20 @@
         int sign = 1;
         int index1 = val.lastIndexOf('-');
         int index2 = val.lastIndexOf('+');
-        if ((index1 + index2) <= -1) {
-            // No leading sign character or at most one leading sign character
-            if (index1 == 0 || index2 == 0) {
-                cursor = 1;
-                if (len == 1)
-                    throw new NumberFormatException("Zero length BigInteger");
+        if (index1 >= 0) {
+            if (index1 != 0 || index2 >= 0) {
+                throw new NumberFormatException("Illegal embedded sign character");
             }
-            if (index1 == 0)
-                sign = -1;
-        } else
-            throw new NumberFormatException("Illegal embedded sign character");
+            sign = -1;
+            cursor = 1;
+        } else if (index2 >= 0) {
+            if (index2 != 0) {
+                throw new NumberFormatException("Illegal embedded sign character");
+            }
+            cursor = 1;
+        }
+        if (cursor == len)
+            throw new NumberFormatException("Zero length BigInteger");
 
         // Skip leading zeros and compute number of digits in magnitude
         while (cursor < len &&
@@ -388,8 +430,11 @@
 
         // Pre-allocate array of expected size. May be too large but can
         // never be too small. Typically exact.
-        int numBits = (int)(((numDigits * bitsPerDigit[radix]) >>> 10) + 1);
-        int numWords = (numBits + 31) >>> 5;
+        long numBits = ((numDigits * bitsPerDigit[radix]) >>> 10) + 1;
+        if (numBits + 31 >= (1L << 32)) {
+            reportOverflow();
+        }
+        int numWords = (int) (numBits + 31) >>> 5;
         int[] magnitude = new int[numWords];
 
         // Process first (potentially short) digit group
@@ -413,6 +458,9 @@
         }
         // Required for cases where the array was overallocated.
         mag = trustedStripLeadingZeroInts(magnitude);
+        if (mag.length >= MAX_MAG_LENGTH) {
+            checkRange();
+        }
     }
 
     /*
@@ -439,8 +487,11 @@
         if (len < 10) {
             numWords = 1;
         } else {
-            int numBits = (int)(((numDigits * bitsPerDigit[10]) >>> 10) + 1);
-            numWords = (numBits + 31) >>> 5;
+            long numBits = ((numDigits * bitsPerDigit[10]) >>> 10) + 1;
+            if (numBits + 31 >= (1L << 32)) {
+                reportOverflow();
+            }
+            numWords = (int) (numBits + 31) >>> 5;
         }
         int[] magnitude = new int[numWords];
 
@@ -456,6 +507,9 @@
             destructiveMulAdd(magnitude, intRadix[10], groupVal);
         }
         mag = trustedStripLeadingZeroInts(magnitude);
+        if (mag.length >= MAX_MAG_LENGTH) {
+            checkRange();
+        }
     }
 
     // Create an integer with the digits between the two indexes
@@ -575,7 +629,7 @@
      *         this constructor is proportional to the value of this parameter.
      * @param  rnd source of random bits used to select candidates to be
      *         tested for primality.
-     * @throws ArithmeticException {@code bitLength < 2}.
+     * @throws ArithmeticException {@code bitLength < 2} or {@code bitLength} is too large.
      * @see    #bitLength()
      */
     public BigInteger(int bitLength, int certainty, Random rnd) {
@@ -607,7 +661,7 @@
      * @param  rnd source of random bits used to select candidates to be
      *         tested for primality.
      * @return a BigInteger of {@code bitLength} bits that is probably prime
-     * @throws ArithmeticException {@code bitLength < 2}.
+     * @throws ArithmeticException {@code bitLength < 2} or {@code bitLength} is too large.
      * @see    #bitLength()
      * @since 1.4
      */
@@ -677,7 +731,7 @@
         p.mag[p.mag.length-1] &= 0xfffffffe;
 
         // Use a sieve length likely to contain the next prime number
-        int searchLen = (bitLength / 20) * 64;
+        int searchLen = getPrimeSearchLen(bitLength);
         BitSieve searchSieve = new BitSieve(p, searchLen);
         BigInteger candidate = searchSieve.retrieve(p, certainty, rnd);
 
@@ -701,7 +755,7 @@
     *
     * @return the first integer greater than this {@code BigInteger} that
     *         is probably prime.
-    * @throws ArithmeticException {@code this < 0}.
+    * @throws ArithmeticException {@code this < 0} or {@code this} is too large.
     * @since 1.5
     */
     public BigInteger nextProbablePrime() {
@@ -750,7 +804,7 @@
             result = result.subtract(ONE);
 
         // Looking for the next large prime
-        int searchLen = (result.bitLength() / 20) * 64;
+        int searchLen = getPrimeSearchLen(result.bitLength());
 
         while (true) {
            BitSieve searchSieve = new BitSieve(result, searchLen);
@@ -762,6 +816,13 @@
         }
     }
 
+    private static int getPrimeSearchLen(int bitLength) {
+        if (bitLength > PRIME_SEARCH_BIT_LENGTH_LIMIT + 1) {
+            throw new ArithmeticException("Prime search implementation restriction on bitLength");
+        }
+        return bitLength / 20 * 64;
+    }
+
     /**
      * Returns {@code true} if this BigInteger is probably prime,
      * {@code false} if it's definitely composite.
@@ -965,6 +1026,9 @@
     BigInteger(int[] magnitude, int signum) {
         this.signum = (magnitude.length == 0 ? 0 : signum);
         this.mag = magnitude;
+        if (mag.length >= MAX_MAG_LENGTH) {
+            checkRange();
+        }
     }
 
     /**
@@ -974,6 +1038,25 @@
     private BigInteger(byte[] magnitude, int signum) {
         this.signum = (magnitude.length == 0 ? 0 : signum);
         this.mag = stripLeadingZeroBytes(magnitude);
+        if (mag.length >= MAX_MAG_LENGTH) {
+            checkRange();
+        }
+    }
+
+    /**
+     * Throws an {@code ArithmeticException} if the {@code BigInteger} would be
+     * out of the supported range.
+     *
+     * @throws ArithmeticException if {@code this} exceeds the supported range.
+     */
+    private void checkRange() {
+        if (mag.length > MAX_MAG_LENGTH || mag.length == MAX_MAG_LENGTH && mag[0] < 0) {
+            reportOverflow();
+        }
+    }
+
+    private static void reportOverflow() {
+        throw new ArithmeticException("BigInteger would overflow supported range");
     }
 
     //Static Factory Methods
@@ -2073,6 +2156,10 @@
         // The remaining part can then be exponentiated faster.  The
         // powers of two will be multiplied back at the end.
         int powersOfTwo = partToSquare.getLowestSetBit();
+        long bitsToShift = (long)powersOfTwo * exponent;
+        if (bitsToShift > Integer.MAX_VALUE) {
+            reportOverflow();
+        }
 
         int remainingBits;
 
@@ -2126,11 +2213,10 @@
 
             // Multiply back the powers of two (quickly, by shifting left)
             if (powersOfTwo > 0) {
-                int bitsToShift = powersOfTwo*exponent;
                 if (bitsToShift + scaleFactor <= 62) { // Fits in long?
                     return valueOf((result << bitsToShift) * newSign);
                 } else {
-                    return valueOf(result*newSign).shiftLeft(bitsToShift);
+                    return valueOf(result*newSign).shiftLeft((int) bitsToShift);
                 }
             }
             else {
@@ -2375,8 +2461,17 @@
             BigInteger y1 = m2.modInverse(m1);
             BigInteger y2 = m1.modInverse(m2);
 
-            result = a1.multiply(m2).multiply(y1).add
-                     (a2.multiply(m1).multiply(y2)).mod(m);
+            if (m.mag.length < MAX_MAG_LENGTH / 2) {
+                result = a1.multiply(m2).multiply(y1).add(a2.multiply(m1).multiply(y2)).mod(m);
+            } else {
+                MutableBigInteger t1 = new MutableBigInteger();
+                new MutableBigInteger(a1.multiply(m2)).multiply(new MutableBigInteger(y1), t1);
+                MutableBigInteger t2 = new MutableBigInteger();
+                new MutableBigInteger(a2.multiply(m1)).multiply(new MutableBigInteger(y2), t2);
+                t1.add(t2);
+                MutableBigInteger q = new MutableBigInteger();
+                result = t1.divide(new MutableBigInteger(m), q).toBigInteger();
+            }
         }
 
         return (invertResult ? result.modInverse(m) : result);
@@ -2797,27 +2892,31 @@
      *
      * @param  n shift distance, in bits.
      * @return {@code this << n}
-     * @throws ArithmeticException if the shift distance is {@code
-     *         Integer.MIN_VALUE}.
      * @see #shiftRight
      */
     public BigInteger shiftLeft(int n) {
         if (signum == 0)
             return ZERO;
-        if (n == 0)
+        if (n > 0) {
+            return new BigInteger(shiftLeft(mag, n), signum);
+        } else if (n == 0) {
             return this;
-        if (n < 0) {
-            if (n == Integer.MIN_VALUE) {
-                throw new ArithmeticException("Shift distance of Integer.MIN_VALUE not supported.");
-            } else {
-                return shiftRight(-n);
-            }
+        } else {
+            // Possible int overflow in (-n) is not a trouble,
+            // because shiftRightImpl considers its argument unsigned
+            return shiftRightImpl(-n);
         }
-        int[] newMag = shiftLeft(mag, n);
-
-        return new BigInteger(newMag, signum);
     }
 
+    /**
+     * Returns a magnitude array whose value is {@code (mag << n)}.
+     * The shift distance, {@code n}, is considered unnsigned.
+     * (Computes <tt>this * 2<sup>n</sup></tt>.)
+     *
+     * @param mag magnitude, the most-significant int ({@code mag[0]}) must be non-zero.
+     * @param  n unsigned shift distance, in bits.
+     * @return {@code mag << n}
+     */
     private static int[] shiftLeft(int[] mag, int n) {
         int nInts = n >>> 5;
         int nBits = n & 0x1f;
@@ -2853,21 +2952,31 @@
      *
      * @param  n shift distance, in bits.
      * @return {@code this >> n}
-     * @throws ArithmeticException if the shift distance is {@code
-     *         Integer.MIN_VALUE}.
      * @see #shiftLeft
      */
     public BigInteger shiftRight(int n) {
-        if (n == 0)
+        if (signum == 0)
+            return ZERO;
+        if (n > 0) {
+            return shiftRightImpl(n);
+        } else if (n == 0) {
             return this;
-        if (n < 0) {
-            if (n == Integer.MIN_VALUE) {
-                throw new ArithmeticException("Shift distance of Integer.MIN_VALUE not supported.");
-            } else {
-                return shiftLeft(-n);
-            }
+        } else {
+            // Possible int overflow in {@code -n} is not a trouble,
+            // because shiftLeft considers its argument unsigned
+            return new BigInteger(shiftLeft(mag, -n), signum);
         }
-
+    }
+
+    /**
+     * Returns a BigInteger whose value is {@code (this >> n)}. The shift
+     * distance, {@code n}, is considered unsigned.
+     * (Computes <tt>floor(this * 2<sup>-n</sup>)</tt>.)
+     *
+     * @param  n unsigned shift distance, in bits.
+     * @return {@code this >> n}
+     */
+    private BigInteger shiftRightImpl(int n) {
         int nInts = n >>> 5;
         int nBits = n & 0x1f;
         int magLen = mag.length;
@@ -3899,7 +4008,7 @@
             ;
 
         int extraByte = (k == byteLength) ? 1 : 0;
-        int intLength = ((byteLength - keep + extraByte) + 3)/4;
+        int intLength = ((byteLength - keep + extraByte) + 3) >>> 2;
         int result[] = new int[intLength];
 
         /* Copy one's complement of input into output, leaving extra
@@ -4135,7 +4244,8 @@
                 message = "BigInteger: Signum not present in stream";
             throw new java.io.StreamCorruptedException(message);
         }
-        if ((magnitude.length == 0) != (sign == 0)) {
+        int[] mag = stripLeadingZeroBytes(magnitude);
+        if ((mag.length == 0) != (sign == 0)) {
             String message = "BigInteger: signum-magnitude mismatch";
             if (fields.defaulted("magnitude"))
                 message = "BigInteger: Magnitude not present in stream";
@@ -4146,7 +4256,14 @@
         UnsafeHolder.putSign(this, sign);
 
         // Calculate mag field from magnitude and discard magnitude
-        UnsafeHolder.putMag(this, stripLeadingZeroBytes(magnitude));
+        UnsafeHolder.putMag(this, mag);
+        if (mag.length >= MAX_MAG_LENGTH) {
+            try {
+                checkRange();
+            } catch (ArithmeticException e) {
+                throw new java.io.StreamCorruptedException("BigInteger: Out of the supported range");
+            }
+        }
     }
 
     // Support for resetting final fields while deserializing
--- a/src/share/classes/java/math/MutableBigInteger.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/math/MutableBigInteger.java	Mon Nov 11 23:17:30 2013 -0800
@@ -1257,14 +1257,14 @@
 
             int j = (s+m-1) / m;      // step 2a: j = ceil(s/m)
             int n = j * m;            // step 2b: block length in 32-bit units
-            int n32 = 32 * n;         // block length in bits
-            int sigma = Math.max(0, n32 - b.bitLength());   // step 3: sigma = max{T | (2^T)*B < beta^n}
+            long n32 = 32L * n;         // block length in bits
+            int sigma = (int) Math.max(0, n32 - b.bitLength());   // step 3: sigma = max{T | (2^T)*B < beta^n}
             MutableBigInteger bShifted = new MutableBigInteger(b);
             bShifted.safeLeftShift(sigma);   // step 4a: shift b so its length is a multiple of n
             safeLeftShift(sigma);     // step 4b: shift this by the same amount
 
             // step 5: t is the number of blocks needed to accommodate this plus one additional bit
-            int t = (bitLength()+n32) / n32;
+            int t = (int) ((bitLength()+n32) / n32);
             if (t < 2) {
                 t = 2;
             }
@@ -1421,10 +1421,10 @@
     }
 
     /** @see BigInteger#bitLength() */
-    int bitLength() {
+    long bitLength() {
         if (intLen == 0)
             return 0;
-        return intLen*32 - Integer.numberOfLeadingZeros(value[offset]);
+        return intLen*32L - Integer.numberOfLeadingZeros(value[offset]);
     }
 
     /**
--- a/src/share/classes/java/net/Authenticator.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/net/Authenticator.java	Mon Nov 11 23:17:30 2013 -0800
@@ -358,7 +358,7 @@
      * will be based on a URL, but in a future JDK it could be, for
      * example, "SOCKS" for a password-protected SOCKS5 firewall.
      *
-     * @return the protcol, optionally followed by "/version", where
+     * @return the protocol, optionally followed by "/version", where
      *          version is a version number.
      *
      * @see java.net.URL#getProtocol()
--- a/src/share/classes/java/net/CookieManager.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/net/CookieManager.java	Mon Nov 11 23:17:30 2013 -0800
@@ -143,7 +143,7 @@
      *
      * @param store     a {@code CookieStore} to be used by cookie manager.
      *                  if {@code null}, cookie manager will use a default one,
-     *                  which is an in-memory CookieStore implmentation.
+     *                  which is an in-memory CookieStore implementation.
      * @param cookiePolicy      a {@code CookiePolicy} instance
      *                          to be used by cookie manager as policy callback.
      *                          if {@code null}, ACCEPT_ORIGINAL_SERVER will
--- a/src/share/classes/java/net/CookieStore.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/net/CookieStore.java	Mon Nov 11 23:17:30 2013 -0800
@@ -48,7 +48,7 @@
      * <p>A cookie to store may or may not be associated with an URI. If it
      * is not associated with an URI, the cookie's domain and path attribute
      * will indicate where it comes from. If it is associated with an URI and
-     * its domain and path attribute are not speicifed, given URI will indicate
+     * its domain and path attribute are not specified, given URI will indicate
      * where this cookie comes from.
      *
      * <p>If a cookie corresponding to the given URI already exists,
--- a/src/share/classes/java/net/DatagramSocket.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/net/DatagramSocket.java	Mon Nov 11 23:17:30 2013 -0800
@@ -640,7 +640,7 @@
                 SecurityManager security = System.getSecurityManager();
 
                 // The reason you want to synchronize on datagram packet
-                // is because you dont want an applet to change the address
+                // is because you don't want an applet to change the address
                 // while you are trying to send the packet for example
                 // after the security check but before the send.
                 if (security != null) {
--- a/src/share/classes/java/net/InetSocketAddress.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/net/InetSocketAddress.java	Mon Nov 11 23:17:30 2013 -0800
@@ -196,7 +196,7 @@
      * If that attempt fails, the address will be flagged as <I>unresolved</I>.
      * <p>
      * If there is a security manager, its {@code checkConnect} method
-     * is called with the host name as its argument to check the permissiom
+     * is called with the host name as its argument to check the permission
      * to resolve it. This could result in a SecurityException.
      * <P>
      * A valid port value is between 0 and 65535.
--- a/src/share/classes/java/net/InterfaceAddress.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/net/InterfaceAddress.java	Mon Nov 11 23:17:30 2013 -0800
@@ -56,7 +56,7 @@
     }
 
     /**
-     * Returns an {@code InetAddress} for the brodcast address
+     * Returns an {@code InetAddress} for the broadcast address
      * for this InterfaceAddress.
      * <p>
      * Only IPv4 networks have broadcast address therefore, in the case
--- a/src/share/classes/java/net/JarURLConnection.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/net/JarURLConnection.java	Mon Nov 11 23:17:30 2013 -0800
@@ -82,7 +82,7 @@
  *
  * </dl>
  *
- * <p>{@code !/} is refered to as the <em>separator</em>.
+ * <p>{@code !/} is referred to as the <em>separator</em>.
  *
  * <p>When constructing a JAR url via {@code new URL(context, spec)},
  * the following rules apply:
@@ -223,7 +223,7 @@
      * for this connection.
      *
      * @exception IOException if getting the JAR file for this
-     * connection causes an IOException to be trown.
+     * connection causes an IOException to be thrown.
      *
      * @see #getJarFile
      */
@@ -240,7 +240,7 @@
      * the JAR URL for this connection points to a JAR file.
      *
      * @exception IOException if getting the JAR file for this
-     * connection causes an IOException to be trown.
+     * connection causes an IOException to be thrown.
      *
      * @see #getJarFile
      * @see #getJarEntry
--- a/src/share/classes/java/net/ServerSocket.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/net/ServerSocket.java	Mon Nov 11 23:17:30 2013 -0800
@@ -610,7 +610,7 @@
     /**
      * Returns the binding state of the ServerSocket.
      *
-     * @return true if the ServerSocket succesfuly bound to an address
+     * @return true if the ServerSocket successfully bound to an address
      * @since 1.4
      */
     public boolean isBound() {
--- a/src/share/classes/java/net/SocksSocketImpl.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/net/SocksSocketImpl.java	Mon Nov 11 23:17:30 2013 -0800
@@ -437,7 +437,7 @@
             }
         }
 
-        // cmdIn & cmdOut were intialized during the privilegedConnect() call
+        // cmdIn & cmdOut were initialized during the privilegedConnect() call
         BufferedOutputStream out = new BufferedOutputStream(cmdOut, 512);
         InputStream in = cmdIn;
 
--- a/src/share/classes/java/net/StandardSocketOptions.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/net/StandardSocketOptions.java	Mon Nov 11 23:17:30 2013 -0800
@@ -257,7 +257,7 @@
      * represents the outgoing interface for multicast datagrams sent by the
      * datagram-oriented socket. For {@link StandardProtocolFamily#INET6 IPv6}
      * sockets then it is system dependent whether setting this option also
-     * sets the outgoing interface for multlicast datagrams sent to IPv4
+     * sets the outgoing interface for multicast datagrams sent to IPv4
      * addresses.
      *
      * <p> The initial/default value of this socket option may be {@code null}
--- a/src/share/classes/java/net/URL.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/net/URL.java	Mon Nov 11 23:17:30 2013 -0800
@@ -465,7 +465,7 @@
      * Otherwise, the path is treated as a relative path and is appended to the
      * context path, as described in RFC2396. Also, in this case,
      * the path is canonicalized through the removal of directory
-     * changes made by occurences of &quot;..&quot; and &quot;.&quot;.
+     * changes made by occurrences of &quot;..&quot; and &quot;.&quot;.
      * <p>
      * For a more detailed description of URL parsing, refer to RFC2396.
      *
--- a/src/share/classes/java/net/URLConnection.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/net/URLConnection.java	Mon Nov 11 23:17:30 2013 -0800
@@ -371,7 +371,7 @@
      * java.net.SocketTimeoutException is raised. A timeout of zero is
      * interpreted as an infinite timeout.
 
-     * <p> Some non-standard implmentation of this method may ignore
+     * <p> Some non-standard implementation of this method may ignore
      * the specified timeout. To see the connect timeout set, please
      * call getConnectTimeout().
      *
@@ -1059,7 +1059,7 @@
      *
      * <p> NOTE: HTTP requires all request properties which can
      * legally have multiple instances with the same key
-     * to use a comma-seperated list syntax which enables multiple
+     * to use a comma-separated list syntax which enables multiple
      * properties to be appended into a single property.
      *
      * @param   key     the keyword by which the request is known
--- a/src/share/classes/java/net/URLDecoder.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/net/URLDecoder.java	Mon Nov 11 23:17:30 2013 -0800
@@ -116,7 +116,7 @@
      * "http://www.w3.org/TR/html40/appendix/notes.html#non-ascii-chars">
      * World Wide Web Consortium Recommendation</a> states that
      * UTF-8 should be used. Not doing so may introduce
-     * incompatibilites.</em>
+     * incompatibilities.</em>
      *
      * @param s the {@code String} to decode
      * @param enc   The name of a supported
--- a/src/share/classes/java/net/URLEncoder.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/net/URLEncoder.java	Mon Nov 11 23:17:30 2013 -0800
@@ -185,7 +185,7 @@
      * "http://www.w3.org/TR/html40/appendix/notes.html#non-ascii-chars">
      * World Wide Web Consortium Recommendation</a> states that
      * UTF-8 should be used. Not doing so may introduce
-     * incompatibilites.</em>
+     * incompatibilities.</em>
      *
      * @param   s   {@code String} to be translated.
      * @param   enc   The name of a supported
--- a/src/share/classes/java/net/URLPermission.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/net/URLPermission.java	Mon Nov 11 23:17:30 2013 -0800
@@ -353,7 +353,7 @@
         return getActions().hashCode()
             + scheme.hashCode()
             + authority.hashCode()
-            + path == null ? 0 : path.hashCode();
+            + (path == null ? 0 : path.hashCode());
     }
 
 
--- a/src/share/classes/java/nio/channels/AsynchronousChannelGroup.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/nio/channels/AsynchronousChannelGroup.java	Mon Nov 11 23:17:30 2013 -0800
@@ -199,7 +199,7 @@
      *
      * <p> The {@code initialSize} parameter may be used by the implementation
      * as a <em>hint</em> as to the initial number of tasks it may submit. For
-     * example, it may be used to indictae the initial number of threads that
+     * example, it may be used to indicate the initial number of threads that
      * wait on I/O events.
      *
      * <p> The executor is intended to be used exclusively by the resulting
--- a/src/share/classes/java/nio/channels/DatagramChannel.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/nio/channels/DatagramChannel.java	Mon Nov 11 23:17:30 2013 -0800
@@ -153,7 +153,7 @@
      * Opens a datagram channel.
      *
      * <p> The {@code family} parameter is used to specify the {@link
-     * ProtocolFamily}. If the datagram channel is to be used for IP multicasing
+     * ProtocolFamily}. If the datagram channel is to be used for IP multicasting
      * then this should correspond to the address type of the multicast groups
      * that this channel will join.
      *
--- a/src/share/classes/java/nio/channels/MembershipKey.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/nio/channels/MembershipKey.java	Mon Nov 11 23:17:30 2013 -0800
@@ -103,7 +103,7 @@
      * multicast datagrams from the given source address. If the given source
      * address is already blocked then this method has no effect.
      * After a source address is blocked it may still be possible to receive
-     * datagams from that source. This can arise when datagrams are waiting to
+     * datagrams from that source. This can arise when datagrams are waiting to
      * be received in the socket's receive buffer.
      *
      * @param   source
--- a/src/share/classes/java/nio/channels/package-info.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/nio/channels/package-info.java	Mon Nov 11 23:17:30 2013 -0800
@@ -269,7 +269,7 @@
  * own asynchronous channel groups or configure the {@code ExecutorService}
  * that will be used for the default group.
  *
- * <p> As with selectors, the implementatin of asynchronous channels can be
+ * <p> As with selectors, the implementation of asynchronous channels can be
  * replaced by "plugging in" an alternative definition or instance of the {@link
  * java.nio.channels.spi.AsynchronousChannelProvider} class defined in the
  * <tt>{@link java.nio.channels.spi}</tt> package.  It is not expected that many
--- a/src/share/classes/java/nio/charset/Charset.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/nio/charset/Charset.java	Mon Nov 11 23:17:30 2013 -0800
@@ -201,7 +201,7 @@
  *
  * </ul>
  *
- * In any case, byte order marks occuring after the first element of an
+ * In any case, byte order marks occurring after the first element of an
  * input sequence are not omitted since the same code is used to represent
  * <small>ZERO-WIDTH NON-BREAKING SPACE</small>.
  *
--- a/src/share/classes/java/nio/file/attribute/UserDefinedFileAttributeView.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/nio/file/attribute/UserDefinedFileAttributeView.java	Mon Nov 11 23:17:30 2013 -0800
@@ -81,7 +81,7 @@
     /**
      * Returns a list containing the names of the user-defined attributes.
      *
-     * @return  An unmodifiable list continaing the names of the file's
+     * @return  An unmodifiable list containing the names of the file's
      *          user-defined
      *
      * @throws  IOException
@@ -179,7 +179,7 @@
      * <p> If an attribute of the given name already exists then its value is
      * replaced. If the attribute does not exist then it is created. If it
      * implementation specific if a test to check for the existence of the
-     * attribute and the creation of attribute are atomic with repect to other
+     * attribute and the creation of attribute are atomic with respect to other
      * file system activities.
      *
      * <p> Where there is insufficient space to store the attribute, or the
--- a/src/share/classes/java/rmi/MarshalledObject.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/rmi/MarshalledObject.java	Mon Nov 11 23:17:30 2013 -0800
@@ -135,7 +135,7 @@
     /**
      * Returns a new copy of the contained marshalledobject.  The internal
      * representation is deserialized with the semantics used for
-     * unmarshaling paramters for RMI calls.
+     * unmarshaling parameters for RMI calls.
      *
      * @return a copy of the contained object
      * @exception IOException if an <code>IOException</code> occurs while
@@ -182,7 +182,7 @@
      * in the serialized representation.
      *
      * @param obj the object to compare with this <code>MarshalledObject</code>
-     * @return <code>true</code> if the argument contains an equaivalent
+     * @return <code>true</code> if the argument contains an equivalent
      * serialized object; <code>false</code> otherwise
      * @since 1.2
      */
--- a/src/share/classes/java/rmi/server/RemoteStub.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/rmi/server/RemoteStub.java	Mon Nov 11 23:17:30 2013 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 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
@@ -25,7 +25,8 @@
 package java.rmi.server;
 
 /**
- * The <code>RemoteStub</code> class is the common superclass to client
+ * The {@code RemoteStub} class is the common superclass of
+ * statically generated client
  * stubs and provides the framework to support a wide range of remote
  * reference semantics.  Stub objects are surrogates that support
  * exactly the same set of remote interfaces defined by the actual
@@ -33,21 +34,26 @@
  *
  * @author  Ann Wollrath
  * @since   JDK1.1
+ *
+ * @deprecated Statically generated stubs are deprecated, since
+ * stubs are generated dynamically. See {@link UnicastRemoteObject}
+ * for information about dynamic stub generation.
  */
+@Deprecated
 abstract public class RemoteStub extends RemoteObject {
 
     /** indicate compatibility with JDK 1.1.x version of class */
     private static final long serialVersionUID = -1585587260594494182L;
 
     /**
-     * Constructs a <code>RemoteStub</code>.
+     * Constructs a {@code RemoteStub}.
      */
     protected RemoteStub() {
         super();
     }
 
     /**
-     * Constructs a <code>RemoteStub</code>, with the specified remote
+     * Constructs a {@code RemoteStub} with the specified remote
      * reference.
      *
      * @param ref the remote reference
@@ -58,14 +64,17 @@
     }
 
     /**
-     * Sets the remote reference inside the remote stub.
+     * Throws {@link UnsupportedOperationException}.
      *
      * @param stub the remote stub
      * @param ref the remote reference
+     * @throws UnsupportedOperationException always
      * @since JDK1.1
-     * @deprecated no replacement.  The <code>setRef</code> method
-     * is not needed since <code>RemoteStub</code>s can be created with
-     * the <code>RemoteStub(RemoteRef)</code> constructor.
+     * @deprecated No replacement.  The {@code setRef} method
+     * was intended for setting the remote reference of a remote
+     * stub. This is unnecessary, since {@code RemoteStub}s can be created
+     * and initialized with a remote reference through use of
+     * the {@link #RemoteStub(RemoteRef)} constructor.
      */
     @Deprecated
     protected static void setRef(RemoteStub stub, RemoteRef ref) {
--- a/src/share/classes/java/rmi/server/UnicastRemoteObject.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/rmi/server/UnicastRemoteObject.java	Mon Nov 11 23:17:30 2013 -0800
@@ -30,51 +30,88 @@
 
 /**
  * Used for exporting a remote object with JRMP and obtaining a stub
- * that communicates to the remote object.
+ * that communicates to the remote object. Stubs are either generated
+ * at runtime using dynamic proxy objects, or they are generated statically
+ * at build time, typically using the {@code rmic} tool.
+ *
+ * <p><strong>Deprecated: Static Stubs.</strong> <em>Support for statically
+ * generated stubs is deprecated. This includes the API in this class that
+ * requires the use of static stubs, as well as the runtime support for
+ * loading static stubs.  Generating stubs dynamically is preferred, using one
+ * of the five non-deprecated ways of exporting objects as listed below. Do
+ * not run {@code rmic} to generate static stub classes. It is unnecessary, and
+ * it is also deprecated.</em>
+ *
+ * <p>There are six ways to export remote objects:
+ *
+ * <ol>
+ *
+ * <li>Subclassing {@code UnicastRemoteObject} and calling the
+ * {@link #UnicastRemoteObject()} constructor.
+ *
+ * <li>Subclassing {@code UnicastRemoteObject} and calling the
+ * {@link #UnicastRemoteObject(int) UnicastRemoteObject(port)} constructor.
+ *
+ * <li>Subclassing {@code UnicastRemoteObject} and calling the
+ * {@link #UnicastRemoteObject(int, RMIClientSocketFactory, RMIServerSocketFactory)
+ * UnicastRemoteObject(port, csf, ssf)} constructor.
  *
- * <p>For the constructors and static <code>exportObject</code> methods
- * below, the stub for a remote object being exported is obtained as
- * follows:
+ * <li>Calling the
+ * {@link #exportObject(Remote) exportObject(Remote)} method.
+ * <strong>Deprecated.</strong>
+ *
+ * <li>Calling the
+ * {@link #exportObject(Remote, int) exportObject(Remote, port)} method.
+ *
+ * <li>Calling the
+ * {@link #exportObject(Remote, int, RMIClientSocketFactory, RMIServerSocketFactory)
+ * exportObject(Remote, port, csf, ssf)} method.
+ *
+ * </ol>
+ *
+ * <p>The fourth technique, {@link #exportObject(Remote)},
+ * always uses statically generated stubs and is deprecated.
+ *
+ * <p>The other five techniques all use the following approach: if the
+ * {@code java.rmi.server.ignoreStubClasses} property is {@code true}
+ * (case insensitive) or if a static stub cannot be found, stubs are generated
+ * dynamically using {@link java.lang.reflect.Proxy Proxy} objects. Otherwise,
+ * static stubs are used.
+ *
+ * <p>The default value of the
+ * {@code java.rmi.server.ignoreStubClasses} property is {@code false}.
+ *
+ * <p>Statically generated stubs are typically pregenerated from the
+ * remote object's class using the {@code rmic} tool. A static stub is
+ * loaded and an instance of that stub class is constructed as described
+ * below.
  *
  * <ul>
  *
- * <li>If the remote object is exported using the {@link
- * #exportObject(Remote) UnicastRemoteObject.exportObject(Remote)} method,
- * a stub class (typically pregenerated from the remote object's class
- * using the <code>rmic</code> tool) is loaded and an instance of that stub
- * class is constructed as follows.
- * <ul>
- *
- * <li>A "root class" is determined as follows:  if the remote object's
+ * <li>A "root class" is determined as follows: if the remote object's
  * class directly implements an interface that extends {@link Remote}, then
  * the remote object's class is the root class; otherwise, the root class is
  * the most derived superclass of the remote object's class that directly
- * implements an interface that extends <code>Remote</code>.
+ * implements an interface that extends {@code Remote}.
  *
  * <li>The name of the stub class to load is determined by concatenating
- * the binary name of the root class with the suffix <code>"_Stub"</code>.
+ * the binary name of the root class with the suffix {@code _Stub}.
  *
  * <li>The stub class is loaded by name using the class loader of the root
- * class.  The stub class must extend {@link RemoteStub} and must have a
- * public constructor that has one parameter, of type {@link RemoteRef}.
+ * class. The stub class must extend {@link RemoteStub} and must have a
+ * public constructor that has one parameter of type {@link RemoteRef}.
  *
  * <li>Finally, an instance of the stub class is constructed with a
  * {@link RemoteRef}.
- * </ul>
  *
- * <li>If the appropriate stub class could not be found, or the stub class
- * could not be loaded, or a problem occurs creating the stub instance, a
+ * <li>If the appropriate stub class could not be found, or if the stub class
+ * could not be loaded, or if a problem occurs creating the stub instance, a
  * {@link StubNotFoundException} is thrown.
  *
- * <li>For all other means of exporting:
- * <ul>
+ * </ul>
  *
- * <li>If the remote object's stub class (as defined above) could not be
- * loaded or the system property
- * <code>java.rmi.server.ignoreStubClasses</code> is set to
- * <code>"true"</code> (case insensitive), a {@link
- * java.lang.reflect.Proxy} instance is constructed with the following
- * properties:
+ * <p>Stubs are dynamically generated by constructing an instance of
+ * a {@link java.lang.reflect.Proxy Proxy} with the following characteristics:
  *
  * <ul>
  *
@@ -90,28 +127,13 @@
  *
  * <li>If the proxy could not be created, a {@link StubNotFoundException}
  * will be thrown.
- * </ul>
  *
- * <li>Otherwise, an instance of the remote object's stub class (as
- * described above) is used as the stub.
- *
- * </ul>
  * </ul>
  *
- * <p>If an object is exported with the
- * {@link #exportObject(Remote) exportObject(Remote)}
- * or
- * {@link #exportObject(Remote, int) exportObject(Remote, port)}
- * methods, or if a subclass constructor invokes one of the
- * {@link #UnicastRemoteObject()}
- * or
- * {@link #UnicastRemoteObject(int) UnicastRemoteObject(port)}
- * constructors, the object is exported with a server socket created using the
- * {@link RMISocketFactory}
- * class.
- *
  * @implNote
- * <p>By default, server sockets created by the {@link RMISocketFactory} class
+ * Depending upon which constructor or static method is used for exporting an
+ * object, {@link RMISocketFactory} may be used for creating sockets.
+ * By default, server sockets created by {@link RMISocketFactory}
  * listen on all network interfaces. See the
  * {@link RMISocketFactory} class and the section
  * <a href="{@docRoot}/../platform/rmi/spec/rmi-server29.html">RMI Socket Factories</a>
@@ -146,6 +168,10 @@
     /**
      * Creates and exports a new UnicastRemoteObject object using an
      * anonymous port.
+     *
+     * <p>The object is exported with a server socket
+     * created using the {@link RMISocketFactory} class.
+     *
      * @throws RemoteException if failed to export object
      * @since JDK1.1
      */
@@ -157,6 +183,10 @@
     /**
      * Creates and exports a new UnicastRemoteObject object using the
      * particular supplied port.
+     *
+     * <p>The object is exported with a server socket
+     * created using the {@link RMISocketFactory} class.
+     *
      * @param port the port number on which the remote object receives calls
      * (if <code>port</code> is zero, an anonymous port is chosen)
      * @throws RemoteException if failed to export object
@@ -171,6 +201,11 @@
     /**
      * Creates and exports a new UnicastRemoteObject object using the
      * particular supplied port and socket factories.
+     *
+     * <p>Either socket factory may be {@code null}, in which case
+     * the corresponding client or server socket creation method of
+     * {@link RMISocketFactory} is used instead.
+     *
      * @param port the port number on which the remote object receives calls
      * (if <code>port</code> is zero, an anonymous port is chosen)
      * @param csf the client-side socket factory for making calls to the
@@ -236,12 +271,23 @@
 
     /**
      * Exports the remote object to make it available to receive incoming
-     * calls using an anonymous port.
+     * calls using an anonymous port. This method will always return a
+     * statically generated stub.
+     *
+     * <p>The object is exported with a server socket
+     * created using the {@link RMISocketFactory} class.
+     *
      * @param obj the remote object to be exported
      * @return remote object stub
      * @exception RemoteException if export fails
      * @since JDK1.1
+     * @deprecated This method is deprecated because it supports only static stubs.
+     * Use {@link #exportObject(Remote, int) exportObject(Remote, port)} or
+     * {@link #exportObject(Remote, int, RMIClientSocketFactory, RMIServerSocketFactory)
+     * exportObject(Remote, port, csf, ssf)}
+     * instead.
      */
+    @Deprecated
     public static RemoteStub exportObject(Remote obj)
         throws RemoteException
     {
@@ -258,6 +304,10 @@
     /**
      * Exports the remote object to make it available to receive incoming
      * calls, using the particular supplied port.
+     *
+     * <p>The object is exported with a server socket
+     * created using the {@link RMISocketFactory} class.
+     *
      * @param obj the remote object to be exported
      * @param port the port to export the object on
      * @return remote object stub
@@ -273,6 +323,11 @@
     /**
      * Exports the remote object to make it available to receive incoming
      * calls, using a transport specified by the given socket factory.
+     *
+     * <p>Either socket factory may be {@code null}, in which case
+     * the corresponding client or server socket creation method of
+     * {@link RMISocketFactory} is used instead.
+     *
      * @param obj the remote object to be exported
      * @param port the port to export the object on
      * @param csf the client-side socket factory for making calls to the
--- a/src/share/classes/java/rmi/server/package.html	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/rmi/server/package.html	Mon Nov 11 23:17:30 2013 -0800
@@ -36,6 +36,23 @@
 mechanism has been deprecated. See {@link java.rmi.server.RMISocketFactory} for
 further information.</em>
 
+<p><strong>Deprecated: Skeletons and Static Stubs.</strong>
+
+<em>Skeletons and statically generated stubs are deprecated.  This
+includes the APIs in this package that require the use of skeletons
+or static stubs, the runtime support for them, and the use of the
+{@code rmic} stub compiler to generate them.  Support for skeletons
+and static stubs may be removed in a future release of the
+platform. Skeletons are unnecessary, as server-side method dispatching
+is handled directly by the RMI runtime. Statically generated stubs are
+unnecessary, as stubs are generated dynamically using {@link
+java.lang.reflect.Proxy Proxy} objects. See {@link
+java.rmi.server.UnicastRemoteObject UnicastRemoteObject} for
+information about dynamic stub generation. Generation of skeletons and
+static stubs was typically performed as part of an application's build
+process by calling the {@code rmic} tool. This is unnecessary, and
+calls to {@code rmic} can simply be omitted.</em>
+
 <!--
 <h2>Package Specification</h2>
 
--- a/src/share/classes/java/security/AccessControlException.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/security/AccessControlException.java	Mon Nov 11 23:17:30 2013 -0800
@@ -44,7 +44,7 @@
 
     private static final long serialVersionUID = 5138225684096988535L;
 
-    // the permission that caused the exeception to be thrown.
+    // the permission that caused the exception to be thrown.
     private Permission perm;
 
     /**
@@ -71,7 +71,7 @@
     }
 
     /**
-     * Gets the Permission object associated with this exeception, or
+     * Gets the Permission object associated with this exception, or
      * null if there was no corresponding Permission object.
      *
      * @return the Permission object.
--- a/src/share/classes/java/security/DigestOutputStream.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/security/DigestOutputStream.java	Mon Nov 11 23:17:30 2013 -0800
@@ -38,7 +38,7 @@
  *
  * <p>To complete the message digest computation, call one of the
  * {@code digest} methods on the associated message
- * digest after your calls to one of this digest ouput stream's
+ * digest after your calls to one of this digest output stream's
  * {@link #write(int) write} methods.
  *
  * <p>It is possible to turn this stream on or off (see
--- a/src/share/classes/java/security/KeyStore.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/security/KeyStore.java	Mon Nov 11 23:17:30 2013 -0800
@@ -1611,7 +1611,7 @@
          * Returns the KeyStore described by this object.
          *
          * @return the {@code KeyStore} described by this object
-         * @exception KeyStoreException if an error occured during the
+         * @exception KeyStoreException if an error occurred during the
          *   operation, for example if the KeyStore could not be
          *   instantiated or loaded
          */
@@ -1627,7 +1627,7 @@
          *   the {@link KeyStore.Entry Entry} with the given alias.
          * @param alias the alias of the KeyStore entry
          * @throws NullPointerException if alias is null
-         * @throws KeyStoreException if an error occured during the
+         * @throws KeyStoreException if an error occurred during the
          *   operation
          * @throws IllegalStateException if the getKeyStore method has
          *   not been invoked prior to calling this method
--- a/src/share/classes/java/security/ProtectionDomain.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/security/ProtectionDomain.java	Mon Nov 11 23:17:30 2013 -0800
@@ -401,7 +401,7 @@
         if (perms != null && permissions != null) {
             //
             // Weed out the duplicates from the policy. Unless a refresh
-            // has occured since the pd was consed this should result in
+            // has occurred since the pd was consed this should result in
             // an empty vector.
             synchronized (permissions) {
                 e = permissions.elements();   // domain vs policy
--- a/src/share/classes/java/security/Security.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/security/Security.java	Mon Nov 11 23:17:30 2013 -0800
@@ -496,7 +496,7 @@
      * <li> <i>{@literal <crypto_service>.<algorithm_or_type>
      * <attribute_name>:<attribute_value>}</i>
      * <p> The cryptographic service name must not contain any dots. There
-     * must be one or more space charaters between the
+     * must be one or more space characters between the
      * <i>{@literal <algorithm_or_type>}</i> and the
      * <i>{@literal <attribute_name>}</i>.
      *  <p> A provider satisfies this selection criterion iff the
@@ -570,7 +570,7 @@
      * <li>  <i>{@literal <crypto_service>}.
      * {@literal <algorithm_or_type> <attribute_name>}</i>
      * <p> The cryptographic service name must not contain any dots. There
-     * must be one or more space charaters between the
+     * must be one or more space characters between the
      * <i>{@literal <algorithm_or_type>}</i>
      * and the <i>{@literal <attribute_name>}</i>.
      * <p> The value associated with the key must be a non-empty string.
--- a/src/share/classes/java/security/UnresolvedPermission.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/security/UnresolvedPermission.java	Mon Nov 11 23:17:30 2013 -0800
@@ -441,7 +441,7 @@
      *
      * @return the target name of the underlying permission that
      *          has not been resolved, or {@code null},
-     *          if there is no targe name
+     *          if there is no target name
      *
      * @since 1.5
      */
--- a/src/share/classes/java/security/cert/CertificateRevokedException.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/security/cert/CertificateRevokedException.java	Mon Nov 11 23:17:30 2013 -0800
@@ -129,7 +129,7 @@
     }
 
     /**
-     * Returns the invalidity date, as specifed in the Invalidity Date
+     * Returns the invalidity date, as specified in the Invalidity Date
      * extension of this {@code CertificateRevokedException}. The
      * invalidity date is the date on which it is known or suspected that the
      * private key was compromised or that the certificate otherwise became
--- a/src/share/classes/java/security/spec/ECFieldF2m.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/security/spec/ECFieldF2m.java	Mon Nov 11 23:17:30 2013 -0800
@@ -64,7 +64,7 @@
      * field which has 2^{@code m} elements with
      * polynomial basis.
      * The reduction polynomial for this field is based
-     * on {@code rp} whose i-th bit correspondes to
+     * on {@code rp} whose i-th bit corresponds to
      * the i-th coefficient of the reduction polynomial.<p>
      * Note: A valid reduction polynomial is either a
      * trinomial (X^{@code m} + X^{@code k} + 1
--- a/src/share/classes/java/sql/Array.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/sql/Array.java	Mon Nov 11 23:17:30 2013 -0800
@@ -323,7 +323,7 @@
    * element at index <code>index</code>.  The result set has
    * up to <code>count</code> rows in ascending order based on the
    * indices.  Each row has two columns:  The second column stores
-   * the element value; the first column stroes the index into the
+   * the element value; the first column stores the index into the
    * array for that element.
    *
    * @param index the array index of the first element to retrieve;
--- a/src/share/classes/java/sql/BatchUpdateException.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/sql/BatchUpdateException.java	Mon Nov 11 23:17:30 2013 -0800
@@ -143,7 +143,7 @@
    * initialized by a call to the
    * {@link Throwable#initCause(java.lang.Throwable)} method.  The
    * <code>SQLState</code> is initialized to <code>null</code>
-   * and the vender code is initialized to 0.
+   * and the vendor code is initialized to 0.
    * <p>
    * <strong>Note:</strong> There is no validation of {@code updateCounts} for
    * overflow and because of this it is recommended that you use the constructor
--- a/src/share/classes/java/sql/Blob.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/sql/Blob.java	Mon Nov 11 23:17:30 2013 -0800
@@ -158,7 +158,7 @@
      * in the <code>Blob</code> object starting at the position
      * <code>pos</code>.  If the end of the <code>Blob</code> value is reached
      * while writing the array of bytes, then the length of the <code>Blob</code>
-     * value will be increased to accomodate the extra bytes.
+     * value will be increased to accommodate the extra bytes.
      * <p>
      * <b>Note:</b> If the value specified for <code>pos</code>
      * is greater then the length+1 of the <code>BLOB</code> value then the
@@ -190,7 +190,7 @@
      * in the <code>Blob</code> object starting at the position
      * <code>pos</code>.  If the end of the <code>Blob</code> value is reached
      * while writing the array of bytes, then the length of the <code>Blob</code>
-     * value will be increased to accomodate the extra bytes.
+     * value will be increased to accommodate the extra bytes.
      * <p>
      * <b>Note:</b> If the value specified for <code>pos</code>
      * is greater then the length+1 of the <code>BLOB</code> value then the
@@ -224,7 +224,7 @@
      * in the <code>Blob</code> object starting at the position
      * <code>pos</code>.  If the end of the <code>Blob</code> value is reached
      * while writing to the stream, then the length of the <code>Blob</code>
-     * value will be increased to accomodate the extra bytes.
+     * value will be increased to accommodate the extra bytes.
      * <p>
      * <b>Note:</b> If the value specified for <code>pos</code>
      * is greater then the length+1 of the <code>BLOB</code> value then the
--- a/src/share/classes/java/sql/CallableStatement.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/sql/CallableStatement.java	Mon Nov 11 23:17:30 2013 -0800
@@ -1900,7 +1900,7 @@
      * @throws SQLException  if parameterName does not correspond to a named
      * parameter; if the length specified
      * is less than zero; if the number of bytes in the inputstream does not match
-     * the specfied length; if a database access error occurs or
+     * the specified length; if a database access error occurs or
      * this method is called on a closed <code>CallableStatement</code>
      * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
      * this method
--- a/src/share/classes/java/sql/Clob.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/sql/Clob.java	Mon Nov 11 23:17:30 2013 -0800
@@ -172,7 +172,7 @@
      * in the <code>Clob</code> object starting at the position
      * <code>pos</code>.  If the end of the <code>Clob</code> value is reached
      * while writing the given string, then the length of the <code>Clob</code>
-     * value will be increased to accomodate the extra characters.
+     * value will be increased to accommodate the extra characters.
      * <p>
      * <b>Note:</b> If the value specified for <code>pos</code>
      * is greater then the length+1 of the <code>CLOB</code> value then the
@@ -202,7 +202,7 @@
      * in the <code>Clob</code> object starting at the position
      * <code>pos</code>.  If the end of the <code>Clob</code> value is reached
      * while writing the given string, then the length of the <code>Clob</code>
-     * value will be increased to accomodate the extra characters.
+     * value will be increased to accommodate the extra characters.
      * <p>
      * <b>Note:</b> If the value specified for <code>pos</code>
      * is greater then the length+1 of the <code>CLOB</code> value then the
@@ -235,7 +235,7 @@
      * in the <code>Clob</code> object starting at the position
      * <code>pos</code>.  If the end of the <code>Clob</code> value is reached
      * while writing characters to the stream, then the length of the <code>Clob</code>
-     * value will be increased to accomodate the extra characters.
+     * value will be increased to accommodate the extra characters.
      * <p>
      * <b>Note:</b> If the value specified for <code>pos</code>
      * is greater then the length+1 of the <code>CLOB</code> value then the
@@ -264,7 +264,7 @@
      * in the <code>Clob</code> object starting at the position
      * <code>pos</code>.  If the end of the <code>Clob</code> value is reached
      * while writing characters to the stream, then the length of the <code>Clob</code>
-     * value will be increased to accomodate the extra characters.
+     * value will be increased to accommodate the extra characters.
      * <p>
      * <b>Note:</b> If the value specified for <code>pos</code>
      * is greater then the length+1 of the <code>CLOB</code> value then the
--- a/src/share/classes/java/sql/Connection.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/sql/Connection.java	Mon Nov 11 23:17:30 2013 -0800
@@ -242,7 +242,7 @@
      *
      * @exception SQLException if a database access error occurs,
      * this method is called while participating in a distributed transaction,
-     * if this method is called on a closed conection or this
+     * if this method is called on a closed connection or this
      *            <code>Connection</code> object is in auto-commit mode
      * @see #setAutoCommit
      */
--- a/src/share/classes/java/sql/DataTruncation.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/sql/DataTruncation.java	Mon Nov 11 23:17:30 2013 -0800
@@ -30,7 +30,7 @@
  * (on writes) or reported as a
  * <code>DataTruncation</code> warning (on reads)
  *  when a data values is unexpectedly truncated for reasons other than its having
- *  execeeded <code>MaxFieldSize</code>.
+ *  exceeded <code>MaxFieldSize</code>.
  *
  * <P>The SQLstate for a <code>DataTruncation</code> during read is <code>01004</code>.
  * <P>The SQLstate for a <code>DataTruncation</code> during write is <code>22001</code>.
@@ -107,7 +107,7 @@
      * <P>This may be -1 if the column or parameter index is unknown, in
      * which case the <code>parameter</code> and <code>read</code> fields should be ignored.
      *
-     * @return the index of the truncated paramter or column value
+     * @return the index of the truncated parameter or column value
      */
     public int getIndex() {
         return index;
--- a/src/share/classes/java/sql/DatabaseMetaData.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/sql/DatabaseMetaData.java	Mon Nov 11 23:17:30 2013 -0800
@@ -1701,7 +1701,7 @@
      * <P>Only privileges matching the column name criteria are
      * returned.  They are ordered by COLUMN_NAME and PRIVILEGE.
      *
-     * <P>Each privilige description has the following columns:
+     * <P>Each privilege description has the following columns:
      *  <OL>
      *  <LI><B>TABLE_CAT</B> String {@code =>} table catalog (may be <code>null</code>)
      *  <LI><B>TABLE_SCHEM</B> String {@code =>} table schema (may be <code>null</code>)
@@ -1747,7 +1747,7 @@
      * <code>TABLE_SCHEM</code>, <code>TABLE_NAME</code>,
      * and <code>PRIVILEGE</code>.
      *
-     * <P>Each privilige description has the following columns:
+     * <P>Each privilege description has the following columns:
      *  <OL>
      *  <LI><B>TABLE_CAT</B> String {@code =>} table catalog (may be <code>null</code>)
      *  <LI><B>TABLE_SCHEM</B> String {@code =>} table schema (may be <code>null</code>)
@@ -3257,7 +3257,7 @@
     boolean supportsStoredFunctionsUsingCallSyntax() throws SQLException;
 
     /**
-     * Retrieves whether a <code>SQLException</code> while autoCommit is <code>true</code> inidcates
+     * Retrieves whether a <code>SQLException</code> while autoCommit is <code>true</code> indicates
      * that all open ResultSets are closed, even ones that are holdable.  When a <code>SQLException</code> occurs while
      * autocommit is <code>true</code>, it is vendor specific whether the JDBC driver responds with a commit operation, a
      * rollback operation, or by doing neither a commit nor a rollback.  A potential result of this difference
--- a/src/share/classes/java/sql/DriverManager.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/sql/DriverManager.java	Mon Nov 11 23:17:30 2013 -0800
@@ -59,7 +59,7 @@
  * <code>my.sql.Driver</code>
  * </pre>
  *
- * <P>Applications no longer need to explictly load JDBC drivers using <code>Class.forName()</code>. Existing programs
+ * <P>Applications no longer need to explicitly load JDBC drivers using <code>Class.forName()</code>. Existing programs
  * which currently load JDBC drivers using <code>Class.forName()</code> will continue to work without
  * modification.
  *
--- a/src/share/classes/java/sql/DriverPropertyInfo.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/sql/DriverPropertyInfo.java	Mon Nov 11 23:17:30 2013 -0800
@@ -38,7 +38,7 @@
     /**
      * Constructs a <code>DriverPropertyInfo</code> object with a  given
      * name and value.  The <code>description</code> and <code>choices</code>
-     * are intialized to <code>null</code> and <code>required</code> is initialized
+     * are initialized to <code>null</code> and <code>required</code> is initialized
      * to <code>false</code>.
      *
      * @param name the name of the property
--- a/src/share/classes/java/sql/PreparedStatement.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/sql/PreparedStatement.java	Mon Nov 11 23:17:30 2013 -0800
@@ -856,7 +856,7 @@
      * this method is called on a closed <code>PreparedStatement</code>;
      *  if the length specified
      * is less than zero or if the number of bytes in the inputstream does not match
-     * the specfied length.
+     * the specified length.
      * @throws SQLFeatureNotSupportedException  if the JDBC driver does not support this method
      *
      * @since 1.6
--- a/src/share/classes/java/sql/ResultSet.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/sql/ResultSet.java	Mon Nov 11 23:17:30 2013 -0800
@@ -184,7 +184,7 @@
      * <P>The closing of a <code>ResultSet</code> object does <strong>not</strong> close the <code>Blob</code>,
      * <code>Clob</code> or <code>NClob</code> objects created by the <code>ResultSet</code>. <code>Blob</code>,
      * <code>Clob</code> or <code>NClob</code> objects remain valid for at least the duration of the
-     * transaction in which they are creataed, unless their <code>free</code> method is invoked.
+     * transaction in which they are created, unless their <code>free</code> method is invoked.
      *<p>
      * When a <code>ResultSet</code> is closed, any <code>ResultSetMetaData</code>
      * instances that were created by calling the  <code>getMetaData</code>
@@ -2423,7 +2423,7 @@
      * <code>DatabaseMetaData</code> method, this method  may return
      * <code>null</code>.
      *
-     * @return the <code>Statment</code> object that produced
+     * @return the <code>Statement</code> object that produced
      * this <code>ResultSet</code> object or <code>null</code>
      * if the result set was produced some other way
      * @exception SQLException if a database access error occurs
@@ -2749,7 +2749,7 @@
 
     /**
      * The constant indicating that open <code>ResultSet</code> objects with this
-     * holdability will remain open when the current transaction is commited.
+     * holdability will remain open when the current transaction is committed.
      *
      * @since 1.4
      */
@@ -2757,7 +2757,7 @@
 
     /**
      * The constant indicating that open <code>ResultSet</code> objects with this
-     * holdability will be closed when the current transaction is commited.
+     * holdability will be closed when the current transaction is committed.
      *
      * @since 1.4
      */
--- a/src/share/classes/java/sql/SQLException.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/sql/SQLException.java	Mon Nov 11 23:17:30 2013 -0800
@@ -107,7 +107,7 @@
     /**
      *  Constructs a <code>SQLException</code> object with a given
      * <code>reason</code>. The  <code>SQLState</code>  is initialized to
-     * <code>null</code> and the vender code is initialized to 0.
+     * <code>null</code> and the vendor code is initialized to 0.
      *
      * The <code>cause</code> is not initialized, and may subsequently be
      * initialized by a call to the
--- a/src/share/classes/java/sql/SQLFeatureNotSupportedException.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/sql/SQLFeatureNotSupportedException.java	Mon Nov 11 23:17:30 2013 -0800
@@ -60,7 +60,7 @@
         /**
          * Constructs a <code>SQLFeatureNotSupportedException</code> object
          * with a given <code>reason</code>. The <code>SQLState</code>
-         * is initialized to <code>null</code> and the vender code is initialized
+         * is initialized to <code>null</code> and the vendor code is initialized
          * to 0.
          *
          * The <code>cause</code> is not initialized, and may subsequently be
@@ -118,7 +118,7 @@
      * <code>cause==null</code> or to <code>cause.toString()</code> if
      * <code>cause!=null</code>.
      * <p>
-     * @param cause the underlying reason for this <code>SQLException</code> (which is saved for later retrieval bythe <code>getCause()</code> method); may be null indicating
+     * @param cause the underlying reason for this <code>SQLException</code> (which is saved for later retrieval by the <code>getCause()</code> method); may be null indicating
      *     the cause is non-existent or unknown.
      * @since 1.6
      */
--- a/src/share/classes/java/sql/SQLIntegrityConstraintViolationException.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/sql/SQLIntegrityConstraintViolationException.java	Mon Nov 11 23:17:30 2013 -0800
@@ -55,7 +55,7 @@
         /**
          * Constructs a <code>SQLIntegrityConstraintViolationException</code>
          *  with a given <code>reason</code>. The <code>SQLState</code>
-         * is initialized to <code>null</code> and the vender code is initialized
+         * is initialized to <code>null</code> and the vendor code is initialized
          * to 0.
          *
          * The <code>cause</code> is not initialized, and may subsequently be
--- a/src/share/classes/java/sql/SQLInvalidAuthorizationSpecException.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/sql/SQLInvalidAuthorizationSpecException.java	Mon Nov 11 23:17:30 2013 -0800
@@ -55,7 +55,7 @@
         /**
          * Constructs a <code>SQLInvalidAuthorizationSpecException</code> object
          *  with a given <code>reason</code>. The <code>SQLState</code>
-         * is initialized to <code>null</code> and the vender code is initialized
+         * is initialized to <code>null</code> and the vendor code is initialized
          * to 0.
          *
          * The <code>cause</code> is not initialized, and may subsequently be
--- a/src/share/classes/java/sql/SQLNonTransientConnectionException.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/sql/SQLNonTransientConnectionException.java	Mon Nov 11 23:17:30 2013 -0800
@@ -56,7 +56,7 @@
         /**
          * Constructs a <code>SQLNonTransientConnectionException</code> object
          *  with a given <code>reason</code>. The <code>SQLState</code>
-         * is initialized to <code>null</code> and the vender code is initialized
+         * is initialized to <code>null</code> and the vendor code is initialized
          * to 0.
          *
          * The <code>cause</code> is not initialized, and may subsequently be
--- a/src/share/classes/java/sql/SQLNonTransientException.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/sql/SQLNonTransientException.java	Mon Nov 11 23:17:30 2013 -0800
@@ -54,7 +54,7 @@
         /**
          * Constructs a <code>SQLNonTransientException</code> object
          * with a given <code>reason</code>. The <code>SQLState</code>
-         * is initialized to <code>null</code> and the vender code is initialized
+         * is initialized to <code>null</code> and the vendor code is initialized
          * to 0.
          *
          * The <code>cause</code> is not initialized, and may subsequently be
--- a/src/share/classes/java/sql/SQLRecoverableException.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/sql/SQLRecoverableException.java	Mon Nov 11 23:17:30 2013 -0800
@@ -56,7 +56,7 @@
         /**
          * Constructs a <code>SQLRecoverableException</code> object
          *  with a given <code>reason</code>. The <code>SQLState</code>
-         * is initialized to <code>null</code> and the vender code is initialized
+         * is initialized to <code>null</code> and the vendor code is initialized
          * to 0.
          *
          * The <code>cause</code> is not initialized, and may subsequently be
--- a/src/share/classes/java/sql/SQLSyntaxErrorException.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/sql/SQLSyntaxErrorException.java	Mon Nov 11 23:17:30 2013 -0800
@@ -54,7 +54,7 @@
         /**
          * Constructs a <code>SQLSyntaxErrorException</code> object
          * with a given <code>reason</code>. The <code>SQLState</code>
-         * is initialized to <code>null</code> and the vender code is initialized
+         * is initialized to <code>null</code> and the vendor code is initialized
          * to 0.
          *
          * The <code>cause</code> is not initialized, and may subsequently be
@@ -112,7 +112,7 @@
      * <code>cause==null</code> or to <code>cause.toString()</code> if
      * <code>cause!=null</code>.
      * <p>
-     * @param cause the underlying reason for this <code>SQLException</code> (which is saved for later retrieval bythe <code>getCause()</code> method); may be null indicating
+     * @param cause the underlying reason for this <code>SQLException</code> (which is saved for later retrieval by the <code>getCause()</code> method); may be null indicating
      *     the cause is non-existent or unknown.
      * @since 1.6
      */
--- a/src/share/classes/java/sql/SQLTimeoutException.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/sql/SQLTimeoutException.java	Mon Nov 11 23:17:30 2013 -0800
@@ -54,7 +54,7 @@
         /**
          * Constructs a <code>SQLTimeoutException</code> object
          * with a given <code>reason</code>. The <code>SQLState</code>
-         * is initialized to <code>null</code> and the vender code is initialized
+         * is initialized to <code>null</code> and the vendor code is initialized
          * to 0.
          *
          * The <code>cause</code> is not initialized, and may subsequently be
--- a/src/share/classes/java/sql/SQLTransactionRollbackException.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/sql/SQLTransactionRollbackException.java	Mon Nov 11 23:17:30 2013 -0800
@@ -54,7 +54,7 @@
         /**
          * Constructs a <code>SQLTransactionRollbackException</code> object
          * with a given <code>reason</code>. The <code>SQLState</code>
-         * is initialized to <code>null</code> and the vender code is initialized
+         * is initialized to <code>null</code> and the vendor code is initialized
          * to 0.
          *
          * The <code>cause</code> is not initialized, and may subsequently be
--- a/src/share/classes/java/sql/SQLTransientConnectionException.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/sql/SQLTransientConnectionException.java	Mon Nov 11 23:17:30 2013 -0800
@@ -55,7 +55,7 @@
         /**
          * Constructs a <code>SQLTransientConnectionException</code> object
          * with a given <code>reason</code>. The <code>SQLState</code>
-         * is initialized to <code>null</code> and the vender code is initialized
+         * is initialized to <code>null</code> and the vendor code is initialized
          * to 0.
          *
          * The <code>cause</code> is not initialized, and may subsequently be
--- a/src/share/classes/java/sql/SQLTransientException.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/sql/SQLTransientException.java	Mon Nov 11 23:17:30 2013 -0800
@@ -27,7 +27,7 @@
 
 /**
  * The subclass of {@link SQLException} is thrown in situations where a
- * previoulsy failed operation might be able to succeed when the operation is
+ * previously failed operation might be able to succeed when the operation is
  * retried without any intervention by application-level functionality.
  *<p>
  *
@@ -53,7 +53,7 @@
         /**
          * Constructs a <code>SQLTransientException</code> object
          *  with a given <code>reason</code>. The <code>SQLState</code>
-         * is initialized to <code>null</code> and the vender code is initialized
+         * is initialized to <code>null</code> and the vendor code is initialized
          * to 0.
          *
          * The <code>cause</code> is not initialized, and may subsequently be
--- a/src/share/classes/java/sql/SQLWarning.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/sql/SQLWarning.java	Mon Nov 11 23:17:30 2013 -0800
@@ -86,7 +86,7 @@
     /**
      * Constructs a <code>SQLWarning</code> object
      * with a given <code>reason</code>. The <code>SQLState</code>
-     * is initialized to <code>null</code> and the vender code is initialized
+     * is initialized to <code>null</code> and the vendor code is initialized
      * to 0.
      *
      * The <code>cause</code> is not initialized, and may subsequently be
--- a/src/share/classes/java/sql/SQLXML.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/sql/SQLXML.java	Mon Nov 11 23:17:30 2013 -0800
@@ -362,7 +362,7 @@
    *
    * @param <T> the type of the class modeled by this Class object
    * @param sourceClass The class of the source, or null.
-   * If the class is null, a vendor specifc Source implementation will be returned.
+   * If the class is null, a vendor specific Source implementation will be returned.
    * The following classes are supported at a minimum:
    * <pre>
    *   javax.xml.transform.dom.DOMSource - returns a DOMSource
--- a/src/share/classes/java/sql/Statement.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/sql/Statement.java	Mon Nov 11 23:17:30 2013 -0800
@@ -34,8 +34,8 @@
  * <code>ResultSet</code> object is interleaved
  * with the reading of another, each must have been generated by
  * different <code>Statement</code> objects. All execution methods in the
- * <code>Statement</code> interface implicitly close a statment's current
- * <code>ResultSet</code> object if an open one exists.
+ * <code>Statement</code> interface implicitly close a current
+ * <code>ResultSet</code> object of the statement if an open one exists.
  *
  * @see Connection#createStatement
  * @see ResultSet
@@ -445,7 +445,7 @@
     /**
      * Gives the JDBC driver a hint as to the number of rows that should
      * be fetched from the database when more rows are needed for
-     * <code>ResultSet</code> objects genrated by this <code>Statement</code>.
+     * <code>ResultSet</code> objects generated by this <code>Statement</code>.
      * If the value specified is zero, then the hint is ignored.
      * The default value is zero.
      *
@@ -501,7 +501,7 @@
     int getResultSetType()  throws SQLException;
 
     /**
-     * Adds the given SQL command to the current list of commmands for this
+     * Adds the given SQL command to the current list of commands for this
      * <code>Statement</code> object. The commands in this list can be
      * executed as a batch by calling the method <code>executeBatch</code>.
      * <P>
@@ -567,8 +567,8 @@
      * <P>
      * The possible implementations and return values have been modified in
      * the Java 2 SDK, Standard Edition, version 1.3 to
-     * accommodate the option of continuing to proccess commands in a batch
-     * update after a <code>BatchUpdateException</code> obejct has been thrown.
+     * accommodate the option of continuing to process commands in a batch
+     * update after a <code>BatchUpdateException</code> object has been thrown.
      *
      * @return an array of update counts containing one element for each
      * command in the batch.  The elements of the array are ordered according
@@ -635,7 +635,7 @@
     int SUCCESS_NO_INFO = -2;
 
     /**
-     * The constant indicating that an error occured while executing a
+     * The constant indicating that an error occurred while executing a
      * batch statement.
      *
      * @since 1.4
--- a/src/share/classes/java/sql/Struct.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/sql/Struct.java	Mon Nov 11 23:17:30 2013 -0800
@@ -81,7 +81,7 @@
   /**
    * Produces the ordered values of the attributes of the SQL
    * structured type that this <code>Struct</code> object represents.
-   *  As individual attrbutes are proccessed, this method uses the given type map
+   *  As individual attributes are processed, this method uses the given type map
    * for customizations of the type mappings.
    * If there is no
    * entry in the given type map that matches the structured
--- a/src/share/classes/java/sql/package.html	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/sql/package.html	Mon Nov 11 23:17:30 2013 -0800
@@ -221,7 +221,7 @@
  <lI>SQLException enhancements -- Added support for cause chaining; New SQLExceptions
  added for common SQLState class value codes
  <li>Enhanced Blob/Clob functionality -- Support provided to create and free a Blob/Clob instance
- as well as additional methods added to improve accessiblity
+ as well as additional methods added to improve accessibility
  <li>Support added for accessing a SQL ROWID
  <li>Support added to allow a JDBC application to access an instance of a JDBC resource
  that has been wrapped by a vendor, usually in an application server or connection 
--- a/src/share/classes/java/text/BreakIterator.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/text/BreakIterator.java	Mon Nov 11 23:17:30 2013 -0800
@@ -338,7 +338,7 @@
      * Otherwise, the iterator's current position is set to the returned boundary.
      * The value returned is always less than the offset or the value
      * <code>BreakIterator.DONE</code>.
-     * @param offset the characater offset to begin scanning.
+     * @param offset the character offset to begin scanning.
      * @return The last boundary before the specified offset or
      * <code>BreakIterator.DONE</code> if the first text boundary is passed in
      * as the offset.
--- a/src/share/classes/java/text/ChoiceFormat.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/text/ChoiceFormat.java	Mon Nov 11 23:17:30 2013 -0800
@@ -409,7 +409,7 @@
      * @param status an input-output parameter.  On input, the
      * status.index field indicates the first character of the
      * source text that should be parsed.  On exit, if no error
-     * occured, status.index is set to the first unparsed character
+     * occurred, status.index is set to the first unparsed character
      * in the source text.  On exit, if an error did occur,
      * status.index is unchanged and status.errorIndex is set to the
      * first index of the character that caused the parse to fail.
--- a/src/share/classes/java/text/DigitList.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/text/DigitList.java	Mon Nov 11 23:17:30 2013 -0800
@@ -483,7 +483,7 @@
              *
              *   This has to be considered only if digit at maximumDigits index
              *   is exactly the last one in the set of digits, otherwise there are
-             *   remaining digits after that position and we dont have to consider
+             *   remaining digits after that position and we don't have to consider
              *   what FloatingDecimal did.
              *
              * - Other rounding modes are not impacted by these tie cases.
@@ -570,7 +570,7 @@
                             return false;
 
                         if (!allDecimalDigits)
-                            // Otherwise if the digits dont represent exact value,
+                            // Otherwise if the digits don't represent exact value,
                             // value was above tie and FloatingDecimal truncated
                             // digits to tie. We must round up.
                             return true;
--- a/src/share/classes/java/text/FieldPosition.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/text/FieldPosition.java	Mon Nov 11 23:17:30 2013 -0800
@@ -136,7 +136,7 @@
      * constant, <code>fieldID</code> should be -1.
      *
      * @param attribute Format.Field constant identifying a field
-     * @param fieldID integer constantce identifying a field
+     * @param fieldID integer constant identifying a field
      * @since 1.4
      */
     public FieldPosition(Format.Field attribute, int fieldID) {
--- a/src/share/classes/java/text/Format.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/text/Format.java	Mon Nov 11 23:17:30 2013 -0800
@@ -281,7 +281,7 @@
     }
 
     /**
-     * Creates an <code>AttributedCharacterIterator</code> containg the
+     * Creates an <code>AttributedCharacterIterator</code> containing the
      * concatenated contents of the passed in
      * <code>AttributedCharacterIterator</code>s.
      *
--- a/src/share/classes/java/text/RuleBasedCollator.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/text/RuleBasedCollator.java	Mon Nov 11 23:17:30 2013 -0800
@@ -671,7 +671,7 @@
         if (tables.isFrenchSec())
         {
             if (preSecIgnore < secResult.length()) {
-                // If we've accumlated any secondary characters after the last base character,
+                // If we've accumulated any secondary characters after the last base character,
                 // reverse them.
                 RBCollationTables.reverse(secResult, preSecIgnore, secResult.length());
             }
--- a/src/share/classes/java/time/chrono/ChronoZonedDateTime.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/time/chrono/ChronoZonedDateTime.java	Mon Nov 11 23:17:30 2013 -0800
@@ -158,7 +158,7 @@
      * This method matches the signature of the functional interface {@link TemporalQuery}
      * allowing it to be used as a query via method reference, {@code ChronoZonedDateTime::from}.
      *
-     * @param temporal  the temporal objec t to convert, not null
+     * @param temporal  the temporal object to convert, not null
      * @return the date-time, not null
      * @throws DateTimeException if unable to convert to a {@code ChronoZonedDateTime}
      * @see Chronology#zonedDateTime(TemporalAccessor)
--- a/src/share/classes/java/time/zone/ZoneRules.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/time/zone/ZoneRules.java	Mon Nov 11 23:17:30 2013 -0800
@@ -899,7 +899,7 @@
                     return transArray[i];
                 }
             }
-            // use last from preceeding year
+            // use last from preceding year
             int lastHistoricYear = findYear(lastHistoric, lastHistoricOffset);
             if (--year > lastHistoricYear) {
                 transArray = findTransitionArray(year);
--- a/src/share/classes/java/util/Arrays.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/util/Arrays.java	Mon Nov 11 23:17:30 2013 -0800
@@ -1225,7 +1225,7 @@
      *
      * <p>The implementation was adapted from Tim Peters's list sort for Python
      * (<a href="http://svn.python.org/projects/python/trunk/Objects/listsort.txt">
-     * TimSort</a>).  It uses techiques from Peter McIlroy's "Optimistic
+     * TimSort</a>).  It uses techniques from Peter McIlroy's "Optimistic
      * Sorting and Information Theoretic Complexity", in Proceedings of the
      * Fourth Annual ACM-SIAM Symposium on Discrete Algorithms, pp 467-474,
      * January 1993.
@@ -1284,7 +1284,7 @@
      *
      * <p>The implementation was adapted from Tim Peters's list sort for Python
      * (<a href="http://svn.python.org/projects/python/trunk/Objects/listsort.txt">
-     * TimSort</a>).  It uses techiques from Peter McIlroy's "Optimistic
+     * TimSort</a>).  It uses techniques from Peter McIlroy's "Optimistic
      * Sorting and Information Theoretic Complexity", in Proceedings of the
      * Fourth Annual ACM-SIAM Symposium on Discrete Algorithms, pp 467-474,
      * January 1993.
@@ -1411,7 +1411,7 @@
      *
      * <p>The implementation was adapted from Tim Peters's list sort for Python
      * (<a href="http://svn.python.org/projects/python/trunk/Objects/listsort.txt">
-     * TimSort</a>).  It uses techiques from Peter McIlroy's "Optimistic
+     * TimSort</a>).  It uses techniques from Peter McIlroy's "Optimistic
      * Sorting and Information Theoretic Complexity", in Proceedings of the
      * Fourth Annual ACM-SIAM Symposium on Discrete Algorithms, pp 467-474,
      * January 1993.
@@ -1475,7 +1475,7 @@
      *
      * <p>The implementation was adapted from Tim Peters's list sort for Python
      * (<a href="http://svn.python.org/projects/python/trunk/Objects/listsort.txt">
-     * TimSort</a>).  It uses techiques from Peter McIlroy's "Optimistic
+     * TimSort</a>).  It uses techniques from Peter McIlroy's "Optimistic
      * Sorting and Information Theoretic Complexity", in Proceedings of the
      * Fourth Annual ACM-SIAM Symposium on Discrete Algorithms, pp 467-474,
      * January 1993.
--- a/src/share/classes/java/util/Locale.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/util/Locale.java	Mon Nov 11 23:17:30 2013 -0800
@@ -1836,7 +1836,7 @@
      * country<br>
      * </blockquote>
      * depending on which fields are specified in the locale.  If the
-     * language, sacript, country, and variant fields are all empty,
+     * language, script, country, and variant fields are all empty,
      * this function returns the empty string.
      *
      * @return The name of the locale appropriate to display.
--- a/src/share/classes/java/util/MissingFormatWidthException.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/util/MissingFormatWidthException.java	Mon Nov 11 23:17:30 2013 -0800
@@ -28,7 +28,7 @@
 /**
  * Unchecked exception thrown when the format width is required.
  *
- * <p> Unless otherwise specified, passing a <tt>null</tt> argument to anyg
+ * <p> Unless otherwise specified, passing a <tt>null</tt> argument to any
  * method or constructor in this class will cause a {@link
  * NullPointerException} to be thrown.
  *
--- a/src/share/classes/java/util/PriorityQueue.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/util/PriorityQueue.java	Mon Nov 11 23:17:30 2013 -0800
@@ -65,7 +65,7 @@
  * java.util.concurrent.PriorityBlockingQueue} class.
  *
  * <p>Implementation note: this implementation provides
- * O(log(n)) time for the enqueing and dequeing methods
+ * O(log(n)) time for the enqueuing and dequeuing methods
  * ({@code offer}, {@code poll}, {@code remove()} and {@code add});
  * linear time for the {@code remove(Object)} and {@code contains(Object)}
  * methods; and constant time for the retrieval methods
--- a/src/share/classes/java/util/ResourceBundle.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/util/ResourceBundle.java	Mon Nov 11 23:17:30 2013 -0800
@@ -1254,7 +1254,7 @@
      * <p><code>getBundle</code> finds
      * <code>foo/bar/Messages_fr.properties</code> and creates a
      * <code>ResourceBundle</code> instance. Then, <code>getBundle</code>
-     * sets up its parent chain from the list of the candiate locales.  Only
+     * sets up its parent chain from the list of the candidate locales.  Only
      * <code>foo/bar/Messages.properties</code> is found in the list and
      * <code>getBundle</code> creates a <code>ResourceBundle</code> instance
      * that becomes the parent of the instance for
@@ -2240,7 +2240,7 @@
          * <li>For an input <code>Locale</code> with a variant value consisting
          * of multiple subtags separated by underscore, generate candidate
          * <code>Locale</code>s by omitting the variant subtags one by one, then
-         * insert them after every occurence of <code> Locale</code>s with the
+         * insert them after every occurrence of <code> Locale</code>s with the
          * full variant value in the original list.  For example, if the
          * the variant consists of two subtags <em>V1</em> and <em>V2</em>:
          *
@@ -2843,7 +2843,7 @@
          * and <code>variant</code> are the language, script, country, and variant
          * values of <code>locale</code>, respectively. Final component values that
          * are empty Strings are omitted along with the preceding '_'.  When the
-         * script is empty, the script value is ommitted along with the preceding '_'.
+         * script is empty, the script value is omitted along with the preceding '_'.
          * If all of the values are empty strings, then <code>baseName</code>
          * is returned.
          *
--- a/src/share/classes/java/util/concurrent/ArrayBlockingQueue.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/util/concurrent/ArrayBlockingQueue.java	Mon Nov 11 23:17:30 2013 -0800
@@ -946,7 +946,7 @@
         }
 
         /**
-         * Called whenever an interior remove (not at takeIndex) occured.
+         * Called whenever an interior remove (not at takeIndex) occurred.
          *
          * Notifies all iterators, and expunges any that are now stale.
          */
@@ -1305,7 +1305,7 @@
         }
 
         /**
-         * Called whenever an interior remove (not at takeIndex) occured.
+         * Called whenever an interior remove (not at takeIndex) occurred.
          *
          * @return true if this iterator should be unlinked from itrs
          */
--- a/src/share/classes/java/util/concurrent/ConcurrentSkipListMap.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/util/concurrent/ConcurrentSkipListMap.java	Mon Nov 11 23:17:30 2013 -0800
@@ -265,7 +265,7 @@
      * highly contended cases.
      *
      * Unlike most skip-list implementations, index insertion and
-     * deletion here require a separate traversal pass occuring after
+     * deletion here require a separate traversal pass occurring after
      * the base-level action, to add or remove index nodes.  This adds
      * to single-threaded overhead, but improves contended
      * multithreaded performance by narrowing interference windows,
--- a/src/share/classes/java/util/concurrent/ExecutorCompletionService.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/util/concurrent/ExecutorCompletionService.java	Mon Nov 11 23:17:30 2013 -0800
@@ -161,7 +161,7 @@
      * @param completionQueue the queue to use as the completion queue
      *        normally one dedicated for use by this service. This
      *        queue is treated as unbounded -- failed attempted
-     *        {@code Queue.add} operations for completed taskes cause
+     *        {@code Queue.add} operations for completed tasks cause
      *        them not to be retrievable.
      * @throws NullPointerException if executor or completionQueue are {@code null}
      */
--- a/src/share/classes/java/util/jar/Manifest.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/util/jar/Manifest.java	Mon Nov 11 23:17:30 2013 -0800
@@ -63,7 +63,7 @@
      * Constructs a new Manifest from the specified input stream.
      *
      * @param is the input stream containing manifest data
-     * @throws IOException if an I/O error has occured
+     * @throws IOException if an I/O error has occurred
      */
     public Manifest(InputStream is) throws IOException {
         read(is);
--- a/src/share/classes/java/util/regex/Pattern.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/util/regex/Pattern.java	Mon Nov 11 23:17:30 2013 -0800
@@ -2438,7 +2438,7 @@
             // single 0x0B). This breaks the range if '\v' is used as
             // the start or end value, such as [\v-...] or [...-\v], in
             // which a single definite value (0x0B) is expected. For
-            // compatiblity concern '\013'/0x0B is returned if isrange.
+            // compatibility concern '\013'/0x0B is returned if isrange.
             if (isrange)
                 return '\013';
             if (create) root = new VertWS();
--- a/src/share/classes/java/util/stream/DistinctOps.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/util/stream/DistinctOps.java	Mon Nov 11 23:17:30 2013 -0800
@@ -54,6 +54,16 @@
     static <T> ReferencePipeline<T, T> makeRef(AbstractPipeline<?, T, ?> upstream) {
         return new ReferencePipeline.StatefulOp<T, T>(upstream, StreamShape.REFERENCE,
                                                       StreamOpFlag.IS_DISTINCT | StreamOpFlag.NOT_SIZED) {
+
+            <P_IN> Node<T> reduce(PipelineHelper<T> helper, Spliterator<P_IN> spliterator) {
+                // If the stream is SORTED then it should also be ORDERED so the following will also
+                // preserve the sort order
+                TerminalOp<T, LinkedHashSet<T>> reduceOp
+                        = ReduceOps.<T, LinkedHashSet<T>>makeRef(LinkedHashSet::new, LinkedHashSet::add,
+                                                                 LinkedHashSet::addAll);
+                return Nodes.node(reduceOp.evaluateParallel(helper, spliterator));
+            }
+
             @Override
             <P_IN> Node<T> opEvaluateParallel(PipelineHelper<T> helper,
                                               Spliterator<P_IN> spliterator,
@@ -63,12 +73,7 @@
                     return helper.evaluate(spliterator, false, generator);
                 }
                 else if (StreamOpFlag.ORDERED.isKnown(helper.getStreamAndOpFlags())) {
-                    // If the stream is SORTED then it should also be ORDERED so the following will also
-                    // preserve the sort order
-                    TerminalOp<T, LinkedHashSet<T>> reduceOp
-                            = ReduceOps.<T, LinkedHashSet<T>>makeRef(LinkedHashSet::new, LinkedHashSet::add,
-                                                                     LinkedHashSet::addAll);
-                    return Nodes.node(reduceOp.evaluateParallel(helper, spliterator));
+                    return reduce(helper, spliterator);
                 }
                 else {
                     // Holder of null state since ConcurrentHashMap does not support null values
@@ -95,6 +100,22 @@
             }
 
             @Override
+            <P_IN> Spliterator<T> opEvaluateParallelLazy(PipelineHelper<T> helper, Spliterator<P_IN> spliterator) {
+                if (StreamOpFlag.DISTINCT.isKnown(helper.getStreamAndOpFlags())) {
+                    // No-op
+                    return helper.wrapSpliterator(spliterator);
+                }
+                else if (StreamOpFlag.ORDERED.isKnown(helper.getStreamAndOpFlags())) {
+                    // Not lazy, barrier required to preserve order
+                    return reduce(helper, spliterator).spliterator();
+                }
+                else {
+                    // Lazy
+                    return new StreamSpliterators.DistinctSpliterator<>(helper.wrapSpliterator(spliterator));
+                }
+            }
+
+            @Override
             Sink<T> opWrapSink(int flags, Sink<T> sink) {
                 Objects.requireNonNull(sink);
 
--- a/src/share/classes/java/util/stream/StreamSpliterators.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/java/util/stream/StreamSpliterators.java	Mon Nov 11 23:17:30 2013 -0800
@@ -27,6 +27,7 @@
 import java.util.Comparator;
 import java.util.Objects;
 import java.util.Spliterator;
+import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.atomic.AtomicLong;
 import java.util.function.BooleanSupplier;
 import java.util.function.Consumer;
@@ -1227,6 +1228,88 @@
     }
 
     /**
+     * A wrapping spliterator that only reports distinct elements of the
+     * underlying spliterator. Does not preserve size and encounter order.
+     */
+    static final class DistinctSpliterator<T> implements Spliterator<T>, Consumer<T> {
+
+        // The value to represent null in the ConcurrentHashMap
+        private static final Object NULL_VALUE = new Object();
+
+        // The underlying spliterator
+        private final Spliterator<T> s;
+
+        // ConcurrentHashMap holding distinct elements as keys
+        private final ConcurrentHashMap<T, Boolean> seen;
+
+        // Temporary element, only used with tryAdvance
+        private T tmpSlot;
+
+        DistinctSpliterator(Spliterator<T> s) {
+            this(s, new ConcurrentHashMap<>());
+        }
+
+        private DistinctSpliterator(Spliterator<T> s, ConcurrentHashMap<T, Boolean> seen) {
+            this.s = s;
+            this.seen = seen;
+        }
+
+        @Override
+        public void accept(T t) {
+            this.tmpSlot = t;
+        }
+
+        @SuppressWarnings("unchecked")
+        private T mapNull(T t) {
+            return t != null ? t : (T) NULL_VALUE;
+        }
+
+        @Override
+        public boolean tryAdvance(Consumer<? super T> action) {
+            while (s.tryAdvance(this)) {
+                if (seen.putIfAbsent(mapNull(tmpSlot), Boolean.TRUE) == null) {
+                    action.accept(tmpSlot);
+                    tmpSlot = null;
+                    return true;
+                }
+            }
+            return false;
+        }
+
+        @Override
+        public void forEachRemaining(Consumer<? super T> action) {
+            s.forEachRemaining(t -> {
+                if (seen.putIfAbsent(mapNull(t), Boolean.TRUE) == null) {
+                    action.accept(t);
+                }
+            });
+        }
+
+        @Override
+        public Spliterator<T> trySplit() {
+            Spliterator<T> split = s.trySplit();
+            return (split != null) ? new DistinctSpliterator<>(split, seen) : null;
+        }
+
+        @Override
+        public long estimateSize() {
+            return s.estimateSize();
+        }
+
+        @Override
+        public int characteristics() {
+            return (s.characteristics() & ~(Spliterator.SIZED | Spliterator.SUBSIZED |
+                                            Spliterator.SORTED | Spliterator.ORDERED))
+                   | Spliterator.DISTINCT;
+        }
+
+        @Override
+        public Comparator<? super T> getComparator() {
+            return s.getComparator();
+        }
+    }
+
+    /**
      * A Spliterator that infinitely supplies elements in no particular order.
      *
      * <p>Splitting divides the estimated size in two and stops when the
--- a/src/share/classes/javax/accessibility/AccessibleContext.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/accessibility/AccessibleContext.java	Mon Nov 11 23:17:30 2013 -0800
@@ -480,7 +480,7 @@
      * a set of predefined roles.  This enables assistive technologies to
      * provide a consistent interface to various tweaked subclasses of
      * components (e.g., use AccessibleRole.PUSH_BUTTON for all components
-     * that act like a push button) as well as distinguish between sublasses
+     * that act like a push button) as well as distinguish between subclasses
      * that behave differently (e.g., AccessibleRole.CHECK_BOX for check boxes
      * and AccessibleRole.RADIO_BUTTON for radio buttons).
      * <p>Note that the AccessibleRole class is also extensible, so
--- a/src/share/classes/javax/accessibility/AccessibleText.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/accessibility/AccessibleText.java	Mon Nov 11 23:17:30 2013 -0800
@@ -175,7 +175,7 @@
      * If there is no selection, but there is
      * a caret, the start and end offsets will be the same.
      *
-     * @return the index into teh text of the end of the selection
+     * @return the index into the text of the end of the selection
      */
     public int getSelectionEnd();
 
--- a/src/share/classes/javax/crypto/NullCipher.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/crypto/NullCipher.java	Mon Nov 11 23:17:30 2013 -0800
@@ -27,7 +27,7 @@
 
 /**
  * The NullCipher class is a class that provides an
- * "identity cipher" -- one that does not tranform the plaintext.  As
+ * "identity cipher" -- one that does not transform the plain text.  As
  * a consequence, the ciphertext is identical to the plaintext.  All
  * initialization methods do nothing, while the blocksize is set to 1
  * byte.
--- a/src/share/classes/javax/crypto/NullCipherSpi.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/crypto/NullCipherSpi.java	Mon Nov 11 23:17:30 2013 -0800
@@ -30,7 +30,7 @@
 
 /**
  * This class provides a delegate for the identity cipher - one that does not
- * tranform the plaintext.
+ * transform the plain text.
  *
  * @author  Li Gong
  * @see NullCipher
--- a/src/share/classes/javax/imageio/IIOParam.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/imageio/IIOParam.java	Mon Nov 11 23:17:30 2013 -0800
@@ -95,7 +95,7 @@
     /**
      * An <code>ImageTypeSpecifier</code> to be used to generate a
      * destination image when reading, or to set the output color type
-     * when writing.  If non has been setm the value will be
+     * when writing.  If non has been set the value will be
      * <code>null</code>.  By default, the value is <code>null</code>.
      */
     protected ImageTypeSpecifier destinationType = null;
--- a/src/share/classes/javax/imageio/ImageIO.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/imageio/ImageIO.java	Mon Nov 11 23:17:30 2013 -0800
@@ -102,7 +102,7 @@
      * into the registry for later retrieval.
      *
      * <p> The exact set of locations searched depends on the
-     * implementation of the Java runtime enviroment.
+     * implementation of the Java runtime environment.
      *
      * @see ClassLoader#getResources
      */
@@ -1466,7 +1466,7 @@
      * it is the responsibility of the caller to close the stream, if desired.
      *
      * @param im a <code>RenderedImage</code> to be written.
-     * @param formatName a <code>String</code> containg the informal
+     * @param formatName a <code>String</code> containing the informal
      * name of the format.
      * @param output an <code>ImageOutputStream</code> to be written to.
      *
@@ -1499,7 +1499,7 @@
      * discarded.
      *
      * @param im a <code>RenderedImage</code> to be written.
-     * @param formatName a <code>String</code> containg the informal
+     * @param formatName a <code>String</code> containing the informal
      * name of the format.
      * @param output a <code>File</code> to be written to.
      *
@@ -1551,7 +1551,7 @@
      * <code>getCacheDirectory</code> will be used to control caching.
      *
      * @param im a <code>RenderedImage</code> to be written.
-     * @param formatName a <code>String</code> containg the informal
+     * @param formatName a <code>String</code> containing the informal
      * name of the format.
      * @param output an <code>OutputStream</code> to be written to.
      *
--- a/src/share/classes/javax/imageio/ImageReader.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/imageio/ImageReader.java	Mon Nov 11 23:17:30 2013 -0800
@@ -632,7 +632,7 @@
      * Returns the aspect ratio of the given image (that is, its width
      * divided by its height) as a <code>float</code>.  For images
      * that are inherently resizable, this method provides a way to
-     * determine the appropriate width given a deired height, or vice
+     * determine the appropriate width given a desired height, or vice
      * versa.  For non-resizable images, the true width and height
      * are used.
      *
@@ -750,7 +750,7 @@
      * not associated with any particular image).  If no such data
      * exists, <code>null</code> is returned.
      *
-     * <p> The resuting metadata object is only responsible for
+     * <p> The resulting metadata object is only responsible for
      * returning documents in the format named by
      * <code>formatName</code>.  Within any documents that are
      * returned, only nodes whose names are members of
@@ -855,7 +855,7 @@
      * if the reader does not support reading metadata or none
      * is available.
      *
-     * <p> The resuting metadata object is only responsible for
+     * <p> The resulting metadata object is only responsible for
      * returning documents in the format named by
      * <code>formatName</code>.  Within any documents that are
      * returned, only nodes whose names are members of
@@ -1435,7 +1435,7 @@
      *
      * <p> This method is merely a convenience equivalent to calling
      * <code>read(int, ImageReadParam)</code> with a read param
-     * specifiying a source region having offsets of
+     * specifying a source region having offsets of
      * <code>tileX*getTileWidth(imageIndex)</code>,
      * <code>tileY*getTileHeight(imageIndex)</code> and width and
      * height of <code>getTileWidth(imageIndex)</code>,
@@ -1948,7 +1948,7 @@
      *
      * <p> The final results of decoding will be the same whether or
      * not intermediate updates are performed.  Thus if only the final
-     * image is desired it may be perferable not to register any
+     * image is desired it may be preferable not to register any
      * <code>IIOReadUpdateListener</code>s.  In general, progressive
      * updating is most effective when fetching images over a network
      * connection that is very slow compared to local CPU processing;
--- a/src/share/classes/javax/imageio/ImageWriteParam.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/imageio/ImageWriteParam.java	Mon Nov 11 23:17:30 2013 -0800
@@ -253,7 +253,7 @@
      * <code>false</code>.  Subclasses must set the value manually.
      *
      * <p> Subclasses that do not support writing tiles, or that
-     * supprt writing but not offsetting tiles must ensure that this
+     * support writing but not offsetting tiles must ensure that this
      * value is set to <code>false</code>.
      */
     protected boolean canOffsetTiles = false;
@@ -803,7 +803,7 @@
      *
      * <ul>
      *   <li><code>MODE_DISABLED</code> - No progression.  Use this to
-     *   turn off progession.
+     *   turn off progression.
      *
      *   <li><code>MODE_COPY_FROM_METADATA</code> - The output image
      *   will use whatever progression parameters are found in the
--- a/src/share/classes/javax/imageio/ImageWriter.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/imageio/ImageWriter.java	Mon Nov 11 23:17:30 2013 -0800
@@ -423,7 +423,7 @@
     // Thumbnails
 
     /**
-     * Returns the number of thumbnails suported by the format being
+     * Returns the number of thumbnails supported by the format being
      * written, given the image type and any additional write
      * parameters and metadata objects that will be used during
      * encoding.  A return value of <code>-1</code> indicates that
@@ -923,7 +923,7 @@
      * <p> The default implementation throws an
      * <code>IllegalStateException</code> if the output is
      * <code>null</code>, and otherwise returns <code>false</code>
-     * withour checking the value of <code>imageIndex</code>.
+     * without checking the value of <code>imageIndex</code>.
      *
      * @param imageIndex the index at which the image is to be
      * inserted.
--- a/src/share/classes/javax/imageio/event/IIOReadProgressListener.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/imageio/event/IIOReadProgressListener.java	Mon Nov 11 23:17:30 2013 -0800
@@ -62,7 +62,7 @@
     void sequenceStarted(ImageReader source, int minIndex);
 
     /**
-     * Reports that a sequence of read operationshas completed.
+     * Reports that a sequence of read operations has completed.
      * <code>ImageReader</code> implementations are required to call
      * this method exactly once from their
      * <code>readAll(Iterator)</code> method.
--- a/src/share/classes/javax/imageio/event/IIOReadUpdateListener.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/imageio/event/IIOReadUpdateListener.java	Mon Nov 11 23:17:30 2013 -0800
@@ -58,7 +58,7 @@
      * @param source the <code>ImageReader</code> object calling this
      * method.
      * @param theImage the <code>BufferedImage</code> being updated.
-     * @param pass the numer of the pass that is about to begin,
+     * @param pass the number of the pass that is about to begin,
      * starting with 0.
      * @param minPass the index of the first pass that will be decoded.
      * @param maxPass the index of the last pass that will be decoded.
@@ -175,7 +175,7 @@
      * method.
      * @param theThumbnail the <code>BufferedImage</code> thumbnail
      * being updated.
-     * @param pass the numer of the pass that is about to begin,
+     * @param pass the number of the pass that is about to begin,
      * starting with 0.
      * @param minPass the index of the first pass that will be decoded.
      * @param maxPass the index of the last pass that will be decoded.
--- a/src/share/classes/javax/imageio/event/IIOReadWarningListener.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/imageio/event/IIOReadWarningListener.java	Mon Nov 11 23:17:30 2013 -0800
@@ -46,7 +46,7 @@
 public interface IIOReadWarningListener extends EventListener {
 
     /**
-     * Reports the occurence of a non-fatal error in decoding.  Decoding
+     * Reports the occurrence of a non-fatal error in decoding.  Decoding
      * will continue following the call to this method.  The application
      * may choose to display a dialog, print the warning to the console,
      * ignore the warning, or take any other action it chooses.
--- a/src/share/classes/javax/imageio/event/IIOWriteWarningListener.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/imageio/event/IIOWriteWarningListener.java	Mon Nov 11 23:17:30 2013 -0800
@@ -46,7 +46,7 @@
 public interface IIOWriteWarningListener extends EventListener {
 
     /**
-     * Reports the occurence of a non-fatal error in encoding.  Encoding
+     * Reports the occurrence of a non-fatal error in encoding.  Encoding
      * will continue following the call to this method.  The application
      * may choose to display a dialog, print the warning to the console,
      * ignore the warning, or take any other action it chooses.
--- a/src/share/classes/javax/imageio/metadata/IIOMetadata.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/imageio/metadata/IIOMetadata.java	Mon Nov 11 23:17:30 2013 -0800
@@ -45,7 +45,7 @@
  * is designed to encode its metadata losslessly.  This format will
  * typically be designed specifically to work with a specific file
  * format, so that images may be loaded and saved in the same format
- * with no loss of metadata, but may be less useful for transfering
+ * with no loss of metadata, but may be less useful for transferring
  * metadata between an <code>ImageReader</code> and an
  * <code>ImageWriter</code> for different image formats.  To convert
  * between two native formats as losslessly as the image file formats
@@ -130,9 +130,9 @@
 
     /**
      * Constructs an empty <code>IIOMetadata</code> object.  The
-     * subclass is responsible for suppying values for all protected
+     * subclass is responsible for supplying values for all protected
      * instance variables that will allow any non-overridden default
-     * implemtations of methods to satisfy their contracts.  For example,
+     * implementations of methods to satisfy their contracts.  For example,
      * <code>extraMetadataFormatNames</code> should not have length 0.
      */
     protected IIOMetadata() {}
@@ -475,7 +475,7 @@
      * Alters the internal state of this <code>IIOMetadata</code>
      * object from a tree of XML DOM <code>Node</code>s whose syntax
      * is defined by the given metadata format.  The previous state is
-     * altered only as necessary to accomodate the nodes that are
+     * altered only as necessary to accommodate the nodes that are
      * present in the given tree.  If the tree structure or contents
      * are invalid, an <code>IIOInvalidTreeException</code> will be
      * thrown.
--- a/src/share/classes/javax/imageio/metadata/IIOMetadataFormat.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/imageio/metadata/IIOMetadataFormat.java	Mon Nov 11 23:17:30 2013 -0800
@@ -40,7 +40,7 @@
  *
  * <p> N.B: classes that implement this interface should contain a
  * method declared as <code>public static getInstance()</code> which
- * returns an instance of the class.  Commonly, an implentation will
+ * returns an instance of the class.  Commonly, an implementation will
  * construct only a single instance and cache it for future
  * invocations of <code>getInstance</code>.
  *
@@ -307,7 +307,7 @@
      * with child policy <code>CHILD_POLICY_REPEAT</code>.  For
      * example, an element representing color primary information
      * might be required to have at least 3 children, one for each
-     * primay.
+     * primary.
      *
      * @param elementName the name of the element being queried.
      *
@@ -343,7 +343,7 @@
 
     /**
      * Returns a <code>String</code> containing a description of the
-     * named element, or <code>null</code>.  The desciption will be
+     * named element, or <code>null</code>.  The description will be
      * localized for the supplied <code>Locale</code> if possible.
      *
      * <p> If <code>locale</code> is <code>null</code>, the current
@@ -434,8 +434,8 @@
     /**
      * Returns one of the constants starting with
      * <code>DATATYPE_</code>, indicating the format and
-     * interpretation of the value of the given attribute within th
-     * enamed element.  If <code>getAttributeValueType</code> returns
+     * interpretation of the value of the given attribute within the
+     * named element.  If <code>getAttributeValueType</code> returns
      * <code>VALUE_LIST</code>, then the legal value is a
      * whitespace-spearated list of values of the returned datatype.
      *
@@ -460,7 +460,7 @@
      * @param elementName the name of the element being queried.
      * @param attrName the name of the attribute being queried.
      *
-     * @return <code>true</code> if the attribut must be present.
+     * @return <code>true</code> if the attribute must be present.
      *
      * @exception IllegalArgumentException if <code>elementName</code>
      * is <code>null</code> or is not a legal element name for this
@@ -473,7 +473,7 @@
 
     /**
      * Returns the default value of the named attribute, if it is not
-     * explictly present within the named element, as a
+     * explicitly present within the named element, as a
      * <code>String</code>, or <code>null</code> if no default value
      * is available.
      *
@@ -624,7 +624,7 @@
 
     /**
      * Returns a <code>String</code> containing a description of the
-     * named attribute, or <code>null</code>.  The desciption will be
+     * named attribute, or <code>null</code>.  The description will be
      * localized for the supplied <code>Locale</code> if possible.
      *
      * <p> If <code>locale</code> is <code>null</code>, the current
@@ -725,7 +725,7 @@
      * <code>VALUE_ENUMERATION</code>.
      *
      * <p> The <code>Object</code> associated with a node that accepts
-     * emuerated values must be equal to one of the values returned by
+     * enumerated values must be equal to one of the values returned by
      * this method, as defined by the <code>==</code> operator (as
      * opposed to the <code>Object.equals</code> method).
      *
--- a/src/share/classes/javax/imageio/metadata/IIOMetadataFormatImpl.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/imageio/metadata/IIOMetadataFormatImpl.java	Mon Nov 11 23:17:30 2013 -0800
@@ -234,7 +234,7 @@
      * name will be equal to <code>this.getClass().getName() +
      * "Resources"</code>.
      *
-     * @param resourceBaseName a <code>String</code> containg the new
+     * @param resourceBaseName a <code>String</code> containing the new
      * base name.
      *
      * @exception IllegalArgumentException if
@@ -381,7 +381,7 @@
      *
      * @param parentName the name of the element that will be the
      * new parent of the element.
-     * @param elementName the name of the element to be addded as a
+     * @param elementName the name of the element to be added as a
      * child.
      *
      * @exception IllegalArgumentException if <code>elementName</code>
@@ -991,7 +991,7 @@
 
     /**
      * Returns a <code>String</code> containing a description of the
-     * named element, or <code>null</code>.  The desciption will be
+     * named element, or <code>null</code>.  The description will be
      * localized for the supplied <code>Locale</code> if possible.
      *
      * <p> The default implementation will first locate a
@@ -1129,7 +1129,7 @@
 
     /**
      * Returns a <code>String</code> containing a description of the
-     * named attribute, or <code>null</code>.  The desciption will be
+     * named attribute, or <code>null</code>.  The description will be
      * localized for the supplied <code>Locale</code> if possible.
      *
      * <p> The default implementation will first locate a
--- a/src/share/classes/javax/imageio/metadata/doc-files/standard_metadata.html	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/imageio/metadata/doc-files/standard_metadata.html	Mon Nov 11 23:17:30 2013 -0800
@@ -228,7 +228,7 @@
           &lt;!-- Data type: Float --&gt;
 
       &lt;!ELEMENT "HorizontalPixelOffset" EMPTY&gt;
-        &lt;!-- The horizonal position, in pixels, where the image should be 
+        &lt;!-- The horizontal position, in pixels, where the image should be 
              rendered onto a raster display --&gt; 
         &lt;!ATTLIST "HorizontalPixelOffset" "value" #CDATA #REQUIRED&gt;
           &lt;!-- Data type: Integer --&gt;
--- a/src/share/classes/javax/imageio/spi/ImageReaderSpi.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/imageio/spi/ImageReaderSpi.java	Mon Nov 11 23:17:30 2013 -0800
@@ -341,7 +341,7 @@
      * @exception IOException if the attempt to instantiate
      * the reader fails.
      * @exception IllegalArgumentException if the
-     * <code>ImageReader</code>'s contructor throws an
+     * <code>ImageReader</code>'s constructor throws an
      * <code>IllegalArgumentException</code> to indicate that the
      * extension object is unsuitable.
      */
--- a/src/share/classes/javax/imageio/spi/ImageReaderWriterSpi.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/imageio/spi/ImageReaderWriterSpi.java	Mon Nov 11 23:17:30 2013 -0800
@@ -538,7 +538,7 @@
      * Returns an <code>IIOMetadataFormat</code> object describing the
      * given image metadata format, or <code>null</code> if no
      * description is available.  The supplied name must be the native
-     * iamge metadata format name, the standard metadata format name,
+     * image metadata format name, the standard metadata format name,
      * or one of those returned by
      * <code>getExtraImageMetadataFormatNames</code>.
      *
--- a/src/share/classes/javax/imageio/stream/ImageInputStream.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/imageio/stream/ImageInputStream.java	Mon Nov 11 23:17:30 2013 -0800
@@ -550,7 +550,7 @@
      * the read occurs.
      *
      * @param s an array of shorts to be written to.
-     * @param off the starting position withinb to write to.
+     * @param off the starting position within <code>s</code> to write to.
      * @param len the maximum number of <code>short</code>s to read.
      *
      * @exception IndexOutOfBoundsException if <code>off</code> is
@@ -575,7 +575,7 @@
      * the read occurs.
      *
      * @param c an array of chars to be written to.
-     * @param off the starting position withinb to write to.
+     * @param off the starting position within <code>c</code> to write to.
      * @param len the maximum number of <code>char</code>s to read.
      *
      * @exception IndexOutOfBoundsException if <code>off</code> is
@@ -600,7 +600,7 @@
      * the read occurs.
      *
      * @param i an array of ints to be written to.
-     * @param off the starting position withinb to write to.
+     * @param off the starting position within <code>i</code> to write to.
      * @param len the maximum number of <code>int</code>s to read.
      *
      * @exception IndexOutOfBoundsException if <code>off</code> is
@@ -625,7 +625,7 @@
      * the read occurs.
      *
      * @param l an array of longs to be written to.
-     * @param off the starting position withinb to write to.
+     * @param off the starting position within <code>l</code> to write to.
      * @param len the maximum number of <code>long</code>s to read.
      *
      * @exception IndexOutOfBoundsException if <code>off</code> is
@@ -650,7 +650,7 @@
      * the read occurs.
      *
      * @param f an array of floats to be written to.
-     * @param off the starting position withinb to write to.
+     * @param off the starting position within <code>f</code> to write to.
      * @param len the maximum number of <code>float</code>s to read.
      *
      * @exception IndexOutOfBoundsException if <code>off</code> is
@@ -675,7 +675,7 @@
      * the read occurs.
      *
      * @param d an array of doubles to be written to.
-     * @param off the starting position withinb to write to.
+     * @param off the starting position within <code>d</code> to write to.
      * @param len the maximum number of <code>double</code>s to read.
      *
      * @exception IndexOutOfBoundsException if <code>off</code> is
@@ -904,7 +904,7 @@
 
     /**
      * Discards the initial portion of the stream prior to the
-     * indicated postion.  Attempting to seek to an offset within the
+     * indicated position.  Attempting to seek to an offset within the
      * flushed portion of the stream will result in an
      * <code>IndexOutOfBoundsException</code>.
      *
--- a/src/share/classes/javax/management/relation/RelationService.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/management/relation/RelationService.java	Mon Nov 11 23:17:30 2013 -0800
@@ -132,7 +132,7 @@
     private MBeanServer myMBeanServer = null;
 
     // Filter registered in the MBean Server with the Relation Service to be
-    // informed of referenced MBean unregistrations
+    // informed of referenced MBean deregistrations
     private MBeanServerNotificationFilter myUnregNtfFilter = null;
 
     // List of unregistration notifications received (storage used if purge
@@ -2108,7 +2108,7 @@
      * <P>Will check the role according to its corresponding role definition
      * provided in relation's relation type
      * <P>The Relation Service will keep track of the change to keep the
-     * consistency of relations by handling referenced MBean unregistrations.
+     * consistency of relations by handling referenced MBean deregistrations.
      *
      * @param relationId  relation id
      * @param role  role to be set (name and new value)
@@ -2220,7 +2220,7 @@
      * <P>Will check the role according to its corresponding role definition
      * provided in relation's relation type
      * <P>The Relation Service keeps track of the changes to keep the
-     * consistency of relations by handling referenced MBean unregistrations.
+     * consistency of relations by handling referenced MBean deregistrations.
      *
      * @param relationId  relation id
      * @param roleList  list of roles to be set
@@ -2831,7 +2831,7 @@
     }
 
     // Updates the listener registered to the MBean Server to be informed of
-    // referenced MBean unregistrations
+    // referenced MBean deregistrations
     //
     // -param newRefList  ArrayList of ObjectNames for new references done
     //  to MBeans (can be null)
--- a/src/share/classes/javax/management/relation/RelationServiceMBean.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/management/relation/RelationServiceMBean.java	Mon Nov 11 23:17:30 2013 -0800
@@ -699,7 +699,7 @@
      * <P>Will check the role according to its corresponding role definition
      * provided in relation's relation type
      * <P>The Relation Service will keep track of the change to keep the
-     * consistency of relations by handling referenced MBean unregistrations.
+     * consistency of relations by handling referenced MBean deregistrations.
      *
      * @param relationId  relation id
      * @param role  role to be set (name and new value)
@@ -742,7 +742,7 @@
      * <P>Will check the role according to its corresponding role definition
      * provided in relation's relation type
      * <P>The Relation Service keeps track of the changes to keep the
-     * consistency of relations by handling referenced MBean unregistrations.
+     * consistency of relations by handling referenced MBean deregistrations.
      *
      * @param relationId  relation id
      * @param roleList  list of roles to be set
--- a/src/share/classes/javax/management/remote/rmi/package.html	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/management/remote/rmi/package.html	Mon Nov 11 23:17:30 2013 -0800
@@ -95,7 +95,7 @@
       <code>rmi</code> or <code>iiop</code> in the
       <code><em>protocol</em></code> part of the
       <code>serviceURL</code> when creating the connector server.  You
-      can also create specialised connector servers by instantiating
+      can also create specialized connector servers by instantiating
       an appropriate subclass of {@link
       javax.management.remote.rmi.RMIServerImpl RMIServerImpl} and
       supplying it to the <code>RMIConnectorServer</code>
--- a/src/share/classes/javax/naming/Binding.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/naming/Binding.java	Mon Nov 11 23:17:30 2013 -0800
@@ -48,7 +48,7 @@
 public class Binding extends NameClassPair {
     /**
      * Contains this binding's object.
-     * It is initialized by the constuctor and can be updated using
+     * It is initialized by the constructor and can be updated using
      * <tt>setObject</tt>.
      * @serial
      * @see #getObject
--- a/src/share/classes/javax/naming/InsufficientResourcesException.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/naming/InsufficientResourcesException.java	Mon Nov 11 23:17:30 2013 -0800
@@ -30,7 +30,7 @@
   * the requested operation. This might due to a lack of resources on
   * the server or on the client. There are no restrictions to resource types,
   * as different services might make use of different resources. Such
-  * restrictions might be due to physical limits and/or adminstrative quotas.
+  * restrictions might be due to physical limits and/or administrative quotas.
   * Examples of limited resources are internal buffers, memory, network bandwidth.
   *<p>
   * InsufficientResourcesException is different from LimitExceededException in that
--- a/src/share/classes/javax/naming/ldap/LdapName.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/naming/ldap/LdapName.java	Mon Nov 11 23:17:30 2013 -0800
@@ -432,7 +432,7 @@
      * Adds the components of a name -- in order -- at a specified position
      * within this name. Components of this LDAP name at or after the
      * index (if any) of the first new component are shifted up
-     * (away from index 0) to accomodate the new components.
+     * (away from index 0) to accommodate the new components.
      *
      * @param suffix    The non-null components to add.
      * @param posn      The index at which to add the new component.
@@ -467,7 +467,7 @@
      * Adds the RDNs of a name -- in order -- at a specified position
      * within this name. RDNs of this LDAP name at or after the
      * index (if any) of the first new RDN are shifted up (away from index 0) to
-     * accomodate the new RDNs.
+     * accommodate the new RDNs.
      *
      * @param suffixRdns        The non-null suffix <tt>Rdn</tt>s to add.
      * @param posn              The index at which to add the suffix RDNs.
--- a/src/share/classes/javax/naming/ldap/Rdn.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/naming/ldap/Rdn.java	Mon Nov 11 23:17:30 2013 -0800
@@ -116,7 +116,7 @@
      * Constructs an Rdn from the given attribute set. See
      * {@link javax.naming.directory.Attributes Attributes}.
      * <p>
-     * The string attribute values are not interpretted as
+     * The string attribute values are not interpreted as
      * <a href="http://www.ietf.org/rfc/rfc2253.txt">RFC 2253</a>
      * formatted RDN strings. That is, the values are used
      * literally (not parsed) and assumed to be unescaped.
@@ -179,7 +179,7 @@
     /**
      * Constructs an Rdn from the given attribute type and
      * value.
-     * The string attribute values are not interpretted as
+     * The string attribute values are not interpreted as
      * <a href="http://www.ietf.org/rfc/rfc2253.txt">RFC 2253</a>
      * formatted RDN strings. That is, the values are used
      * literally (not parsed) and assumed to be unescaped.
@@ -215,7 +215,7 @@
 
     /*
      * Adds the given attribute type and value to this Rdn.
-     * The string attribute values are not interpretted as
+     * The string attribute values are not interpreted as
      * <a href="http://www.ietf.org/rfc/rfc2253.txt">RFC 2253</a>
      * formatted RDN strings. That is the values are used
      * literally (not parsed) and assumed to be unescaped.
@@ -343,7 +343,7 @@
      * components in multi-valued Rdns (such as "ou=Sales+cn=Bob") is not
      * significant.
      * <p>
-     * Type and value equalilty matching is done as below:
+     * Type and value equality matching is done as below:
      * <ul>
      * <li> The types are compared for equality with their case ignored.
      * <li> String values with different but equivalent usage of quoting,
@@ -605,7 +605,7 @@
                 --end;
             }
 
-            // Add back the trailing whitespace with a preceeding '\'
+            // Add back the trailing whitespace with a preceding '\'
             // (escaped or unescaped) that was taken off in the above
             // loop. Whether or not to retain this whitespace is decided below.
             if (end != chars.length &&
@@ -662,7 +662,7 @@
             }
 
             // Get rid of the unescaped trailing whitespace with the
-            // preceeding '\' character that was previously added back.
+            // preceding '\' character that was previously added back.
             int len = builder.length();
             if (isWhitespace(builder.charAt(len - 1)) && esc != (end - 1)) {
                 builder.setLength(len - 1);
--- a/src/share/classes/javax/net/ssl/SSLPeerUnverifiedException.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/net/ssl/SSLPeerUnverifiedException.java	Mon Nov 11 23:17:30 2013 -0800
@@ -46,7 +46,7 @@
 
     /**
      * Constructs an exception reporting that the SSL peer's
-     * identity has not been verifiied.
+     * identity has not been verified.
      *
      * @param reason describes the problem.
      */
--- a/src/share/classes/javax/net/ssl/SSLSocket.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/net/ssl/SSLSocket.java	Mon Nov 11 23:17:30 2013 -0800
@@ -78,7 +78,7 @@
  * </UL>
  *
  * <P>If handshaking fails for any reason, the <code>SSLSocket</code>
- * is closed, and no futher communications can be done.
+ * is closed, and no further communications can be done.
  *
  * <P>There are two groups of cipher suites which you will need to know
  * about when managing cipher suites: <UL>
--- a/src/share/classes/javax/print/CancelablePrintJob.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/print/CancelablePrintJob.java	Mon Nov 11 23:17:30 2013 -0800
@@ -55,7 +55,7 @@
      * Stops further processing of a print job.
      * <p>
      * If a service supports this method it cannot be concluded that
-     * job cancellation will always suceeed. A job may not be able to be
+     * job cancellation will always succeed. A job may not be able to be
      * cancelled once it has reached and passed some point in its processing.
      * A successful cancellation means only that the entire job was not
      * printed, some portion may already have printed when cancel returns.
--- a/src/share/classes/javax/print/DocFlavor.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/print/DocFlavor.java	Mon Nov 11 23:17:30 2013 -0800
@@ -95,7 +95,7 @@
  * <UL>
  * <LI>
  * Character array (<CODE>char[]</CODE>) -- The print data consists of the
- * Unicde characters in the array.
+ * Unicode characters in the array.
  * <P>
  * <LI>
  * <code>String</code>  --
@@ -163,7 +163,7 @@
  * Every instance of the Java virtual machine has a default character encoding
  * determined during virtual-machine startup and typically depends upon the
  * locale and charset being used by the underlying operating system.
- * In a distributed environment there is no gurantee that two VM's share
+ * In a distributed environment there is no guarantee that two VM share
  * the same default encoding. Thus clients which want to stream platform
  * encoded text data from the host platform to a Java Print Service instance
  * must explicitly declare the charset and not rely on defaults.
--- a/src/share/classes/javax/print/DocPrintJob.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/print/DocPrintJob.java	Mon Nov 11 23:17:30 2013 -0800
@@ -102,7 +102,7 @@
      * specific job attribute should verify it is in that set, but
      * updates about an attribute will be made only if it changes and this
      * is detected by the job. Also updates may be subject to batching
-     * by the job. To minimise overhead in print job processing it is
+     * by the job. To minimize overhead in print job processing it is
      * recommended to listen on only that subset of attributes which
      * are likely to change.
      * If the specified set is empty no attribute updates will be reported
--- a/src/share/classes/javax/print/MultiDoc.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/print/MultiDoc.java	Mon Nov 11 23:17:30 2013 -0800
@@ -117,7 +117,7 @@
      * @return  Current doc object.
      *
      * @exception  IOException
-     *     Thrown if a error ocurred reading the document.
+     *     Thrown if a error occurred reading the document.
      */
     public Doc getDoc() throws IOException;
 
--- a/src/share/classes/javax/print/PrintService.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/print/PrintService.java	Mon Nov 11 23:17:30 2013 -0800
@@ -118,7 +118,7 @@
     /**
      * Gets the value of the single specified service attribute.
      * This may be useful to clients which only need the value of one
-     * attribute and want to minimise overhead.
+     * attribute and want to minimize overhead.
      * @param category the category of a PrintServiceAttribute supported
      * by this service - may not be null.
      * @return the value of the supported attribute or null if the
--- a/src/share/classes/javax/print/attribute/package.html	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/print/attribute/package.html	Mon Nov 11 23:17:30 2013 -0800
@@ -1,3 +1,4 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN">
 <html>
 <head>
 <title>javax.print.attribute package</title>
@@ -30,7 +31,6 @@
 Provides classes and interfaces
 that describe the types of Java<sup><font size="-2">TM</font></sup> Print
 Service attributes and how they can be collected into attribute sets.
-<P>
 <H3>What is an Attribute?</H3>
 When setting up a print job,
 a client specifies two things:
@@ -71,7 +71,6 @@
 which it achieves the results specified by the processing instructions.
 Representing processing instructions as descriptive items
 provides more flexibility for implementing print jobs.
-<P>
 <h4>Attribute Categories and Values</h4>
 Each printer has a set of capabilities, such as the ability to print on
 different paper sizes or the ability to print more than one copy.  Each of 
@@ -222,7 +221,6 @@
 All of these classes extend <A HREF="HashAttributeSet.html">HashAttributeSet</A>
 and enforce the restriction that the attribute set is only allowed to contain
 the corresponding kind of attribute.
-<P>
 <H3>Attribute Class Design</H3>
 An attribute value is a small, atomic data item,
 such as an integer or an enumerated value.  The Java Print Service API 
@@ -299,8 +297,8 @@
 <code>Attribute</code>.  Most attribute classes also extend the appropriate 
 abstract syntax class to get the implementation.  Consider the 
 <code>Sides</code> attribute class:
+<blockquote>
 <pre>
-<blockquote>
 public class Sides
   extends EnumSyntax
   implements DocAttribute, PrintRequestAttribute, PrintJobAttribute
@@ -311,8 +309,8 @@
     }
   ...
   }
+</pre>
 </blockquote>  
-</pre>
 <p>
 Since every attribute class implements <code>Attribute</code>, every attribute
 class must provide an implementation for the 
@@ -363,9 +361,8 @@
 client usually specifies.  This example demonstrates creating an attribute
 set of print-request attributes and locating a printer that can
 print the document according to the specified attributes:
-<p>
+<blockquote>
 <pre>
-<blockquote>
 
 FileInputStream psStream;
 try {
@@ -392,8 +389,8 @@
 	job.print(myDoc, aset);
    } catch (PrintException pe) {}
 }
+</pre>
 </blockquote>
-</pre>
 <P>
 Please note: In the javax.print APIs, a null reference parameter to methods 
 is incorrect unless explicitly documented on the method as having a meaningful
--- a/src/share/classes/javax/print/attribute/standard/MediaTray.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/print/attribute/standard/MediaTray.java	Mon Nov 11 23:17:30 2013 -0800
@@ -55,7 +55,7 @@
     public static final MediaTray TOP = new MediaTray(0);
 
     /**
-     * The middle input tray in the printe.
+     * The middle input tray in the printer.
      */
     public static final MediaTray MIDDLE = new MediaTray(1);
 
--- a/src/share/classes/javax/print/attribute/standard/PresentationDirection.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/print/attribute/standard/PresentationDirection.java	Mon Nov 11 23:17:30 2013 -0800
@@ -56,56 +56,56 @@
 
     /**
      * Pages are laid out in columns starting at the top left,
-     * proceeeding towards the bottom {@literal &} right.
+     * proceeding towards the bottom {@literal &} right.
      */
     public static final PresentationDirection TOBOTTOM_TORIGHT =
         new PresentationDirection(0);
 
     /**
      * Pages are laid out in columns starting at the top right,
-     * proceeeding towards the bottom {@literal &} left.
+     * proceeding towards the bottom {@literal &} left.
      */
     public static final PresentationDirection TOBOTTOM_TOLEFT =
         new PresentationDirection(1);
 
     /**
      * Pages are laid out in columns starting at the bottom left,
-     * proceeeding towards the top {@literal &} right.
+     * proceeding towards the top {@literal &} right.
      */
     public static final PresentationDirection TOTOP_TORIGHT =
         new PresentationDirection(2);
 
     /**
      * Pages are laid out in columns starting at the bottom right,
-     * proceeeding towards the top {@literal &} left.
+     * proceeding towards the top {@literal &} left.
      */
     public static final PresentationDirection TOTOP_TOLEFT =
         new PresentationDirection(3);
 
     /**
      * Pages are laid out in rows starting at the top left,
-     * proceeeding towards the right {@literal &} bottom.
+     * proceeding towards the right {@literal &} bottom.
      */
     public static final PresentationDirection TORIGHT_TOBOTTOM =
         new PresentationDirection(4);
 
     /**
      * Pages are laid out in rows starting at the bottom left,
-     * proceeeding towards the right {@literal &} top.
+     * proceeding towards the right {@literal &} top.
      */
     public static final PresentationDirection TORIGHT_TOTOP =
         new PresentationDirection(5);
 
     /**
      * Pages are laid out in rows starting at the top right,
-     * proceeeding towards the left {@literal &} bottom.
+     * proceeding towards the left {@literal &} bottom.
      */
     public static final PresentationDirection TOLEFT_TOBOTTOM =
         new PresentationDirection(6);
 
     /**
      * Pages are laid out in rows starting at the bottom right,
-     * proceeeding towards the left {@literal &} top.
+     * proceeding towards the left {@literal &} top.
      */
     public static final PresentationDirection TOLEFT_TOTOP =
         new PresentationDirection(7);
--- a/src/share/classes/javax/print/attribute/standard/PrinterIsAcceptingJobs.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/print/attribute/standard/PrinterIsAcceptingJobs.java	Mon Nov 11 23:17:30 2013 -0800
@@ -39,7 +39,7 @@
  * will accept jobs even when the {@link PrinterState PrinterState} is STOPPED.
  * <P>
  * <B>IPP Compatibility:</B> The IPP boolean value is "true" for ACCEPTING_JOBS
- * and "false" for NOT_ACCEPTING_JOBS. TThe category name returned by
+ * and "false" for NOT_ACCEPTING_JOBS. The category name returned by
  * <CODE>getName()</CODE> is the IPP attribute name.  The enumeration's
  * integer value is the IPP enum value.  The <code>toString()</code> method
  * returns the IPP string representation of the attribute value.
@@ -59,7 +59,7 @@
         NOT_ACCEPTING_JOBS = new PrinterIsAcceptingJobs(0);
 
     /**
-     * The printer is currently acccepting jobs.
+     * The printer is currently accepting jobs.
      */
     public static final PrinterIsAcceptingJobs
         ACCEPTING_JOBS = new PrinterIsAcceptingJobs(1);
--- a/src/share/classes/javax/print/attribute/standard/PrinterStateReason.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/print/attribute/standard/PrinterStateReason.java	Mon Nov 11 23:17:30 2013 -0800
@@ -50,7 +50,7 @@
  * object to the Print Service's
  * {@link PrinterStateReasons PrinterStateReasons} attribute when the
  * corresponding condition becomes true of the printer, and the printer
- * removesthe PrinterStateReason object again when the corresponding
+ * removes the PrinterStateReason object again when the corresponding
  * condition becomes false, regardless of whether the Print Service's overall
  * {@link PrinterState PrinterState} also changed.
  * <P>
--- a/src/share/classes/javax/print/attribute/standard/package.html	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/print/attribute/standard/package.html	Mon Nov 11 23:17:30 2013 -0800
@@ -1,3 +1,4 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html>
 <head>
 <title>javax.print.attribute.standard package</title>
@@ -199,7 +200,6 @@
 so there is no restricted <A HREF="../AttributeSet.html">
 AttributeSet</A>
 subinterface for them.
-<P>
 
 <H4>Attribute Table</H4>
 The table below lists all the printing attributes.
@@ -213,7 +213,6 @@
 lists the supported-values attribute class, if any,
 with which a print service 
 indicates the supported values for that attribute category.
-<P>
 <TABLE BORDER=1 CELLPADDING=2 CELLSPACING=1 SUMMARY="Lists all printing attributes as described in above text">
 <TR BGCOLOR="#E5E5E5">
 <TH VALIGN="bottom">Attribute Class</TH>
--- a/src/share/classes/javax/print/event/package.html	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/print/event/package.html	Mon Nov 11 23:17:30 2013 -0800
@@ -1,3 +1,4 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN">
 <html>
 <head>
 <title>javax.print.event package</title>
@@ -30,7 +31,7 @@
 Package javax.print.event contains event classes  and listener interfaces.
 <p>
 They may be used to monitor both print services (such as printers going
-on-line & off-line), and the progress of a specific print job.
+on-line &amp; off-line), and the progress of a specific print job.
 <P>
 Please note: In the javax.print APIs, a null reference parameter to methods 
 is incorrect unless explicitly documented on the method as having a meaningful
--- a/src/share/classes/javax/print/package.html	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/print/package.html	Mon Nov 11 23:17:30 2013 -0800
@@ -1,3 +1,4 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN">
 <html>
 <head>
 <title>javax.print package</title>
@@ -52,7 +53,7 @@
 implementations of <code>PrintServiceLookup</code>.  The print-service provider 
 can dynamically install these <code>PrintServiceLookup</code> implementations 
 using the 
-<a href="../../../technotes/guides/jar/jar.html#Service Provider">
+<a href="../../../technotes/guides/jar/jar.html#Service%20Provider">
 SPI JAR file specification</a>.
 
 <h3>Attribute Definitions</h3>
@@ -69,7 +70,7 @@
 <a href="http://www.ietf.org/rfc/rfc2911.txt">
 RFC 2911 Internet Printing Protocol, 1.1: Model and Semantics</a>, dated 
 September 2000.  The attributes specified in <code>javax.print.attribute.standard</code>
-include common capabilites, such as: resolution, copies, media sizes, 
+include common capabilities, such as: resolution, copies, media sizes, 
 job priority, and page ranges.
 
 <h3>Document Type Specification</h3>
@@ -105,9 +106,8 @@
 of a Postscript document on size A4 paper, creating a print job from 
 one of the returned print services, and calling print.
 
-<p>
+<blockquote>
 <pre>
-<blockquote>
 FileInputStream psStream;
 try {
    psStream = new FileInputStream("file.ps");
@@ -132,8 +132,8 @@
 	job.print(myDoc, aset);
    } catch (PrintException pe) {}
 }
+</pre>
 </blockquote>
-</pre>
 <P>
 Please note: In the javax.print APIs, a null reference parameter to methods 
 is incorrect unless explicitly documented on the method as having a meaningful
--- a/src/share/classes/javax/script/AbstractScriptEngine.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/script/AbstractScriptEngine.java	Mon Nov 11 23:17:30 2013 -0800
@@ -255,7 +255,7 @@
      *
      * @param script A <code>String</code> containing the source of the script.
      * @return The return value from <code>eval(String, ScriptContext)</code>
-     * @throws ScriptException if an error occurrs in script.
+     * @throws ScriptException if an error occurs in script.
      * @throws NullPointerException if any of the parameters is null.
      */
     public Object eval(String script) throws ScriptException {
--- a/src/share/classes/javax/script/CompiledScript.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/script/CompiledScript.java	Mon Nov 11 23:17:30 2013 -0800
@@ -36,7 +36,7 @@
  * Each <code>CompiledScript</code> is associated with a <code>ScriptEngine</code> -- A call to an  <code>eval</code>
  * method of the <code>CompiledScript</code> causes the execution of the script by the
  * <code>ScriptEngine</code>.  Changes in the state of the <code>ScriptEngine</code> caused by execution
- * of tne <code>CompiledScript</code>  may visible during subsequent executions of scripts by the engine.
+ * of the <code>CompiledScript</code>  may visible during subsequent executions of scripts by the engine.
  *
  * @author Mike Grogan
  * @since 1.6
--- a/src/share/classes/javax/script/Invocable.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/script/Invocable.java	Mon Nov 11 23:17:30 2013 -0800
@@ -51,7 +51,7 @@
      * @return The value returned by the procedure.  The rules for converting the scripting
      * variable returned by the script method to a Java Object are implementation-specific.
      *
-     * @throws ScriptException if an error occurrs during invocation of the method.
+     * @throws ScriptException if an error occurs during invocation of the method.
      * @throws NoSuchMethodException if method with given name or matching argument types cannot be found.
      * @throws NullPointerException if the method name is null.
      * @throws IllegalArgumentException if the specified thiz is null or the specified Object is
@@ -67,7 +67,7 @@
      * @param args Arguments to pass to the procedure or function
      * @return The value returned by the procedure or function
      *
-     * @throws ScriptException if an error occurrs during invocation of the method.
+     * @throws ScriptException if an error occurs during invocation of the method.
      * @throws NoSuchMethodException if method with given name or matching argument types cannot be found.
      * @throws NullPointerException if method name is null.
      */
--- a/src/share/classes/javax/script/ScriptEngine.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/script/ScriptEngine.java	Mon Nov 11 23:17:30 2013 -0800
@@ -114,7 +114,7 @@
      *
      * @return The value returned from the execution of the script.
      *
-     * @throws ScriptException if an error occurrs in script. ScriptEngines should create and throw
+     * @throws ScriptException if an error occurs in script. ScriptEngines should create and throw
      * <code>ScriptException</code> wrappers for checked Exceptions thrown by underlying scripting
      * implementations.
      * @throws NullPointerException if either argument is null.
@@ -132,7 +132,7 @@
      *
      * @return The value returned from the execution of the script.
      *
-     * @throws ScriptException if an error occurrs in script.
+     * @throws ScriptException if an error occurs in script.
      * @throws NullPointerException if either argument is null.
      */
     public Object eval(Reader reader , ScriptContext context) throws ScriptException;
@@ -145,7 +145,7 @@
      *
      * @return The value returned from the execution of the script.
      *
-     * @throws ScriptException if error occurrs in script.
+     * @throws ScriptException if error occurs in script.
      * @throws NullPointerException if the argument is null.
      */
     public Object eval(String script) throws ScriptException;
@@ -158,7 +158,7 @@
      *
      * @return The value returned by the script.
      *
-     * @throws ScriptException if an error occurrs in script.
+     * @throws ScriptException if an error occurs in script.
      * @throws NullPointerException if the argument is null.
      */
     public Object eval(Reader reader) throws ScriptException;
@@ -177,7 +177,7 @@
      *
      * @return The value returned by the script.
      *
-     * @throws ScriptException if an error occurrs in script.
+     * @throws ScriptException if an error occurs in script.
      * @throws NullPointerException if either argument is null.
      */
     public Object eval(String script, Bindings n) throws ScriptException;
@@ -191,7 +191,7 @@
      *
      * @return The value returned by the script.
      *
-     * @throws ScriptException if an error occurrs.
+     * @throws ScriptException if an error occurs.
      * @throws NullPointerException if either argument is null.
      */
     public Object eval(Reader reader , Bindings n) throws ScriptException;
--- a/src/share/classes/javax/script/ScriptEngineFactory.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/script/ScriptEngineFactory.java	Mon Nov 11 23:17:30 2013 -0800
@@ -142,7 +142,7 @@
 
     /**
      * Returns a String which can be used to invoke a method of a  Java object using the syntax
-     * of the supported scripting language.  For instance, an implementaton for a Javascript
+     * of the supported scripting language.  For instance, an implementation for a Javascript
      * engine might be;
      * <p>
      * <pre>{@code
@@ -178,7 +178,7 @@
 
     /**
      * Returns a String that can be used as a statement to display the specified String  using
-     * the syntax of the supported scripting language.  For instance, the implementaton for a Perl
+     * the syntax of the supported scripting language.  For instance, the implementation for a Perl
      * engine might be;
      * <p>
      * <pre><code>
@@ -196,7 +196,7 @@
 
 
     /**
-     * Returns a valid scripting language executable progam with given statements.
+     * Returns a valid scripting language executable program with given statements.
      * For instance an implementation for a PHP engine might be:
      * <p>
      * <pre>{@code
--- a/src/share/classes/javax/security/sasl/RealmChoiceCallback.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/security/sasl/RealmChoiceCallback.java	Mon Nov 11 23:17:30 2013 -0800
@@ -46,7 +46,7 @@
      * @param choices the non-null list of realms to choose from.
      * @param defaultChoice the choice to be used as the default choice
      * when the list of choices is displayed. It is an index into
-     * the {@code choices} arary.
+     * the {@code choices} array.
      * @param multiple true if multiple choices allowed; false otherwise
      * @throws IllegalArgumentException If {@code prompt} is null or the empty string,
      * if {@code choices} has a length of 0, if any element from
--- a/src/share/classes/javax/security/sasl/Sasl.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/security/sasl/Sasl.java	Mon Nov 11 23:17:30 2013 -0800
@@ -172,7 +172,7 @@
      *
      * Mechanism implementations that support reuse might allow customization
      * of its implementation, for factors such as cache size, timeouts, and
-     * criteria for reuseability. Such customizations are
+     * criteria for reusability. Such customizations are
      * implementation-dependent.
      */
      public static final String REUSE = "javax.security.sasl.reuse";
--- a/src/share/classes/javax/security/sasl/SaslClient.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/security/sasl/SaslClient.java	Mon Nov 11 23:17:30 2013 -0800
@@ -123,7 +123,7 @@
      * @param challenge The non-null challenge sent from the server.
      * The challenge array may have zero length.
      *
-     * @return The possibly null reponse to send to the server.
+     * @return The possibly null response to send to the server.
      * It is null if the challenge accompanied a "SUCCESS" status and the challenge
      * only contains data for the client to update its state and no response
      * needs to be sent to the server. The response is a zero-length byte
--- a/src/share/classes/javax/security/sasl/SaslException.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/security/sasl/SaslException.java	Mon Nov 11 23:17:30 2013 -0800
@@ -107,7 +107,7 @@
     /**
      * Returns the string representation of this exception.
      * The string representation contains
-     * this exception's class name, its detailed messsage, and if
+     * this exception's class name, its detailed message, and if
      * it has a root exception, the string representation of the root
      * exception. This string representation
      * is meant for debugging and not meant to be interpreted
--- a/src/share/classes/javax/smartcardio/CardChannel.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/smartcardio/CardChannel.java	Mon Nov 11 23:17:30 2013 -0800
@@ -122,7 +122,7 @@
 
     /**
      * Transmits the command APDU stored in the command ByteBuffer and receives
-     * the reponse APDU in the response ByteBuffer.
+     * the response APDU in the response ByteBuffer.
      *
      * <p>The command buffer must contain valid command APDU data starting
      * at <code>command.position()</code> and the APDU must be
--- a/src/share/classes/javax/smartcardio/CardTerminal.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/smartcardio/CardTerminal.java	Mon Nov 11 23:17:30 2013 -0800
@@ -28,7 +28,7 @@
 import java.util.*;
 
 /**
- * A Smart Card terminal, sometimes refered to as a Smart Card Reader.
+ * A Smart Card terminal, sometimes referred to as a Smart Card Reader.
  * A CardTerminal object can be obtained by calling
  * {@linkplain CardTerminals#list}
  * or {@linkplain CardTerminals#getTerminal CardTerminals.getTerminal()}.
--- a/src/share/classes/javax/sound/midi/MidiDevice.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/sound/midi/MidiDevice.java	Mon Nov 11 23:17:30 2013 -0800
@@ -60,7 +60,7 @@
  * <code>Receiver</code> or <code>Transmitter</code> that resulted in
  * opening it. If more than one implicitly opening
  * <code>Receiver</code> or <code>Transmitter</code> were obtained by
- * the application, the decive is closed after the last
+ * the application, the device is closed after the last
  * <code>Receiver</code> or <code>Transmitter</code> has been
  * closed. On the other hand, calling <code>getReceiver</code> or
  * <code>getTransmitter</code> on the device instance directly does
--- a/src/share/classes/javax/sound/midi/MidiMessage.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/sound/midi/MidiMessage.java	Mon Nov 11 23:17:30 2013 -0800
@@ -59,7 +59,7 @@
  * <p>
  * If you simply need to pass a known MIDI byte value as a method parameter,
  * it can be expressed directly as an integer, using (for example) decimal or
- * hexidecimal notation.  For instance, to pass the "active sensing" status byte
+ * hexadecimal notation.  For instance, to pass the "active sensing" status byte
  * as the first argument to ShortMessage's
  * {@link ShortMessage#setMessage(int) setMessage(int)}
  * method, you can express it as 254 or 0xFE.
--- a/src/share/classes/javax/sound/midi/MidiSystem.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/sound/midi/MidiSystem.java	Mon Nov 11 23:17:30 2013 -0800
@@ -120,7 +120,7 @@
  * is optional.
  *
  * <p>If the provider class is specified, and it can be
- * successully retrieved from the installed providers,
+ * successfully retrieved from the installed providers,
  * the list of
  * <code>MidiDevice.Info</code> objects is retrieved
  * from the provider. Otherwise, or when these devices
--- a/src/share/classes/javax/sound/midi/ShortMessage.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/sound/midi/ShortMessage.java	Mon Nov 11 23:17:30 2013 -0800
@@ -94,7 +94,7 @@
     // System real-time messages
 
     /**
-     * Status byte for Timing Clock messagem (0xF8, or 248).
+     * Status byte for Timing Clock message (0xF8, or 248).
      * @see MidiMessage#getStatus
      */
     public static final int TIMING_CLOCK                                = 0xF8; // 248
--- a/src/share/classes/javax/sound/midi/Soundbank.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/sound/midi/Soundbank.java	Mon Nov 11 23:17:30 2013 -0800
@@ -100,7 +100,7 @@
 
     /**
      * Extracts a list of non-Instrument resources contained in the sound bank.
-     * @return an array of resources, exclusing instruments.  If the sound bank contains
+     * @return an array of resources, excluding instruments.  If the sound bank contains
      * no resources (other than instruments), returns an array of length 0.
      */
     public SoundbankResource[] getResources();
--- a/src/share/classes/javax/sound/midi/Synthesizer.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/sound/midi/Synthesizer.java	Mon Nov 11 23:17:30 2013 -0800
@@ -212,7 +212,7 @@
      * @param from the <code>Instrument</code> object to be replaced
      * @param to the <code>Instrument</code> object to be used in place
      * of the old instrument, it should be loaded into the synthesizer
-     * @return <code>true</code> if the instrument succeessfully remapped,
+     * @return <code>true</code> if the instrument successfully remapped,
      * <code>false</code> if feature is not implemented by synthesizer
      * @throws IllegalArgumentException if instrument
      * <code>from</code> or instrument <code>to</code> aren't supported by
--- a/src/share/classes/javax/sound/sampled/AudioFormat.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/sound/sampled/AudioFormat.java	Mon Nov 11 23:17:30 2013 -0800
@@ -31,7 +31,7 @@
 
 /**
  * <code>AudioFormat</code> is the class that specifies a particular arrangement of data in a sound stream.
- * By examing the information stored in the audio format, you can discover how to interpret the bits in the
+ * By examining the information stored in the audio format, you can discover how to interpret the bits in the
  * binary sound data.
  * <p>
  * Every data line has an audio format associated with its data stream. The audio format of a source (playback) data line indicates
--- a/src/share/classes/javax/sound/sampled/AudioSystem.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/sound/sampled/AudioSystem.java	Mon Nov 11 23:17:30 2013 -0800
@@ -115,7 +115,7 @@
  * is optional.
  *
  * <p>If the provider class is specified, and it can be
- * successully retrieved from the installed providers, the list of
+ * successfully retrieved from the installed providers, the list of
  * <code>Mixer.Info</code> objects is retrieved
  * from the provider. Otherwise, or when these mixers
  * do not provide a subsequent match, the list is retrieved
--- a/src/share/classes/javax/sound/sampled/ReverbType.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/sound/sampled/ReverbType.java	Mon Nov 11 23:17:30 2013 -0800
@@ -42,7 +42,7 @@
  * intensity of late reflections, and an overall decay time.
  * Early reflections are the initial individual low-order reflections of the
  * direct signal off the surfaces in the room.
- * The late Relections are the dense, high-order reflections that characterize
+ * The late Reflections are the dense, high-order reflections that characterize
  * the room's reverberation.
  * The delay times for the start of these two reflection types give the listener
  * a sense of the overall size and complexity of the room's shape and contents.
--- a/src/share/classes/javax/sql/PooledConnection.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/sql/PooledConnection.java	Mon Nov 11 23:17:30 2013 -0800
@@ -73,7 +73,7 @@
  * if a fatal error has made the connection unusable.
  *
  * <p>
- * A connection pool manager is often also a statement pool manager, maintining
+ * A connection pool manager is often also a statement pool manager, maintaining
  *  a pool of <code>PreparedStatement</code> objects.
  *  When an application closes a prepared statement, it calls the
  *  <code>PreparedStatement</code>
--- a/src/share/classes/javax/sql/RowSet.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/sql/RowSet.java	Mon Nov 11 23:17:30 2013 -0800
@@ -206,7 +206,7 @@
   int getTransactionIsolation();
 
   /**
-   * Sets the transaction isolation level for this <code>RowSet</code> obejct.
+   * Sets the transaction isolation level for this <code>RowSet</code> object.
    *
    * @param level the transaction isolation level; one of
    *      <code>Connection.TRANSACTION_READ_UNCOMMITTED</code>,
@@ -1438,7 +1438,7 @@
      * if parameterIndex does not correspond
      * to a parameter marker in the SQL statement,  if the length specified
      * is less than zero or if the number of bytes in the inputstream does not match
-     * the specfied length.
+     * the specified length.
      * @throws SQLFeatureNotSupportedException  if the JDBC driver does not support this method
      *
      * @since 1.6
@@ -1492,7 +1492,7 @@
      * @throws SQLException  if parameterIndex does not correspond
      * to a parameter marker in the SQL statement,  or if the length specified
      * is less than zero; if the number of bytes in the inputstream does not match
-     * the specfied length; if a database access error occurs or
+     * the specified length; if a database access error occurs or
      * this method is called on a closed <code>CallableStatement</code>
      * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
      * this method
@@ -1956,7 +1956,7 @@
    void setRowId(String parameterName, RowId x) throws SQLException;
 
     /**
-     * Sets the designated paramter to the given <code>String</code> object.
+     * Sets the designated parameter to the given <code>String</code> object.
      * The driver converts this to a SQL <code>NCHAR</code> or
      * <code>NVARCHAR</code> or <code>LONGNVARCHAR</code> value
      * (depending on the argument's
@@ -1973,7 +1973,7 @@
      void setNString(int parameterIndex, String value) throws SQLException;
 
     /**
-     * Sets the designated paramter to the given <code>String</code> object.
+     * Sets the designated parameter to the given <code>String</code> object.
      * The driver converts this to a SQL <code>NCHAR</code> or
      * <code>NVARCHAR</code> or <code>LONGNVARCHAR</code>
      * @param parameterName the name of the column to be set
--- a/src/share/classes/javax/sql/StatementEvent.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/sql/StatementEvent.java	Mon Nov 11 23:17:30 2013 -0800
@@ -53,7 +53,7 @@
          * <p>
          * @param con                   The <code>PooledConnection</code> that the closed or invalid
          * <code>PreparedStatement</code>is associated with.
-         * @param statement             The <code>PreparedStatement</code> that is bieng closed or is invalid
+         * @param statement             The <code>PreparedStatement</code> that is being closed or is invalid
          * <p>
          * @throws IllegalArgumentException if <code>con</code> is null.
          *
--- a/src/share/classes/javax/sql/rowset/BaseRowSet.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/sql/rowset/BaseRowSet.java	Mon Nov 11 23:17:30 2013 -0800
@@ -211,7 +211,7 @@
  * to the driver or the DBMS. For example, the methods <code>setDate</code>,
  * <code>setTime</code>, and <code>setTimestamp</code> can take a <code>Calendar</code>
  * object as their third parameter.  If the DBMS does not store time zone information,
- * the drivern uses the <code>Calendar</code> object to construct the <code>Date</code>,
+ * the driver uses the <code>Calendar</code> object to construct the <code>Date</code>,
  * <code>Time</code>, or <code>Timestamp</code> object being set. As is true with other
  * methods that provide additional information, the element in the array returned
  * by <code>getParams</code> is an array instead of a simple <code>Object</code> instance.
@@ -3162,7 +3162,7 @@
      * @return an array of <code>Object</code> instances that includes the
      *         parameter values that may be set in this <code>RowSet</code> object's
      *         command; an empty array if no parameters have been set
-     * @throws SQLException if an error occurs retrieveing the object array of
+     * @throws SQLException if an error occurs retrieving the object array of
      *         parameters of this <code>RowSet</code> object or if not all parameters have
      *         been set
      */
@@ -3810,7 +3810,7 @@
     * if parameterIndex does not correspond
     * to a parameter marker in the SQL statement,  if the length specified
     * is less than zero or if the number of bytes in the inputstream does not match
-    * the specfied length.
+    * the specified length.
     * @throws SQLFeatureNotSupportedException  if the JDBC driver does not support this method
     *
     * @since 1.6
@@ -3870,7 +3870,7 @@
      * @throws SQLException  if parameterIndex does not correspond
      * to a parameter marker in the SQL statement,  or if the length specified
      * is less than zero; if the number of bytes in the inputstream does not match
-     * the specfied length; if a database access error occurs or
+     * the specified length; if a database access error occurs or
      * this method is called on a closed <code>CallableStatement</code>
      * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
      * this method
@@ -4253,7 +4253,7 @@
  }
 
  /**
-  * Sets the designated paramter to the given <code>String</code> object.
+  * Sets the designated parameter to the given <code>String</code> object.
   * The driver converts this to a SQL <code>NCHAR</code> or
   * <code>NVARCHAR</code> or <code>LONGNVARCHAR</code> value
   * (depending on the argument's
@@ -4275,7 +4275,7 @@
 
 
  /**
-  * Sets the designated paramter to the given <code>String</code> object.
+  * Sets the designated parameter to the given <code>String</code> object.
   * The driver converts this to a SQL <code>NCHAR</code> or
   * <code>NVARCHAR</code> or <code>LONGNVARCHAR</code>
   * @param parameterName the name of the column to be set
--- a/src/share/classes/javax/sql/rowset/CachedRowSet.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/sql/rowset/CachedRowSet.java	Mon Nov 11 23:17:30 2013 -0800
@@ -1104,7 +1104,7 @@
     public SyncProvider getSyncProvider() throws SQLException;
 
    /**
-    * Sets the <code>SyncProvider</code> objec for this <code>CachedRowSet</code>
+    * Sets the <code>SyncProvider</code> object for this <code>CachedRowSet</code>
     * object to the one specified.  This method
     * allows the <code>SyncProvider</code> object to be reset.
     * <P>
@@ -1173,7 +1173,7 @@
     * the last synchronization with the underlying data source.  If there have been
     * no synchronizations, the original value will be the value with which the
     * <code>RowSet</code> object was populated.  This method is called internally
-    * when an aplication calls the method <code>acceptChanges</code> and the
+    * when an application calls the method <code>acceptChanges</code> and the
     * <code>SyncProvider</code> object has been implemented to check for conflicts.
     * If this is the case, the writer compares the original value with the value
     * currently in the data source to check for conflicts.
--- a/src/share/classes/javax/sql/rowset/JoinRowSet.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/sql/rowset/JoinRowSet.java	Mon Nov 11 23:17:30 2013 -0800
@@ -359,7 +359,7 @@
      * <code>RowSet</code> objects that have been added to this
      * <code>JoinRowSet</code> object.
      * This should return the 'n' number of RowSet contained
-     * within the <code>JOIN</code> and maintain any updates that have occured while in
+     * within the <code>JOIN</code> and maintain any updates that have occurred while in
      * this union.
      *
      * @return a <code>Collection</code> object consisting of the
--- a/src/share/classes/javax/sql/rowset/Joinable.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/sql/rowset/Joinable.java	Mon Nov 11 23:17:30 2013 -0800
@@ -76,7 +76,7 @@
  *     jrs.addRowSet(crs);
  * </pre>
  * In the previous example, <i>crs</i> is a <code>CachedRowSet</code> object that
- * has emplemented the <code>Joinable</code> interface.  In the following example,
+ * has implemented the <code>Joinable</code> interface.  In the following example,
  * <i>crs2</i> has not, so it must supply the match column as an argument to the
  * <code>addRowSet</code> method. This example assumes that column 1 is the match
  * column.
@@ -250,7 +250,7 @@
      * Unsets the designated columns as the match column for this <code>RowSet</code>
      * object.
      *
-     * @param columnIdxes an arrary of <code>int</code> that identifies the indexes
+     * @param columnIdxes an array of <code>int</code> that identifies the indexes
      *     of the columns that are to be unset as match columns
      * @throws SQLException if an invalid column index is designated or if
      *          the designated column was not previously set as a match
--- a/src/share/classes/javax/sql/rowset/Predicate.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/sql/rowset/Predicate.java	Mon Nov 11 23:17:30 2013 -0800
@@ -131,7 +131,7 @@
      *        SQL index of a column in this <code>RowSet</code> object. This must
      *        have been passed to <code>Predicate</code> as one of the columns
      *        for filtering while initializing a <code>Predicate</code>
-     * @return <code>true</code> ifrow value lies within the filter;
+     * @return <code>true</code> if row value lies within the filter;
      *     <code>false</code> otherwise
      * @throws SQLException if the column is not part of filtering criteria
      */
--- a/src/share/classes/javax/sql/rowset/package.html	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/sql/rowset/package.html	Mon Nov 11 23:17:30 2013 -0800
@@ -43,7 +43,7 @@
 <ul>
 <li><a href="#pkgspec">1.0 Package Specification</a>
 <li><a href="#stdrowset">2.0 Standard RowSet Definitions</a>
-<li><a href="#impl">3.0 Implementater's Guide</a>
+<li><a href="#impl">3.0 Implementer's Guide</a>
 <li><a href="#relspec">4.0 Related Specifications</a>
 <li><a href="#reldocs">5.0 Related Documentation</a>
 </ul>
--- a/src/share/classes/javax/sql/rowset/spi/SyncFactory.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/sql/rowset/spi/SyncFactory.java	Mon Nov 11 23:17:30 2013 -0800
@@ -71,7 +71,7 @@
  *       <code>WebRowSet</code> objects
  * </UL>
  * Note that the JDBC RowSet Implementations include the <code>SyncProvider</code>
- * implemtations <code>RIOptimisticProvider</code> and <code>RIXmlProvider</code>,
+ * implementations <code>RIOptimisticProvider</code> and <code>RIXmlProvider</code>,
  * which satisfy this requirement.
  * <P>
  * The <code>SyncFactory</code> class provides accessor methods to assist
--- a/src/share/classes/javax/sql/rowset/spi/SyncResolver.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/sql/rowset/spi/SyncResolver.java	Mon Nov 11 23:17:30 2013 -0800
@@ -264,10 +264,10 @@
     public static int INSERT_ROW_CONFLICT = 2;
 
     /**
-     * Indicates that <b>no</b> conflict occured while the <code>RowSet</code> object
+     * Indicates that <b>no</b> conflict occurred while the <code>RowSet</code> object
      * was attempting to update, delete or insert a row in the data source. The values in
      * the <code>SyncResolver</code> will contain <code>null</code> values only as an indication
-     * that no information in pertitent to the conflict resolution in this row.
+     * that no information in pertinent to the conflict resolution in this row.
      */
     public static int NO_ROW_CONFLICT = 3;
 
--- a/src/share/classes/javax/sql/rowset/spi/TransactionalWriter.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/sql/rowset/spi/TransactionalWriter.java	Mon Nov 11 23:17:30 2013 -0800
@@ -37,10 +37,10 @@
  * <code>SyncProvider</code> abstract class so that it has finer grained
  * transaction control.
  * <p>
- * If one or more disconnected <code>RowSet</code> objects are particating
+ * If one or more disconnected <code>RowSet</code> objects are participating
  * in a global transaction, they may wish to coordinate their synchronization
  * commits to preserve data integrity and reduce the number of
- * sychronization exceptions. If this is the case, an application should set
+ * synchronization exceptions. If this is the case, an application should set
  * the <code>CachedRowSet</code> constant <code>COMMIT_ON_ACCEPT_CHANGES</code>
  * to <code>false</code> and use the <code>commit</code> and <code>rollback</code>
  * methods defined in this interface to manage transaction boundaries.
--- a/src/share/classes/javax/sql/rowset/spi/XmlReader.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/sql/rowset/spi/XmlReader.java	Mon Nov 11 23:17:30 2013 -0800
@@ -38,7 +38,7 @@
  * <P>
  * <code>SyncProvider</code>  implementations that supply XML data reader
  * capabilities such as output XML stream capabilities can implement this
- * interface to provider standard <code>XmlReader</code> objects to
+ * interface to provide standard <code>XmlReader</code> objects to
  * <code>WebRowSet</code> implementations.
  * <p>
  * An <code>XmlReader</code> object is registered as the
--- a/src/share/classes/javax/sql/rowset/spi/XmlWriter.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/sql/rowset/spi/XmlWriter.java	Mon Nov 11 23:17:30 2013 -0800
@@ -38,7 +38,7 @@
  * <p>
  * <code>SyncProvider</code>  implementations that supply XML data writer
  * capabilities such as output XML stream capabilities can implement this
- * interface to provider standard <code>XmlWriter</code> objects to
+ * interface to provide standard <code>XmlWriter</code> objects to
  * <code>WebRowSet</code> implementations.
  * <P>
  * Writing a <code>WebRowSet</code> object includes printing the
--- a/src/share/classes/javax/swing/AbstractButton.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/AbstractButton.java	Mon Nov 11 23:17:30 2013 -0800
@@ -330,7 +330,7 @@
     /**
      * Sets the state of the button. Note that this method does not
      * trigger an <code>actionEvent</code>.
-     * Call <code>doClick</code> to perform a programatic action change.
+     * Call <code>doClick</code> to perform a programmatic action change.
      *
      * @param b  true if the button is selected, otherwise false
      */
@@ -2928,7 +2928,7 @@
          * If there is no selection, but there is
          * a caret, the start and end offsets will be the same.
          *
-         * @return the index into teh text of the end of the selection
+         * @return the index into the text of the end of the selection
          * @since 1.3
          */
         public int getSelectionEnd() {
--- a/src/share/classes/javax/swing/Action.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/Action.java	Mon Nov 11 23:17:30 2013 -0800
@@ -98,10 +98,10 @@
  *         summary="Supported Action properties"
  *         valign="top" >
  *  <tr valign="top"  align="left">
- *    <th bgcolor="#CCCCFF" align="left">Component Property
- *    <th bgcolor="#CCCCFF" align="left">Components
- *    <th bgcolor="#CCCCFF" align="left">Action Key
- *    <th bgcolor="#CCCCFF" align="left">Notes
+ *    <th style="background-color:#CCCCFF" align="left">Component Property
+ *    <th style="background-color:#CCCCFF" align="left">Components
+ *    <th style="background-color:#CCCCFF" align="left">Action Key
+ *    <th style="background-color:#CCCCFF" align="left">Notes
  *  <tr valign="top"  align="left">
  *      <td><b><code>enabled</code></b>
  *      <td>All
--- a/src/share/classes/javax/swing/BoxLayout.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/BoxLayout.java	Mon Nov 11 23:17:30 2013 -0800
@@ -338,7 +338,7 @@
      * to lay out the components it contains.
      *
      * @param target  the container that needs to be laid out
-     * @return the dimenions >= 0 && <= Integer.MAX_VALUE
+     * @return the dimensions >= 0 && <= Integer.MAX_VALUE
      * @exception AWTError  if the target isn't the container specified to the
      *                      BoxLayout constructor
      * @see #preferredLayoutSize
--- a/src/share/classes/javax/swing/DefaultListSelectionModel.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/DefaultListSelectionModel.java	Mon Nov 11 23:17:30 2013 -0800
@@ -786,7 +786,7 @@
      * leadIndex and newLeadIndex is the new one.
      * <p>
      * If the value at the anchor index is not selected, do the same thing in
-     * reverse selecting values in the old range and deslecting values in the
+     * reverse selecting values in the old range and deselecting values in the
      * new one.
      * <p>
      * Generate a single event for this change and notify all listeners.
--- a/src/share/classes/javax/swing/DefaultRowSorter.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/DefaultRowSorter.java	Mon Nov 11 23:17:30 2013 -0800
@@ -53,7 +53,7 @@
  * <code>Collator.getInstance()</code> is used on the results of
  * calling <code>toString</code> on the underlying objects.  The
  * <code>Comparator</code> is never passed <code>null</code>.  A
- * <code>null</code> value is treated as occuring before a
+ * <code>null</code> value is treated as occurring before a
  * non-<code>null</code> value, and two <code>null</code> values are
  * considered equal.
  * <p>
--- a/src/share/classes/javax/swing/GroupLayout.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/GroupLayout.java	Mon Nov 11 23:17:30 2013 -0800
@@ -79,7 +79,7 @@
  * The following diagram shows a sequential group along the horizontal
  * axis. The sequential group contains three components. A parallel group
  * was used along the vertical axis.
- * <p align="center">
+ * <p style="text-align:center">
  * <img src="doc-files/groupLayout.1.gif">
  * <p>
  * To reinforce that each axis is treated independently the diagram shows
@@ -101,7 +101,7 @@
  * parallel group along the horizontal axis and the sequential group along
  * the vertical axis.
  * <p>
- * <p align="center">
+ * <p style="text-align:center">
  * <img src="doc-files/groupLayout.2.gif">
  * <p>
  * As {@code c1} is the largest of the three components, the parallel
@@ -115,7 +115,7 @@
  * <p>
  * The following diagram shows a sequential group along both the horizontal
  * and vertical axis.
- * <p align="center">
+ * <p style="text-align:center">
  * <img src="doc-files/groupLayout.3.gif">
  * <p>
  * {@code GroupLayout} provides the ability to insert gaps between
@@ -172,7 +172,7 @@
  * </pre>
  * <p>
  * When run the following is produced.
- * <p align="center">
+ * <p style="text-align:center">
  * <img src="doc-files/groupLayout.example.png">
  * <p>
  * This layout consists of the following.
@@ -382,7 +382,7 @@
     }
 
     /**
-     * Sets whether component visiblity is considered when sizing and
+     * Sets whether component visibility is considered when sizing and
      * positioning components. A value of {@code true} indicates that
      * non-visible components should not be treated as part of the
      * layout. A value of {@code false} indicates that components should be
@@ -397,7 +397,7 @@
      * <p>
      * The default is {@code true}.
      *
-     * @param honorsVisibility whether component visiblity is considered when
+     * @param honorsVisibility whether component visibility is considered when
      *                         sizing and positioning components
      * @see #setHonorsVisibility(Component,Boolean)
      */
@@ -411,10 +411,10 @@
     }
 
     /**
-     * Returns whether component visiblity is considered when sizing and
+     * Returns whether component visibility is considered when sizing and
      * positioning components.
      *
-     * @return whether component visiblity is considered when sizing and
+     * @return whether component visibility is considered when sizing and
      *         positioning components
      */
     public boolean getHonorsVisibility() {
@@ -422,7 +422,7 @@
     }
 
     /**
-     * Sets whether the component's visiblity is considered for
+     * Sets whether the component's visibility is considered for
      * sizing and positioning. A value of {@code Boolean.TRUE}
      * indicates that if {@code component} is not visible it should
      * not be treated as part of the layout. A value of {@code false}
@@ -432,11 +432,11 @@
      * setHonorsVisibility} should be used.
      * <p>
      * If {@code component} is not a child of the {@code Container} this
-     * {@code GroupLayout} is managine, it will be added to the
+     * {@code GroupLayout} is managing, it will be added to the
      * {@code Container}.
      *
      * @param component the component
-     * @param honorsVisibility whether {@code component}'s visiblity should be
+     * @param honorsVisibility whether visibility of this {@code component} should be
      *              considered for sizing and positioning
      * @throws IllegalArgumentException if {@code component} is {@code null}
      * @see #setHonorsVisibility(Component,Boolean)
@@ -1315,7 +1315,7 @@
             return parent;
         }
 
-        // This is here purely as a conveniance for ParallelGroup to avoid
+        // This is here purely as a convenience for ParallelGroup to avoid
         // having to track alignment separately.
         void setAlignment(Alignment alignment) {
             this.alignment = alignment;
@@ -2048,7 +2048,7 @@
             // 2. Sort the list in ascending order
             // 3. Iterate through each of the resizable Springs, attempting
             //    to give them (pref - size) / resizeCount
-            // 4. For any Springs that can not accomodate that much space
+            // 4. For any Springs that can not accommodate that much space
             //    add the remainder back to the amount to distribute and
             //    recalculate how must space the remaining springs will get.
             // 5. Set the size of the springs.
@@ -2275,7 +2275,7 @@
                 if (!baselineSpring.isResizable(VERTICAL)) {
                     // Spring to use for baseline isn't resizable. In this case
                     // baseline resize behavior can be determined based on how
-                    // preceeding springs resize.
+                    // preceding springs resize.
                     boolean leadingResizable = false;
                     for (Spring spring : springs) {
                         if (spring == baselineSpring) {
--- a/src/share/classes/javax/swing/ImageIcon.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/ImageIcon.java	Mon Nov 11 23:17:30 2013 -0800
@@ -80,8 +80,20 @@
     ImageObserver imageObserver;
     String description = null;
 
-    // Fields for twisted backward compatibility only. DO NOT USE.
+    /**
+     * Do not use this shared component, which is used to track image loading.
+     * It is left for backward compatibility only.
+     * @deprecated since 1.8
+     */
+    @Deprecated
     protected final static Component component;
+
+    /**
+     * Do not use this shared media tracker, which is used to load images.
+     * It is left for backward compatibility only.
+     * @deprecated since 1.8
+     */
+    @Deprecated
     protected final static MediaTracker tracker;
 
     static {
--- a/src/share/classes/javax/swing/JApplet.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/JApplet.java	Mon Nov 11 23:17:30 2013 -0800
@@ -46,9 +46,10 @@
  * <code>java.applet.Applet</code>.  <code>JApplet</code> contains a
  * <code>JRootPane</code> as its only child.  The <code>contentPane</code>
  * should be the parent of any children of the <code>JApplet</code>.
- * As a convenience <code>add</code> and its variants, <code>remove</code> and
- * <code>setLayout</code> have been overridden to forward to the
- * <code>contentPane</code> as necessary. This means you can write:
+ * As a convenience, the {@code add}, {@code remove}, and {@code setLayout}
+ * methods of this class are overridden, so that they delegate calls
+ * to the corresponding methods of the {@code ContentPane}.
+ * For example, you can add a child component to an applet as follows:
  * <pre>
  *       applet.add(child);
  * </pre>
@@ -256,7 +257,7 @@
      * <code>setLayout</code> are forwarded to the <code>contentPane</code>.
      *
      * @return true if <code>add</code> and <code>setLayout</code>
-     *         are fowarded; false otherwise
+     *         are forwarded; false otherwise
      *
      * @see #addImpl
      * @see #setLayout
--- a/src/share/classes/javax/swing/JComboBox.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/JComboBox.java	Mon Nov 11 23:17:30 2013 -0800
@@ -2143,7 +2143,7 @@
              * a set of predefined roles.  This enables assistive technologies to
              * provide a consistent interface to various tweaked subclasses of
              * components (e.g., use AccessibleRole.PUSH_BUTTON for all components
-             * that act like a push button) as well as distinguish between sublasses
+             * that act like a push button) as well as distinguish between subclasses
              * that behave differently (e.g., AccessibleRole.CHECK_BOX for check boxes
              * and AccessibleRole.RADIO_BUTTON for radio buttons).
              * <p>Note that the AccessibleRole class is also extensible, so
--- a/src/share/classes/javax/swing/JComponent.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/JComponent.java	Mon Nov 11 23:17:30 2013 -0800
@@ -316,7 +316,7 @@
 
     /**
      * <code>JPopupMenu</code> assigned to this component
-     * and all of its childrens
+     * and all of its children
      */
     private JPopupMenu popupMenu;
 
@@ -2020,7 +2020,7 @@
     /**
      * This method is now obsolete, please use a combination of
      * <code>getActionMap()</code> and <code>getInputMap()</code> for
-     * similiar behavior. For example, to bind the <code>KeyStroke</code>
+     * similar behavior. For example, to bind the <code>KeyStroke</code>
      * <code>aKeyStroke</code> to the <code>Action</code> <code>anAction</code>
      * now use:
      * <pre>
@@ -2207,7 +2207,7 @@
     /**
      * This method is now obsolete, please use a combination of
      * <code>getActionMap()</code> and <code>getInputMap()</code> for
-     * similiar behavior.
+     * similar behavior.
      */
     public void registerKeyboardAction(ActionListener anAction,KeyStroke aKeyStroke,int aCondition) {
         registerKeyboardAction(anAction,null,aKeyStroke,aCondition);
@@ -5236,7 +5236,7 @@
      *
      * @return NOT_OBSCURED if non of the siblings above the Component obscure
      *         it, COMPLETELY_OBSCURED if one of the siblings completely
-     *         obscures the Component or PARTIALLY_OBSCURED if the Comonent is
+     *         obscures the Component or PARTIALLY_OBSCURED if the Component is
      *         only partially obscured.
      */
     private int getObscuredState(int compIndex, int x, int y, int width,
--- a/src/share/classes/javax/swing/JDialog.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/JDialog.java	Mon Nov 11 23:17:30 2013 -0800
@@ -44,9 +44,10 @@
  * as its only child.
  * The {@code contentPane} should be the parent of any children of the
  * {@code JDialog}.
- * As a convenience {@code add} and its variants, {@code remove} and
- * {@code setLayout} have been overridden to forward to the
- * {@code contentPane} as necessary. This means you can write:
+ * As a convenience, the {@code add}, {@code remove}, and {@code setLayout}
+ * methods of this class are overridden, so that they delegate calls
+ * to the corresponding methods of the {@code ContentPane}.
+ * For example, you can add a child component to a dialog as follows:
  * <pre>
  *       dialog.add(child);
  * </pre>
@@ -862,7 +863,7 @@
      * {@code setLayout} are forwarded to the {@code contentPane}.
      *
      * @return true if {@code add} and {@code setLayout}
-     *         are fowarded; false otherwise
+     *         are forwarded; false otherwise
      *
      * @see #addImpl
      * @see #setLayout
@@ -1024,7 +1025,7 @@
      * This method is called by the constructor.
      * <p>
      * Swing's painting architecture requires an opaque {@code JComponent}
-     * in the containment hiearchy. This is typically provided by the
+     * in the containment hierarchy. This is typically provided by the
      * content pane. If you replace the content pane it is recommended you
      * replace it with an opaque {@code JComponent}.
      * @see JRootPane
--- a/src/share/classes/javax/swing/JFileChooser.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/JFileChooser.java	Mon Nov 11 23:17:30 2013 -0800
@@ -134,7 +134,7 @@
     public static final int APPROVE_OPTION = 0;
 
     /**
-     * Return value if an error occured.
+     * Return value if an error occurred.
      */
     public static final int ERROR_OPTION = -1;
 
--- a/src/share/classes/javax/swing/JFormattedTextField.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/JFormattedTextField.java	Mon Nov 11 23:17:30 2013 -0800
@@ -126,14 +126,14 @@
  * policy is <code>JFormattedTextField.PERSIST</code>
  * and the <code>JFormattedTextField</code> has been edited, the
  * <code>AbstractFormatterFactory</code> will not be queried until the
- * value has been commited. Similarly if the focus lost policy is
+ * value has been committed. Similarly if the focus lost policy is
  * <code>JFormattedTextField.COMMIT</code> and an exception
  * is thrown from <code>stringToValue</code>, the
- * <code>AbstractFormatterFactory</code> will not be querired when focus is
+ * <code>AbstractFormatterFactory</code> will not be queried when focus is
  * lost or gained.
  * <p>
  * <code>JFormattedTextField.AbstractFormatter</code>
- * is also responsible for determining when values are commited to
+ * is also responsible for determining when values are committed to
  * the <code>JFormattedTextField</code>. Some
  * <code>JFormattedTextField.AbstractFormatter</code>s will make new values
  * available on every edit, and others will never commit the value. You can
@@ -184,7 +184,7 @@
 
     /**
      * Constant identifying that when focus is lost,
-     * <code>commitEdit</code> should be invoked. If in commiting the
+     * <code>commitEdit</code> should be invoked. If in committing the
      * new value a <code>ParseException</code> is thrown, the invalid
      * value will remain.
      *
@@ -194,7 +194,7 @@
 
     /**
      * Constant identifying that when focus is lost,
-     * <code>commitEdit</code> should be invoked. If in commiting the new
+     * <code>commitEdit</code> should be invoked. If in committing the new
      * value a <code>ParseException</code> is thrown, the value will be
      * reverted.
      *
@@ -878,7 +878,7 @@
      * Instances of <code>AbstractFormatter</code> are used by
      * <code>JFormattedTextField</code> to handle the conversion both
      * from an Object to a String, and back from a String to an Object.
-     * <code>AbstractFormatter</code>s can also enfore editing policies,
+     * <code>AbstractFormatter</code>s can also enforce editing policies,
      * or navigation policies, or manipulate the
      * <code>JFormattedTextField</code> in any way it sees fit to
      * enforce the desired policy.
@@ -1116,7 +1116,7 @@
                     ((JFormattedTextField)target).commitEdit();
                 } catch (ParseException pe) {
                     ((JFormattedTextField)target).invalidEdit();
-                    // value not commited, don't notify ActionListeners
+                    // value not committed, don't notify ActionListeners
                     return;
                 }
             }
--- a/src/share/classes/javax/swing/JFrame.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/JFrame.java	Mon Nov 11 23:17:30 2013 -0800
@@ -50,9 +50,10 @@
  * as a rule, contain
  * all the non-menu components displayed by the <code>JFrame</code>.
  * This is different from the AWT <code>Frame</code> case.
- * As a conveniance <code>add</code> and its variants, <code>remove</code> and
- * <code>setLayout</code> have been overridden to forward to the
- * <code>contentPane</code> as necessary. This means you can write:
+ * As a convenience, the {@code add}, {@code remove}, and {@code setLayout}
+ * methods of this class are overridden, so that they delegate calls
+ * to the corresponding methods of the {@code ContentPane}.
+ * For example, you can add a child component to a frame as follows:
  * <pre>
  *       frame.add(child);
  * </pre>
@@ -505,7 +506,7 @@
      * <code>setLayout</code> are forwarded to the <code>contentPane</code>.
      *
      * @return true if <code>add</code> and <code>setLayout</code>
-     *         are fowarded; false otherwise
+     *         are forwarded; false otherwise
      *
      * @see #addImpl
      * @see #setLayout
@@ -673,7 +674,7 @@
      * This method is called by the constructor.
      * <p>
      * Swing's painting architecture requires an opaque <code>JComponent</code>
-     * in the containment hiearchy. This is typically provided by the
+     * in the containment hierarchy. This is typically provided by the
      * content pane. If you replace the content pane it is recommended you
      * replace it with an opaque <code>JComponent</code>.
      *
--- a/src/share/classes/javax/swing/JInternalFrame.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/JInternalFrame.java	Mon Nov 11 23:17:30 2013 -0800
@@ -63,9 +63,10 @@
  * <p>
  * The <code>JInternalFrame</code> content pane
  * is where you add child components.
- * As a conveniance <code>add</code> and its variants, <code>remove</code> and
- * <code>setLayout</code> have been overridden to forward to the
- * <code>contentPane</code> as necessary. This means you can write:
+ * As a convenience, the {@code add}, {@code remove}, and {@code setLayout}
+ * methods of this class are overridden, so that they delegate calls
+ * to the corresponding methods of the {@code ContentPane}.
+ * For example, you can add a child component to an internal frame as follows:
  * <pre>
  *       internalFrame.add(child);
  * </pre>
@@ -445,7 +446,7 @@
      * <code>setLayout</code> are forwarded to the <code>contentPane</code>.
      *
      * @return true if <code>add</code> and <code>setLayout</code>
-     *         are fowarded; false otherwise
+     *         are forwarded; false otherwise
      *
      * @see #addImpl
      * @see #setLayout
--- a/src/share/classes/javax/swing/JLabel.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/JLabel.java	Mon Nov 11 23:17:30 2013 -0800
@@ -1457,7 +1457,7 @@
          * If there is no selection, but there is
          * a caret, the start and end offsets will be the same.
          *
-         * @return the index into teh text of the end of the selection
+         * @return the index into the text of the end of the selection
          * @since 1.3
          */
         public int getSelectionEnd() {
--- a/src/share/classes/javax/swing/JLayeredPane.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/JLayeredPane.java	Mon Nov 11 23:17:30 2013 -0800
@@ -168,7 +168,7 @@
     /** Convenience object defining the Drag layer. Equivalent to new Integer(400).*/
     public final static Integer DRAG_LAYER = new Integer(400);
     /** Convenience object defining the Frame Content layer.
-      * This layer is normally only use to positon the contentPane and menuBar
+      * This layer is normally only use to position the contentPane and menuBar
       * components of JFrame.
       * Equivalent to new Integer(-30000).
       * @see JFrame
@@ -648,7 +648,7 @@
     /**
      * This method is an extended version of insertIndexForLayer()
      * to support setLayer which uses Container.setZOrder which does
-     * not remove the component from the containment heirarchy though
+     * not remove the component from the containment hierarchy though
      * we need to ignore it when calculating the insertion index.
      *
      * @param comp      component to ignore when determining index
--- a/src/share/classes/javax/swing/JMenu.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/JMenu.java	Mon Nov 11 23:17:30 2013 -0800
@@ -495,7 +495,7 @@
      * In most cases, the delay is not observed for top level menus
      * or while dragging.  The default for <code>delay</code> is 0.
      * This method is a property of the look and feel code and is used
-     * to manage the idiosyncracies of the various UI implementations.
+     * to manage the idiosyncrasies of the various UI implementations.
      *
      *
      * @return the <code>delay</code> property
@@ -510,7 +510,7 @@
      * it's own policy for observing the delay property.  In most cases,
      * the delay is not observed for top level menus or while dragging.
      * This method is a property of the look and feel code and is used
-     * to manage the idiosyncracies of the various UI implementations.
+     * to manage the idiosyncrasies of the various UI implementations.
      *
      * @param       d the number of milliseconds to delay
      * @exception   IllegalArgumentException if <code>d</code>
--- a/src/share/classes/javax/swing/JPasswordField.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/JPasswordField.java	Mon Nov 11 23:17:30 2013 -0800
@@ -348,7 +348,7 @@
 
     /**
      * This method is a hack to get around the fact that we cannot
-     * directly override setUIProperty because part of the inheritance heirarchy
+     * directly override setUIProperty because part of the inheritance hierarchy
      * goes outside of the javax.swing package, and therefore calling a package
      * private method isn't allowed. This method should return true if the property
      * was handled, and false otherwise.
--- a/src/share/classes/javax/swing/JPopupMenu.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/JPopupMenu.java	Mon Nov 11 23:17:30 2013 -0800
@@ -1104,7 +1104,7 @@
 
     /**
      * Returns the margin, in pixels, between the popup menu's border and
-     * its containees.
+     * its containers.
      *
      * @return an <code>Insets</code> object containing the margin values.
      */
--- a/src/share/classes/javax/swing/JRootPane.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/JRootPane.java	Mon Nov 11 23:17:30 2013 -0800
@@ -161,7 +161,7 @@
  * <p>
  * The painting architecture of Swing requires an opaque
  * <code>JComponent</code>
- * to exist in the containment hieararchy above all other components. This is
+ * to exist in the containment hierarchy above all other components. This is
  * typically provided by way of the content pane. If you replace the content
  * pane, it is recommended that you make the content pane opaque
  * by way of <code>setOpaque(true)</code>. Additionally, if the content pane
@@ -608,7 +608,7 @@
      * parented by the root pane.
      * <p>
      * Swing's painting architecture requires an opaque <code>JComponent</code>
-     * in the containment hiearchy. This is typically provided by the
+     * in the containment hierarchy. This is typically provided by the
      * content pane. If you replace the content pane it is recommended you
      * replace it with an opaque <code>JComponent</code>.
      *
@@ -741,7 +741,7 @@
      * On the other hand, the <code>glassPane</code>
      * is normally not visible, and so this can return true if the
      * <code>glassPane</code> isn't visible. Therefore, the
-     * return value here depends upon the visiblity of the
+     * return value here depends upon the visibility of the
      * <code>glassPane</code>.
      *
      * @return true if this component's children don't overlap
--- a/src/share/classes/javax/swing/JSlider.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/JSlider.java	Mon Nov 11 23:17:30 2013 -0800
@@ -662,7 +662,7 @@
 
     /**
      * Returns the "extent" from the <code>BoundedRangeModel</code>.
-     * This respresents the range of values "covered" by the knob.
+     * This represents the range of values "covered" by the knob.
      *
      * @return an int representing the extent
      * @see #setExtent
--- a/src/share/classes/javax/swing/JSpinner.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/JSpinner.java	Mon Nov 11 23:17:30 2013 -0800
@@ -545,7 +545,7 @@
      * call if forwarded to the editor, otherwise this does nothing.
      *
      * @throws ParseException if the currently edited value couldn't
-     *         be commited.
+     *         be committed.
      */
     public void commitEdit() throws ParseException {
         JComponent editor = getEditor();
@@ -1462,7 +1462,7 @@
          * a set of predefined roles.  This enables assistive technologies to
          * provide a consistent interface to various tweaked subclasses of
          * components (e.g., use AccessibleRole.PUSH_BUTTON for all components
-         * that act like a push button) as well as distinguish between sublasses
+         * that act like a push button) as well as distinguish between subclasses
          * that behave differently (e.g., AccessibleRole.CHECK_BOX for check boxes
          * and AccessibleRole.RADIO_BUTTON for radio buttons).
          * <p>Note that the AccessibleRole class is also extensible, so
@@ -1889,7 +1889,7 @@
          * If there is no selection, but there is
          * a caret, the start and end offsets will be the same.
          *
-         * @return the index into teh text of the end of the selection
+         * @return the index into the text of the end of the selection
          */
         public int getSelectionEnd() {
             AccessibleText at = getEditorAccessibleText();
--- a/src/share/classes/javax/swing/JSplitPane.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/JSplitPane.java	Mon Nov 11 23:17:30 2013 -0800
@@ -828,7 +828,7 @@
      * Returns the last value passed to <code>setDividerLocation</code>.
      * The value returned from this method may differ from the actual
      * divider location (if <code>setDividerLocation</code> was passed a
-     * value bigger than the curent size).
+     * value bigger than the current size).
      *
      * @return an integer specifying the location of the divider
      */
--- a/src/share/classes/javax/swing/JTable.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/JTable.java	Mon Nov 11 23:17:30 2013 -0800
@@ -2991,7 +2991,7 @@
 
     /**
      * Causes this table to lay out its rows and columns.  Overridden so
-     * that columns can be resized to accomodate a change in the size of
+     * that columns can be resized to accommodate a change in the size of
      * a containing parent.
      * Resizes one or more of the columns in the table
      * so that the total width of all of this <code>JTable</code>'s
@@ -3014,7 +3014,7 @@
      * The modes are:
      * <ul>
      * <li>  AUTO_RESIZE_OFF: Don't automatically adjust the column's
-     * widths at all. Use a horizontal scrollbar to accomodate the
+     * widths at all. Use a horizontal scrollbar to accommodate the
      * columns when their sum exceeds the width of the
      * <code>Viewport</code>.  If the <code>JTable</code> is not
      * enclosed in a <code>JScrollPane</code> this may
@@ -3104,7 +3104,7 @@
      * <P>
      * The overall effect is that the total size moves that same percentage,
      * k, towards the total minimum or maximum and that percentage guarantees
-     * accomodation of the required space, DELTA.
+     * accommodation of the required space, DELTA.
      *
      * <H4>Details</H4>
      * <P>
--- a/src/share/classes/javax/swing/JViewport.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/JViewport.java	Mon Nov 11 23:17:30 2013 -0800
@@ -463,7 +463,7 @@
                     // and paint is received another repaint is queued
                     // indicating part of the view is invalid. There
                     // is no way for JViewport to notice another
-                    // repaint has occured and it ends up blitting
+                    // repaint has occurred and it ends up blitting
                     // what is now a dirty region and the repaint is
                     // never delivered.
                     // It just so happens JTable encounters this
@@ -585,7 +585,7 @@
      * Returns the insets (border) dimensions as (0,0,0,0), since borders
      * are not supported on a <code>JViewport</code>.
      *
-     * @return a <code>Rectange</code> of zero dimension and zero origin
+     * @return a <code>Rectangle</code> of zero dimension and zero origin
      * @see #setBorder
      */
     public final Insets getInsets() {
--- a/src/share/classes/javax/swing/JWindow.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/JWindow.java	Mon Nov 11 23:17:30 2013 -0800
@@ -43,9 +43,10 @@
  * The <code>JWindow</code> component contains a <code>JRootPane</code>
  * as its only child.  The <code>contentPane</code> should be the parent
  * of any children of the <code>JWindow</code>.
- * As a conveniance <code>add</code> and its variants, <code>remove</code> and
- * <code>setLayout</code> have been overridden to forward to the
- * <code>contentPane</code> as necessary. This means you can write:
+ * As a convenience, the {@code add}, {@code remove}, and {@code setLayout}
+ * methods of this class are overridden, so that they delegate calls
+ * to the corresponding methods of the {@code ContentPane}.
+ * For example, you can add a child component to a window as follows:
  * <pre>
  *       window.add(child);
  * </pre>
@@ -286,7 +287,7 @@
      * <code>setLayout</code> are forwarded to the <code>contentPane</code>.
      *
      * @return true if <code>add</code> and <code>setLayout</code>
-     *         are fowarded; false otherwise
+     *         are forwarded; false otherwise
      *
      * @see #addImpl
      * @see #setLayout
--- a/src/share/classes/javax/swing/LookAndFeel.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/LookAndFeel.java	Mon Nov 11 23:17:30 2013 -0800
@@ -74,7 +74,7 @@
  * BasicLookAndFeel} providing the key-value pair {@code
  * "TreeUI"-"javax.swing.plaf.basic.BasicTreeUI"}, in the
  * {@code UIDefaults} returned from {@code getDefaults}. Refer to
- * {@link UIDefaults#getUI(JComponent)} for defails on how the implementation
+ * {@link UIDefaults#getUI(JComponent)} for details on how the implementation
  * of the {@code ComponentUI} subclass is obtained.
  * <p>
  * When a {@code LookAndFeel} is installed the {@code UIManager} does
@@ -114,7 +114,7 @@
  * <p>
  * For primitive values, such as {@code opaque}, the method {@code
  * installProperty} should be invoked.  {@code installProperty} only changes
- * the correspoding property if the value has not been changed by the
+ * the corresponding property if the value has not been changed by the
  * developer.
  * <p>
  * {@code ComponentUI} implementations should use the various install methods
@@ -269,7 +269,7 @@
      */
     public static void installProperty(JComponent c,
                                        String propertyName, Object propertyValue) {
-        // this is a special case because the JPasswordField's ancestor heirarchy
+        // this is a special case because the JPasswordField's ancestor hierarchy
         // includes a class outside of javax.swing, thus we cannot call setUIProperty
         // directly.
         if (SunToolkit.isInstanceOf(c, "javax.swing.JPasswordField")) {
--- a/src/share/classes/javax/swing/ProgressMonitor.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/ProgressMonitor.java	Mon Nov 11 23:17:30 2013 -0800
@@ -650,7 +650,7 @@
          * a set of predefined roles.  This enables assistive technologies to
          * provide a consistent interface to various tweaked subclasses of
          * components (e.g., use AccessibleRole.PUSH_BUTTON for all components
-         * that act like a push button) as well as distinguish between sublasses
+         * that act like a push button) as well as distinguish between subclasses
          * that behave differently (e.g., AccessibleRole.CHECK_BOX for check boxes
          * and AccessibleRole.RADIO_BUTTON for radio buttons).
          * <p>Note that the AccessibleRole class is also extensible, so
@@ -1017,7 +1017,7 @@
          * If there is no selection, but there is
          * a caret, the start and end offsets will be the same.
          *
-         * @return the index into teh text of the end of the selection
+         * @return the index into the text of the end of the selection
          */
         public int getSelectionEnd() {
             AccessibleText at = getNoteLabelAccessibleText();
--- a/src/share/classes/javax/swing/RepaintManager.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/RepaintManager.java	Mon Nov 11 23:17:30 2013 -0800
@@ -698,7 +698,7 @@
 
     /**
      * This is invoked to process paint requests.  It's needed
-     * for backward compatability in so far as RepaintManager would previously
+     * for backward compatibility in so far as RepaintManager would previously
      * not see paint requests for top levels, so, we have to make sure
      * a subclass correctly paints any dirty top levels.
      */
--- a/src/share/classes/javax/swing/RootPaneContainer.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/RootPaneContainer.java	Mon Nov 11 23:17:30 2013 -0800
@@ -45,18 +45,18 @@
  * dropping a component on a RootPaneContainer would be interpreted
  * as <code>frame.getContentPane().add(child)</code>.
  * <p>
- * For conveniance
- * <code>JFrame</code>, <code>JDialog</code>, <code>JWindow</code>,
- * <code>JApplet</code> and <code>JInternalFrame</code>, by default,
- * forward, by default, all calls to the <code>add</code>,
- * <code>remove</code> and <code>setLayout</code> methods, to the
- * <code>contentPane</code>. This means you can call:
+ * As a convenience, the standard classes that implement this interface
+ * (such as {@code JFrame}, {@code JDialog}, {@code JWindow}, {@code JApplet},
+ * and {@code JInternalFrame}) have their {@code add}, {@code remove},
+ * and {@code setLayout} methods overridden, so that they delegate calls
+ * to the corresponding methods of the {@code ContentPane}.
+ * For example, you can add a child component to a frame as follows:
  * <pre>
- * rootPaneContainer.add(component);
+ *       frame.add(child);
  * </pre>
  * instead of:
  * <pre>
- * rootPaneContainer.getContentPane().add(component);
+ *       frame.getContentPane().add(child);
  * </pre>
  * <p>
  * The behavior of the <code>add</code> and
--- a/src/share/classes/javax/swing/ScrollPaneConstants.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/ScrollPaneConstants.java	Mon Nov 11 23:17:30 2013 -0800
@@ -40,7 +40,7 @@
     String VIEWPORT = "VIEWPORT";
     /** Identifies a vertical scrollbar. */
     String VERTICAL_SCROLLBAR = "VERTICAL_SCROLLBAR";
-    /** Identifies a horizonal scrollbar. */
+    /** Identifies a horizontal scrollbar. */
     String HORIZONTAL_SCROLLBAR = "HORIZONTAL_SCROLLBAR";
     /**
      * Identifies the area along the left side of the viewport between the
--- a/src/share/classes/javax/swing/SpinnerDateModel.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/SpinnerDateModel.java	Mon Nov 11 23:17:30 2013 -0800
@@ -67,7 +67,7 @@
  *   <li><code>Calendar.SECOND</code>
  *   <li><code>Calendar.MILLISECOND</code>
  * </ul>
- * However some UIs may set the calendarField before commiting the edit
+ * However some UIs may set the calendarField before committing the edit
  * to spin the field under the cursor. If you only want one field to
  * spin you can subclass and ignore the setCalendarField calls.
  * <p>
@@ -133,7 +133,7 @@
      * upper or lower bound.  If <code>value</code> or
      * <code>calendarField</code> is <code>null</code>, or if both
      * <code>start</code> and <code>end</code> are specified and
-     * <code>mininum &gt; maximum</code> then an
+     * <code>minimum &gt; maximum</code> then an
      * <code>IllegalArgumentException</code> is thrown.
      * Similarly if <code>(minimum &lt;= value &lt;= maximum)</code> is false,
      * an IllegalArgumentException is thrown.
@@ -310,7 +310,7 @@
      * simply move the specified <code>Calendar</code> field forward or backward
      * by one unit with the <code>Calendar.add</code> method.
      * You should use this method with care as some UIs may set the
-     * calendarField before commiting the edit to spin the field under
+     * calendarField before committing the edit to spin the field under
      * the cursor. If you only want one field to spin you can subclass
      * and ignore the setCalendarField calls.
      *
--- a/src/share/classes/javax/swing/SpinnerModel.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/SpinnerModel.java	Mon Nov 11 23:17:30 2013 -0800
@@ -33,7 +33,7 @@
  * A model for a potentially unbounded sequence of object values.  This model
  * is similar to <code>ListModel</code> however there are some important differences:
  * <ul>
- * <li> The number of sequence elements isn't neccessarily bounded.
+ * <li> The number of sequence elements isn't necessarily bounded.
  * <li> The model doesn't support indexed random access to sequence elements.
  *      Only three sequence values are accessible at a time: current, next and
  *      previous.
@@ -50,7 +50,7 @@
  *     last element of the sequence.
  *
  *   <dt><code>previousValue</code>
- *   <dd>The preceeding element or null if <code>value</code> is the
+ *   <dd>The preceding element or null if <code>value</code> is the
  *     first element of the sequence.
  * </dl>
  * When the the <code>value</code> property changes,
--- a/src/share/classes/javax/swing/SpinnerNumberModel.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/SpinnerNumberModel.java	Mon Nov 11 23:17:30 2013 -0800
@@ -102,7 +102,7 @@
      * have an upper or lower bound.
      * If <code>value</code> or <code>stepSize</code> is <code>null</code>,
      * or if both <code>minimum</code> and <code>maximum</code>
-     * are specified and <code>mininum &gt; maximum</code> then an
+     * are specified and <code>minimum &gt; maximum</code> then an
      * <code>IllegalArgumentException</code> is thrown.
      * Similarly if <code>(minimum &lt;= value &lt;= maximum</code>) is false,
      * an <code>IllegalArgumentException</code> is thrown.
--- a/src/share/classes/javax/swing/SpringLayout.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/SpringLayout.java	Mon Nov 11 23:17:30 2013 -0800
@@ -286,7 +286,7 @@
      * as EAST - WIDTH.
      * <p>
      * [RELATIVE_BASELINE is a private constraint that is set automatically when
-     * the SpringLayout.Constraints(Component) constuctor is called or when
+     * the SpringLayout.Constraints(Component) constructor is called or when
      * a constraints object is registered with a SpringLayout object.]
      * <p>
      * <b>Note</b>: In this document,
@@ -1167,7 +1167,7 @@
      * method, instead of returning the current binding for the
      * edge, returns a proxy that tracks the characteristics
      * of the edge even if the edge is subsequently rebound.
-     * Proxies are intended to be used in builder envonments
+     * Proxies are intended to be used in builder environments
      * where it is useful to allow the user to define the
      * constraints for a layout in any order. Proxies do, however,
      * provide the means to create cyclic dependencies amongst
--- a/src/share/classes/javax/swing/SwingUtilities.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/SwingUtilities.java	Mon Nov 11 23:17:30 2013 -0800
@@ -1337,7 +1337,7 @@
      * <code>java.awt.EventQueue.invokeAndWait()</code>.
      *
      * @exception  InterruptedException if we're interrupted while waiting for
-     *             the event dispatching thread to finish excecuting
+     *             the event dispatching thread to finish executing
      *             <code>doRun.run()</code>
      * @exception  InvocationTargetException  if an exception is thrown
      *             while running <code>doRun</code>
--- a/src/share/classes/javax/swing/ToolTipManager.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/ToolTipManager.java	Mon Nov 11 23:17:30 2013 -0800
@@ -37,7 +37,7 @@
  * hide. Consider a component that has a different tooltip based on where
  * the mouse is, such as JTree. When the mouse moves into the JTree and
  * over a region that has a valid tooltip, the tooltip will become
- * visibile after <code>initialDelay</code> milliseconds. After
+ * visible after <code>initialDelay</code> milliseconds. After
  * <code>dismissDelay</code> milliseconds the tooltip will be hidden. If
  * the mouse is over a region that has a valid tooltip, and the tooltip
  * is currently visible, when the mouse moves to a region that doesn't have
--- a/src/share/classes/javax/swing/TransferHandler.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/TransferHandler.java	Mon Nov 11 23:17:30 2013 -0800
@@ -759,7 +759,7 @@
      * returns. Should the clipboard be unavailable when attempting to place
      * data on it, the <code>IllegalStateException</code> thrown by
      * {@link Clipboard#setContents(Transferable, ClipboardOwner)} will
-     * be propogated through this method. However,
+     * be propagated through this method. However,
      * <code>exportDone</code> will first be called with an action
      * of <code>NONE</code> for consistency.
      *
--- a/src/share/classes/javax/swing/UIManager.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/UIManager.java	Mon Nov 11 23:17:30 2013 -0800
@@ -126,7 +126,7 @@
  *       current look and feel ({@code setLookAndFeel()} is invoked). The
  *       look and feel defaults can be obtained using the {@code
  *       getLookAndFeelDefaults()} method.
- *   <li>Sytem defaults. The system defaults are provided by Swing.
+ *   <li>System defaults. The system defaults are provided by Swing.
  * </ol>
  * Invoking any of the various {@code get} methods
  * results in checking each of the defaults, in order, returning
@@ -152,7 +152,7 @@
  * and documented by that look and feel. In addition, each look and
  * feel, or {@code ComponentUI} provided by a look and feel, may
  * access the defaults at different times in their life cycle. Some
- * look and feels may agressively look up defaults, so that changing a
+ * look and feels may aggressively look up defaults, so that changing a
  * default may not have an effect after installing the look and feel.
  * Other look and feels may lazily access defaults so that a change to
  * the defaults may effect an existing look and feel. Finally, other look
@@ -313,7 +313,7 @@
          *
          * @param name      a <code>String</code> specifying the name of
          *                      the look and feel
-         * @param className a <code>String</code> specifiying the name of
+         * @param className a <code>String</code> specifying the name of
          *                      the class that implements the look and feel
          */
         public LookAndFeelInfo(String name, String className) {
--- a/src/share/classes/javax/swing/border/TitledBorder.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/border/TitledBorder.java	Mon Nov 11 23:17:30 2013 -0800
@@ -45,7 +45,7 @@
  * specified position and justification.
  * <p>
  * If the border, font, or color property values are not
- * specified in the constuctor or by invoking the appropriate
+ * specified in the constructor or by invoking the appropriate
  * set methods, the property values will be defined by the current
  * look and feel, using the following property names in the
  * Defaults Table:
--- a/src/share/classes/javax/swing/border/package.html	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/border/package.html	Mon Nov 11 23:17:30 2013 -0800
@@ -25,7 +25,7 @@
 or visit www.oracle.com if you need additional information or have any
 questions.
 -->
-
+<title></title>
 </head>
 <body bgcolor="white">
 
--- a/src/share/classes/javax/swing/colorchooser/package.html	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/colorchooser/package.html	Mon Nov 11 23:17:30 2013 -0800
@@ -25,6 +25,7 @@
 or visit www.oracle.com if you need additional information or have any
 questions.
 -->
+<title></title>
 </head>
 <body bgcolor="white">
 
--- a/src/share/classes/javax/swing/event/DocumentEvent.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/event/DocumentEvent.java	Mon Nov 11 23:17:30 2013 -0800
@@ -79,7 +79,7 @@
      * This method is for observers to discover the structural
      * changes that were made.  This means that only elements
      * that existed prior to the mutation (and still exist after
-     * the mutatino) need to have ElementChange records.
+     * the mutation) need to have ElementChange records.
      * The changes made available need not be recursive.
      * <p>
      * For example, if the an element is removed from it's
--- a/src/share/classes/javax/swing/event/HyperlinkEvent.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/event/HyperlinkEvent.java	Mon Nov 11 23:17:30 2013 -0800
@@ -158,7 +158,7 @@
     /**
      * Returns the <code>Element</code> that corresponds to the source of the
      * event. This will typically be an <code>Element</code> representing
-     * an anchor. If a constructur that is used that does not specify a source
+     * an anchor. If a constructor that is used that does not specify a source
      * <code>Element</code>, or null was specified as the source
      * <code>Element</code>, this will return null.
      *
--- a/src/share/classes/javax/swing/event/TableModelEvent.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/event/TableModelEvent.java	Mon Nov 11 23:17:30 2013 -0800
@@ -67,7 +67,7 @@
  */
 public class TableModelEvent extends java.util.EventObject
 {
-    /** Identifies the addtion of new rows or columns. */
+    /** Identifies the addition of new rows or columns. */
     public static final int INSERT =  1;
     /** Identifies a change to existing data. */
     public static final int UPDATE =  0;
--- a/src/share/classes/javax/swing/event/TreeModelEvent.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/event/TreeModelEvent.java	Mon Nov 11 23:17:30 2013 -0800
@@ -89,7 +89,7 @@
      * before the deletes have occurred. Since the indexes must be specified in
      * order, the most natural processing methodology is to use a delete-counter.
      * Start by initializing the counter to zero and start work through the
-     * list from lowest to higest. Every time you do a delete, add the current
+     * list from lowest to highest. Every time you do a delete, add the current
      * value of the delete-counter to the index-position where the delete occurred,
      * and append the result to a Vector of delete-locations, using
      * <code>addElement()</code>. Then increment the delete-counter. The index
--- a/src/share/classes/javax/swing/event/package.html	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/event/package.html	Mon Nov 11 23:17:30 2013 -0800
@@ -25,7 +25,7 @@
 or visit www.oracle.com if you need additional information or have any
 questions.
 -->
-
+<title></title>
 </head>
 <body bgcolor="white">
 
--- a/src/share/classes/javax/swing/filechooser/FileSystemView.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/filechooser/FileSystemView.java	Mon Nov 11 23:17:30 2013 -0800
@@ -122,7 +122,7 @@
     }
 
     /**
-     * Determines if the given file is a root in the navigatable tree(s).
+     * Determines if the given file is a root in the navigable tree(s).
      * Examples: Windows 98 has one root, the Desktop folder. DOS has one root
      * per drive letter, <code>C:\</code>, <code>D:\</code>, etc. Unix has one root,
      * the <code>"/"</code> directory.
@@ -130,7 +130,7 @@
      * The default implementation gets information from the <code>ShellFolder</code> class.
      *
      * @param f a <code>File</code> object representing a directory
-     * @return <code>true</code> if <code>f</code> is a root in the navigatable tree.
+     * @return <code>true</code> if <code>f</code> is a root in the navigable tree.
      * @see #isFileSystemRoot
      */
     public boolean isRoot(File f) {
@@ -201,7 +201,7 @@
     /**
      * Type description for a file, directory, or folder as it would be displayed in
      * a system file browser. Example from Windows: the "Desktop" folder
-     * is desribed as "Desktop".
+     * is described as "Desktop".
      *
      * Override for platforms with native ShellFolder implementations.
      *
@@ -254,7 +254,7 @@
      * parent directory in the filesystem. Folder could for example be the
      * "Desktop" folder which is not the same as file.getParentFile().
      *
-     * @param folder a <code>File</code> object repesenting a directory or special folder
+     * @param folder a <code>File</code> object representing a directory or special folder
      * @param file a <code>File</code> object
      * @return <code>true</code> if <code>folder</code> is a directory or special folder and contains <code>file</code>.
      * @since 1.4
@@ -281,7 +281,7 @@
 
     /**
      *
-     * @param parent a <code>File</code> object repesenting a directory or special folder
+     * @param parent a <code>File</code> object representing a directory or special folder
      * @param fileName a name of a file or folder which exists in <code>parent</code>
      * @return a File object. This is normally constructed with <code>new
      * File(parent, fileName)</code> except when parent and child are both
@@ -698,7 +698,7 @@
     /**
      * Type description for a file, directory, or folder as it would be displayed in
      * a system file browser. Example from Windows: the "Desktop" folder
-     * is desribed as "Desktop".
+     * is described as "Desktop".
      *
      * The Windows implementation gets information from the ShellFolder class.
      */
--- a/src/share/classes/javax/swing/filechooser/package.html	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/filechooser/package.html	Mon Nov 11 23:17:30 2013 -0800
@@ -25,7 +25,7 @@
 or visit www.oracle.com if you need additional information or have any
 questions.
 -->
-
+<title></title>
 </head>
 
 <body bgcolor="white">
--- a/src/share/classes/javax/swing/plaf/ComboBoxUI.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/plaf/ComboBoxUI.java	Mon Nov 11 23:17:30 2013 -0800
@@ -36,7 +36,7 @@
 public abstract class ComboBoxUI extends ComponentUI {
 
     /**
-     * Set the visiblity of the popup
+     * Set the visibility of the popup
      */
     public abstract void setPopupVisible( JComboBox c, boolean v );
 
--- a/src/share/classes/javax/swing/plaf/basic/BasicBorders.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/plaf/basic/BasicBorders.java	Mon Nov 11 23:17:30 2013 -0800
@@ -497,7 +497,7 @@
 
 
     /**
-     * Draws the border around the splitpane. To work correctly you shoudl
+     * Draws the border around the splitpane. To work correctly you should
      * also install a border on the divider (property SplitPaneDivider.border).
      */
     public static class SplitPaneBorder implements Border, UIResource {
--- a/src/share/classes/javax/swing/plaf/basic/BasicComboBoxUI.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/plaf/basic/BasicComboBoxUI.java	Mon Nov 11 23:17:30 2013 -0800
@@ -41,7 +41,7 @@
 /**
  * Basic UI implementation for JComboBox.
  * <p>
- * The combo box is a compound component which means that it is an agregate of
+ * The combo box is a compound component which means that it is an aggregate of
  * many simpler components. This class creates and manages the listeners
  * on the combo box and the combo box model. These listeners update the user
  * interface in response to changes in the properties and state of the combo box.
@@ -705,7 +705,7 @@
     }
 
     /**
-     * The aggregate components which compise the combo box are
+     * The aggregate components which comprise the combo box are
      * unregistered and uninitialized. This method is called as part of the
      * UI uninstallation process.
      */
@@ -911,7 +911,7 @@
     }
 
     /**
-     * The minumum size is the size of the display area plus insets plus the button.
+     * The minimum size is the size of the display area plus insets plus the button.
      */
     @Override
     public Dimension getMinimumSize( JComponent c ) {
--- a/src/share/classes/javax/swing/plaf/basic/BasicFileChooserUI.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/plaf/basic/BasicFileChooserUI.java	Mon Nov 11 23:17:30 2013 -0800
@@ -456,7 +456,7 @@
 
         public void mouseClicked(MouseEvent evt) {
             // Note: we can't depend on evt.getSource() because of backward
-            // compatability
+            // compatibility
             if (list != null &&
                 SwingUtilities.isLeftMouseButton(evt) &&
                 (evt.getClickCount()%2 == 0)) {
@@ -565,7 +565,7 @@
     }
 
     protected class DoubleClickListener extends MouseAdapter {
-        // NOTE: This class exists only for backward compatability. All
+        // NOTE: This class exists only for backward compatibility. All
         // its functionality has been moved into Handler. If you need to add
         // new functionality add it to the Handler, but make sure this
         // class calls into the Handler.
@@ -591,7 +591,7 @@
     }
 
     protected class SelectionListener implements ListSelectionListener {
-        // NOTE: This class exists only for backward compatability. All
+        // NOTE: This class exists only for backward compatibility. All
         // its functionality has been moved into Handler. If you need to add
         // new functionality add it to the Handler, but make sure this
         // class calls into the Handler.
--- a/src/share/classes/javax/swing/plaf/basic/BasicInternalFrameTitlePane.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/plaf/basic/BasicInternalFrameTitlePane.java	Mon Nov 11 23:17:30 2013 -0800
@@ -270,18 +270,27 @@
 
     protected void addSystemMenuItems(JMenu systemMenu) {
         JMenuItem mi = systemMenu.add(restoreAction);
-        mi.setMnemonic('R');
+        mi.setMnemonic(getButtonMnemonic("restore"));
         mi = systemMenu.add(moveAction);
-        mi.setMnemonic('M');
+        mi.setMnemonic(getButtonMnemonic("move"));
         mi = systemMenu.add(sizeAction);
-        mi.setMnemonic('S');
+        mi.setMnemonic(getButtonMnemonic("size"));
         mi = systemMenu.add(iconifyAction);
-        mi.setMnemonic('n');
+        mi.setMnemonic(getButtonMnemonic("minimize"));
         mi = systemMenu.add(maximizeAction);
-        mi.setMnemonic('x');
+        mi.setMnemonic(getButtonMnemonic("maximize"));
         systemMenu.add(new JSeparator());
         mi = systemMenu.add(closeAction);
-        mi.setMnemonic('C');
+        mi.setMnemonic(getButtonMnemonic("close"));
+    }
+
+    private static int getButtonMnemonic(String button) {
+        try {
+            return Integer.parseInt(UIManager.getString(
+                    "InternalFrameTitlePane." + button + "Button.mnemonic"));
+        } catch (NumberFormatException e) {
+            return -1;
+        }
     }
 
     protected JMenu createSystemMenu() {
@@ -556,7 +565,7 @@
      * Instantiate it only within subclasses of <code>Foo</code>.
      */
     public class PropertyChangeHandler implements PropertyChangeListener {
-        // NOTE: This class exists only for backward compatability. All
+        // NOTE: This class exists only for backward compatibility. All
         // its functionality has been moved into Handler. If you need to add
         // new functionality add it to the Handler, but make sure this
         // class calls into the Handler.
@@ -570,7 +579,7 @@
      * Instantiate it only within subclasses of <code>Foo</code>.
      */
     public class TitlePaneLayout implements LayoutManager {
-        // NOTE: This class exists only for backward compatability. All
+        // NOTE: This class exists only for backward compatibility. All
         // its functionality has been moved into Handler. If you need to add
         // new functionality add it to the Handler, but make sure this
         // class calls into the Handler.
--- a/src/share/classes/javax/swing/plaf/basic/BasicInternalFrameUI.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/plaf/basic/BasicInternalFrameUI.java	Mon Nov 11 23:17:30 2013 -0800
@@ -477,7 +477,7 @@
 
     public class InternalFramePropertyChangeListener implements
         PropertyChangeListener {
-        // NOTE: This class exists only for backward compatability. All
+        // NOTE: This class exists only for backward compatibility. All
         // its functionality has been moved into Handler. If you need to add
         // new functionality add it to the Handler, but make sure this
         // class calls into the Handler.
@@ -491,7 +491,7 @@
     }
 
   public class InternalFrameLayout implements LayoutManager {
-    // NOTE: This class exists only for backward compatability. All
+    // NOTE: This class exists only for backward compatibility. All
     // its functionality has been moved into Handler. If you need to add
     // new functionality add it to the Handler, but make sure this
     // class calls into the Handler.
@@ -1093,7 +1093,7 @@
     }    /// End BorderListener Class
 
     protected class ComponentHandler implements ComponentListener {
-      // NOTE: This class exists only for backward compatability. All
+      // NOTE: This class exists only for backward compatibility. All
       // its functionality has been moved into Handler. If you need to add
       // new functionality add it to the Handler, but make sure this
       // class calls into the Handler.
@@ -1119,7 +1119,7 @@
 
 
     protected class GlassPaneDispatcher implements MouseInputListener {
-        // NOTE: This class exists only for backward compatability. All
+        // NOTE: This class exists only for backward compatibility. All
         // its functionality has been moved into Handler. If you need to add
         // new functionality add it to the Handler, but make sure this
         // class calls into the Handler.
@@ -1159,7 +1159,7 @@
 
     protected class BasicInternalFrameListener implements InternalFrameListener
     {
-      // NOTE: This class exists only for backward compatability. All
+      // NOTE: This class exists only for backward compatibility. All
       // its functionality has been moved into Handler. If you need to add
       // new functionality add it to the Handler, but make sure this
       // class calls into the Handler.
--- a/src/share/classes/javax/swing/plaf/basic/BasicLookAndFeel.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/plaf/basic/BasicLookAndFeel.java	Mon Nov 11 23:17:30 2013 -0800
@@ -433,7 +433,7 @@
      * used for getting localized defaults.  Also initialize the default
      * locale used when no locale is passed into UIDefaults.get().  The
      * default locale should generally not be relied upon. It is here for
-     * compatability with releases prior to 1.4.
+     * compatibility with releases prior to 1.4.
      */
     private void initResourceBundle(UIDefaults table) {
         table.setDefaultLocale( Locale.getDefault() );
--- a/src/share/classes/javax/swing/plaf/basic/BasicMenuItemUI.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/plaf/basic/BasicMenuItemUI.java	Mon Nov 11 23:17:30 2013 -0800
@@ -760,7 +760,7 @@
             Thread.dumpStack();
     }
     protected class MouseInputHandler implements MouseInputListener {
-        // NOTE: This class exists only for backward compatability. All
+        // NOTE: This class exists only for backward compatibility. All
         // its functionality has been moved into Handler. If you need to add
         // new functionality add it to the Handler, but make sure this
         // class calls into the Handler.
--- a/src/share/classes/javax/swing/plaf/basic/BasicMenuUI.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/plaf/basic/BasicMenuUI.java	Mon Nov 11 23:17:30 2013 -0800
@@ -322,7 +322,7 @@
      * @since 1.4
      */
     protected class MouseInputHandler implements MouseInputListener {
-        // NOTE: This class exists only for backward compatability. All
+        // NOTE: This class exists only for backward compatibility. All
         // its functionality has been moved into Handler. If you need to add
         // new functionality add it to the Handler, but make sure this
         // class calls into the Handler.
--- a/src/share/classes/javax/swing/plaf/basic/BasicOptionPaneUI.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/plaf/basic/BasicOptionPaneUI.java	Mon Nov 11 23:17:30 2013 -0800
@@ -923,7 +923,7 @@
         private boolean reverseButtons;
         /**
          * Indicates whether or not centersChildren should be used vs
-         * the orientation. This is done for backward compatability
+         * the orientation. This is done for backward compatibility
          * for subclassers.
          */
         private boolean useOrientation;
--- a/src/share/classes/javax/swing/plaf/basic/BasicProgressBarUI.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/plaf/basic/BasicProgressBarUI.java	Mon Nov 11 23:17:30 2013 -0800
@@ -335,7 +335,7 @@
 
     /**
      * Returns the width (if HORIZONTAL) or height (if VERTICAL)
-     * of each of the indivdual cells/units to be rendered in the
+     * of each of the individual cells/units to be rendered in the
      * progress bar. However, for text rendering simplification and
      * aesthetic considerations, this function will return 1 when
      * the progress string is being rendered.
@@ -1215,7 +1215,7 @@
      * Instantiate it only within subclasses of {@code BasicProgressBarUI}.
      */
     public class ChangeHandler implements ChangeListener {
-        // NOTE: This class exists only for backward compatability. All
+        // NOTE: This class exists only for backward compatibility. All
         // its functionality has been moved into Handler. If you need to add
         // new functionality add it to the Handler, but make sure this
         // class calls into the Handler.
--- a/src/share/classes/javax/swing/plaf/basic/BasicScrollBarUI.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/plaf/basic/BasicScrollBarUI.java	Mon Nov 11 23:17:30 2013 -0800
@@ -1489,7 +1489,7 @@
 
     public class PropertyChangeHandler implements PropertyChangeListener
     {
-        // NOTE: This class exists only for backward compatability. All
+        // NOTE: This class exists only for backward compatibility. All
         // its functionality has been moved into Handler. If you need to add
         // new functionality add it to the Handler, but make sure this
         // class calls into the Handler.
--- a/src/share/classes/javax/swing/plaf/basic/BasicScrollPaneUI.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/plaf/basic/BasicScrollPaneUI.java	Mon Nov 11 23:17:30 2013 -0800
@@ -443,7 +443,7 @@
     public class ViewportChangeHandler implements ChangeListener
     {
 
-        // NOTE: This class exists only for backward compatability. All
+        // NOTE: This class exists only for backward compatibility. All
         // its functionality has been moved into Handler. If you need to add
         // new functionality add it to the Handler, but make sure this
         // class calls into the Handler.
@@ -464,7 +464,7 @@
     public class HSBChangeListener implements ChangeListener
     {
 
-        // NOTE: This class exists only for backward compatability. All
+        // NOTE: This class exists only for backward compatibility. All
         // its functionality has been moved into Handler. If you need to add
         // new functionality add it to the Handler, but make sure this
         // class calls into the Handler.
@@ -494,7 +494,7 @@
     public class VSBChangeListener implements ChangeListener
     {
 
-        // NOTE: This class exists only for backward compatability. All
+        // NOTE: This class exists only for backward compatibility. All
         // its functionality has been moved into Handler. If you need to add
         // new functionality add it to the Handler, but make sure this
         // class calls into the Handler.
@@ -534,7 +534,7 @@
      */
     protected class MouseWheelHandler implements MouseWheelListener {
 
-        // NOTE: This class exists only for backward compatability. All
+        // NOTE: This class exists only for backward compatibility. All
         // its functionality has been moved into Handler. If you need to add
         // new functionality add it to the Handler, but make sure this
         // class calls into the Handler.
@@ -665,7 +665,7 @@
     public class PropertyChangeHandler implements PropertyChangeListener
     {
 
-        // NOTE: This class exists only for backward compatability. All
+        // NOTE: This class exists only for backward compatibility. All
         // its functionality has been moved into Handler. If you need to add
         // new functionality add it to the Handler, but make sure this
         // class calls into the Handler.
--- a/src/share/classes/javax/swing/plaf/basic/BasicSliderUI.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/plaf/basic/BasicSliderUI.java	Mon Nov 11 23:17:30 2013 -0800
@@ -743,7 +743,7 @@
     }
 
     public class PropertyChangeHandler implements PropertyChangeListener {
-        // NOTE: This class exists only for backward compatability. All
+        // NOTE: This class exists only for backward compatibility. All
         // its functionality has been moved into Handler. If you need to add
         // new functionality add it to the Handler, but make sure this
         // class calls into the Handler.
@@ -1545,7 +1545,7 @@
      * Instantiate it only within subclasses of <code>Foo</code>.
      */
     public class ChangeHandler implements ChangeListener {
-        // NOTE: This class exists only for backward compatability. All
+        // NOTE: This class exists only for backward compatibility. All
         // its functionality has been moved into Handler. If you need to add
         // new functionality add it to the Handler, but make sure this
         // class calls into the Handler.
@@ -1852,7 +1852,7 @@
      * Instantiate it only within subclasses of <code>Foo</code>.
      */
     public class ComponentHandler extends ComponentAdapter {
-        // NOTE: This class exists only for backward compatability. All
+        // NOTE: This class exists only for backward compatibility. All
         // its functionality has been moved into Handler. If you need to add
         // new functionality add it to the Handler, but make sure this
         // class calls into the Handler.
@@ -1868,7 +1868,7 @@
      * Instantiate it only within subclasses of <code>Foo</code>.
      */
     public class FocusHandler implements FocusListener {
-        // NOTE: This class exists only for backward compatability. All
+        // NOTE: This class exists only for backward compatibility. All
         // its functionality has been moved into Handler. If you need to add
         // new functionality add it to the Handler, but make sure this
         // class calls into the Handler.
@@ -1895,7 +1895,7 @@
      * Instantiate it only within subclasses of <code>Foo</code>.
      */
     public class ActionScroller extends AbstractAction {
-        // NOTE: This class exists only for backward compatability. All
+        // NOTE: This class exists only for backward compatibility. All
         // its functionality has been moved into Actions. If you need to add
         // new functionality add it to the Actions, but make sure this
         // class calls into the Actions.
@@ -1928,7 +1928,7 @@
      * A static version of the above.
      */
     static class SharedActionScroller extends AbstractAction {
-        // NOTE: This class exists only for backward compatability. All
+        // NOTE: This class exists only for backward compatibility. All
         // its functionality has been moved into Actions. If you need to add
         // new functionality add it to the Actions, but make sure this
         // class calls into the Actions.
--- a/src/share/classes/javax/swing/plaf/basic/BasicSplitPaneUI.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/plaf/basic/BasicSplitPaneUI.java	Mon Nov 11 23:17:30 2013 -0800
@@ -273,7 +273,7 @@
     private Color dividerDraggingColor;
     private boolean rememberPaneSizes;
 
-    // Indicates wether the one of splitpane sides is expanded
+    // Indicates whether the one of splitpane sides is expanded
     private boolean keepHidden = false;
 
     /** Indicates that we have painted once. */
@@ -637,7 +637,7 @@
 
 
     /**
-     * Determines wether the JSplitPane is set to use a continuous layout.
+     * Determines whether the JSplitPane is set to use a continuous layout.
      */
     public boolean isContinuousLayout() {
         return continuousLayout;
@@ -683,7 +683,7 @@
      */
     public class PropertyHandler implements PropertyChangeListener
     {
-        // NOTE: This class exists only for backward compatability. All
+        // NOTE: This class exists only for backward compatibility. All
         // its functionality has been moved into Handler. If you need to add
         // new functionality add it to the Handler, but make sure this
         // class calls into the Handler.
@@ -707,7 +707,7 @@
      */
     public class FocusHandler extends FocusAdapter
     {
-        // NOTE: This class exists only for backward compatability. All
+        // NOTE: This class exists only for backward compatibility. All
         // its functionality has been moved into Handler. If you need to add
         // new functionality add it to the Handler, but make sure this
         // class calls into the Handler.
@@ -1073,7 +1073,7 @@
 
     /**
      * Returns the preferred size for the passed in component,
-     * This is passed off to the current layoutmanager.
+     * This is passed off to the current layout manager.
      */
     public Dimension getPreferredSize(JComponent jc) {
         if(splitPane != null)
@@ -1084,7 +1084,7 @@
 
     /**
      * Returns the minimum size for the passed in component,
-     * This is passed off to the current layoutmanager.
+     * This is passed off to the current layout manager.
      */
     public Dimension getMinimumSize(JComponent jc) {
         if(splitPane != null)
@@ -1095,7 +1095,7 @@
 
     /**
      * Returns the maximum size for the passed in component,
-     * This is passed off to the current layoutmanager.
+     * This is passed off to the current layout manager.
      */
     public Dimension getMaximumSize(JComponent jc) {
         if(splitPane != null)
@@ -1438,8 +1438,8 @@
 
         /**
          * Returns the minimum size needed to contain the children.
-         * The width is the sum of all the childrens min widths and
-         * the height is the largest of the childrens minimum heights.
+         * The width is the sum of all the children's min widths and
+         * the height is the largest of the children's minimum heights.
          */
         public Dimension minimumLayoutSize(Container container) {
             int         minPrimary = 0;
@@ -1471,8 +1471,8 @@
 
         /**
          * Returns the preferred size needed to contain the children.
-         * The width is the sum of all the childrens preferred widths and
-         * the height is the largest of the childrens preferred heights.
+         * The width is the sum of all the preferred widths of the children and
+         * the height is the largest preferred height of the children.
          */
         public Dimension preferredLayoutSize(Container container) {
             int         prePrimary = 0;
--- a/src/share/classes/javax/swing/plaf/basic/BasicTabbedPaneUI.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/plaf/basic/BasicTabbedPaneUI.java	Mon Nov 11 23:17:30 2013 -0800
@@ -3748,7 +3748,7 @@
      * Instantiate it only within subclasses of BasicTabbedPaneUI.
      */
     public class PropertyChangeHandler implements PropertyChangeListener {
-        // NOTE: This class exists only for backward compatability. All
+        // NOTE: This class exists only for backward compatibility. All
         // its functionality has been moved into Handler. If you need to add
         // new functionality add it to the Handler, but make sure this
         // class calls into the Handler.
@@ -3762,7 +3762,7 @@
      * Instantiate it only within subclasses of BasicTabbedPaneUI.
      */
     public class TabSelectionHandler implements ChangeListener {
-        // NOTE: This class exists only for backward compatability. All
+        // NOTE: This class exists only for backward compatibility. All
         // its functionality has been moved into Handler. If you need to add
         // new functionality add it to the Handler, but make sure this
         // class calls into the Handler.
@@ -3776,7 +3776,7 @@
      * Instantiate it only within subclasses of BasicTabbedPaneUI.
      */
     public class MouseHandler extends MouseAdapter {
-        // NOTE: This class exists only for backward compatability. All
+        // NOTE: This class exists only for backward compatibility. All
         // its functionality has been moved into Handler. If you need to add
         // new functionality add it to the Handler, but make sure this
         // class calls into the Handler.
@@ -3790,7 +3790,7 @@
      * Instantiate it only within subclasses of BasicTabbedPaneUI.
      */
     public class FocusHandler extends FocusAdapter {
-        // NOTE: This class exists only for backward compatability. All
+        // NOTE: This class exists only for backward compatibility. All
         // its functionality has been moved into Handler. If you need to add
         // new functionality add it to the Handler, but make sure this
         // class calls into the Handler.
--- a/src/share/classes/javax/swing/plaf/basic/BasicTableUI.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/plaf/basic/BasicTableUI.java	Mon Nov 11 23:17:30 2013 -0800
@@ -738,7 +738,7 @@
      * the current <code>TableCellEditor</code>.
      */
      public class KeyHandler implements KeyListener {
-        // NOTE: This class exists only for backward compatability. All
+        // NOTE: This class exists only for backward compatibility. All
         // its functionality has been moved into Handler. If you need to add
         // new functionality add it to the Handler, but make sure this
         // class calls into the Handler.
@@ -764,7 +764,7 @@
      * Instantiate it only within subclasses of {@code BasicTableUI}.
      */
     public class FocusHandler implements FocusListener {
-        // NOTE: This class exists only for backward compatability. All
+        // NOTE: This class exists only for backward compatibility. All
         // its functionality has been moved into Handler. If you need to add
         // new functionality add it to the Handler, but make sure this
         // class calls into the Handler.
@@ -786,7 +786,7 @@
      * Instantiate it only within subclasses of BasicTableUI.
      */
     public class MouseInputHandler implements MouseInputListener {
-        // NOTE: This class exists only for backward compatability. All
+        // NOTE: This class exists only for backward compatibility. All
         // its functionality has been moved into Handler. If you need to add
         // new functionality add it to the Handler, but make sure this
         // class calls into the Handler.
--- a/src/share/classes/javax/swing/plaf/basic/BasicTextUI.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/plaf/basic/BasicTextUI.java	Mon Nov 11 23:17:30 2013 -0800
@@ -1560,6 +1560,10 @@
          * location that one might place a caret.  Some views may not be visible,
          * they might not be in the same order found in the model, or they just
          * might not allow access to some of the locations in the model.
+         * This method enables specifying a position to convert
+         * within the range of &gt;=0.  If the value is -1, a position
+         * will be calculated automatically.  If the value &lt; -1,
+         * the {@code BadLocationException} will be thrown.
          *
          * @param pos the position to convert &gt;= 0
          * @param a the allocated region to render into
@@ -1569,13 +1573,17 @@
          *  SwingConstants.NORTH, or SwingConstants.SOUTH.
          * @return the location within the model that best represents the next
          *  location visual position.
-         * @exception BadLocationException
+         * @exception BadLocationException the given position is not a valid
+         *                                 position within the document
          * @exception IllegalArgumentException for an invalid direction
          */
         public int getNextVisualPositionFrom(int pos, Position.Bias b, Shape a,
                                              int direction,
                                              Position.Bias[] biasRet)
             throws BadLocationException {
+            if (pos < -1) {
+                throw new BadLocationException("invalid position", pos);
+            }
             if( view != null ) {
                 int nextPos = view.getNextVisualPositionFrom(pos, b, a,
                                                      direction, biasRet);
--- a/src/share/classes/javax/swing/plaf/basic/BasicToolBarUI.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/plaf/basic/BasicToolBarUI.java	Mon Nov 11 23:17:30 2013 -0800
@@ -583,7 +583,7 @@
 
     /**
      * Sets the flag for enabling rollover borders on the toolbar and it will
-     * also install the apropriate border depending on the state of the flag.
+     * also install the appropriate border depending on the state of the flag.
      *
      * @param rollover if true, rollover borders are installed.
      *        Otherwise non-rollover borders are installed
@@ -606,7 +606,7 @@
      * This is a convenience method to call <code>setBorderToRollover</code>
      * for each child component.
      *
-     * @param c container which holds the child components (usally a JToolBar)
+     * @param c container which holds the child components (usually a JToolBar)
      * @see #setBorderToRollover
      * @since 1.4
      */
@@ -630,7 +630,7 @@
      * This is a convenience method to call <code>setBorderToNonRollover</code>
      * for each child component.
      *
-     * @param c container which holds the child components (usally a JToolBar)
+     * @param c container which holds the child components (usually a JToolBar)
      * @see #setBorderToNonRollover
      * @since 1.4
      */
@@ -654,7 +654,7 @@
      * This is a convenience method to call <code>setBorderNormal</code>
      * for each child component.
      *
-     * @param c container which holds the child components (usally a JToolBar)
+     * @param c container which holds the child components (usually a JToolBar)
      * @see #setBorderToNonRollover
      * @since 1.4
      */
@@ -1274,7 +1274,7 @@
     }
 
     protected class ToolBarContListener implements ContainerListener {
-        // NOTE: This class exists only for backward compatability. All
+        // NOTE: This class exists only for backward compatibility. All
         // its functionality has been moved into Handler. If you need to add
         // new functionality add it to the Handler, but make sure this
         // class calls into the Handler.
@@ -1289,7 +1289,7 @@
     }
 
     protected class ToolBarFocusListener implements FocusListener {
-        // NOTE: This class exists only for backward compatability. All
+        // NOTE: This class exists only for backward compatibility. All
         // its functionality has been moved into Handler. If you need to add
         // new functionality add it to the Handler, but make sure this
         // class calls into the Handler.
@@ -1303,7 +1303,7 @@
     }
 
     protected class PropertyListener implements PropertyChangeListener {
-        // NOTE: This class exists only for backward compatability. All
+        // NOTE: This class exists only for backward compatibility. All
         // its functionality has been moved into Handler. If you need to add
         // new functionality add it to the Handler, but make sure this
         // class calls into the Handler.
@@ -1317,7 +1317,7 @@
      * Instantiate it only within subclasses of BasicToolBarUI.
      */
     public class DockingListener implements MouseInputListener {
-        // NOTE: This class exists only for backward compatability. All
+        // NOTE: This class exists only for backward compatibility. All
         // its functionality has been moved into Handler. If you need to add
         // new functionality add it to the Handler, but make sure this
         // class calls into the Handler.
--- a/src/share/classes/javax/swing/plaf/basic/BasicToolTipUI.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/plaf/basic/BasicToolTipUI.java	Mon Nov 11 23:17:30 2013 -0800
@@ -204,7 +204,7 @@
         JComponent comp = ((JToolTip)c).getComponent();
 
         if (comp != null && !(comp.isEnabled())) {
-            // For better backward compatability, only install inactive
+            // For better backward compatibility, only install inactive
             // properties if they are defined.
             if (UIManager.getBorder("ToolTip.borderInactive") != null) {
                 LookAndFeel.installBorder(c, "ToolTip.borderInactive");
--- a/src/share/classes/javax/swing/plaf/basic/BasicTreeUI.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/plaf/basic/BasicTreeUI.java	Mon Nov 11 23:17:30 2013 -0800
@@ -140,7 +140,7 @@
     /** Used to determine what to display. */
     protected TreeModel         treeModel;
 
-    /** Model maintaing the selection. */
+    /** Model maintaining the selection. */
     protected TreeSelectionModel treeSelectionModel;
 
     /** How much the depth should be offset to properly calculate
@@ -1275,7 +1275,7 @@
     }
 
     /**
-     * Returns a ubounding box for the drop line.
+     * Returns a unbounding box for the drop line.
      *
      * @param loc a {@code DropLocation}
      * @return bounding box for the drop line
@@ -2525,7 +2525,7 @@
      * Updates the TreeState in response to nodes expanding/collapsing.
      */
     public class TreeExpansionHandler implements TreeExpansionListener {
-        // NOTE: This class exists only for backward compatability. All
+        // NOTE: This class exists only for backward compatibility. All
         // its functionality has been moved into Handler. If you need to add
         // new functionality add it to the Handler, but make sure this
         // class calls into the Handler.
@@ -2627,7 +2627,7 @@
      */
     public class TreeModelHandler implements TreeModelListener {
 
-        // NOTE: This class exists only for backward compatability. All
+        // NOTE: This class exists only for backward compatibility. All
         // its functionality has been moved into Handler. If you need to add
         // new functionality add it to the Handler, but make sure this
         // class calls into the Handler.
@@ -2656,7 +2656,7 @@
      */
     public class TreeSelectionHandler implements TreeSelectionListener {
 
-        // NOTE: This class exists only for backward compatability. All
+        // NOTE: This class exists only for backward compatibility. All
         // its functionality has been moved into Handler. If you need to add
         // new functionality add it to the Handler, but make sure this
         // class calls into the Handler.
@@ -2677,7 +2677,7 @@
      */
     public class CellEditorHandler implements CellEditorListener {
 
-        // NOTE: This class exists only for backward compatability. All
+        // NOTE: This class exists only for backward compatibility. All
         // its functionality has been moved into Handler. If you need to add
         // new functionality add it to the Handler, but make sure this
         // class calls into the Handler.
@@ -2695,12 +2695,12 @@
 
 
     /**
-     * This is used to get mutliple key down events to appropriately generate
+     * This is used to get multiple key down events to appropriately generate
      * events.
      */
     public class KeyHandler extends KeyAdapter {
 
-        // NOTE: This class exists only for backward compatability. All
+        // NOTE: This class exists only for backward compatibility. All
         // its functionality has been moved into Handler. If you need to add
         // new functionality add it to the Handler, but make sure this
         // class calls into the Handler.
@@ -2742,7 +2742,7 @@
      * Repaints the lead selection row when focus is lost/gained.
      */
     public class FocusHandler implements FocusListener {
-        // NOTE: This class exists only for backward compatability. All
+        // NOTE: This class exists only for backward compatibility. All
         // its functionality has been moved into Handler. If you need to add
         // new functionality add it to the Handler, but make sure this
         // class calls into the Handler.
@@ -2844,7 +2844,7 @@
      */
     public class MouseHandler extends MouseAdapter implements MouseMotionListener
  {
-        // NOTE: This class exists only for backward compatability. All
+        // NOTE: This class exists only for backward compatibility. All
         // its functionality has been moved into Handler. If you need to add
         // new functionality add it to the Handler, but make sure this
         // class calls into the Handler.
@@ -2877,12 +2877,12 @@
 
     /**
      * PropertyChangeListener for the tree. Updates the appropriate
-     * varaible, or TreeState, based on what changes.
+     * variable, or TreeState, based on what changes.
      */
     public class PropertyChangeHandler implements
                        PropertyChangeListener {
 
-        // NOTE: This class exists only for backward compatability. All
+        // NOTE: This class exists only for backward compatibility. All
         // its functionality has been moved into Handler. If you need to add
         // new functionality add it to the Handler, but make sure this
         // class calls into the Handler.
@@ -2900,7 +2900,7 @@
     public class SelectionModelPropertyChangeHandler implements
                       PropertyChangeListener {
 
-        // NOTE: This class exists only for backward compatability. All
+        // NOTE: This class exists only for backward compatibility. All
         // its functionality has been moved into Handler. If you need to add
         // new functionality add it to the Handler, but make sure this
         // class calls into the Handler.
--- a/src/share/classes/javax/swing/plaf/basic/package.html	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/plaf/basic/package.html	Mon Nov 11 23:17:30 2013 -0800
@@ -25,7 +25,7 @@
 or visit www.oracle.com if you need additional information or have any
 questions.
 -->
-
+<title></title>
 </head>
 <body bgcolor="white">
 
--- a/src/share/classes/javax/swing/plaf/metal/DefaultMetalTheme.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/plaf/metal/DefaultMetalTheme.java	Mon Nov 11 23:17:30 2013 -0800
@@ -57,7 +57,7 @@
  *     <code>UIManager.put("swing.boldMetal",&nbsp;Boolean.FALSE);</code>
  * </ul>
  * The defaults property <code>swing.boldMetal</code>, if set,
- * takes precendence over the system property of the same name. After
+ * takes precedence over the system property of the same name. After
  * setting this defaults property you need to re-install
  * <code>MetalLookAndFeel</code>, as well as update the UI
  * of any previously created widgets. Otherwise the results are undefined.
@@ -284,7 +284,7 @@
     /**
      * Returns the system text font. This returns Dialog, 12pt, plain.
      *
-     * @return the sytem text font
+     * @return the system text font
      */
     public FontUIResource getSystemTextFont() {
         return getFont(SYSTEM_TEXT_FONT);
--- a/src/share/classes/javax/swing/plaf/metal/MetalLookAndFeel.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/plaf/metal/MetalLookAndFeel.java	Mon Nov 11 23:17:30 2013 -0800
@@ -1738,7 +1738,7 @@
     public static FontUIResource getControlTextFont() { return getCurrentTheme().getControlTextFont();}
 
     /**
-     * Returns the sytem text font of the current theme. This is a
+     * Returns the system text font of the current theme. This is a
      * cover method for {@code getCurrentTheme().getSystemTextFont()}.
      *
      * @return the system text font
--- a/src/share/classes/javax/swing/plaf/metal/MetalRootPaneUI.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/plaf/metal/MetalRootPaneUI.java	Mon Nov 11 23:17:30 2013 -0800
@@ -682,7 +682,7 @@
         private boolean isMovingWindow;
 
         /**
-         * Used to determine the corner the resize is occuring from.
+         * Used to determine the corner the resize is occurring from.
          */
         private int dragCursor;
 
--- a/src/share/classes/javax/swing/plaf/metal/MetalSliderUI.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/plaf/metal/MetalSliderUI.java	Mon Nov 11 23:17:30 2013 -0800
@@ -64,14 +64,14 @@
 
    /**
     * A default horizontal thumb <code>Icon</code>. This field might not be
-    * used. To change the <code>Icon</code> used by this delgate directly set it
+    * used. To change the <code>Icon</code> used by this delegate directly set it
     * using the <code>Slider.horizontalThumbIcon</code> UIManager property.
     */
     protected static Icon horizThumbIcon;
 
    /**
     * A default vertical thumb <code>Icon</code>. This field might not be
-    * used. To change the <code>Icon</code> used by this delgate directly set it
+    * used. To change the <code>Icon</code> used by this delegate directly set it
     * using the <code>Slider.verticalThumbIcon</code> UIManager property.
     */
     protected static Icon vertThumbIcon;
--- a/src/share/classes/javax/swing/plaf/metal/MetalToolBarUI.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/plaf/metal/MetalToolBarUI.java	Mon Nov 11 23:17:30 2013 -0800
@@ -64,7 +64,7 @@
     private static List<WeakReference<JComponent>> components = new ArrayList<WeakReference<JComponent>>();
 
     /**
-     * This protected field is implemenation specific. Do not access directly
+     * This protected field is implementation specific. Do not access directly
      * or override. Use the create method instead.
      *
      * @see #createContainerListener
@@ -72,7 +72,7 @@
     protected ContainerListener contListener;
 
     /**
-     * This protected field is implemenation specific. Do not access directly
+     * This protected field is implementation specific. Do not access directly
      * or override. Use the create method instead.
      *
      * @see #createRolloverListener
--- a/src/share/classes/javax/swing/plaf/metal/MetalTreeUI.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/plaf/metal/MetalTreeUI.java	Mon Nov 11 23:17:30 2013 -0800
@@ -64,7 +64,7 @@
  * </table>
  *
  * <p>
- * As it is typically impratical to obtain the <code>TreeUI</code> from
+ * As it is typically impractical to obtain the <code>TreeUI</code> from
  * the <code>JTree</code> and cast to an instance of <code>MetalTreeUI</code>
  * you enable this property via the client property
  * <code>JTree.lineStyle</code>. For example, to switch to
--- a/src/share/classes/javax/swing/plaf/metal/package.html	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/plaf/metal/package.html	Mon Nov 11 23:17:30 2013 -0800
@@ -25,7 +25,7 @@
 or visit www.oracle.com if you need additional information or have any
 questions.
 -->
-
+<title></title>
 </head>
 <body bgcolor="white">
 
--- a/src/share/classes/javax/swing/plaf/multi/doc-files/multi_tsc.html	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/plaf/multi/doc-files/multi_tsc.html	Mon Nov 11 23:17:30 2013 -0800
@@ -14,14 +14,14 @@
 
 <blockquote>
 <hr>
+<p>
 <i>
-<p>
 This document is based on an article
 originally published in
 <a href="http://java.sun.com/products/jfc/tsc/" target="_top"><em>The Swing
 Connection</em></a>.
+</i>
 </p>
-</i>
 <hr>
 </blockquote>
 
@@ -43,7 +43,6 @@
 and requires no modifications to work with auxiliary look and feels.
 </p>
 
-</p>
 
 <p>
 This document has the following sections:
@@ -76,14 +75,12 @@
 </p>
 
 <p> 
-<a name="overview">
+<a name="overview"></a>
 <hr width=100% align=LEFT size=2>
-</a>
 <b>
 <font color="#000080" size="+2">Overview</font>
 </b>
 
-<p></p>
 
 <p>
 
@@ -146,14 +143,12 @@
 the Multiplexing look and feel.
 
 <p> 
-<a name="howtouse">
+<a name="howtouse"></a>
 <hr width=100% align=LEFT size=2>
-</a>
 <b>
 <font color="#000080" size="+2">How to Use Auxiliary Look and Feels</font>
 </b>
 
-<p></p>
 
 <p>
 It's easy to use auxiliary look and feels with Swing. To instruct 
@@ -204,14 +199,12 @@
 </p>
 
 <p> 
-<a name="howtowrite">
+<a name="howtowrite"></a>
 <hr width=100% align=LEFT size=2>
-</a>
 <b>
 <font color="#000080" size="+2">Tips for Writing an Auxiliary Look and Feel</font>
 </b>
 
-<p></p>
 
 <p>
 An auxiliary look and feel is like any other look and feel,
@@ -252,7 +245,6 @@
 <font color="#000080" size="+1"><b>Dos and Don'ts</b></font> 
 </a>
 </p>
-<p></p>
 
 <p>
 The following paragraphs provide some general recommendations for developing 
@@ -264,22 +256,19 @@
 to perform all initialization,
 and the <code>uninstallUI</code> method
 to perform all cleanup.</b></font>
-</font>
 </p>
-<ul>
-<p>
+<blockquote>
 The <code>installUI</code> and <code>uninstallUI</code>
 methods are invoked when a component's look and feel is set.
 The <code>installUI</code> method gives the new UI object
 a chance to add listeners on the component and its data model.
 Similarly, the <code>uninstallUI</code> method
 lets the previous UI object remove its listeners.
-</p>
-            </ul>
+</blockquote>
             <p> <font color="#000080"><b>Don't extend 
               visual look and feels.</b></font></p>
-            <ul>
-              <p> We recommended that you <i>don't</i> implement 
+<blockquote>
+               We recommended that you <i>don't</i> implement 
                 UI classes of an auxiliary look and feel as subclasses of the 
                 UI classes of a visual look and feel. Why not? Because they might 
                 accidentally inherit code that installs listeners on a component 
@@ -290,13 +279,13 @@
                 Instead, we recommend that the UI classes of an auxiliary look 
                 and feel directly extend the abstract UI classes in the <code>javax.swing.plaf</code> 
                 package. By using this strategy, the developer of an auxiliary 
-                look and feel can avoid competing with the default look and feel.</p>
-            </ul>
+                look and feel can avoid competing with the default look and feel.
+</blockquote>
             <p> <font color="#000080"><b>Override all UI-specific methods
 	    your UI classes inherit.</b></font>
 	    </p>
-            <ul>
-              <p> We recommend that each UI class of 
+<blockquote>
+               We recommend that each UI class of 
                 an auxiliary look and feel override the methods 
 		defined in the <code>javax.swing.plaf</code>
                 UI classes it descends from
@@ -309,15 +298,14 @@
 		if the 
                 component is opaque. If a UI class from a non-visual auxiliary 
                 look and feel does not override this method, all 
-                opaque components appear as blank areas on the screen!</p>
-            </ul>
+                opaque components appear as blank areas on the screen!
+</blockquote>
             <p> 
 
 <br>
 <a name="uidefaults">
 <font color="#000080" size="+1"><b>Extending UIDefaults</b></font> 
 </a>
-            <p></p>
 
             <p>In many cases, you 
               might want an auxiliary look and feel to be &quot;incomplete.&quot; That 
@@ -379,7 +367,6 @@
 <a name="defaultui">
 <b><font color="#000080" size="+1">Examining Other UI Objects</font></b> 
 </a>
-<p></p>
 
             <p>In 
               rare instances, a UI object from an auxiliary look and feel 
@@ -395,12 +382,10 @@
 	      </p>
 
 <p> 
-<a name="implementation">
+<a name="implementation"></a>
 <hr width=100% align=LEFT size=2>
-</a>
 <font color="#000080" size="+2"><b>How the Multiplexing Look and Feel
 Is Implemented</b></font> 
-<p></p>
 
 <p>
 The Multiplexing look and feel
@@ -437,8 +422,8 @@
                 and feel is always the first to be created. After that, a UI object 
                 is created from each auxiliary look and feel in the order 
                 they are specified in the <code>swing.auxiliarylaf</code> 
-                property.</li>
-<p>
+                property.<br><br></li>
+
               <li> When a method that requests information 
                 from a UI object is invoked, the multiplexing UI object 
 		invokes the method on all the UI objects, but returns 
@@ -450,8 +435,8 @@
 		The <code>getPreferredSize</code> method
 		is also invoked on the UI object for each auxiliary look and feel,
 		but the return values are ignored.
-                </li>
-<p>
+                <br><br></li>
+
               <li> When a method that does not request information 
                 from the UI object is invoked, the multiplexing UI object 
                 invokes that method on all UIs --
@@ -474,14 +459,12 @@
 
 <p> 
 
-<a name="custom">
+<a name="custom"></a>
 <hr width=100% align=LEFT size=2>
-</a>
 <font color="#000080" size="+2"><b>How to Provide a Custom Multiplexing Look
 and Feel</b></font> 
-<p></p>
 
-            <p><font color="#000080" size="+2"><b></b></font>While 
+            <p>While 
               we hope the behavior of the Multiplexing look and feel is 
               flexible enough not to require an alternative multiplexing look 
               and feel, Swing allows the user to specify another multiplexing look 
--- a/src/share/classes/javax/swing/plaf/multi/package.html	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/plaf/multi/package.html	Mon Nov 11 23:17:30 2013 -0800
@@ -25,7 +25,7 @@
 or visit www.oracle.com if you need additional information or have any
 questions.
 -->
-
+<title></title>
 </head>
 <body bgcolor="white">
 
--- a/src/share/classes/javax/swing/plaf/nimbus/AbstractRegionPainter.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/plaf/nimbus/AbstractRegionPainter.java	Mon Nov 11 23:17:30 2013 -0800
@@ -187,7 +187,7 @@
     protected abstract PaintContext getPaintContext();
 
     /**
-     * <p>Configures the given Graphics2D. Often, rendering hints or compositiing rules are
+     * <p>Configures the given Graphics2D. Often, rendering hints or compositing rules are
      * applied to a Graphics2D object prior to painting, which should affect all of the
      * subsequent painting operations. This method provides a convenient hook for configuring
      * the Graphics object prior to rendering, regardless of whether the render operation is
@@ -201,7 +201,7 @@
 
     /**
      * Actually performs the painting operation. Subclasses must implement this method.
-     * The graphics object passed may represent the actual surface being rendererd to,
+     * The graphics object passed may represent the actual surface being rendered to,
      * or it may be an intermediate buffer. It has also been pre-translated. Simply render
      * the component as if it were located at 0, 0 and had a width of <code>width</code>
      * and a height of <code>height</code>. For performance reasons, you may want to read
@@ -313,13 +313,13 @@
      * Decodes and returns a color, which is derived from a base color in UI
      * defaults.
      *
-     * @param key     A key corrosponding to the value in the UI Defaults table
+     * @param key     A key corresponding to the value in the UI Defaults table
      *                of UIManager where the base color is defined
      * @param hOffset The hue offset used for derivation.
      * @param sOffset The saturation offset used for derivation.
      * @param bOffset The brightness offset used for derivation.
      * @param aOffset The alpha offset used for derivation. Between 0...255
-     * @return The derived color, whos color value will change if the parent
+     * @return The derived color, whose color value will change if the parent
      *         uiDefault color changes.
      */
     protected final Color decodeColor(String key, float hOffset, float sOffset,
@@ -532,11 +532,11 @@
          *                   to one of the "decode" methods will return the passed in value.
          * @param inverted Whether to "invert" the meaning of the 9-square grid and stretching insets
          * @param cacheMode A hint as to which caching mode to use. If null, then set to no caching.
-         * @param maxH The maximium scale in the horizontal direction to use before punting and redrawing from scratch.
+         * @param maxH The maximum scale in the horizontal direction to use before punting and redrawing from scratch.
          *             For example, if maxH is 2, then we will attempt to scale any cached images up to 2x the canvas
          *             width before redrawing from scratch. Reasonable maxH values may improve painting performance.
          *             If set too high, then you may get poor looking graphics at higher zoom levels. Must be &gt;= 1.
-         * @param maxV The maximium scale in the vertical direction to use before punting and redrawing from scratch.
+         * @param maxV The maximum scale in the vertical direction to use before punting and redrawing from scratch.
          *             For example, if maxV is 2, then we will attempt to scale any cached images up to 2x the canvas
          *             height before redrawing from scratch. Reasonable maxV values may improve painting performance.
          *             If set too high, then you may get poor looking graphics at higher zoom levels. Must be &gt;= 1.
--- a/src/share/classes/javax/swing/plaf/nimbus/LoweredBorder.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/plaf/nimbus/LoweredBorder.java	Mon Nov 11 23:17:30 2013 -0800
@@ -64,7 +64,7 @@
     /**
      * Actually performs the painting operation. Subclasses must implement this
      * method. The graphics object passed may represent the actual surface being
-     * rendererd to, or it may be an intermediate buffer. It has also been
+     * rendered to, or it may be an intermediate buffer. It has also been
      * pre-translated. Simply render the component as if it were located at 0, 0
      * and had a width of <code>width</code> and a height of
      * <code>height</code>. For performance reasons, you may want to read the
--- a/src/share/classes/javax/swing/plaf/nimbus/NimbusStyle.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/plaf/nimbus/NimbusStyle.java	Mon Nov 11 23:17:30 2013 -0800
@@ -808,7 +808,7 @@
     }
 
     /**
-     * Simple utility method that searchs the given array of Strings for the
+     * Simple utility method that searches the given array of Strings for the
      * given string. This method is only called from getExtendedState if
      * the developer has specified a specific state for the component to be
      * in (ie, has "wedged" the component in that state) by specifying
@@ -1010,7 +1010,7 @@
     }
 
     /**
-     * Contains values such as the UIDefaults and painters asssociated with
+     * Contains values such as the UIDefaults and painters associated with
      * a state. Whereas <code>State</code> represents a distinct state that a
      * component can be in (such as Enabled), this class represents the colors,
      * fonts, painters, etc associated with some state for this
--- a/src/share/classes/javax/swing/plaf/nimbus/doc-files/properties.html	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/plaf/nimbus/doc-files/properties.html	Mon Nov 11 23:17:30 2013 -0800
@@ -1,5 +1,7 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html>
 <head>
+<title></title>
 </head>
 <body>
 <h1 id="primaryColors">Primary Colors</h1>
--- a/src/share/classes/javax/swing/plaf/nimbus/package.html	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/plaf/nimbus/package.html	Mon Nov 11 23:17:30 2013 -0800
@@ -25,7 +25,7 @@
 or visit www.oracle.com if you need additional information or have any
 questions.
 -->
-
+<title></title>
 </head>
 <body bgcolor="white">
 
@@ -39,11 +39,11 @@
 
 <p>Nimbus allows customizing many of its properties, including painters, by
 altering the {@link javax.swing.UIDefaults} table. Here's an example:
-<code><pre>
+<pre>
     UIManager.put("ProgressBar.tileWidth", myTileWidth);
     UIManager.put("ProgressBar[Enabled].backgroundPainter", myBgPainter);
     UIManager.put("ProgressBar[Enabled].foregroundPainter", myFgPainter);
-</pre></code>
+</pre>
 
 <p>Per-component customization is also possible. When rendering a component,
 Nimbus checks its client property named "Nimbus.Overrides". The value of this
@@ -53,14 +53,14 @@
 Boolean, specifies whether the overriding settings should be merged with
 default ones ({@code true}), or replace them ({@code false}). By default they
 are merged:
-<code><pre>
+<pre>
     JProgressBar bar = new JProgressBar();
     UIDefaults overrides = new UIDefaults();
     overrides.put("ProgressBar.cycleTime", 330);
     ...
     bar.putClientProperty("Nimbus.Overrides", overrides);
     bar.putClientProperty("Nimbus.Overrides.InheritDefaults", false);
-</pre></code>
+</pre>
 
 <p>Colors in Nimbus are derived from a core set of
 <a href="doc-files/properties.html#primaryColors">primary colors</a>. There are also
--- a/src/share/classes/javax/swing/plaf/package.html	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/plaf/package.html	Mon Nov 11 23:17:30 2013 -0800
@@ -25,7 +25,7 @@
 or visit www.oracle.com if you need additional information or have any
 questions.
 -->
-
+<title></title>
 </head>
 <body bgcolor="white">
 
--- a/src/share/classes/javax/swing/plaf/synth/SynthInternalFrameTitlePane.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/plaf/synth/SynthInternalFrameTitlePane.java	Mon Nov 11 23:17:30 2013 -0800
@@ -191,20 +191,28 @@
     }
 
     protected void addSystemMenuItems(JPopupMenu menu) {
-        // PENDING: this should all be localizable!
         JMenuItem mi = menu.add(restoreAction);
-        mi.setMnemonic('R');
+        mi.setMnemonic(getButtonMnemonic("restore"));
         mi = menu.add(moveAction);
-        mi.setMnemonic('M');
+        mi.setMnemonic(getButtonMnemonic("move"));
         mi = menu.add(sizeAction);
-        mi.setMnemonic('S');
+        mi.setMnemonic(getButtonMnemonic("size"));
         mi = menu.add(iconifyAction);
-        mi.setMnemonic('n');
+        mi.setMnemonic(getButtonMnemonic("minimize"));
         mi = menu.add(maximizeAction);
-        mi.setMnemonic('x');
+        mi.setMnemonic(getButtonMnemonic("maximize"));
         menu.add(new JSeparator());
         mi = menu.add(closeAction);
-        mi.setMnemonic('C');
+        mi.setMnemonic(getButtonMnemonic("close"));
+    }
+
+    private static int getButtonMnemonic(String button) {
+        try {
+            return Integer.parseInt(UIManager.getString(
+                    "InternalFrameTitlePane." + button + "Button.mnemonic"));
+        } catch (NumberFormatException e) {
+            return -1;
+        }
     }
 
     protected void showSystemMenu() {
--- a/src/share/classes/javax/swing/plaf/synth/SynthLookAndFeel.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/plaf/synth/SynthLookAndFeel.java	Mon Nov 11 23:17:30 2013 -0800
@@ -116,7 +116,7 @@
     /**
      * Used by the renderers. For the most part the renderers are implemented
      * as Labels, which is problematic in so far as they are never selected.
-     * To accomodate this SynthLabelUI checks if the current
+     * To accommodate this SynthLabelUI checks if the current
      * UI matches that of <code>selectedUI</code> (which this methods sets), if
      * it does, then a state as set by this method is returned. This provides
      * a way for labels to have a state other than selected.
--- a/src/share/classes/javax/swing/plaf/synth/doc-files/componentProperties.html	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/plaf/synth/doc-files/componentProperties.html	Mon Nov 11 23:17:30 2013 -0800
@@ -47,7 +47,7 @@
 JComboBox, JScrollBar and JSplitPane (for the buttons on the divider).
 In       addition to the <a
  href="#buttonProperties">Button 	properties</a>, ArrowButton supports
-the following propeties: </p>
+the following properties: </p>
 <h5>ArrowButton Specific Properties</h5>
 <table border="1">
   <thead><tr>
@@ -887,7 +887,7 @@
       JScrollPane is unique in that it provides a method for setting
       the Border around the JViewport with JViewport throwing an
       IllegalArgumentException from <code>setBorder</code>. To
-      accomodate this a special border is installed on the
+      accommodate this a special border is installed on the
       <code>JScrollPane</code> that uses the 
       insets from the key
       <code>ScrollPane.viewportBorderInsets</code>. The
@@ -1190,7 +1190,7 @@
       <td>Tree.scrollsHorizontallyAndVertically</td>
       <td>Boolean</td>
       <td>false 	 </td>
-      <td>If false and scrolling needs to happen to accomodate 	 cells
+      <td>If false and scrolling needs to happen to accommodate 	 cells
 it will only happen along the vertical axis, if 	    true, scrolling
 may happen along both the horizontal and 	    vertical axis. 	</td>
     </tr>
--- a/src/share/classes/javax/swing/plaf/synth/doc-files/synthFileFormat.html	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/plaf/synth/doc-files/synthFileFormat.html	Mon Nov 11 23:17:30 2013 -0800
@@ -2,7 +2,7 @@
 <html>
   <head>
     <title>Synth File Format</title>
-  <style>
+  <style type="text/css">
 div.dtd-fragment {
     width: 100%;
     border: none;
@@ -24,7 +24,7 @@
       Synth's file format (<a href="synth.dtd">dtd</a>)
       allows for specifying all the pieces
       necessary to create your own look and feel. A synth file is
-      loaded by way of the <A HREF="../../../../../javax/swing/plaf/synth/SynthLookAndFeel.html#load(java.io.InputStream, java.lang.Class)">SynthLookAndFeel.load(InputStream, Class)</a> or
+      loaded by way of the <A HREF="../../../../../javax/swing/plaf/synth/SynthLookAndFeel.html#load(java.io.InputStream,%20java.lang.Class)">SynthLookAndFeel.load(InputStream, Class)</a> or
       <a href="../../../../../javax/swing/plaf/synth/SynthLookAndFeel.html#load(java.net.URL)">SynthLookAndFeel.load(URL)</a> methods.
       The following example uses the <code>load</code> method to configure 
       a <code>SynthLookAndFeel</code> and sets it as the current look
@@ -110,7 +110,7 @@
 	    style.</dd>
     </dl>
     <p>
-      A <a name="e.style">style</a> element corresponds to a
+      A style element corresponds to a
       <code>SynthStyle</code>, with the child elements specifying
       properties that apply to all states or state elements which
       contain properties specific to a particular state. The following
@@ -216,7 +216,6 @@
       contains at least SELECTED and PRESSED, state <code>one</code> will be
       chosen, otherwise if the state is SELECTED, but not does not
       contain PRESSED, state <code>two</code> will be used.
-    <p>
 
     <h3>The font element</h3>
 <div class="dtd-fragment">
@@ -462,7 +461,6 @@
 	for idref properties this will be the unique id of a
 	previously defined object.</dd>
     </dl>
-    </dl>
     <p>
       <a href="#e.defaultsProperty">DefaultsProperty</a> elements are
       used to define properties that will be placed in the
@@ -738,7 +736,7 @@
   &lt;state value="SELECTED">
     &lt;painter idref="stateFallbackPainter"/>
     &lt;painter idref="stateButtonBackgroundPainter" method="buttonBackground"/>
-  &lt/state>
+  &lt;/state>
 &lt;/style>
       </pre>
     </div>      
--- a/src/share/classes/javax/swing/plaf/synth/package.html	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/plaf/synth/package.html	Mon Nov 11 23:17:30 2013 -0800
@@ -27,6 +27,7 @@
 
 
 -->
+<title></title>
 </head>
 <body bgcolor="white">
     <p>
--- a/src/share/classes/javax/swing/table/DefaultTableColumnModel.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/table/DefaultTableColumnModel.java	Mon Nov 11 23:17:30 2013 -0800
@@ -315,7 +315,7 @@
      * of the view/controller object using this model (typically JTable).  The
      * view/controller need not display the columns sequentially from left to
      * right.  For example, columns could be displayed from right to left to
-     * accomodate a locale preference or some columns might be hidden at the
+     * accommodate a locale preference or some columns might be hidden at the
      * request of the user.  Because the model does not know how the columns
      * are laid out on screen, the given <code>xPosition</code> should not be
      * considered to be a coordinate in 2D graphics space.  Instead, it should
--- a/src/share/classes/javax/swing/table/JTableHeader.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/table/JTableHeader.java	Mon Nov 11 23:17:30 2013 -0800
@@ -869,7 +869,7 @@
 
       /**
        * This class provides an implementation of the Java Accessibility
-       * API appropropriate for JTableHeader entries.
+       * API appropriate for JTableHeader entries.
        */
         protected class AccessibleJTableHeaderEntry extends AccessibleContext
             implements Accessible, AccessibleComponent  {
--- a/src/share/classes/javax/swing/table/TableColumn.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/table/TableColumn.java	Mon Nov 11 23:17:30 2013 -0800
@@ -37,7 +37,7 @@
 
 /**
  *  A <code>TableColumn</code> represents all the attributes of a column in a
- *  <code>JTable</code>, such as width, resizibility, minimum and maximum width.
+ *  <code>JTable</code>, such as width, resizability, minimum and maximum width.
  *  In addition, the <code>TableColumn</code> provides slots for a renderer and
  *  an editor that can be used to display and edit the values in this column.
  *  <p>
--- a/src/share/classes/javax/swing/table/TableColumnModel.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/table/TableColumnModel.java	Mon Nov 11 23:17:30 2013 -0800
@@ -154,7 +154,7 @@
      * of the view/controller object using this model (typically JTable).  The
      * view/controller need not display the columns sequentially from left to
      * right.  For example, columns could be displayed from right to left to
-     * accomodate a locale preference or some columns might be hidden at the
+     * accommodate a locale preference or some columns might be hidden at the
      * request of the user.  Because the model does not know how the columns
      * are laid out on screen, the given <code>xPosition</code> should not be
      * considered to be a coordinate in 2D graphics space.  Instead, it should
--- a/src/share/classes/javax/swing/table/package.html	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/table/package.html	Mon Nov 11 23:17:30 2013 -0800
@@ -25,7 +25,7 @@
 or visit www.oracle.com if you need additional information or have any
 questions.
 -->
-
+<title></title>
 </head>
 <body bgcolor="white">
 
--- a/src/share/classes/javax/swing/text/AbstractDocument.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/text/AbstractDocument.java	Mon Nov 11 23:17:30 2013 -0800
@@ -48,7 +48,7 @@
  * all observers of the document have been notified of a previous
  * change before beginning another mutation to the document.  The
  * read lock is acquired and released using the <code>render</code>
- * method.  A write lock is aquired by the methods that mutate the
+ * method.  A write lock is acquired by the methods that mutate the
  * document, and are held for the duration of the method call.
  * Notification is done on the thread that produced the mutation,
  * and the thread has full read access to the document for the
@@ -391,7 +391,7 @@
      * is being executed.  The runnable itself may <em>not</em>
      * make any mutations.
      * <p>
-     * This is implemented to aquire a read lock for the duration
+     * This is implemented to acquire a read lock for the duration
      * of the runnables execution.  There may be multiple runnables
      * executing at the same time, and all writers will be blocked
      * while there are active rendering runnables.  If the runnable
@@ -1373,7 +1373,7 @@
 
     /**
      * Releases a write lock previously obtained via <code>writeLock</code>.
-     * After decrementing the lock count if there are no oustanding locks
+     * After decrementing the lock count if there are no outstanding locks
      * this will allow a new writer, or readers.
      *
      * @see #writeLock
@@ -1642,7 +1642,7 @@
          * @param where   The offset into the sequence to make the
          *   insertion &gt;= 0.
          * @param nitems  The number of items in the sequence to remove &gt;= 0.
-         * @return  If the implementation supports a history mechansim,
+         * @return  If the implementation supports a history mechanism,
          *    a reference to an Edit implementation will be returned,
          *    otherwise null.
          * @exception BadLocationException  Thrown if the area covered by
--- a/src/share/classes/javax/swing/text/AbstractWriter.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/text/AbstractWriter.java	Mon Nov 11 23:17:30 2013 -0800
@@ -396,7 +396,7 @@
     }
 
     /**
-     * Sets the String used to reprsent newlines. This is initialized
+     * Sets the String used to represent newlines. This is initialized
      * in the constructor from either the Document, or the System property
      * line.separator.
      *
@@ -698,7 +698,7 @@
     }
 
     /**
-     * Support method to locate an occurence of a particular character.
+     * Support method to locate an occurrence of a particular character.
      */
     private int indexOf(char[] chars, char sChar, int startIndex,
                         int endIndex) {
--- a/src/share/classes/javax/swing/text/AsyncBoxView.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/text/AsyncBoxView.java	Mon Nov 11 23:17:30 2013 -0800
@@ -42,7 +42,7 @@
  * or a visible area) can be taken on.
  * <p>
  * While the child view is being accessed
- * a read lock is aquired on the associated document
+ * a read lock is acquired on the associated document
  * so that the model is stable while being accessed.
  *
  * @author  Timothy Prinzing
@@ -77,7 +77,7 @@
     }
 
     /**
-     * Fetch the minor axis (the axis orthoginal
+     * Fetch the minor axis (the axis orthogonal
      * to the tiled axis).  This will have a value of
      * either X_AXIS or Y_AXIS.
      */
@@ -827,8 +827,12 @@
      * location that one might place a caret.  Some views may not be visible,
      * they might not be in the same order found in the model, or they just
      * might not allow access to some of the locations in the model.
+     * This method enables specifying a position to convert
+     * within the range of &gt;=0.  If the value is -1, a position
+     * will be calculated automatically.  If the value &lt; -1,
+     * the {@code BadLocationException} will be thrown.
      *
-     * @param pos the position to convert &gt;= 0
+     * @param pos the position to convert
      * @param a the allocated region to render into
      * @param direction the direction from the current position that can
      *  be thought of as the arrow keys typically found on a keyboard;
@@ -842,13 +846,17 @@
      * @param biasRet an array contain the bias that was checked
      * @return the location within the model that best represents the next
      *  location visual position
-     * @exception BadLocationException
+     * @exception BadLocationException the given position is not a valid
+     *                                 position within the document
      * @exception IllegalArgumentException if <code>direction</code> is invalid
      */
     public int getNextVisualPositionFrom(int pos, Position.Bias b, Shape a,
                                          int direction,
                                          Position.Bias[] biasRet)
                                                   throws BadLocationException {
+        if (pos < -1) {
+            throw new BadLocationException("invalid position", pos);
+        }
         return Utilities.getNextVisualPositionFrom(
                             this, pos, b, a, direction, biasRet);
     }
@@ -1048,7 +1056,7 @@
         /**
          * Copy the currently allocated shape into the Rectangle
          * used to store the current allocation.  This would be
-         * a floating point rectangle in a Java2D-specific implmentation.
+         * a floating point rectangle in a Java2D-specific implementation.
          */
         protected void setAllocation(Shape a) {
             if (a instanceof Rectangle) {
@@ -1216,7 +1224,7 @@
          * time updating the child state (intended to
          * be the layout thread).
          * <p>
-         * This aquires a read lock on the associated
+         * This acquires a read lock on the associated
          * document for the duration of the update to
          * ensure the model is not changed while it is
          * operating.  The first thing to do would be
--- a/src/share/classes/javax/swing/text/BoxView.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/text/BoxView.java	Mon Nov 11 23:17:30 2013 -0800
@@ -38,7 +38,7 @@
  * This is a building block that might be useful to represent
  * things like a collection of lines, paragraphs,
  * lists, columns, pages, etc.  The axis along which the children are tiled is
- * considered the major axis.  The orthoginal axis is the minor axis.
+ * considered the major axis.  The orthogonal axis is the minor axis.
  * <p>
  * Layout for each axis is handled separately by the methods
  * <code>layoutMajorAxis</code> and <code>layoutMinorAxis</code>.
@@ -507,7 +507,7 @@
      * Determines the desired alignment for this view along an
      * axis.  This is implemented to give the total alignment
      * needed to position the children with the alignment points
-     * lined up along the axis orthoginal to the axis that is
+     * lined up along the axis orthogonal to the axis that is
      * being tiled.  The axis being tiled will request to be
      * centered (i.e. 0.5f).
      *
@@ -650,7 +650,7 @@
      * @param x the X coordinate &gt;= 0
      * @param y the Y coordinate &gt;= 0
      * @param alloc the parents inner allocation on entry, which should
-     *   be changed to the childs allocation on exit
+     *   be changed to the child's allocation on exit
      * @return the view
      */
     protected View getViewAtPoint(int x, int y, Rectangle alloc) {
@@ -816,7 +816,7 @@
 
     /**
      * Performs layout for the minor axis of the box (i.e. the
-     * axis orthoginal to the axis that it represents). The results
+     * axis orthogonal to the axis that it represents). The results
      * of the layout (the offset and span for each children) are
      * placed in the given arrays which represent the allocations to
      * the children along the minor axis.
@@ -1102,7 +1102,7 @@
     }
 
     /**
-     * Fetches the span of a particular childs current layout.
+     * Fetches the span of a particular child's current layout.
      * @param axis the axis being studied
      * @param childIndex the index of the requested child
      * @return the span (width or height) of the specified child
--- a/src/share/classes/javax/swing/text/CompositeView.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/text/CompositeView.java	Mon Nov 11 23:17:30 2013 -0800
@@ -435,8 +435,12 @@
      * might not allow access to some of the locations in the model.
      * This is a convenience method for {@link #getNextNorthSouthVisualPositionFrom}
      * and {@link #getNextEastWestVisualPositionFrom}.
+     * This method enables specifying a position to convert
+     * within the range of &gt;=0.  If the value is -1, a position
+     * will be calculated automatically.  If the value &lt; -1,
+     * the {@code BadLocationException} will be thrown.
      *
-     * @param pos the position to convert &gt;= 0
+     * @param pos the position to convert
      * @param b a bias value of either <code>Position.Bias.Forward</code>
      *  or <code>Position.Bias.Backward</code>
      * @param a the allocated region to render into
@@ -452,12 +456,16 @@
      * @param biasRet an array containing the bias that was checked
      * @return the location within the model that best represents the next
      *  location visual position
-     * @exception BadLocationException
+     * @exception BadLocationException the given position is not a valid
+     *                                 position within the document
      * @exception IllegalArgumentException if <code>direction</code> is invalid
      */
     public int getNextVisualPositionFrom(int pos, Position.Bias b, Shape a,
                                          int direction, Position.Bias[] biasRet)
       throws BadLocationException {
+        if (pos < -1) {
+            throw new BadLocationException("invalid position", pos);
+        }
         Rectangle alloc = getInsideAllocation(a);
 
         switch (direction) {
--- a/src/share/classes/javax/swing/text/DefaultFormatter.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/text/DefaultFormatter.java	Mon Nov 11 23:17:30 2013 -0800
@@ -34,7 +34,7 @@
 import javax.swing.text.*;
 
 /**
- * <code>DefaultFormatter</code> formats aribtrary objects. Formatting is done
+ * <code>DefaultFormatter</code> formats arbitrary objects. Formatting is done
  * by invoking the <code>toString</code> method. In order to convert the
  * value back to a String, your class must provide a constructor that
  * takes a String argument. If no single argument constructor that takes a
@@ -137,7 +137,7 @@
      * <code>JFormattedTextField</code>, typically when enter is pressed
      * or focus leaves the <code>JFormattedTextField</code>.
      *
-     * @param commit Used to indicate when edits are commited back to the
+     * @param commit Used to indicate when edits are committed back to the
      *               JTextComponent
      */
     public void setCommitsOnValidEdit(boolean commit) {
@@ -148,7 +148,7 @@
      * Returns when edits are published back to the
      * <code>JFormattedTextField</code>.
      *
-     * @return true if edits are commited after evey valid edit
+     * @return true if edits are committed after every valid edit
      */
     public boolean getCommitsOnValidEdit() {
         return commitOnEdit;
@@ -213,7 +213,7 @@
     /**
      * Returns that class that is used to create new Objects.
      *
-     * @return Class used to constuct return value from stringToValue
+     * @return Class used to construct return value from stringToValue
      */
     public Class<?> getValueClass() {
         return valueClass;
@@ -225,7 +225,7 @@
      * takes a String argument. If <code>getValueClass</code>
      * returns null, the Class of the current value in the
      * <code>JFormattedTextField</code> will be used. If this is null, a
-     * String will be returned. If the constructor thows an exception, a
+     * String will be returned. If the constructor throws an exception, a
      * <code>ParseException</code> will be thrown. If there is no single
      * argument String constructor, <code>string</code> will be returned.
      *
@@ -500,7 +500,7 @@
 
 
     /**
-     * Finds the next navigatable character.
+     * Finds the next navigable character.
      */
     int getNextVisualPositionFrom(JTextComponent text, int pos,
                                   Position.Bias bias, int direction,
--- a/src/share/classes/javax/swing/text/DefaultHighlighter.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/text/DefaultHighlighter.java	Mon Nov 11 23:17:30 2013 -0800
@@ -447,7 +447,7 @@
          *        necessarily the region to paint.
          * @param c the editor
          * @param view View painting for
-         * @return region drawing occured in
+         * @return region drawing occurred in
          */
         public Shape paintLayer(Graphics g, int offs0, int offs1,
                                 Shape bounds, JTextComponent c, View view) {
--- a/src/share/classes/javax/swing/text/DefaultStyledDocument.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/text/DefaultStyledDocument.java	Mon Nov 11 23:17:30 2013 -0800
@@ -2328,7 +2328,7 @@
         /**
          * Recreates <code>toDuplicate</code>. This is called when an
          * element needs to be created as the result of an insertion. This
-         * will recurse and create all the children. This is similiar to
+         * will recurse and create all the children. This is similar to
          * <code>clone</code>, but deteremines the offsets differently.
          */
         Element recreateFracturedElement(Element parent, Element toDuplicate) {
--- a/src/share/classes/javax/swing/text/Document.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/text/Document.java	Mon Nov 11 23:17:30 2013 -0800
@@ -123,7 +123,7 @@
  * rather than a mutation to the <code>Document</code> made through its
  * api.
  * <p style="text-align:center"><img src="doc-files/Document-notification.gif"
- * alt="The preceeding text describes this graphic.">
+ * alt="The preceding text describes this graphic.">
  * <p>
  * Referring to the above diagram, suppose that the component shown
  * on the left mutates the document object represented by the blue
--- a/src/share/classes/javax/swing/text/DocumentFilter.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/text/DocumentFilter.java	Mon Nov 11 23:17:30 2013 -0800
@@ -131,7 +131,7 @@
      */
     public static abstract class FilterBypass {
         /**
-         * Returns the Document the mutation is occuring on.
+         * Returns the Document the mutation is occurring on.
          *
          * @return Document that remove/insertString will operate on
          */
--- a/src/share/classes/javax/swing/text/ElementIterator.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/text/ElementIterator.java	Mon Nov 11 23:17:30 2013 -0800
@@ -30,7 +30,7 @@
 
 /**
  * <p>
- * ElementIterator, as the name suggests, iteratates over the Element
+ * ElementIterator, as the name suggests, iterates over the Element
  * tree.  The constructor can be invoked with either Document or an Element
  * as an argument.  If the constructor is invoked with a Document as an
  * argument then the root of the iteration is the return value of
@@ -284,7 +284,7 @@
 
 
     /**
-     * Fetches the previous Element. If howver the current
+     * Fetches the previous Element. If however the current
      * element is the last element, or the current element
      * is null, then null is returned.
      *
--- a/src/share/classes/javax/swing/text/FlowView.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/text/FlowView.java	Mon Nov 11 23:17:30 2013 -0800
@@ -171,7 +171,7 @@
      * the layout along the box axis.  The FlowStrategy.layout
      * method will be called to rebuild the flow rows as
      * appropriate.  If the height of this view changes
-     * (determined by the perferred size along the box axis),
+     * (determined by the preferred size along the box axis),
      * a preferenceChanged is called.  Following all of that,
      * the normal box layout of the superclass is performed.
      *
@@ -221,7 +221,7 @@
     }
 
     /**
-     * Calculate equirements along the minor axis.  This
+     * Calculate requirements along the minor axis.  This
      * is implemented to forward the request to the logical
      * view by calling getMinimumSpan, getPreferredSpan, and
      * getMaximumSpan on it.
@@ -328,7 +328,7 @@
      * entire flow if the layout is invalid on the
      * given FlowView.  Alternative strategies can
      * be implemented by subclassing, and might
-     * perform incrementatal repair to the layout
+     * perform incremental repair to the layout
      * or alternative breaking behavior.
      * @since 1.3
      */
@@ -491,7 +491,7 @@
          * This is implemented to fill the row by repeatedly calling
          * the createView method until the available span has been
          * exhausted, a forced break was encountered, or the createView
-         * method returned null.  If the remaining span was exhaused,
+         * method returned null.  If the remaining span was exhausted,
          * the adjustRow method will be called to perform adjustments
          * to the row to try and make it fit into the given span.
          *
--- a/src/share/classes/javax/swing/text/GapContent.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/text/GapContent.java	Mon Nov 11 23:17:30 2013 -0800
@@ -44,7 +44,7 @@
  * to take advantage of common behavior where most changes are
  * in the same location.  Changes that occur at a gap boundary are
  * generally cheap and moving the gap is generally cheaper than
- * moving the array contents directly to accomodate the change.
+ * moving the array contents directly to accommodate the change.
  * <p>
  * The positions tracking change are also generally cheap to
  * maintain.  The Position implementations (marks) store the array
--- a/src/share/classes/javax/swing/text/GapVector.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/text/GapVector.java	Mon Nov 11 23:17:30 2013 -0800
@@ -36,7 +36,7 @@
  * to take advantage of common behavior where most changes occur
  * in the same location.  Changes that occur at a gap boundary are
  * generally cheap and moving the gap is generally cheaper than
- * moving the array contents directly to accomodate the change.
+ * moving the array contents directly to accommodate the change.
  *
  * @author  Timothy Prinzing
  * @see GapContent
--- a/src/share/classes/javax/swing/text/GlyphView.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/text/GlyphView.java	Mon Nov 11 23:17:30 2013 -0800
@@ -879,8 +879,12 @@
      * visible, they might not be in the same order found in the model, or
      * they just might not allow access to some of the locations in the
      * model.
+     * This method enables specifying a position to convert
+     * within the range of &gt;=0.  If the value is -1, a position
+     * will be calculated automatically.  If the value &lt; -1,
+     * the {@code BadLocationException} will be thrown.
      *
-     * @param pos the position to convert &gt;= 0
+     * @param pos the position to convert
      * @param a the allocated region to render into
      * @param direction the direction from the current position that can
      *  be thought of as the arrow keys typically found on a keyboard.
@@ -888,7 +892,8 @@
      *  SwingConstants.NORTH, or SwingConstants.SOUTH.
      * @return the location within the model that best represents the next
      *  location visual position.
-     * @exception BadLocationException
+     * @exception BadLocationException the given position is not a valid
+     *                                 position within the document
      * @exception IllegalArgumentException for an invalid direction
      */
     public int getNextVisualPositionFrom(int pos, Position.Bias b, Shape a,
@@ -896,6 +901,9 @@
                                          Position.Bias[] biasRet)
         throws BadLocationException {
 
+        if (pos < -1) {
+            throw new BadLocationException("invalid position", pos);
+        }
         return painter.getNextVisualPositionFrom(this, pos, b, a, direction, biasRet);
     }
 
--- a/src/share/classes/javax/swing/text/InternationalFormatter.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/text/InternationalFormatter.java	Mon Nov 11 23:17:30 2013 -0800
@@ -569,7 +569,7 @@
     }
 
     /**
-     * Returns true if the character at offset is navigatable too. This
+     * Returns true if the character at offset is navigable too. This
      * is implemented in terms of <code>isLiteral</code>, subclasses
      * may wish to provide different behavior.
      */
@@ -862,7 +862,7 @@
     }
 
     /**
-     * Returns the number of occurences of <code>f</code> before
+     * Returns the number of occurrences of <code>f</code> before
      * the location <code>start</code> in the current
      * <code>AttributedCharacterIterator</code>.
      */
--- a/src/share/classes/javax/swing/text/JTextComponent.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/text/JTextComponent.java	Mon Nov 11 23:17:30 2013 -0800
@@ -160,9 +160,9 @@
  *
  * <table border=1 summary="Stages of keyboard and input method event handling">
  * <tr>
- * <th id="stage"><p align="left">Stage</p></th>
- * <th id="ke"><p align="left">KeyEvent</p></th>
- * <th id="ime"><p align="left">InputMethodEvent</p></th></tr>
+ * <th id="stage"><p style="text-align:left">Stage</p></th>
+ * <th id="ke"><p style="text-align:left">KeyEvent</p></th>
+ * <th id="ime"><p style="text-align:left">InputMethodEvent</p></th></tr>
  * <tr><td headers="stage">1.   </td>
  *     <td headers="ke">input methods </td>
  *     <td headers="ime">(generated here)</td></tr>
@@ -214,7 +214,7 @@
  * The text document model may be shared by other views which act as observers
  * of the model (e.g. a document may be shared by multiple components).
  *
- * <p align=center><img src="doc-files/editor.gif" alt="Diagram showing interaction between Controller, Document, events, and ViewFactory"
+ * <p style="text-align:center"><img src="doc-files/editor.gif" alt="Diagram showing interaction between Controller, Document, events, and ViewFactory"
  *                  HEIGHT=358 WIDTH=587></p>
  *
  * <p>
@@ -426,7 +426,7 @@
         Document old = model;
 
         /*
-         * aquire a read lock on the old model to prevent notification of
+         * acquire a read lock on the old model to prevent notification of
          * mutations while we disconnecting the old model.
          */
         try {
@@ -1399,8 +1399,8 @@
      * Fetches a portion of the text represented by the
      * component.  Returns an empty string if length is 0.
      *
-     * @param offs the offset >= 0
-     * @param len the length >= 0
+     * @param offs the offset &ge; 0
+     * @param len the length &ge; 0
      * @return the text
      * @exception BadLocationException if the offset or length are invalid
      */
@@ -1416,7 +1416,7 @@
      * be computed until the component has been sized).  The
      * component does not have to be visible or painted.
      *
-     * @param pos the position >= 0
+     * @param pos the position &ge; 0
      * @return the coordinates as a rectangle, with (r.x, r.y) as the location
      *   in the coordinate system, or null if the component does
      *   not yet have a positive size.
@@ -1437,7 +1437,7 @@
      * component does not have to be visible or painted.
      *
      * @param pt the location in the view to translate
-     * @return the offset >= 0 from the start of the document,
+     * @return the offset &ge; 0 from the start of the document,
      *   or -1 if the component does not yet have a positive
      *   size.
      * @see TextUI#viewToModel
@@ -1493,10 +1493,10 @@
     }
 
     /**
-     * This is a conveniance method that is only useful for
+     * This is a convenience method that is only useful for
      * <code>cut</code>, <code>copy</code> and <code>paste</code>.  If
      * an <code>Action</code> with the name <code>name</code> does not
-     * exist in the <code>ActionMap</code>, this will attemp to install a
+     * exist in the <code>ActionMap</code>, this will attempt to install a
      * <code>TransferHandler</code> and then use <code>altAction</code>.
      */
     private void invokeAction(String name, Action altAction) {
@@ -1688,7 +1688,7 @@
      * text component.
      *
      * @return the position of the text insertion caret for the
-     *  text component >= 0
+     *  text component &ge; 0
      */
     @Transient
     public int getCaretPosition() {
@@ -1814,7 +1814,7 @@
      * Returns the selected text's start position.  Return 0 for an
      * empty document, or the value of dot if no selection.
      *
-     * @return the start position >= 0
+     * @return the start position &ge; 0
      */
     @Transient
     public int getSelectionStart() {
@@ -1832,7 +1832,7 @@
      * This is implemented to forward to the <code>Caret</code>
      * implementation which is where the actual selection is maintained.
      *
-     * @param selectionStart the start position of the text >= 0
+     * @param selectionStart the start position of the text &ge; 0
      * @beaninfo
      * description: starting location of the selection.
      */
@@ -1847,7 +1847,7 @@
      * Returns the selected text's end position.  Return 0 if the document
      * is empty, or the value of dot if there is no selection.
      *
-     * @return the end position >= 0
+     * @return the end position &ge; 0
      */
     @Transient
     public int getSelectionEnd() {
@@ -1865,7 +1865,7 @@
      * This is implemented to forward to the <code>Caret</code>
      * implementation which is where the actual selection is maintained.
      *
-     * @param selectionEnd the end position of the text >= 0
+     * @param selectionEnd the end position of the text &ge; 0
      * @beaninfo
      * description: ending location of the selection.
      */
@@ -2785,7 +2785,7 @@
          * if the JTextComponent is contained in a JScrollPane in which
          * case the resulting rectangle should be composed with the parent
          * coordinates.  A good algorithm to use is:
-         * <nf>
+         * <pre>
          * Accessible a:
          * AccessibleText at = a.getAccessibleText();
          * AccessibleComponent ac = a.getAccessibleComponent();
@@ -2793,14 +2793,14 @@
          * Point p = ac.getLocation();
          * r.x += p.x;
          * r.y += p.y;
-         * </nf>
+         * </pre>
          *
          * Note: the JTextComponent must have a valid size (e.g. have
          * been added to a parent container whose ancestor container
          * is a valid top-level window) for this method to be able
          * to return a meaningful (non-null) value.
          *
-         * @param i the index into the String >= 0
+         * @param i the index into the String &ge; 0
          * @return the screen coordinates of the character's bounding box
          */
         public Rectangle getCharacterBounds(int i) {
@@ -2844,7 +2844,7 @@
         /**
          * Returns the number of characters (valid indices)
          *
-         * @return the number of characters >= 0
+         * @return the number of characters &ge; 0
          */
         public int getCharCount() {
             return model.getLength();
@@ -2895,7 +2895,7 @@
          * Return 0 if the text is empty, or the caret position
          * if no selection.
          *
-         * @return the index into the text of the start of the selection >= 0
+         * @return the index into the text of the start of the selection &ge; 0
          */
         public int getSelectionStart() {
             return JTextComponent.this.getSelectionStart();
@@ -2908,7 +2908,7 @@
          * Return 0 if the text is empty, or the caret position
          * if no selection.
          *
-         * @return the index into teh text of the end of the selection >= 0
+         * @return the index into the text of the end of the selection &ge; 0
          */
         public int getSelectionEnd() {
             return JTextComponent.this.getSelectionEnd();
--- a/src/share/classes/javax/swing/text/NumberFormatter.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/text/NumberFormatter.java	Mon Nov 11 23:17:30 2013 -0800
@@ -34,7 +34,7 @@
  * <code>NumberFormatter</code> subclasses <code>InternationalFormatter</code>
  * adding special behavior for numbers. Among the specializations are
  * (these are only used if the <code>NumberFormatter</code> does not display
- * invalid nubers, eg <code>setAllowsInvalid(false)</code>):
+ * invalid numbers, for example, <code>setAllowsInvalid(false)</code>):
  * <ul>
  *   <li>Pressing +/- (- is determined from the
  *       <code>DecimalFormatSymbols</code> associated with the
@@ -44,7 +44,7 @@
  *   <li>Pressing +/- (- is determined from the
  *       <code>DecimalFormatSymbols</code> associated with the
  *       <code>DecimalFormat</code>) in the exponent field will
- *       attemp to change the sign of the exponent to positive/negative.
+ *       attempt to change the sign of the exponent to positive/negative.
  * </ul>
  * <p>
  * If you are displaying scientific numbers, you may wish to turn on
@@ -299,9 +299,9 @@
     }
 
     /**
-     * Subclassed to make the decimal separator navigatable, as well
+     * Subclassed to make the decimal separator navigable, as well
      * as making the character between the integer field and the next
-     * field navigatable.
+     * field navigable.
      */
     boolean isNavigatable(int index) {
         if (!super.isNavigatable(index)) {
--- a/src/share/classes/javax/swing/text/ParagraphView.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/text/ParagraphView.java	Mon Nov 11 23:17:30 2013 -0800
@@ -567,7 +567,7 @@
 
     /**
      * Renders using the given rendering surface and area on that
-     * surface.  This is implemented to delgate to the superclass
+     * surface.  This is implemented to delegate to the superclass
      * after stashing the base coordinate for tab calculations.
      *
      * @param g the rendering surface to use
@@ -931,7 +931,7 @@
 
         /**
          * Perform layout for the minor axis of the box (i.e. the
-         * axis orthoginal to the axis that it represents).  The results
+         * axis orthogonal to the axis that it represents).  The results
          * of the layout should be placed in the given arrays which represent
          * the allocations to the children along the minor axis.
          * <p>
@@ -939,7 +939,7 @@
          * by calling BoxView.baselineLayout.
          *
          * @param targetSpan the total span given to the view, which
-         *  whould be used to layout the children.
+         *  would be used to layout the children.
          * @param axis the axis being layed out.
          * @param offsets the offsets from the origin of the view for
          *  each of the child views.  This is a return value and is
--- a/src/share/classes/javax/swing/text/SimpleAttributeSet.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/text/SimpleAttributeSet.java	Mon Nov 11 23:17:30 2013 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 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
@@ -29,8 +29,9 @@
 import java.util.Collections;
 import java.io.IOException;
 import java.io.ObjectInputStream;
-import java.io.ObjectOutputStream;
 import java.io.Serializable;
+import java.util.AbstractMap;
+import java.util.LinkedHashMap;
 
 /**
  * A straightforward implementation of MutableAttributeSet using a
@@ -56,7 +57,7 @@
      */
     public static final AttributeSet EMPTY = new EmptyAttributeSet();
 
-    private transient Hashtable<Object, Object> table = new Hashtable<Object, Object>(3);
+    private transient LinkedHashMap<Object, Object> table = new LinkedHashMap<>(3);
 
     /**
      * Creates a new attribute set.
@@ -73,10 +74,6 @@
         addAttributes(source);
     }
 
-    private SimpleAttributeSet(Hashtable<Object, Object> table) {
-        this.table = table;
-    }
-
     /**
      * Checks whether the set of attributes is empty.
      *
@@ -132,7 +129,7 @@
      * @return the names as an <code>Enumeration</code>
      */
     public Enumeration<?> getAttributeNames() {
-        return table.keys();
+        return Collections.enumeration(table.keySet());
     }
 
     /**
@@ -278,7 +275,7 @@
         SimpleAttributeSet attr;
         try {
             attr = (SimpleAttributeSet) super.clone();
-            attr.table = (Hashtable) table.clone();
+            attr.table = (LinkedHashMap) table.clone();
         } catch (CloneNotSupportedException cnse) {
             attr = null;
         }
@@ -341,7 +338,7 @@
     private void readObject(ObjectInputStream s)
       throws ClassNotFoundException, IOException {
         s.defaultReadObject();
-        table = new Hashtable<Object, Object>(3);
+        table = new LinkedHashMap<>(3);
         StyleContext.readAttributeSet(s, this);
     }
 
--- a/src/share/classes/javax/swing/text/StyleConstants.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/text/StyleConstants.java	Mon Nov 11 23:17:30 2013 -0800
@@ -39,7 +39,7 @@
  * All sizes are specified in points (such as found in postscript), a
  * device independent measure.
  * </p>
- * <p align=center><img src="doc-files/paragraph.gif"
+ * <p style="text-align:center"><img src="doc-files/paragraph.gif"
  * alt="Diagram shows SpaceAbove, FirstLineIndent, LeftIndent, RightIndent,
  *      and SpaceBelow a paragraph."></p>
  * <p>
@@ -65,7 +65,7 @@
     public static final Object NameAttribute = new StyleConstants("name");
 
     /**
-     * Attribute name used to identifiy the resolving parent
+     * Attribute name used to identify the resolving parent
      * set of attributes, if one is defined.
      */
     public static final Object ResolveAttribute = new StyleConstants("resolver");
--- a/src/share/classes/javax/swing/text/StyleContext.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/text/StyleContext.java	Mon Nov 11 23:17:30 2013 -0800
@@ -438,7 +438,7 @@
     }
 
     /**
-     * Returns a set no longer needed by the MutableAttributeSet implmentation.
+     * Returns a set no longer needed by the MutableAttributeSet implementation.
      * This is useful for operation under 1.1 where there are no weak
      * references.  This would typically be called by the finalize method
      * of the MutableAttributeSet implementation.
@@ -576,7 +576,7 @@
      * special care to deal with static attribute keys that
      * have been registered wit the
      * <code>registerStaticAttributeKey</code> method.
-     * Any attribute key not regsitered as a static key
+     * Any attribute key not registered as a static key
      * will be serialized directly.  All values are expected
      * to be serializable.
      *
@@ -839,7 +839,7 @@
         }
 
         /**
-         * Compares this object to the specifed object.
+         * Compares this object to the specified object.
          * The result is <code>true</code> if the object is an equivalent
          * set of attributes.
          * @param     obj   the object to compare with.
@@ -1040,7 +1040,7 @@
 
     /**
      * Sorts the key strings so that they can be very quickly compared
-     * in the attribute set searchs.
+     * in the attribute set searches.
      */
     class KeyBuilder {
 
@@ -1209,7 +1209,7 @@
         }
 
         /**
-         * Compares this object to the specifed object.
+         * Compares this object to the specified object.
          * The result is <code>true</code> if and only if the argument is not
          * <code>null</code> and is a <code>Font</code> object with the same
          * name, style, and point size as this font.
--- a/src/share/classes/javax/swing/text/TableView.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/text/TableView.java	Mon Nov 11 23:17:30 2013 -0800
@@ -308,7 +308,7 @@
 
     /**
      * Perform layout for the minor axis of the box (i.e. the
-     * axis orthoginal to the axis that it represents).  The results
+     * axis orthogonal to the axis that it represents).  The results
      * of the layout should be placed in the given arrays which represent
      * the allocations to the children along the minor axis.  This
      * is called by the superclass whenever the layout needs to be
@@ -320,7 +320,7 @@
      * of the tables rows.
      *
      * @param targetSpan the total span given to the view, which
-     *  whould be used to layout the children.
+     *  would be used to layout the children.
      * @param axis the axis being layed out.
      * @param offsets the offsets from the origin of the view for
      *  each of the child views.  This is a return value and is
@@ -657,7 +657,7 @@
          * the multi-column span.
          *
          * @param targetSpan the total span given to the view, which
-         *  whould be used to layout the children.
+         *  would be used to layout the children.
          * @param axis the axis being layed out.
          * @param offsets the offsets from the origin of the view for
          *  each of the child views.  This is a return value and is
@@ -691,7 +691,7 @@
 
         /**
          * Perform layout for the minor axis of the box (i.e. the
-         * axis orthoginal to the axis that it represents).  The results
+         * axis orthogonal to the axis that it represents).  The results
          * of the layout should be placed in the given arrays which represent
          * the allocations to the children along the minor axis.  This
          * is called by the superclass whenever the layout needs to be
@@ -701,7 +701,7 @@
          * the span for any cell that spans multiple rows.
          *
          * @param targetSpan the total span given to the view, which
-         *  whould be used to layout the children.
+         *  would be used to layout the children.
          * @param axis the axis being layed out.
          * @param offsets the offsets from the origin of the view for
          *  each of the child views.  This is a return value and is
--- a/src/share/classes/javax/swing/text/View.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/text/View.java	Mon Nov 11 23:17:30 2013 -0800
@@ -128,7 +128,7 @@
     A view should set any settings needed.
     <li>A <code>View</code> is inherently transparent.  While a view may render into its
     entire allocation, typically a view does not.  Rendering is performed by
-    tranversing down the tree of <code>View</code> implementations.
+    traversing down the tree of <code>View</code> implementations.
     Each <code>View</code> is responsible
     for rendering its children.  This behavior is depended upon for thread
     safety.  While view implementations do not necessarily have to be implemented
@@ -324,7 +324,7 @@
      * the view has been removed from the hierarchy as
      * well. When this method is called to set the parent to
      * null, this method does the same for each of its children,
-     * propogating the notification that they have been
+     * propagating the notification that they have been
      * disconnected from the view tree. If this is
      * reimplemented, <code>super.setParent()</code> should
      * be called.
@@ -476,8 +476,12 @@
      * Some views may not be visible,
      * they might not be in the same order found in the model, or they just
      * might not allow access to some of the locations in the model.
+     * This method enables specifying a position to convert
+     * within the range of &gt;=0.  If the value is -1, a position
+     * will be calculated automatically.  If the value &lt; -1,
+     * the {@code BadLocationException} will be thrown.
      *
-     * @param pos the position to convert &gt;= 0
+     * @param pos the position to convert
      * @param a the allocated region in which to render
      * @param direction the direction from the current position that can
      *  be thought of as the arrow keys typically found on a keyboard.
@@ -490,7 +494,8 @@
      * </ul>
      * @return the location within the model that best represents the next
      *  location visual position
-     * @exception BadLocationException
+     * @exception BadLocationException the given position is not a valid
+     *                                 position within the document
      * @exception IllegalArgumentException if <code>direction</code>
      *          doesn't have one of the legal values above
      */
--- a/src/share/classes/javax/swing/text/WrappedPlainView.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/text/WrappedPlainView.java	Mon Nov 11 23:17:30 2013 -0800
@@ -380,8 +380,8 @@
     public void setSize(float width, float height) {
         updateMetrics();
         if ((int) width != getWidth()) {
-            // invalidate the view itself since the childrens
-            // desired widths will be based upon this views width.
+            // invalidate the view itself since the desired widths
+            // of the children will be based upon this views width.
             preferenceChanged(null, true, true);
             widthChanging = true;
         }
--- a/src/share/classes/javax/swing/text/ZoneView.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/text/ZoneView.java	Mon Nov 11 23:17:30 2013 -0800
@@ -60,7 +60,7 @@
  *   Boxes are easier to estimate the size of than some other shapes.
  *   </ul>
  * <p>
- * The default behavior is controled by two properties, maxZoneSize
+ * The default behavior is controlled by two properties, maxZoneSize
  * and maxZonesLoaded.  Setting maxZoneSize to Integer.MAX_VALUE would
  * have the effect of causing only one zone to be created.  This would
  * effectively turn the view into an implementation of the decorator
@@ -144,7 +144,7 @@
      * Called by a zone when it gets loaded.  This happens when
      * an attempt is made to display or perform a model/view
      * translation on a zone that was in an unloaded state.
-     * This is imlemented to check if the maximum number of
+     * This is implemented to check if the maximum number of
      * zones was reached and to unload the oldest zone if so.
      *
      * @param zone the child view that was just loaded.
--- a/src/share/classes/javax/swing/text/html/AccessibleHTML.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/text/html/AccessibleHTML.java	Mon Nov 11 23:17:30 2013 -0800
@@ -276,7 +276,7 @@
          * a set of predefined roles.  This enables assistive technologies to
          * provide a consistent interface to various tweaked subclasses of
          * components (e.g., use AccessibleRole.PUSH_BUTTON for all components
-         * that act like a push button) as well as distinguish between sublasses
+         * that act like a push button) as well as distinguish between subclasses
          * that behave differently (e.g., AccessibleRole.CHECK_BOX for check boxes
          * and AccessibleRole.RADIO_BUTTON for radio buttons).
          * <p>Note that the AccessibleRole class is also extensible, so
@@ -893,7 +893,7 @@
              * a set of predefined roles.  This enables assistive technologies to
              * provide a consistent interface to various tweaked subclasses of
              * components (e.g., use AccessibleRole.PUSH_BUTTON for all components
-             * that act like a push button) as well as distinguish between sublasses
+             * that act like a push button) as well as distinguish between subclasses
              * that behave differently (e.g., AccessibleRole.CHECK_BOX for check boxes
              * and AccessibleRole.RADIO_BUTTON for radio buttons).
              * <p>Note that the AccessibleRole class is also extensible, so
@@ -1192,7 +1192,7 @@
              * If there is no selection, but there is
              * a caret, the start and end offsets will be the same.
              *
-             * @return the index into teh text of the end of the selection
+             * @return the index into the text of the end of the selection
              */
             public int getSelectionEnd() {
                 return editor.getSelectionEnd();
@@ -1327,7 +1327,7 @@
              * a set of predefined roles.  This enables assistive technologies to
              * provide a consistent interface to various tweaked subclasses of
              * components (e.g., use AccessibleRole.PUSH_BUTTON for all components
-             * that act like a push button) as well as distinguish between sublasses
+             * that act like a push button) as well as distinguish between subclasses
              * that behave differently (e.g., AccessibleRole.CHECK_BOX for check boxes
              * and AccessibleRole.RADIO_BUTTON for radio buttons).
              * <p>Note that the AccessibleRole class is also extensible, so
@@ -1628,7 +1628,7 @@
              * a set of predefined roles.  This enables assistive technologies to
              * provide a consistent interface to various tweaked subclasses of
              * components (e.g., use AccessibleRole.PUSH_BUTTON for all components
-             * that act like a push button) as well as distinguish between sublasses
+             * that act like a push button) as well as distinguish between subclasses
              * that behave differently (e.g., AccessibleRole.CHECK_BOX for check boxes
              * and AccessibleRole.RADIO_BUTTON for radio buttons).
              * <p>Note that the AccessibleRole class is also extensible, so
--- a/src/share/classes/javax/swing/text/html/BlockView.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/text/html/BlockView.java	Mon Nov 11 23:17:30 2013 -0800
@@ -106,7 +106,7 @@
 
     /**
      * Calculate the requirements of the block along the minor
-     * axis (i.e. the axis orthoginal to the axis along with it tiles).
+     * axis (i.e. the axis orthogonal to the axis along with it tiles).
      * This is implemented
      * to provide the superclass behavior and then adjust it if the
      * CSS width or height attribute is specified and applicable to
@@ -218,13 +218,13 @@
 
     /**
      * Performs layout for the minor axis of the box (i.e. the
-     * axis orthoginal to the axis that it represents). The results
+     * axis orthogonal to the axis that it represents). The results
      * of the layout (the offset and span for each children) are
      * placed in the given arrays which represent the allocations to
      * the children along the minor axis.
      *
      * @param targetSpan the total span given to the view, which
-     *  whould be used to layout the childre.
+     *  would be used to layout the children.
      * @param axis the axis being layed out
      * @param offsets the offsets from the origin of the view for
      *  each of the child views; this is a return value and is
--- a/src/share/classes/javax/swing/text/html/CSS.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/text/html/CSS.java	Mon Nov 11 23:17:30 2013 -0800
@@ -49,7 +49,7 @@
  * CSS attributes to determine how they will render. This also defines
  * methods to map between CSS/HTML/StyleConstants. Any shorthand
  * properties, such as font, are mapped to the intrinsic properties.
- * <p>The following describes the CSS properties that are suppored by the
+ * <p>The following describes the CSS properties that are supported by the
  * rendering engine:
  * <ul><li>font-family
  *   <li>font-style
@@ -3070,7 +3070,7 @@
                     }
                 }
                 if (!valid) {
-                    // Part is non-parseable or occured more than once.
+                    // Part is non-parseable or occurred more than once.
                     return;
                 }
             }
--- a/src/share/classes/javax/swing/text/html/CSSParser.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/text/html/CSSParser.java	Mon Nov 11 23:17:30 2013 -0800
@@ -513,7 +513,7 @@
      * hit.
      */
     // NOTE: this could be combined with readTill, as they contain somewhat
-    // similiar functionality.
+    // similar functionality.
     private boolean getIdentifier(char stopChar) throws IOException {
         boolean lastWasEscape = false;
         boolean done = false;
--- a/src/share/classes/javax/swing/text/html/FormSubmitEvent.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/text/html/FormSubmitEvent.java	Mon Nov 11 23:17:30 2013 -0800
@@ -29,7 +29,7 @@
 
 /**
  * FormSubmitEvent is used to notify interested
- * parties that a form was submited.
+ * parties that a form was submitted.
  *
  * @since 1.5
  * @author    Denis Sharypov
--- a/src/share/classes/javax/swing/text/html/FormView.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/text/html/FormView.java	Mon Nov 11 23:17:30 2013 -0800
@@ -663,7 +663,7 @@
 
                     if (type != null && type.equals("submit") &&
                         next != getElement()) {
-                        // do nothing - this submit isnt the trigger
+                        // do nothing - this submit is not the trigger
                     } else if (type == null || !type.equals("image")) {
                         // images only result in data if they triggered
                         // the submit and they require that the mouse click
--- a/src/share/classes/javax/swing/text/html/FrameSetView.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/text/html/FrameSetView.java	Mon Nov 11 23:17:30 2013 -0800
@@ -157,7 +157,7 @@
      * to the children along the major axis.
      *
      * @param targetSpan the total span given to the view, which
-     *  whould be used to layout the children
+     *  would be used to layout the children
      * @param axis the axis being layed out
      * @param offsets the offsets from the origin of the view for
      *  each of the child views; this is a return value and is
@@ -267,7 +267,7 @@
             // they share priority, however, unspecified what happens when
             // overallocation occurs.)
 
-            // addendum is that we behave similiar to netscape in that specified
+            // addendum is that we behave similar to netscape in that specified
             // widths have precedance over percentage widths...
 
             float vTotal = (float)(targetSpan - remainingSpace);
--- a/src/share/classes/javax/swing/text/html/HTML.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/text/html/HTML.java	Mon Nov 11 23:17:30 2013 -0800
@@ -303,7 +303,7 @@
         }
 
         /**
-         * Compares this object to the specifed object.
+         * Compares this object to the specified object.
          * The result is <code>true</code> if and only if the argument is not
          * <code>null</code> and is an <code>UnknownTag</code> object
          * with the same name.
--- a/src/share/classes/javax/swing/text/html/HTMLDocument.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/text/html/HTMLDocument.java	Mon Nov 11 23:17:30 2013 -0800
@@ -184,7 +184,6 @@
  * of various methods described above.</p>
  *
  * <table border=1 cellspacing=0>
- *   <caption></caption>
  *   <tr>
  *     <th>Example</th>
  *     <th><code>insertAfterStart</code></th>
@@ -262,8 +261,8 @@
  * not be compatible with future Swing releases. The current
  * serialization support is appropriate for short term storage or RMI
  * between applications running the same version of Swing.  As of 1.4,
- * support for long term storage of all JavaBeans<sup><font
- * size="-2">TM</font></sup> has been added to the
+ * support for long term storage of all JavaBeans&trade;
+ * has been added to the
  * <code>java.beans</code> package.  Please see {@link
  * java.beans.XMLEncoder}.</p>
  *
@@ -1012,7 +1011,7 @@
      * If either <code>elem</code> or <code>htmlText</code> parameter
      * is <code>null</code>, no changes are made to the document.</p>
      *
-     * <p>For this to work correcty, the document must have an
+     * <p>For this to work correctly, the document must have an
      * <code>HTMLEditorKit.Parser</code> set. This will be the case
      * if the document was created from an HTMLEditorKit via the
      * <code>createDefaultDocument</code> method.</p>
@@ -1054,7 +1053,7 @@
      * a newline present if one is needed. This may result in an additional
      * element being inserted. Consider, if you were to replace a character
      * element that contained a newline with &lt;img&gt; this would create
-     * two elements, one for the image, ane one for the newline.</p>
+     * two elements, one for the image, and one for the newline.</p>
      *
      * <p>If you try to replace the element at length you will most
      * likely end up with two elements, eg
@@ -1090,7 +1089,7 @@
      * parameter is <code>null</code>, no changes are made to the
      * document.</p>
      *
-     * <p>For this to work correcty, the document must have an
+     * <p>For this to work correctly, the document must have an
      * HTMLEditorKit.Parser set. This will be the case if the document
      * was created from an HTMLEditorKit via the
      * <code>createDefaultDocument</code> method.</p>
@@ -1167,7 +1166,7 @@
      * If either <code>elem</code> or <code>htmlText</code> parameter
      * is <code>null</code>, no changes are made to the document.</p>
      *
-     * <p>For this to work correcty, the document must have an
+     * <p>For this to work correctly, the document must have an
      * <code>HTMLEditorKit.Parser</code> set. This will be the case
      * if the document was created from an HTMLEditorKit via the
      * <code>createDefaultDocument</code> method.</p>
@@ -1237,7 +1236,7 @@
      * If either <code>elem</code> or <code>htmlText</code> parameter
      * is <code>null</code>, no changes are made to the document.</p>
      *
-     * <p>For this to work correcty, the document must have an
+     * <p>For this to work correctly, the document must have an
      * <code>HTMLEditorKit.Parser</code> set. This will be the case
      * if the document was created from an HTMLEditorKit via the
      * <code>createDefaultDocument</code> method.</p>
@@ -1301,7 +1300,7 @@
      * parameter is <code>null</code>, no changes are made to the
      * document.</p>
      *
-     * <p>For this to work correcty, the document must have an
+     * <p>For this to work correctly, the document must have an
      * <code>HTMLEditorKit.Parser</code> set. This will be the case
      * if the document was created from an HTMLEditorKit via the
      * <code>createDefaultDocument</code> method.</p>
@@ -1359,7 +1358,7 @@
      * parameter is <code>null</code>, no changes are made to the
      * document.</p>
      *
-     * <p>For this to work correcty, the document must have an
+     * <p>For this to work correctly, the document must have an
      * <code>HTMLEditorKit.Parser</code> set. This will be the case
      * if the document was created from an HTMLEditorKit via the
      * <code>createDefaultDocument</code> method.</p>
@@ -3345,7 +3344,7 @@
                     String type = (String)
                         attr.getAttribute(HTML.Attribute.TYPE);
                     /*
-                     * if type is not defined teh default is
+                     * if type is not defined the default is
                      * assumed to be text.
                      */
                     if (type == null) {
@@ -3735,7 +3734,7 @@
             int size = parseBuffer.size();
             if (insertTagDepthDelta < 0) {
                 // When inserting via an insertTag, the depths (of the tree
-                // being read in, and existing hiearchy) may not match up.
+                // being read in, and existing hierarchy) may not match up.
                 // This attemps to clean it up.
                 int removeCounter = insertTagDepthDelta;
                 while (removeCounter < 0 && size >= 0 &&
@@ -3974,7 +3973,7 @@
         private boolean receivedEndHTML;
         /** Number of times <code>flushBuffer</code> has been invoked. */
         private int flushCount;
-        /** If true, behavior is similiar to insertTag, but instead of
+        /** If true, behavior is similar to insertTag, but instead of
          * waiting for insertTag will wait for first Element without
          * an 'implied' attribute and begin inserting then. */
         private boolean insertAfterImplied;
--- a/src/share/classes/javax/swing/text/html/HTMLEditorKit.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/text/html/HTMLEditorKit.java	Mon Nov 11 23:17:30 2013 -0800
@@ -69,7 +69,7 @@
  * exactly as defined in the HTML document.
  * <p>
  * The modeling of HTML is provided by the class <code>HTMLDocument</code>.
- * Its documention describes the details of how the HTML is modeled.
+ * Its documentation describes the details of how the HTML is modeled.
  * The editing support leverages heavily off of the text package.
  * <p>
  * <dt>
@@ -80,7 +80,7 @@
  * features.
  * <ol>
  *   <li>
- *   The parser is replacable.  The default parser is the Hot Java
+ *   The parser is replaceable.  The default parser is the Hot Java
  *   parser which is DTD based.  A different DTD can be used, or an
  *   entirely different parser can be used.  To change the parser,
  *   reimplement the getParser method.  The default parser is
--- a/src/share/classes/javax/swing/text/html/HTMLFrameHyperlinkEvent.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/text/html/HTMLFrameHyperlinkEvent.java	Mon Nov 11 23:17:30 2013 -0800
@@ -92,7 +92,7 @@
      * @param source the object responsible for the event
      * @param type the event type
      * @param targetURL the affected URL
-     * @param desc a desription
+     * @param desc a description
      * @param sourceElement the element that corresponds to the source
      *                      of the event
      * @param targetFrame the Frame to display the document in
@@ -109,7 +109,7 @@
      * @param source the object responsible for the event
      * @param type the event type
      * @param targetURL the affected URL
-     * @param desc a desription
+     * @param desc a description
      * @param sourceElement the element that corresponds to the source
      *                      of the event
      * @param inputEvent  InputEvent that triggered the hyperlink event
--- a/src/share/classes/javax/swing/text/html/HTMLWriter.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/text/html/HTMLWriter.java	Mon Nov 11 23:17:30 2013 -0800
@@ -750,7 +750,7 @@
 
     /**
      * Searches the attribute set and for each tag
-     * that is stored in the tag vector.  If the tag isnt found,
+     * that is stored in the tag vector.  If the tag is not found,
      * then the tag is removed from the vector and a corresponding
      * end tag is written out.
      *
--- a/src/share/classes/javax/swing/text/html/OptionListModel.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/text/html/OptionListModel.java	Mon Nov 11 23:17:30 2013 -0800
@@ -502,7 +502,7 @@
      * leadIndex and newLeadIndex is the new one.
      * <p>
      * If the value at the anchor index is not selected, do the same thing in reverse,
-     * selecting values in the old range and deslecting values in the new one.
+     * selecting values in the old range and deselecting values in the new one.
      * <p>
      * Generate a single event for this change and notify all listeners.
      * For the purposes of generating minimal bounds in this event, do the
--- a/src/share/classes/javax/swing/text/html/ParagraphView.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/text/html/ParagraphView.java	Mon Nov 11 23:17:30 2013 -0800
@@ -211,7 +211,7 @@
 
     /**
      * Renders using the given rendering surface and area on that
-     * surface.  This is implemented to delgate to the superclass
+     * surface.  This is implemented to delegate to the superclass
      * after stashing the base coordinate for tab calculations.
      *
      * @param g the rendering surface to use
--- a/src/share/classes/javax/swing/text/html/StyleSheet.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/text/html/StyleSheet.java	Mon Nov 11 23:17:30 2013 -0800
@@ -105,7 +105,7 @@
  * background. But if the html file also contains the CSS rule
  * <code>body { background: blue }</code> it becomes less clear as to
  * what color the background of the body should be. The current
- * implemention gives visual attributes defined in the element the
+ * implementation gives visual attributes defined in the element the
  * highest precedence, that is they are always checked before any styles.
  * Therefore, in the previous example the background would have a
  * red color as the body element defines the background color to be red.
@@ -938,7 +938,7 @@
     /**
      * Sets the base font size from the passed in String. The string
      * can either identify a specific font size, with legal values between
-     * 1 and 7, or identifiy a relative font size such as +1 or -2.
+     * 1 and 7, or identify a relative font size such as +1 or -2.
      */
     public void setBaseFontSize(String size) {
         css.setBaseFontSize(size);
@@ -1035,7 +1035,7 @@
     }
 
     //
-    // The following gaggle of methods is used in maintaing the rules from
+    // The following gaggle of methods is used in maintaining the rules from
     // the sheet.
     //
 
@@ -2959,13 +2959,13 @@
                 return true;
             }
             if (thisDotIndex != -1) {
-                // Reciever references a class, just check element name.
+                // Receiver references a class, just check element name.
                 return (((thisDotIndex - thisCurrent) == (sLast - sCurrent)) &&
                         selector.regionMatches(sCurrent, name, thisCurrent,
                                                thisDotIndex - thisCurrent));
             }
             if (thisPoundIndex != -1) {
-                // Reciever references an id, just check element name.
+                // Receiver references an id, just check element name.
                 return (((thisPoundIndex - thisCurrent) ==(sLast - sCurrent))&&
                         selector.regionMatches(sCurrent, name, thisCurrent,
                                                thisPoundIndex - thisCurrent));
@@ -2977,7 +2977,7 @@
         }
 
         /**
-         * Similiar to String.indexOf, but allows an upper bound
+         * Similar to String.indexOf, but allows an upper bound
          * (this is slower in that it will still check string starting at
          * start.
          */
--- a/src/share/classes/javax/swing/text/html/TableView.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/text/html/TableView.java	Mon Nov 11 23:17:30 2013 -0800
@@ -620,7 +620,7 @@
 
     /**
      * Perform layout for the minor axis of the box (i.e. the
-     * axis orthoginal to the axis that it represents).  The results
+     * axis orthogonal to the axis that it represents).  The results
      * of the layout should be placed in the given arrays which represent
      * the allocations to the children along the minor axis.  This
      * is called by the superclass whenever the layout needs to be
@@ -632,7 +632,7 @@
      * of the tables rows.
      *
      * @param targetSpan the total span given to the view, which
-     *  whould be used to layout the children
+     *  would be used to layout the children
      * @param axis the axis being layed out
      * @param offsets the offsets from the origin of the view for
      *  each of the child views.  This is a return value and is
@@ -675,7 +675,7 @@
      * with border spacing and border collapsing capabilities.
      *
      * @param targetSpan the total span given to the view, which
-     *  whould be used to layout the children
+     *  would be used to layout the children
      * @param axis the axis being layed out
      * @param offsets the offsets from the origin of the view for
      *  each of the child views; this is a return value and is
@@ -1169,7 +1169,7 @@
         }
 
         /**
-         * Fixup preferences to accomodate a multi-row table cell
+         * Fixup preferences to accommodate a multi-row table cell
          * if not already covered by existing preferences.  This is
          * a no-op if not all of the rows needed (to do this check/fixup)
          * have arrived yet.
@@ -1523,7 +1523,7 @@
          * the multi-column span.
          *
          * @param targetSpan the total span given to the view, which
-         *  whould be used to layout the children
+         *  would be used to layout the children
          * @param axis the axis being layed out
          * @param offsets the offsets from the origin of the view for
          *  each of the child views; this is a return value and is
@@ -1564,7 +1564,7 @@
 
         /**
          * Perform layout for the minor axis of the box (i.e. the
-         * axis orthoginal to the axis that it represents).  The results
+         * axis orthogonal to the axis that it represents).  The results
          * of the layout should be placed in the given arrays which represent
          * the allocations to the children along the minor axis.  This
          * is called by the superclass whenever the layout needs to be
@@ -1574,7 +1574,7 @@
          * the span for any cell that spans multiple rows.
          *
          * @param targetSpan the total span given to the view, which
-         *  whould be used to layout the children
+         *  would be used to layout the children
          * @param axis the axis being layed out
          * @param offsets the offsets from the origin of the view for
          *  each of the child views; this is a return value and is
@@ -1716,7 +1716,7 @@
          * (i.e. position according to the html valign attribute).
          *
          * @param targetSpan the total span given to the view, which
-         *  whould be used to layout the children
+         *  would be used to layout the children
          * @param axis the axis being layed out
          * @param offsets the offsets from the origin of the view for
          *  each of the child views; this is a return value and is
--- a/src/share/classes/javax/swing/text/html/package.html	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/text/html/package.html	Mon Nov 11 23:17:30 2013 -0800
@@ -25,7 +25,7 @@
 or visit www.oracle.com if you need additional information or have any
 questions.
 -->
-
+<title></title>
 </head>
 <body bgcolor="white">
 
--- a/src/share/classes/javax/swing/text/html/parser/ContentModel.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/text/html/parser/ContentModel.java	Mon Nov 11 23:17:30 2013 -0800
@@ -34,7 +34,7 @@
  * A representation of a content model. A content model is
  * basically a restricted BNF expression. It is restricted in
  * the sense that it must be deterministic. This means that you
- * don't have to represent it as a finite state automata.<p>
+ * don't have to represent it as a finite state automaton.<p>
  * See Annex H on page 556 of the SGML handbook for more information.
  *
  * @author   Arthur van Hoff
--- a/src/share/classes/javax/swing/text/html/parser/DocumentParser.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/text/html/parser/DocumentParser.java	Mon Nov 11 23:17:30 2013 -0800
@@ -69,7 +69,7 @@
  * a String value of 'neat' and the String key 'foo' with a String value of
  * 'bar'.
  * <p>The position argument will indicate the start of the tag, comment
- * or text. Similiar to arrays, the first character in the stream has a
+ * or text. Similar to arrays, the first character in the stream has a
  * position of 0. For tags that are
  * implied the position will indicate
  * the location of the next encountered tag. In the first example,
--- a/src/share/classes/javax/swing/text/html/parser/Element.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/text/html/parser/Element.java	Mon Nov 11 23:17:30 2013 -0800
@@ -32,7 +32,7 @@
 
 /**
  * An element as described in a DTD using the ELEMENT construct.
- * This is essentiall the description of a tag. It describes the
+ * This is essential the description of a tag. It describes the
  * type, content model, attributes, attribute types etc. It is used
  * to correctly parse a document by the Parser.
  *
--- a/src/share/classes/javax/swing/text/html/parser/Parser.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/text/html/parser/Parser.java	Mon Nov 11 23:17:30 2013 -0800
@@ -547,7 +547,7 @@
         // The use of all error recovery strategies are contingent
         // on the value of the strict property.
         //
-        // These are commonly occuring errors.  if insertTag is true,
+        // These are commonly occurring errors.  if insertTag is true,
         // then we want to adopt an error recovery strategy that
         // involves attempting to insert an additional tag to
         // legalize the context.  The two errors addressed here
@@ -606,7 +606,7 @@
         // They try to find a legal context by checking if the current
         // tag is valid in an enclosing context.  If so
         // close out the tags by outputing end tags and then
-        // insert the curent tag.  If the tags that are
+        // insert the current tag.  If the tags that are
         // being closed out do not have an optional end tag
         // specification in the DTD then an html error is
         // reported.
@@ -1761,7 +1761,7 @@
 
             // find the corresponding start tag
 
-            // A commonly occuring error appears to be the insertion
+            // A commonly occurring error appears to be the insertion
             // of extra end tags in a table.  The intent here is ignore
             // such extra end tags.
             //
@@ -1769,7 +1769,7 @@
                 String stackElem = stack.elem.getName();
 
                 if (stackElem.equals("table")) {
-                    // If it isnt a valid end tag ignore it and return
+                    // If it is not a valid end tag ignore it and return
                     //
                     if (!elem.getName().equals(stackElem)) {
                         error("tag.ignore", elem.getName());
--- a/src/share/classes/javax/swing/text/html/parser/package.html	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/text/html/parser/package.html	Mon Nov 11 23:17:30 2013 -0800
@@ -25,7 +25,7 @@
 or visit www.oracle.com if you need additional information or have any
 questions.
 -->
-
+<title></title>
 </head>
 <body bgcolor="white">
 
--- a/src/share/classes/javax/swing/text/package.html	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/text/package.html	Mon Nov 11 23:17:30 2013 -0800
@@ -25,7 +25,7 @@
 or visit www.oracle.com if you need additional information or have any
 questions.
 -->
-
+<title></title>
 </head>
 <body bgcolor="white">
 
--- a/src/share/classes/javax/swing/text/rtf/package.html	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/text/rtf/package.html	Mon Nov 11 23:17:30 2013 -0800
@@ -25,7 +25,7 @@
 or visit www.oracle.com if you need additional information or have any
 questions.
 -->
-
+<title></title>
 </head>
 <body bgcolor="white">
 
--- a/src/share/classes/javax/swing/tree/AbstractLayoutCache.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/tree/AbstractLayoutCache.java	Mon Nov 11 23:17:30 2013 -0800
@@ -68,7 +68,7 @@
 
     /**
      * Sets the renderer that is responsible for drawing nodes in the tree
-     * and which is threfore responsible for calculating the dimensions of
+     * and which is therefore responsible for calculating the dimensions of
      * individual nodes.
      *
      * @param nd a <code>NodeDimensions</code> object
--- a/src/share/classes/javax/swing/tree/DefaultTreeCellEditor.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/tree/DefaultTreeCellEditor.java	Mon Nov 11 23:17:30 2013 -0800
@@ -45,7 +45,7 @@
  * If you do not supply a <code>TreeCellEditor</code>,
  * a <code>TextField</code> will be used. Editing is started
  * on a triple mouse click, or after a click, pause, click and
- * a delay of 1200 miliseconds.
+ * a delay of 1200 milliseconds.
  *<p>
  * <strong>Warning:</strong>
  * Serialized objects of this class will not be compatible with
@@ -173,7 +173,7 @@
      * Sets the font to edit with. <code>null</code> indicates
      * the renderers font should be used. This will NOT
      * override any font you have set in the editor
-     * the receiver was instantied with. If <code>null</code>
+     * the receiver was instantiated with. If <code>null</code>
      * for an editor was passed in a default editor will be
      * created that will pick up this font.
      *
@@ -216,7 +216,7 @@
                                         isSelected, expanded,leaf, row);
 
 
-        // this is kept for backwards compatability but isn't really needed
+        // this is kept for backwards compatibility but isn't really needed
         // with the current BasicTreeUI implementation.
         TreePath        newPath = tree.getPathForRow(row);
 
--- a/src/share/classes/javax/swing/tree/DefaultTreeCellRenderer.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/tree/DefaultTreeCellRenderer.java	Mon Nov 11 23:17:30 2013 -0800
@@ -62,8 +62,8 @@
  * {@code DefaultTreeCellRenderer} property and defaults table key:
  * <table border="1" cellpadding="1" cellspacing="0" summary="">
  *   <tr valign="top"  align="left">
- *     <th bgcolor="#CCCCFF" align="left">Property:
- *     <th bgcolor="#CCCCFF" align="left">Key:
+ *     <th style="background-color:#CCCCFF" align="left">Property:
+ *     <th style="background-color:#CCCCFF" align="left">Key:
  *   <tr><td>"leafIcon"<td>"Tree.leafIcon"
  *   <tr><td>"closedIcon"<td>"Tree.closedIcon"
  *   <tr><td>"openIcon"<td>"Tree.openIcon"
--- a/src/share/classes/javax/swing/tree/DefaultTreeModel.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/tree/DefaultTreeModel.java	Mon Nov 11 23:17:30 2013 -0800
@@ -357,7 +357,7 @@
 
     /**
       * Invoke this method if you've totally changed the children of
-      * node and its childrens children...  This will post a
+      * node and its children's children...  This will post a
       * treeStructureChanged event.
       */
     public void nodeStructureChanged(TreeNode node) {
--- a/src/share/classes/javax/swing/tree/DefaultTreeSelectionModel.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/tree/DefaultTreeSelectionModel.java	Mon Nov 11 23:17:30 2013 -0800
@@ -1123,7 +1123,7 @@
     /**
      * This method is obsolete and its implementation is now a noop.  It's
      * still called by setSelectionPaths and addSelectionPaths, but only
-     * for backwards compatability.
+     * for backwards compatibility.
      */
     protected void insureUniqueness() {
     }
--- a/src/share/classes/javax/swing/tree/FixedHeightLayoutCache.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/tree/FixedHeightLayoutCache.java	Mon Nov 11 23:17:30 2013 -0800
@@ -936,7 +936,7 @@
         }
 
         /**
-         * Recreates the receivers path, and all its childrens paths.
+         * Recreates the receivers path, and all its children's paths.
          */
         protected void resetChildrenPaths(TreePath parentPath) {
             removeMapping(this);
@@ -1079,7 +1079,7 @@
         }
 
         /**
-         * Resets the receivers childrens rows. Starting with the child
+         * Resets the receivers children's rows. Starting with the child
          * at <code>childIndex</code> (and <code>modelIndex</code>) to
          * <code>newRow</code>. This uses <code>setRowAndChildren</code>
          * to recursively descend children, and uses
@@ -1346,7 +1346,7 @@
                         return true;
                     }
                     else {
-                        // May have been in last childs bounds.
+                        // May have been in last child's bounds.
                         int          lastChildEndRow = 1 + child.row -
                                      (child.childIndex - lastChild.childIndex);
 
@@ -1474,7 +1474,7 @@
     /**
      * An enumerator to iterate through visible nodes.
      */
-    // This is very similiar to
+    // This is very similar to
     // VariableHeightTreeState.VisibleTreeStateNodeEnumeration
     private class VisibleFHTreeStateNodeEnumeration
         implements Enumeration<TreePath>
--- a/src/share/classes/javax/swing/tree/TreeModel.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/tree/TreeModel.java	Mon Nov 11 23:17:30 2013 -0800
@@ -30,7 +30,7 @@
  * The model used by <code>JTree</code>.
  * <p>
  * <code>JTree</code> and its related classes make extensive use of
- * <code>TreePath</code>s for indentifying nodes in the <code>TreeModel</code>.
+ * <code>TreePath</code>s for identifying nodes in the <code>TreeModel</code>.
  * If a <code>TreeModel</code> returns the same object, as compared by
  * <code>equals</code>, at two different indices under the same parent
  * than the resulting <code>TreePath</code> objects will be considered equal
--- a/src/share/classes/javax/swing/tree/TreeSelectionModel.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/tree/TreeSelectionModel.java	Mon Nov 11 23:17:30 2013 -0800
@@ -47,7 +47,7 @@
   *
   * A TreeSelectionModel can be configured to allow only one
   * path (<code>SINGLE_TREE_SELECTION</code>) a number of
-  * continguous paths (<code>CONTIGUOUS_TREE_SELECTION</code>) or a number of
+  * contiguous paths (<code>CONTIGUOUS_TREE_SELECTION</code>) or a number of
   * discontiguous paths (<code>DISCONTIGUOUS_TREE_SELECTION</code>).
   * A <code>RowMapper</code> is used to determine if TreePaths are
   * contiguous.
--- a/src/share/classes/javax/swing/tree/VariableHeightLayoutCache.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/tree/VariableHeightLayoutCache.java	Mon Nov 11 23:17:30 2013 -0800
@@ -1315,7 +1315,7 @@
         //
 
         /**
-         * Recreates the receivers path, and all its childrens paths.
+         * Recreates the receivers path, and all its children's paths.
          */
         protected void resetChildrenPaths(TreePath parentPath) {
             removeMapping(this);
--- a/src/share/classes/javax/swing/tree/package.html	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/tree/package.html	Mon Nov 11 23:17:30 2013 -0800
@@ -25,7 +25,7 @@
 or visit www.oracle.com if you need additional information or have any
 questions.
 -->
-
+<title></title>
 </head>
 <body bgcolor="white">
 
--- a/src/share/classes/javax/swing/undo/package.html	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/swing/undo/package.html	Mon Nov 11 23:17:30 2013 -0800
@@ -25,7 +25,7 @@
 or visit www.oracle.com if you need additional information or have any
 questions.
 -->
-
+<title></title>
 </head>
 <body bgcolor="white">
 
--- a/src/share/classes/javax/xml/crypto/KeySelector.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/xml/crypto/KeySelector.java	Mon Nov 11 23:17:30 2013 -0800
@@ -34,7 +34,7 @@
 /**
  * A selector that finds and returns a key using the data contained in a
  * {@link KeyInfo} object. An example of an implementation of
- * this class is one that searchs a {@link java.security.KeyStore} for
+ * this class is one that searches a {@link java.security.KeyStore} for
  * trusted keys that match information contained in a <code>KeyInfo</code>.
  *
  * <p>Whether or not the returned key is trusted and the mechanisms
--- a/src/share/classes/javax/xml/crypto/MarshalException.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/xml/crypto/MarshalException.java	Mon Nov 11 23:17:30 2013 -0800
@@ -36,7 +36,7 @@
 import javax.xml.crypto.dsig.keyinfo.KeyInfoFactory;
 
 /**
- * Indicates an exceptional condition that occured during the XML
+ * Indicates an exceptional condition that occurred during the XML
  * marshalling or unmarshalling process.
  *
  * <p>A <code>MarshalException</code> can contain a cause: another
--- a/src/share/classes/javax/xml/crypto/dsig/TransformException.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/xml/crypto/dsig/TransformException.java	Mon Nov 11 23:17:30 2013 -0800
@@ -31,7 +31,7 @@
 import java.io.PrintWriter;
 
 /**
- * Indicates an exceptional condition that occured while executing a
+ * Indicates an exceptional condition that occurred while executing a
  * transform algorithm.
  *
  * <p>A <code>TransformException</code> can contain a cause: another
--- a/src/share/classes/javax/xml/crypto/dsig/XMLSignatureException.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/javax/xml/crypto/dsig/XMLSignatureException.java	Mon Nov 11 23:17:30 2013 -0800
@@ -31,7 +31,7 @@
 import java.io.PrintWriter;
 
 /**
- * Indicates an exceptional condition that occured during the XML
+ * Indicates an exceptional condition that occurred during the XML
  * signature generation or validation process.
  *
  * <p>An <code>XMLSignatureException</code> can contain a cause: another
--- a/src/share/classes/jdi-overview.html	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/jdi-overview.html	Mon Nov 11 23:17:30 2013 -0800
@@ -6,7 +6,7 @@
   <body>
 	The Java<sup><font size="-2">TM</font></sup>
  Debug Interface (JDI) is a high level Java
-API providing information useful for debuggers and similiar
+API providing information useful for debuggers and similar
 systems needing access to the running state of a (usually remote)
 virtual machine.
 <p>
--- a/src/share/classes/jdk/internal/org/objectweb/asm/Frame.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/jdk/internal/org/objectweb/asm/Frame.java	Mon Nov 11 23:17:30 2013 -0800
@@ -537,7 +537,7 @@
     /**
      * The types that are initialized in the basic block. A constructor
      * invocation on an UNINITIALIZED or UNINITIALIZED_THIS type must replace
-     * <i>every occurence</i> of this type in the local variables and in the
+     * <i>every occurrence</i> of this type in the local variables and in the
      * operand stack. This cannot be done during the first phase of the
      * algorithm since, during this phase, the local variables and the operand
      * stack are not completely computed. It is therefore necessary to store the
--- a/src/share/classes/jdk/internal/org/objectweb/asm/tree/analysis/Analyzer.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/jdk/internal/org/objectweb/asm/tree/analysis/Analyzer.java	Mon Nov 11 23:17:30 2013 -0800
@@ -404,7 +404,7 @@
      *         instruction of the method. The size of the returned array is
      *         equal to the number of instructions (and labels) of the method. A
      *         given frame is <tt>null</tt> if the corresponding instruction
-     *         cannot be reached, or if an error occured during the analysis of
+     *         cannot be reached, or if an error occurred during the analysis of
      *         the method.
      */
     public Frame<V>[] getFrames() {
--- a/src/share/classes/jdk/internal/org/objectweb/asm/tree/analysis/Interpreter.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/jdk/internal/org/objectweb/asm/tree/analysis/Interpreter.java	Mon Nov 11 23:17:30 2013 -0800
@@ -111,7 +111,7 @@
      *            the bytecode instruction to be interpreted.
      * @return the result of the interpretation of the given instruction.
      * @throws AnalyzerException
-     *             if an error occured during the interpretation.
+     *             if an error occurred during the interpretation.
      */
     public abstract V newOperation(AbstractInsnNode insn)
             throws AnalyzerException;
@@ -130,7 +130,7 @@
      * @return the result of the interpretation of the given instruction. The
      *         returned value must be <tt>equal</tt> to the given value.
      * @throws AnalyzerException
-     *             if an error occured during the interpretation.
+     *             if an error occurred during the interpretation.
      */
     public abstract V copyOperation(AbstractInsnNode insn, V value)
             throws AnalyzerException;
@@ -151,7 +151,7 @@
      *            the argument of the instruction to be interpreted.
      * @return the result of the interpretation of the given instruction.
      * @throws AnalyzerException
-     *             if an error occured during the interpretation.
+     *             if an error occurred during the interpretation.
      */
     public abstract V unaryOperation(AbstractInsnNode insn, V value)
             throws AnalyzerException;
@@ -175,7 +175,7 @@
      *            the second argument of the instruction to be interpreted.
      * @return the result of the interpretation of the given instruction.
      * @throws AnalyzerException
-     *             if an error occured during the interpretation.
+     *             if an error occurred during the interpretation.
      */
     public abstract V binaryOperation(AbstractInsnNode insn, V value1, V value2)
             throws AnalyzerException;
@@ -196,7 +196,7 @@
      *            the third argument of the instruction to be interpreted.
      * @return the result of the interpretation of the given instruction.
      * @throws AnalyzerException
-     *             if an error occured during the interpretation.
+     *             if an error occurred during the interpretation.
      */
     public abstract V ternaryOperation(AbstractInsnNode insn, V value1,
             V value2, V value3) throws AnalyzerException;
@@ -214,7 +214,7 @@
      *            the arguments of the instruction to be interpreted.
      * @return the result of the interpretation of the given instruction.
      * @throws AnalyzerException
-     *             if an error occured during the interpretation.
+     *             if an error occurred during the interpretation.
      */
     public abstract V naryOperation(AbstractInsnNode insn,
             List<? extends V> values) throws AnalyzerException;
@@ -232,7 +232,7 @@
      * @param expected
      *            the expected return type of the analyzed method.
      * @throws AnalyzerException
-     *             if an error occured during the interpretation.
+     *             if an error occurred during the interpretation.
      */
     public abstract void returnOperation(AbstractInsnNode insn, V value,
             V expected) throws AnalyzerException;
--- a/src/share/classes/jdk/internal/org/xml/sax/EntityResolver.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/jdk/internal/org/xml/sax/EntityResolver.java	Mon Nov 11 23:17:30 2013 -0800
@@ -55,7 +55,7 @@
  *
  * <p>Many SAX applications will not need to implement this interface,
  * but it will be especially useful for applications that build
- * XML documents from databases or other specialised input sources,
+ * XML documents from databases or other specialized input sources,
  * or for applications that use URI types other than URLs.</p>
  *
  * <p>The following resolver would provide the application
--- a/src/share/classes/jdk/internal/util/xml/XMLStreamException.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/jdk/internal/util/xml/XMLStreamException.java	Mon Nov 11 23:17:30 2013 -0800
@@ -50,7 +50,7 @@
     }
 
     /**
-     * Construct an exception with the assocated message.
+     * Construct an exception with the associated message.
      *
      * @param msg the message to report
      */
@@ -59,7 +59,7 @@
     }
 
     /**
-     * Construct an exception with the assocated exception
+     * Construct an exception with the associated exception
      *
      * @param th a nested exception
      */
@@ -69,7 +69,7 @@
     }
 
     /**
-     * Construct an exception with the assocated message and exception
+     * Construct an exception with the associated message and exception
      *
      * @param th a nested exception
      * @param msg the message to report
--- a/src/share/classes/jdk/internal/util/xml/impl/Parser.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/jdk/internal/util/xml/impl/Parser.java	Mon Nov 11 23:17:30 2013 -0800
@@ -1052,7 +1052,7 @@
                         case 'X':
                         case ':':
                             bkch();
-                            //          Get the attribut from the list or add a new one.
+                            //          Get the attribute from the list or add a new one.
                             attqn = qname(mIsNSAware);
                             att = find(elm.list, attqn);
                             if (att == null) {
@@ -2960,7 +2960,7 @@
      * Parses the xml text declaration.
      *
      * This method gets encoding from the xml text declaration [#4.3.1] if any.
-     * The method assumes the buffer (mChars) is big enough to accomodate whole
+     * The method assumes the buffer (mChars) is big enough to accommodate whole
      * xml text declaration.
      *
      * @param reader is entity reader.
--- a/src/share/classes/org/ietf/jgss/GSSContext.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/org/ietf/jgss/GSSContext.java	Mon Nov 11 23:17:30 2013 -0800
@@ -1094,7 +1094,7 @@
      * side  and it has to be done prior to the first call to
      * <code>initSecContext</code>.<p>
      *
-     * The actual lifetime of the context will depend on the capabilites of
+     * The actual lifetime of the context will depend on the capabilities of
      * the underlying mechanism and the application should call the {@link
      * #getLifetime() getLifetime} method to determine this.<p>
      *
--- a/src/share/classes/org/ietf/jgss/GSSCredential.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/org/ietf/jgss/GSSCredential.java	Mon Nov 11 23:17:30 2013 -0800
@@ -203,7 +203,7 @@
      * expire.  A return value of 0 indicates that the credential element is
      * already expired.
      *
-     * @param mech the Oid of the mechanism whose intiator credential element
+     * @param mech the Oid of the mechanism whose initiator credential element
      * should be queried.
      *
      * @throws GSSException containing the following
--- a/src/share/classes/org/ietf/jgss/GSSException.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/org/ietf/jgss/GSSException.java	Mon Nov 11 23:17:30 2013 -0800
@@ -291,7 +291,7 @@
      * this exception to be thrown. Major error codes are
      * defined at the mechanism independent GSS-API level in this
      * class. Mechanism specific error codes that might provide more
-     * information aer set as the minor error code.
+     * information are set as the minor error code.
      *
      * @return int the GSS-API level major error code causing this exception
      * @see #getMajorString
--- a/src/share/classes/org/ietf/jgss/GSSManager.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/org/ietf/jgss/GSSManager.java	Mon Nov 11 23:17:30 2013 -0800
@@ -214,7 +214,7 @@
      * the namespace type parameter indicates NT_EXPORT_NAME or when the
      * GSS-API implementation is not multi-mechanism. It is
      * not recommended to use this method with a NT_EXPORT_NAME type because
-     * representing a previously exported name consisting of abitrary bytes
+     * representing a previously exported name consisting of arbitrary bytes
      * as a String might cause problems with character encoding schemes. In
      * such cases it is recommended that the bytes be passed in directly to
      * the overloaded form of this method {@link #createName(byte[],
--- a/src/share/classes/org/ietf/jgss/GSSName.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/org/ietf/jgss/GSSName.java	Mon Nov 11 23:17:30 2013 -0800
@@ -45,7 +45,7 @@
  * single-mechanism environments where the underlying mechanism supports
  * multiple namespaces). Different name formats and their definitions are
  * identified with {@link Oid Oid's} and some standard types
- * are defind in this interface. The format of the names can be derived
+ * are defined in this interface. The format of the names can be derived
  * based on the unique <code>Oid</code> of its name type.<p>
  *
  * Included below are code examples utilizing the <code>GSSName</code> interface.
--- a/src/share/classes/org/ietf/jgss/package.html	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/org/ietf/jgss/package.html	Mon Nov 11 23:17:30 2013 -0800
@@ -86,9 +86,9 @@
 
     This model does require that a {@link
     javax.security.auth.login JAAS login} be performed in order to
-    authenticate and populate a Subject that the JGSS mechnanism can later 
+    authenticate and populate a Subject that the JGSS mechanism can later 
     utilize. However, applications have the ability to relax this
-    restiction by means of a system property:
+    restriction by means of a system property:
     <code>javax.security.auth.useSubjectCredsOnly</code>. By default
     this system property will be assumed to be <code>true</code> (even when
     it is unset) indicating that providers must only use the credentials
--- a/src/share/classes/sun/applet/AppletSecurity.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/sun/applet/AppletSecurity.java	Mon Nov 11 23:17:30 2013 -0800
@@ -140,7 +140,7 @@
          * fix bug # 6433620 the logic here is : try to find URLClassLoader from
          * class context, check its AccessControlContext to see if
          * AppletClassLoader is in stack when it's created. for this kind of
-         * URLClassLoader, return the AppContext assocated with the
+         * URLClassLoader, return the AppContext associated with the
          * AppletClassLoader.
          */
         for (int i = 0; i < context.length; i++) {
@@ -304,7 +304,7 @@
      *
      * @since   JDK1.1
      * @exception  SecurityException  if the caller does not have
-     *             permission to accesss the AWT event queue.
+     *             permission to access the AWT event queue.
      */
     public void checkAwtEventQueueAccess() {
         AppContext appContext = AppContext.getAppContext();
--- a/src/share/classes/sun/awt/AWTAccessor.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/sun/awt/AWTAccessor.java	Mon Nov 11 23:17:30 2013 -0800
@@ -31,6 +31,7 @@
 import java.awt.KeyboardFocusManager;
 import java.awt.DefaultKeyboardFocusManager;
 import java.awt.event.InputEvent;
+import java.awt.event.InvocationEvent;
 import java.awt.event.KeyEvent;
 import java.awt.geom.Point2D;
 import java.awt.peer.ComponentPeer;
@@ -721,6 +722,13 @@
     }
 
     /*
+     * An accessor object for the InvocationEvent class
+     */
+    public interface InvocationEventAccessor {
+        void dispose(InvocationEvent event);
+    }
+
+    /*
      * Accessor instances are initialized in the static initializers of
      * corresponding AWT classes by using setters defined below.
      */
@@ -748,6 +756,7 @@
     private static DefaultKeyboardFocusManagerAccessor defaultKeyboardFocusManagerAccessor;
     private static SequencedEventAccessor sequencedEventAccessor;
     private static ToolkitAccessor toolkitAccessor;
+    private static InvocationEventAccessor invocationEventAccessor;
 
     /*
      * Set an accessor object for the java.awt.Component class.
@@ -1159,4 +1168,18 @@
 
         return toolkitAccessor;
     }
+
+    /*
+     * Get the accessor object for the java.awt.event.InvocationEvent class.
+     */
+    public static void setInvocationEventAccessor(InvocationEventAccessor invocationEventAccessor) {
+        AWTAccessor.invocationEventAccessor = invocationEventAccessor;
+    }
+
+    /*
+     * Set the accessor object for the java.awt.event.InvocationEvent class.
+     */
+    public static InvocationEventAccessor getInvocationEventAccessor() {
+        return invocationEventAccessor;
+    }
 }
--- a/src/share/classes/sun/awt/AppContext.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/sun/awt/AppContext.java	Mon Nov 11 23:17:30 2013 -0800
@@ -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
@@ -309,14 +312,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/FontConfiguration.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/sun/awt/FontConfiguration.java	Mon Nov 11 23:17:30 2013 -0800
@@ -1278,7 +1278,7 @@
     //////////////////////////////////////////////////////////////////////
     /* The binary font configuration file begins with a short[] "head", which
      * contains the offsets to the starts of the individual data table which
-     * immediately follow. Teh current implemention includes the tables shown
+     * immediately follow. The current implementation includes the tables shown
      * below.
      *
      * (00) table_scriptIDs    :stringIDs of all defined CharacterSubsetNames
@@ -2119,7 +2119,7 @@
         private void parseProperty(String key, String value) {
             if (key.startsWith("filename.")) {
                 //the only special case is "MingLiu_HKSCS" which has "_" in its
-                //facename, we dont want to replace the "_" with " "
+                //facename, we don't want to replace the "_" with " "
                 key = key.substring(9);
                 if (!"MingLiU_HKSCS".equals(key)) {
                     key = key.replace('_', ' ');
@@ -2224,7 +2224,7 @@
                 proportionals.put(getID(componentFontNameIDs, key),
                                   getID(componentFontNameIDs, value));
             } else {
-                //"name.style.script(.motif)", we dont care anything else
+                //"name.style.script(.motif)", we don't care anything else
                 int dot1, dot2;
                 boolean isMotif = false;
 
--- a/src/share/classes/sun/awt/GlobalCursorManager.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/sun/awt/GlobalCursorManager.java	Mon Nov 11 23:17:30 2013 -0800
@@ -157,7 +157,7 @@
      *
      * (2) If 'useCache' is true, the native code is free to use a cached
      * value to determine the most specific, visible, enabled heavyweight
-     * because this update is occuring in response to a mouse move. If
+     * because this update is occurring in response to a mouse move. If
      * 'useCache' is false, the native code must perform a new search given
      * the current mouse coordinates.
      *
--- a/src/share/classes/sun/awt/datatransfer/DataTransferer.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/sun/awt/datatransfer/DataTransferer.java	Mon Nov 11 23:17:30 2013 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 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
@@ -1674,6 +1674,15 @@
                 theObject = translateStream(bais, flavor, format, localeTransferable);
             }
 
+        } else if (flavor.isRepresentationClassRemote()) {
+            try (ByteArrayInputStream bais = new ByteArrayInputStream(bytes);
+                 ObjectInputStream ois = new ObjectInputStream(bais))
+            {
+                theObject = RMI.getMarshalledObject(ois.readObject());
+            } catch (Exception e) {
+                throw new IOException(e.getMessage());
+            }
+
             // Target data is Serializable
         } else if (flavor.isRepresentationClassSerializable()) {
 
@@ -1731,6 +1740,14 @@
             }
             theObject = files;
 
+        // Target data is a String. Strip terminating NUL bytes. Decode bytes
+        // into characters. Search-and-replace EOLN.
+        } else if (String.class.equals(flavor.getRepresentationClass()) &&
+                   isFlavorCharsetTextType(flavor) && isTextFormat(format)) {
+
+            return translateBytesToString(inputStreamToByteArray(str),
+                format, localeTransferable);
+
             // Special hack to maintain backwards-compatibility with the brokenness
             // of StringSelection. Return a StringReader instead of an InputStream.
             // Recur to obtain String and encapsulate.
--- a/src/share/classes/sun/awt/dnd/SunDropTargetContextPeer.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/sun/awt/dnd/SunDropTargetContextPeer.java	Mon Nov 11 23:17:30 2013 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 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
@@ -271,14 +271,11 @@
                 throw new InvalidDnDOperationException(e.getMessage());
             }
         } else if (ret instanceof InputStream) {
-            InputStream inputStream = (InputStream)ret;
             try {
                 return DataTransferer.getInstance().
-                    translateStream(inputStream, df, format, this);
+                    translateStream((InputStream)ret, df, format, this);
             } catch (IOException e) {
                 throw new InvalidDnDOperationException(e.getMessage());
-            } finally {
-                inputStream.close();
             }
         } else {
             throw new IOException("no native data was transfered");
--- a/src/share/classes/sun/awt/shell/ShellFolderManager.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/sun/awt/shell/ShellFolderManager.java	Mon Nov 11 23:17:30 2013 -0800
@@ -48,7 +48,7 @@
      *  "fileChooserDefaultFolder":
      *    Returns a <code>File</code> - the default shellfolder for a new filechooser
      *  "roots":
-     *    Returns a <code>File[]</code> - containing the root(s) of the displayable hieararchy
+     *    Returns a <code>File[]</code> - containing the root(s) of the displayable hierarchy
      *  "fileChooserComboBoxFolders":
      *    Returns a <code>File[]</code> - an array of shellfolders representing the list to
      *    show by default in the file chooser's combobox
@@ -73,7 +73,7 @@
                 return homeDir;
             }
         } else if (key.equals("roots")) {
-            // The root(s) of the displayable hieararchy
+            // The root(s) of the displayable hierarchy
             return File.listRoots();
         } else if (key.equals("fileChooserComboBoxFolders")) {
             // Return an array of ShellFolders representing the list to
--- a/src/share/classes/sun/dc/DuctusRenderingEngine.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/sun/dc/DuctusRenderingEngine.java	Mon Nov 11 23:17:30 2013 -0800
@@ -290,7 +290,7 @@
                  * and Infinity values. Ignoring current path segment in case
                  * of invalid endpoints's data. Equivalent to the SEG_LINETO
                  * if endpoint coordinates are valid but there are invalid data
-                 * amoung other coordinates
+                 * among other coordinates
                  */
                 if (point[2] < UPPER_BND && point[2] > LOWER_BND &&
                     point[3] < UPPER_BND && point[3] > LOWER_BND)
@@ -319,7 +319,7 @@
                  * and Infinity values. Ignoring current path segment in case
                  * of invalid endpoints's data. Equivalent to the SEG_LINETO
                  * if endpoint coordinates are valid but there are invalid data
-                 * amoung other coordinates
+                 * among other coordinates
                  */
                 if (point[4] < UPPER_BND && point[4] > LOWER_BND &&
                     point[5] < UPPER_BND && point[5] > LOWER_BND)
@@ -545,7 +545,7 @@
                      * NaN and Infinity values. Ignoring current path segment
                      * in case of invalid endpoints's data. Equivalent to the
                      * SEG_LINETO if endpoint coordinates are valid but there
-                     * are invalid data amoung other coordinates
+                     * are invalid data among other coordinates
                      */
                     if (point[2] < UPPER_BND && point[2] > LOWER_BND &&
                         point[3] < UPPER_BND && point[3] > LOWER_BND)
@@ -574,7 +574,7 @@
                      * NaN and Infinity values. Ignoring  current path segment
                      * in case of invalid endpoints's data. Equivalent to the
                      * SEG_LINETO if endpoint coordinates are valid but there
-                     * are invalid data amoung other coordinates
+                     * are invalid data among other coordinates
                      */
 
                     if (point[4] < UPPER_BND && point[4] > LOWER_BND &&
--- a/src/share/classes/sun/font/ExtendedTextSourceLabel.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/sun/font/ExtendedTextSourceLabel.java	Mon Nov 11 23:17:30 2013 -0800
@@ -569,7 +569,7 @@
 * The output maps this to character positions, and therefore caret positions, via the following assumptions:
 * - zero-advance glyphs do not contribute to the advance of their character (i.e. position is ignored), conversely
 *   if a glyph is to contribute to the advance of its character it must have a non-zero (float) advance
-* - no carets can appear between a zero width character and its preceeding character, where 'preceeding' is
+* - no carets can appear between a zero width character and its preceding character, where 'preceding' is
 *   defined logically.
 * - no carets can appear within a split character
 * - no carets can appear within a local reordering (i.e. Indic reordering, or non-adjacent split characters)
--- a/src/share/classes/sun/font/FileFontStrike.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/sun/font/FileFontStrike.java	Mon Nov 11 23:17:30 2013 -0800
@@ -189,7 +189,7 @@
 
         /* Always segment for fonts with > 256 glyphs, but also for smaller
          * fonts with non-typical sizes and transforms.
-         * Segmenting for all non-typical pt sizes helps to minimise memory
+         * Segmenting for all non-typical pt sizes helps to minimize memory
          * usage when very many distinct strikes are created.
          * The size range of 0->5 and 37->INF for segmenting is arbitrary
          * but the intention is that typical GUI integer point sizes (6->36)
--- a/src/share/classes/sun/font/FontManager.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/sun/font/FontManager.java	Mon Nov 11 23:17:30 2013 -0800
@@ -92,7 +92,7 @@
 
     /**
      * If usingPerAppContextComposites is true, we are in "applet"
-     * (eg browser) enviroment and at least one context has selected
+     * (eg browser) environment and at least one context has selected
      * an alternate composite font behaviour.
      */
     public boolean usingPerAppContextComposites();
--- a/src/share/classes/sun/font/FontRunIterator.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/sun/font/FontRunIterator.java	Mon Nov 11 23:17:30 2013 -0800
@@ -90,10 +90,10 @@
      * problems: we optimize latin-1 and cjk text assuming a fixed
      * width for each character.  since latin-1 digits and punctuation
      * are common, following this algorithm they will change to match
-     * the fonts used for the preceeding text, and potentially change metrics.
+     * the fonts used for the preceding text, and potentially change metrics.
      *
      * this also seems to have the potential for changing arbitrary runs of text, e.g.
-     * any number of digits and spaces can change depending on the preceeding (or following!)
+     * any number of digits and spaces can change depending on the preceding (or following!)
      * non-COMMON character's font assignment.  this is not good.
      *
      * since the goal is to enable layout to be performed using as few physical fonts as
--- a/src/share/classes/sun/font/LayoutPathImpl.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/sun/font/LayoutPathImpl.java	Mon Nov 11 23:17:30 2013 -0800
@@ -144,7 +144,7 @@
         /**
          * Reset the builder for a new path.  Datalen is a hint of how many
          * points will be in the path, and the working buffer will be sized
-         * to accomodate at least this number of points.  If datalen is zero,
+         * to accommodate at least this number of points.  If datalen is zero,
          * the working buffer is freed (it will be allocated on first use).
          */
         public void reset(int datalen) {
--- a/src/share/classes/sun/font/ScriptRun.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/sun/font/ScriptRun.java	Mon Nov 11 23:17:30 2013 -0800
@@ -39,7 +39,7 @@
  * the same script, as defined in the <code>Script</code> class.
  * It implements a simple iterator over an array of characters.
  * The iterator will assign <code>COMMON</code> and <code>INHERITED</code>
- * characters to the same script as the preceeding characters. If the
+ * characters to the same script as the preceding characters. If the
  * COMMON and INHERITED characters are first, they will be assigned to
  * the same script as the following characters.
  *
--- a/src/share/classes/sun/font/StandardTextSource.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/sun/font/StandardTextSource.java	Mon Nov 11 23:17:30 2013 -0800
@@ -97,7 +97,7 @@
       throw new IllegalArgumentException("bad frc: null");
     }
 
-    this.chars = chars;
+    this.chars = chars.clone();
     this.start = start;
     this.len = len;
     this.cstart = cstart;
@@ -148,7 +148,7 @@
   // TextSource API
 
   public char[] getChars() {
-    return chars;
+    return chars.clone();
   }
 
   public int getStart() {
--- a/src/share/classes/sun/font/StrikeCache.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/sun/font/StrikeCache.java	Mon Nov 11 23:17:30 2013 -0800
@@ -166,7 +166,7 @@
                 * cache strikes. The default is "soft" which hints to keep
                 * the strikes around. This property allows the client to
                 * override this to "weak" which hint to the GC to free
-                * memory more agressively.
+                * memory more aggressively.
                 */
                String refType =
                    System.getProperty("sun.java2d.font.reftype", "soft");
--- a/src/share/classes/sun/font/SunFontManager.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/sun/font/SunFontManager.java	Mon Nov 11 23:17:30 2013 -0800
@@ -2814,7 +2814,7 @@
      * these methods will be called very rarely.
      *
      * If _usingPerAppContextComposites is true, we are in "applet"
-     * (eg browser) enviroment and at least one context has selected
+     * (eg browser) environment and at least one context has selected
      * an alternate composite font behaviour.
      * If _usingAlternateComposites is true, we are not in an "applet"
      * environment and the (single) application has selected
--- a/src/share/classes/sun/font/TextLabelFactory.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/sun/font/TextLabelFactory.java	Mon Nov 11 23:17:30 2013 -0800
@@ -32,7 +32,6 @@
 import java.awt.Font;
 
 import java.awt.font.FontRenderContext;
-import java.awt.font.LineMetrics;
 import java.text.Bidi;
 
   /**
@@ -70,7 +69,7 @@
                           Bidi bidi,
                           int flags) {
     this.frc = frc;
-    this.text = text;
+    this.text = text.clone();
     this.bidi = bidi;
     this.flags = flags;
     this.lineBidi = bidi;
@@ -82,30 +81,10 @@
     return frc;
   }
 
-  public char[] getText() {
-    return text;
-  }
-
-  public Bidi getParagraphBidi() {
-    return bidi;
-  }
-
   public Bidi getLineBidi() {
     return lineBidi;
   }
 
-  public int getLayoutFlags() {
-    return flags;
-  }
-
-  public int getLineStart() {
-    return lineStart;
-  }
-
-  public int getLineLimit() {
-    return lineLimit;
-  }
-
   /**
    * Set a line context for the factory.  Shaping only occurs on this line.
    * Characters are ordered as they would appear on this line.
--- a/src/share/classes/sun/font/TrueTypeFont.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/sun/font/TrueTypeFont.java	Mon Nov 11 23:17:30 2013 -0800
@@ -630,7 +630,7 @@
      * only one of these ranges then we need to distinguish based on
      * country. So far this only seems to matter for zh.
      * REMIND: Unicode locales such as Hindi do not have a code page so
-     * this whole mechansim needs to be revised to map languages to
+     * this whole mechanism needs to be revised to map languages to
      * the Unicode ranges either when this fails, or as an additional
      * validating test. Basing it on Unicode ranges should get us away
      * from needing to map to this small and incomplete set of Windows
--- a/src/share/classes/sun/font/Type1Font.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/sun/font/Type1Font.java	Mon Nov 11 23:17:30 2013 -0800
@@ -368,7 +368,7 @@
         String fontType = null;
         try {
             //Parse font looking for explicit FullName, FamilyName and FontName
-            //  (acording to Type1 spec they are optional)
+            //  (according to Type1 spec they are optional)
             while ((fullName == null || familyName == null || psName == null || fontType == null) && !eof) {
                 int tokenType = nextTokenType(bb);
                 if (tokenType == PSNAMETOKEN) {
--- a/src/share/classes/sun/java2d/SurfaceDataProxy.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/sun/java2d/SurfaceDataProxy.java	Mon Nov 11 23:17:30 2013 -0800
@@ -368,7 +368,7 @@
      * be useful given the operational parameters.
      * This method checks any preexisting cached copy for being "up to date"
      * and tries to update it if it is stale or non-existant and the
-     * appropriate number of accesses have occured since it last was stale.
+     * appropriate number of accesses have occurred since it last was stale.
      * <p>
      * An outline of the process is as follows:
      * <ol>
--- a/src/share/classes/sun/java2d/loops/ProcessPath.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/sun/java2d/loops/ProcessPath.java	Mon Nov 11 23:17:30 2013 -0800
@@ -744,7 +744,7 @@
 
             /* Checking that we are not running out of the endpoint and bounding
              * violating coordinate.  The check is pretty simple because the
-             * curve passed to the DrawCubic already splitted into the
+             * curve passed to the DrawCubic already split into the
              * monotonic in X and Y pieces
              */
 
@@ -1105,7 +1105,7 @@
 
                 /* Checking that we are not running out of the endpoint and
                  * bounding violating coordinate.  The check is pretty simple
-                 * because the curve passed to the DrawCubic already splitted
+                 * because the curve passed to the DrawCubic already split
                  * into the monotonic in X and Y pieces
                  */
 
--- a/src/share/classes/sun/java2d/opengl/OGLBlitLoops.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/sun/java2d/opengl/OGLBlitLoops.java	Mon Nov 11 23:17:30 2013 -0800
@@ -720,7 +720,7 @@
 }
 
 /**
- * This general Blit implemenation converts any source surface to an
+ * This general Blit implementation converts any source surface to an
  * intermediate IntArgbPre surface, and then uses the more specific
  * IntArgbPre->OpenGLSurface/Texture loop to get the intermediate
  * (premultiplied) surface down to OpenGL.
--- a/src/share/classes/sun/java2d/pipe/BufferedMaskFill.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/sun/java2d/pipe/BufferedMaskFill.java	Mon Nov 11 23:17:30 2013 -0800
@@ -120,7 +120,7 @@
                     }
                 }
             } else {
-                // queue is too small to accomodate entire mask; perform
+                // queue is too small to accommodate entire mask; perform
                 // the operation directly on the queue flushing thread
                 rq.flushAndInvokeNow(new Runnable() {
                     public void run() {
--- a/src/share/classes/sun/java2d/pipe/BufferedRenderPipe.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/sun/java2d/pipe/BufferedRenderPipe.java	Mon Nov 11 23:17:30 2013 -0800
@@ -224,7 +224,7 @@
                 buf.put(xPoints, 0, nPoints);
                 buf.put(yPoints, 0, nPoints);
             } else {
-                // queue is too small to accomodate all points; perform the
+                // queue is too small to accommodate all points; perform the
                 // operation directly on the queue flushing thread
                 rq.flushAndInvokeNow(new Runnable() {
                     public void run() {
--- a/src/share/classes/sun/java2d/pipe/BufferedTextPipe.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/sun/java2d/pipe/BufferedTextPipe.java	Mon Nov 11 23:17:30 2013 -0800
@@ -137,7 +137,7 @@
                 buf.put(positions, 0, 2*totalGlyphs);
             }
         } else {
-            // queue is too small to accomodate glyphs; perform
+            // queue is too small to accommodate glyphs; perform
             // the operation directly on the queue flushing thread
             rq.flushAndInvokeNow(new Runnable() {
                 public void run() {
--- a/src/share/classes/sun/java2d/pipe/DrawImage.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/sun/java2d/pipe/DrawImage.java	Mon Nov 11 23:17:30 2013 -0800
@@ -128,7 +128,7 @@
 
     /*
      * This method is only called in those circumstances where the
-     * operation has a non-null secondary transform specfied.  Its
+     * operation has a non-null secondary transform specified.  Its
      * role is to check for various optimizations based on the types
      * of both the secondary and SG2D transforms and to do some
      * quick calculations to avoid having to combine the transforms
--- a/src/share/classes/sun/java2d/pipe/RenderingEngine.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/sun/java2d/pipe/RenderingEngine.java	Mon Nov 11 23:17:30 2013 -0800
@@ -344,7 +344,7 @@
 
     /**
      * Returns the minimum pen width that the antialiasing rasterizer
-     * can represent without dropouts occuring.
+     * can represent without dropouts occurring.
      * @since 1.7
      */
     public abstract float getMinimumAAPenSize();
--- a/src/share/classes/sun/java2d/pipe/hw/AccelDeviceEventNotifier.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/sun/java2d/pipe/hw/AccelDeviceEventNotifier.java	Mon Nov 11 23:17:30 2013 -0800
@@ -81,7 +81,7 @@
     }
 
     /**
-     * Called to indicate that a device event had occured.
+     * Called to indicate that a device event had occurred.
      * If a singleton exists, the listeners (those associated with
      * the device) will be notified.
      *
--- a/src/share/classes/sun/java2d/pisces/PiscesRenderingEngine.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/sun/java2d/pisces/PiscesRenderingEngine.java	Mon Nov 11 23:17:30 2013 -0800
@@ -632,7 +632,7 @@
 
     /**
      * Returns the minimum pen width that the antialiasing rasterizer
-     * can represent without dropouts occuring.
+     * can represent without dropouts occurring.
      * @since 1.7
      */
     public float getMinimumAAPenSize() {
--- a/src/share/classes/sun/jvmstat/perfdata/monitor/PerfDataBufferImpl.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/sun/jvmstat/perfdata/monitor/PerfDataBufferImpl.java	Mon Nov 11 23:17:30 2013 -0800
@@ -120,7 +120,7 @@
                 }
             } catch (MonitorException e) {
                 /*
-                 * just ignore this here and let the reciever of the
+                 * just ignore this here and let the receiver of the
                  * byte[] detect and handle the problem.
                  */
             }
--- a/src/share/classes/sun/jvmstat/perfdata/monitor/protocol/file/FileMonitoredVm.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/sun/jvmstat/perfdata/monitor/protocol/file/FileMonitoredVm.java	Mon Nov 11 23:17:30 2013 -0800
@@ -34,7 +34,7 @@
 
 /**
  * Concrete implementation of the AbstractMonitoredVm class for the
- * <em>file:</em> protcol for the HotSpot PerfData monitoring implementation.
+ * <em>file:</em> protocol for the HotSpot PerfData monitoring implementation.
  * <p>
  * This class provides the ability to attach to the instrumentation buffer
  * (saved or live) of a target Java Virtual Machine by providing a
--- a/src/share/classes/sun/launcher/resources/launcher_pt_BR.properties	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/sun/launcher/resources/launcher_pt_BR.properties	Mon Nov 11 23:17:30 2013 -0800
@@ -34,7 +34,7 @@
 java.launcher.ergo.message2  =\                  porque a execu\u00E7\u00E3o est\u00E1 sendo feita em uma m\u00E1quina de classe de servidor.\n
 
 # Translators please note do not translate the options themselves
-java.launcher.opt.footer     =\    -cp <caminho de pesquisa da classe dos diret\u00F3rios e arquivos zip/jar>\n    -classpath <caminho de pesquisa da classe dos diret\u00F3rios e arquivos zip/jar>\n                  Uma lista separada por {0} de diret\u00F3rios, archives JAR\n                  e archives ZIP nos quais ser\u00E3o procurados os arquivos de classe.\n    -D<nome>=<valor>\n                  define uma propriedade do sistema\n    -verbose:[classe|gc|jni]\n                  ativa a sa\u00EDda detalhada\n    -version      imprime a vers\u00E3o do produto e sai do programa\n    -version:<valor>\n                  requer a execu\u00E7\u00E3o da vers\u00E3o especificada\n    -showversion  imprime a vers\u00E3o do produto e continua\n    -jre-restrict-search | -no-jre-restrict-search\n                  inclui/exclui JREs privados do usu\u00E1rio na pesquisa de vers\u00E3o\n    -? -help      imprime esta mensagem de ajuda\n    -X            imprime a ajuda sobre op\u00E7\u00F5es n\u00E3o padronizadas\n    -ea[:<nome do pacote>...|:<nome da classe>]\n    -enableassertions[:<nome do pacote>...|:<nome da classe>]\n                  ativa asser\u00E7\u00F5es com granularidade especificada\n    -da[:<nome do pacote>...|:<nome da classe>]\n    -disableassertions[:<nome do pacote>...|:<nome da classe>]\n                  desativa asser\u00E7\u00F5es com granularidade especificada\n    -esa | -enablesystemassertions\n                  ativa asser\u00E7\u00F5es do sistema\n    -dsa | -disablesystemassertions\n                  desativa asser\u00E7\u00F5es do sistema\n    -agentlib:<nome da biblioteca>[=<op\u00E7\u00F5es>]\n                  carrega a biblioteca de agentes nativa <nome da biblioteca>, por exemplo: -agentlib:hprof\n                  consulte tamb\u00E9m: -agentlib:jdwp=help e -agentlib:hprof=help\n    -agentpath:<nome do caminho>[=<op\u00E7\u00F5es>]\n                  carrega a biblioteca de agentes nativa com base no nome do caminho completo\n    -javaagent:<caminho do arquivo jar>[=<op\u00E7\u00F5es>]\n                  carrega o agente da linguagem de programa\u00E7\u00E3o Java; consulte java.lang.instrument\n    -splash:<caminho da imagem>\n                  mostra a tela de abertura com a imagem especificada\nConsulte http://www.oracle.com/technetwork/java/javase/documentation/index.html para obter mais detalhes.
+java.launcher.opt.footer     =\    -cp <caminho de pesquisa da classe dos diret\u00F3rios e arquivos zip/jar>\n    -classpath <caminho de pesquisa da classe dos diret\u00F3rios e arquivos zip/jar>\n                  Uma lista separada por {0} de diret\u00F3rios, archives JAR\n                  e archives ZIP nos quais ser\u00E3o procurados os arquivos de classe.\n    -D<nome>=<valor>\n                  define uma propriedade do sistema\n    -verbose:[class|gc|jni]\n                  ativa a sa\u00EDda detalhada\n    -version      imprime a vers\u00E3o do produto e sai do programa\n    -version:<valor>\n                  requer a execu\u00E7\u00E3o da vers\u00E3o especificada\n    -showversion  imprime a vers\u00E3o do produto e continua\n    -jre-restrict-search | -no-jre-restrict-search\n                  inclui/exclui JREs privados do usu\u00E1rio na pesquisa de vers\u00E3o\n    -? -help      imprime esta mensagem de ajuda\n    -X            imprime a ajuda sobre op\u00E7\u00F5es n\u00E3o padronizadas\n    -ea[:<nome do pacote>...|:<nome da classe>]\n    -enableassertions[:<nome do pacote>...|:<nome da classe>]\n                  ativa asser\u00E7\u00F5es com granularidade especificada\n    -da[:<nome do pacote>...|:<nome da classe>]\n    -disableassertions[:<nome do pacote>...|:<nome da classe>]\n                  desativa asser\u00E7\u00F5es com granularidade especificada\n    -esa | -enablesystemassertions\n                  ativa asser\u00E7\u00F5es do sistema\n    -dsa | -disablesystemassertions\n                  desativa asser\u00E7\u00F5es do sistema\n    -agentlib:<nome da biblioteca>[=<op\u00E7\u00F5es>]\n                  carrega a biblioteca de agentes nativa <nome da biblioteca>, por exemplo: -agentlib:hprof\n                  consulte tamb\u00E9m: -agentlib:jdwp=help e -agentlib:hprof=help\n    -agentpath:<nome do caminho>[=<op\u00E7\u00F5es>]\n                  carrega a biblioteca de agentes nativa com base no nome do caminho completo\n    -javaagent:<caminho do arquivo jar>[=<op\u00E7\u00F5es>]\n                  carrega o agente da linguagem de programa\u00E7\u00E3o Java; consulte java.lang.instrument\n    -splash:<caminho da imagem>\n                  mostra a tela de abertura com a imagem especificada\nConsulte http://www.oracle.com/technetwork/java/javase/documentation/index.html para obter mais detalhes.
 
 # Translators please note do not translate the options themselves
 java.launcher.X.usage=\    -Xmixed           execu\u00E7\u00E3o no modo misto (default)\n    -Xint             execu\u00E7\u00E3o somente no modo interpretado\n    -Xbootclasspath:<diret\u00F3rios e arquivos zip/jar separados por {0}>\n                      define o caminho de pesquisa para classes e recursos de inicializa\u00E7\u00E3o\n    -Xbootclasspath/a:<diret\u00F3rios e arquivos zip/jar separados por {0}>\n                      anexa no final do caminho da classe de inicializa\u00E7\u00E3o\n    -Xbootclasspath/p:<diret\u00F3rios e arquivos zip/jar separados por {0}>\n                      anexa no in\u00EDcio do caminho da classe de inicializa\u00E7\u00E3o\n    -Xdiag            mostra mensagens de diagn\u00F3stico adicionais\n    -Xnoclassgc       desativa a coleta de lixo da classe\n    -Xincgc           ativa a coleta de lixo incremental\n    -Xloggc:<arquivo>    registra o status do GC status em um arquivo com marca\u00E7\u00F5es de data e hor\u00E1rio\n    -Xbatch           desativa a compila\u00E7\u00E3o em segundo plano\n    -Xms<tamanho>        define o tamanho inicial do heap Java\n    -Xmx<tamanho>        define o tamanho m\u00E1ximo do heap Java\n    -Xss<tamanho>        define o tamanho da pilha de threads java\n    -Xprof            produz dados de perfil da cpu\n    -Xfuture          ativa verifica\u00E7\u00F5es de n\u00EDvel m\u00E1ximo de exig\u00EAncia, prevendo o valor default futuro\n    -Xrs              reduz o uso de sinais do SO pelo(a) Java/VM (consulte a documenta\u00E7\u00E3o)\n    -Xcheck:jni       executa verifica\u00E7\u00F5es adicionais de fun\u00E7\u00F5es da JNI\n    -Xshare:off       n\u00E3o tenta usar dados da classe compartilhada\n    -Xshare:auto      se poss\u00EDvel, usa dados da classe compartilhada (default)\n    -Xshare:on        requer o uso de dados da classe compartilhada, caso contr\u00E1rio haver\u00E1 falha.\n    -XshowSettings    mostra todas as defini\u00E7\u00F5es e continua\n    -XshowSettings:all\n                      mostra todas as defini\u00E7\u00F5es e continua\n    -XshowSettings:vm mostra todas as defini\u00E7\u00F5es relacionadas \u00E0 vm e continua\n    -XshowSettings:properties\n                      mostra todas as defini\u00E7\u00F5es da propriedade e continua\n    -XshowSettings:locale\n                      mostra todas as defini\u00E7\u00F5es relativas \u00E0s configura\u00E7\u00F5es regionais e continua\n\nAs -X options n\u00E3o s\u00E3o padronizadas e est\u00E3o sujeitas a altera\u00E7\u00F5es sem aviso.\n
--- a/src/share/classes/sun/management/counter/perf/InstrumentationException.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/sun/management/counter/perf/InstrumentationException.java	Mon Nov 11 23:17:30 2013 -0800
@@ -28,14 +28,14 @@
 public class InstrumentationException extends RuntimeException {
     /**
      * Constructs a <tt>InstrumentationException</tt> with no
-     * detail mesage.
+     * detail message.
      */
      public InstrumentationException() {
      }
 
     /**
      * Constructs a <tt>InstrumentationException</tt> with a specified
-     * detail mesage.
+     * detail message.
      *
      * @param message the detail message
      */
--- a/src/share/classes/sun/management/counter/perf/PerfDataType.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/sun/management/counter/perf/PerfDataType.java	Mon Nov 11 23:17:30 2013 -0800
@@ -32,7 +32,7 @@
  * performance data.
  *
  * <p> The enumeration values for this typesafe enumeration must be
- * kept in sychronization with the PerfDataType enum in the
+ * kept in synchronization with the PerfDataType enum in the
  * globalsDefinitions.hpp file in the HotSpot source base.</p>
  *
  * @author  Brian Doherty
--- a/src/share/classes/sun/misc/CRC16.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/sun/misc/CRC16.java	Mon Nov 11 23:17:30 2013 -0800
@@ -28,7 +28,7 @@
 /**
  * The CRC-16 class calculates a 16 bit cyclic redundancy check of a set
  * of bytes. This error detecting code is used to determine if bit rot
- * has occured in a byte stream.
+ * has occurred in a byte stream.
  */
 
 public class CRC16 {
--- a/src/share/classes/sun/misc/CharacterDecoder.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/sun/misc/CharacterDecoder.java	Mon Nov 11 23:17:30 2013 -0800
@@ -145,7 +145,7 @@
      * Decode the text from the InputStream and write the decoded
      * octets to the OutputStream. This method runs until the stream
      * is exhausted.
-     * @exception CEFormatException An error has occured while decoding
+     * @exception CEFormatException An error has occurred while decoding
      * @exception CEStreamExhausted The input stream is unexpectedly out of data
      */
     public void decodeBuffer(InputStream aStream, OutputStream bStream) throws IOException {
@@ -181,7 +181,7 @@
     /**
      * Alternate decode interface that takes a String containing the encoded
      * buffer and returns a byte array containing the data.
-     * @exception CEFormatException An error has occured while decoding
+     * @exception CEFormatException An error has occurred while decoding
      */
     public byte decodeBuffer(String inputString)[] throws IOException {
         byte    inputBuffer[] = new byte[inputString.length()];
--- a/src/share/classes/sun/misc/PerformanceLogger.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/sun/misc/PerformanceLogger.java	Mon Nov 11 23:17:30 2013 -0800
@@ -37,7 +37,7 @@
  * This class is intended to be a central place for the jdk to
  * log timing events of interest.  There is pre-defined event
  * of startTime, as well as a general
- * mechanism of setting aribtrary times in an array.
+ * mechanism of setting arbitrary times in an array.
  * All unreserved times in the array can be used by callers
  * in application-defined situations.  The caller is responsible
  * for setting and getting all times and for doing whatever
--- a/src/share/classes/sun/net/NetworkClient.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/sun/net/NetworkClient.java	Mon Nov 11 23:17:30 2013 -0800
@@ -244,7 +244,7 @@
      * Sets the read timeout.
      *
      * Note: Public URLConnection (and protocol specific implementations)
-     * protect against negative timeout values being set. This implemenation,
+     * protect against negative timeout values being set. This implementation,
      * and protocol specific implementations, use -1 to represent the default
      * read timeout.
      *
--- a/src/share/classes/sun/net/TelnetOutputStream.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/sun/net/TelnetOutputStream.java	Mon Nov 11 23:17:30 2013 -0800
@@ -81,7 +81,7 @@
     }
 
     /**
-     * set the stickyCRLF flag. Tells wether the terminal considers CRLF as a single
+     * set the stickyCRLF flag. Tells whether the terminal considers CRLF as a single
      * char.
      *
      * @param   on      the <code>boolean</code> to set the flag to.
--- a/src/share/classes/sun/net/ftp/FtpClient.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/sun/net/ftp/FtpClient.java	Mon Nov 11 23:17:30 2013 -0800
@@ -267,7 +267,7 @@
      * @param user The user name
      * @param password The password for that user
      * @return this FtpClient
-     * @throws IOException if an error occured during the transmission
+     * @throws IOException if an error occurred during the transmission
      * @throws FtpProtocolException if the login was refused by the server
      */
     public abstract FtpClient login(String user, char[] password) throws FtpProtocolException, IOException;
@@ -378,7 +378,7 @@
      *
      * @param name the name of the remote file
      * @return the {@link java.io.InputStream} from the data connection
-     * @throws IOException if an error occured during the transmission.
+     * @throws IOException if an error occurred during the transmission.
      * @throws FtpProtocolException if the command was refused by the server
      * @see #setRestartOffset(long)
      */
@@ -398,7 +398,7 @@
      * @param name the name of the remote file to write.
      * @return the {@link java.io.OutputStream} from the data connection or
      *         {@code null} if the command was unsuccessful.
-     * @throws IOException if an error occured during the transmission.
+     * @throws IOException if an error occurred during the transmission.
      * @throws FtpProtocolException if the command was rejected by the server
      */
     public OutputStream putFileStream(String name) throws FtpProtocolException, IOException {
@@ -427,7 +427,7 @@
      * @param unique {@code true} if the remote files should be unique,
      *        in which case the STOU command will be used.
      * @return the {@link java.io.OutputStream} from the data connection.
-     * @throws IOException if an error occured during the transmission.
+     * @throws IOException if an error occurred during the transmission.
      * @throws FtpProtocolException if the command was rejected by the server
      */
     public abstract OutputStream putFileStream(String name, boolean unique) throws FtpProtocolException, IOException;
@@ -456,7 +456,7 @@
      * @param local the {@code InputStream} that points to the data to
      *        transfer.
      * @return this FtpClient
-     * @throws IOException if an error occured during the transmission.
+     * @throws IOException if an error occurred during the transmission.
      * @throws FtpProtocolException if the command was rejected by the server
      */
     public FtpClient putFile(String name, InputStream local) throws FtpProtocolException, IOException {
@@ -481,7 +481,7 @@
      * @param unique {@code true} if the remote file should be unique
      *        (i.e. not already existing), {@code false} otherwise.
      * @return this FtpClient
-     * @throws IOException if an error occured during the transmission.
+     * @throws IOException if an error occurred during the transmission.
      * @throws FtpProtocolException if the command was rejected by the server
      * @see #getLastFileName()
      */
@@ -500,7 +500,7 @@
      * @param local The {@code InputStream} providing access to the data
      *        to be appended.
      * @return this FtpClient
-     * @throws IOException if an error occured during the transmission.
+     * @throws IOException if an error occurred during the transmission.
      * @throws FtpProtocolException if the command was rejected by the server
      */
     public abstract FtpClient appendFile(String name, InputStream local) throws FtpProtocolException, IOException;
@@ -511,7 +511,7 @@
      * @param from the name of the file being renamed
      * @param to the new name for the file
      * @return this FtpClient
-     * @throws IOException if an error occured during the transmission.
+     * @throws IOException if an error occurred during the transmission.
      * @throws FtpProtocolException if the command was rejected by the server
      */
     public abstract FtpClient rename(String from, String to) throws FtpProtocolException, IOException;
@@ -522,7 +522,7 @@
      * @param name a {@code String} containing the name of the file
      *        to delete.
      * @return this FtpClient
-     * @throws IOException if an error occured during the exchange
+     * @throws IOException if an error occurred during the exchange
      * @throws FtpProtocolException if the command was rejected by the server
      */
     public abstract FtpClient deleteFile(String name) throws FtpProtocolException, IOException;
@@ -533,7 +533,7 @@
      * @param name a {@code String} containing the name of the directory
      *        to create.
      * @return this FtpClient
-     * @throws IOException if an error occured during the exchange
+     * @throws IOException if an error occurred during the exchange
      * @throws FtpProtocolException if the command was rejected by the server
      */
     public abstract FtpClient makeDirectory(String name) throws FtpProtocolException, IOException;
@@ -545,7 +545,7 @@
      *        to remove.
      *
      * @return this FtpClient
-     * @throws IOException if an error occured during the exchange.
+     * @throws IOException if an error occurred during the exchange.
      * @throws FtpProtocolException if the command was rejected by the server
      */
     public abstract FtpClient removeDirectory(String name) throws FtpProtocolException, IOException;
@@ -555,7 +555,7 @@
      * status or as a <I>keep alive</I> mechanism.
      *
      * @return this FtpClient
-     * @throws IOException if an error occured during the transmission.
+     * @throws IOException if an error occurred during the transmission.
      * @throws FtpProtocolException if the command was rejected by the server
      */
     public abstract FtpClient noop() throws FtpProtocolException, IOException;
@@ -572,7 +572,7 @@
      * @param name an optional {@code String} containing the pathname
      *        the STAT command should apply to.
      * @return the response from the server
-     * @throws IOException if an error occured during the transmission.
+     * @throws IOException if an error occurred during the transmission.
      * @throws FtpProtocolException if the command was rejected by the server
      */
     public abstract String getStatus(String name) throws FtpProtocolException, IOException;
@@ -602,7 +602,7 @@
      * after an abort.</p>
      *
      * @return this FtpClient
-     * @throws IOException if an error occured during the transmission.
+     * @throws IOException if an error occurred during the transmission.
      * @throws FtpProtocolException if the command was rejected by the server
      */
     public abstract FtpClient abort() throws FtpProtocolException, IOException;
@@ -637,7 +637,7 @@
      * </pre>
      * <p>Since {@link #close()} will call completePending() if necessary.</p>
      * @return this FtpClient
-     * @throws IOException if an error occured during the transfer
+     * @throws IOException if an error occurred during the transfer
      * @throws FtpProtocolException if the command didn't complete successfully
      */
     public abstract FtpClient completePending() throws FtpProtocolException, IOException;
@@ -786,7 +786,7 @@
      *        for the current working directoty.
      * @return a {@code Iterator} of files or {@code null} if the
      *         command failed.
-     * @throws IOException if an error occured during the transmission
+     * @throws IOException if an error occurred during the transmission
      * @see #setDirParser(FtpDirParser)
      * @see #changeDirectory(String)
      * @throws FtpProtocolException if the command was rejected by the server
@@ -862,7 +862,7 @@
      * but before calling {@link #login(java.lang.String, char[]) }.</p>
      *
      * @return this FtpCLient
-     * @throws IOException if an error occured during the transmission.
+     * @throws IOException if an error occurred during the transmission.
      * @throws FtpProtocolException if the command was rejected by the server
      * @see #endSecureSession()
      */
@@ -874,7 +874,7 @@
      * back to a non encrypted transmission.
      *
      * @return this FtpClient
-     * @throws IOException if an error occured during transmission.
+     * @throws IOException if an error occurred during transmission.
      * @throws FtpProtocolException if the command was rejected by the server
      * @see #startSecureSession()
      */
@@ -886,7 +886,7 @@
      *
      * @param size The number of bytes to allocate.
      * @return this FtpClient
-     * @throws IOException if an error occured during the transmission.
+     * @throws IOException if an error occurred during the transmission.
      * @throws FtpProtocolException if the command was rejected by the server
      */
     public abstract FtpClient allocate(long size) throws FtpProtocolException, IOException;
@@ -899,7 +899,7 @@
      * @param struct a {@code String} containing the name of the
      *        structure to mount.
      * @return this FtpClient
-     * @throws IOException if an error occured during the transmission.
+     * @throws IOException if an error occurred during the transmission.
      * @throws FtpProtocolException if the command was rejected by the server
      */
     public abstract FtpClient structureMount(String struct) throws FtpProtocolException, IOException;
@@ -911,7 +911,7 @@
      *
      * @return a {@code String} describing the OS, or {@code null}
      *         if the operation was not successful.
-     * @throws IOException if an error occured during the transmission.
+     * @throws IOException if an error occurred during the transmission.
      * @throws FtpProtocolException if the command was rejected by the server
      */
     public abstract String getSystem() throws FtpProtocolException, IOException;
@@ -924,7 +924,7 @@
      *        {@code null} for the general help
      * @return a {@code String} containing the text sent back by the
      *         server, or {@code null} if the command failed.
-     * @throws IOException if an error occured during transmission
+     * @throws IOException if an error occurred during transmission
      * @throws FtpProtocolException if the command was rejected by the server
      */
     public abstract String getHelp(String cmd) throws FtpProtocolException, IOException;
@@ -936,7 +936,7 @@
      *
      * @param cmd the command to be sent.
      * @return this FtpClient
-     * @throws IOException if an error occured during transmission
+     * @throws IOException if an error occurred during transmission
      * @throws FtpProtocolException if the command was rejected by the server
      */
     public abstract FtpClient siteCmd(String cmd) throws FtpProtocolException, IOException;
--- a/src/share/classes/sun/net/ftp/impl/FtpClient.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/sun/net/ftp/impl/FtpClient.java	Mon Nov 11 23:17:30 2013 -0800
@@ -491,7 +491,7 @@
      * Read the reply from the FTP server.
      *
      * @return <code>true</code> if the command was successful
-     * @throws IOException if an error occured
+     * @throws IOException if an error occurred
      */
     private boolean readReply() throws IOException {
         lastReplyCode = FtpReplyCode.find(readServerResponse());
@@ -537,7 +537,7 @@
      *
      * @param cmd String containing the command
      *
-     * @throws FtpProtocolException if an error occured
+     * @throws FtpProtocolException if an error occurred
      */
     private void issueCommandCheck(String cmd) throws sun.net.ftp.FtpProtocolException, IOException {
         if (!issueCommand(cmd)) {
@@ -738,7 +738,7 @@
             // Some FTP servers (like the one on Solaris) are bugged, they
             // will accept the EPRT command but then, the subsequent command
             // (e.g. RETR) will fail, so we have to check BOTH results (the
-            // EPRT cmd then the actual command) to decide wether we should
+            // EPRT cmd then the actual command) to decide whether we should
             // fall back on the older PORT command.
             portCmd = "EPRT |" + ((myAddress instanceof Inet6Address) ? "2" : "1") + "|" +
                     myAddress.getHostAddress() + "|" + portSocket.getLocalPort() + "|";
@@ -1037,7 +1037,7 @@
      * @param user The user name
      * @param password The password for that user
      * @return <code>true</code> if the login was successful.
-     * @throws IOException if an error occured during the transmission
+     * @throws IOException if an error occurred during the transmission
      */
     public sun.net.ftp.FtpClient login(String user, char[] password) throws sun.net.ftp.FtpProtocolException, IOException {
         if (!isConnected()) {
@@ -1262,7 +1262,7 @@
      * @param name the name of the remote file
      * @return the {@link java.io.InputStream} from the data connection, or
      *         <code>null</code> if the command was unsuccessful.
-     * @throws IOException if an error occured during the transmission.
+     * @throws IOException if an error occurred during the transmission.
      */
     public InputStream getFileStream(String name) throws sun.net.ftp.FtpProtocolException, IOException {
         Socket s;
@@ -1311,7 +1311,7 @@
      *        in which case the STOU command will be used.
      * @return the {@link java.io.OutputStream} from the data connection or
      *         <code>null</code> if the command was unsuccessful.
-     * @throws IOException if an error occured during the transmission.
+     * @throws IOException if an error occurred during the transmission.
      */
     public OutputStream putFileStream(String name, boolean unique)
         throws sun.net.ftp.FtpProtocolException, IOException
@@ -1340,7 +1340,7 @@
      * @param unique <code>true</code> if the remote file should be unique
      *        (i.e. not already existing), <code>false</code> otherwise.
      * @return <code>true</code> if the transfer was successful.
-     * @throws IOException if an error occured during the transmission.
+     * @throws IOException if an error occurred during the transmission.
      * @see #getLastFileName()
      */
     public sun.net.ftp.FtpClient putFile(String name, InputStream local, boolean unique) throws sun.net.ftp.FtpProtocolException, IOException {
@@ -1371,7 +1371,7 @@
      * @param local The <code>InputStream</code> providing access to the data
      *        to be appended.
      * @return <code>true</code> if the transfer was successful.
-     * @throws IOException if an error occured during the transmission.
+     * @throws IOException if an error occurred during the transmission.
      */
     public sun.net.ftp.FtpClient appendFile(String name, InputStream local) throws sun.net.ftp.FtpProtocolException, IOException {
         int mtu = 1500;
@@ -1407,7 +1407,7 @@
      * @param name a <code>String</code> containing the name of the file
      *        to delete.
      * @return <code>true</code> if the command was successful
-     * @throws IOException if an error occured during the exchange
+     * @throws IOException if an error occurred during the exchange
      */
     public sun.net.ftp.FtpClient deleteFile(String name) throws sun.net.ftp.FtpProtocolException, IOException {
         issueCommandCheck("DELE " + name);
@@ -1420,7 +1420,7 @@
      * @param name a <code>String</code> containing the name of the directory
      *        to create.
      * @return <code>true</code> if the operation was successful.
-     * @throws IOException if an error occured during the exchange
+     * @throws IOException if an error occurred during the exchange
      */
     public sun.net.ftp.FtpClient makeDirectory(String name) throws sun.net.ftp.FtpProtocolException, IOException {
         issueCommandCheck("MKD " + name);
@@ -1434,7 +1434,7 @@
      *        to remove.
      *
      * @return <code>true</code> if the operation was successful.
-     * @throws IOException if an error occured during the exchange.
+     * @throws IOException if an error occurred during the exchange.
      */
     public sun.net.ftp.FtpClient removeDirectory(String name) throws sun.net.ftp.FtpProtocolException, IOException {
         issueCommandCheck("RMD " + name);
@@ -1465,7 +1465,7 @@
      *        the STAT command should apply to.
      * @return the response from the server or <code>null</code> if the
      *         command failed.
-     * @throws IOException if an error occured during the transmission.
+     * @throws IOException if an error occurred during the transmission.
      */
     public String getStatus(String name) throws sun.net.ftp.FtpProtocolException, IOException {
         issueCommandCheck((name == null ? "STAT" : "STAT " + name));
@@ -1548,7 +1548,7 @@
      * It tells the server to stop the previous command or transfer.
      *
      * @return <code>true</code> if the command was successful.
-     * @throws IOException if an error occured during the transmission.
+     * @throws IOException if an error occurred during the transmission.
      */
     public sun.net.ftp.FtpClient abort() throws sun.net.ftp.FtpProtocolException, IOException {
         issueCommandCheck("ABOR");
@@ -1871,7 +1871,7 @@
      *        for the current working directoty.
      * @return a <code>Iterator</code> of files or <code>null</code> if the
      *         command failed.
-     * @throws IOException if an error occured during the transmission
+     * @throws IOException if an error occurred during the transmission
      * @see #setDirParser(FtpDirParser)
      * @see #changeDirectory(String)
      */
@@ -2038,7 +2038,7 @@
      * {@link #reInit()} command or a {@link #endSecureSession()} command is issued.
      *
      * @return <code>true</code> if the operation was successful.
-     * @throws IOException if an error occured during the transmission.
+     * @throws IOException if an error occurred during the transmission.
      * @see #endSecureSession()
      */
     public sun.net.ftp.FtpClient startSecureSession() throws sun.net.ftp.FtpProtocolException, IOException {
@@ -2086,7 +2086,7 @@
      * back to a non crypted transmission.
      *
      * @return <code>true</code> if the operation was successful.
-     * @throws IOException if an error occured during transmission.
+     * @throws IOException if an error occurred during transmission.
      * @see #startSecureSession()
      */
     public sun.net.ftp.FtpClient endSecureSession() throws sun.net.ftp.FtpProtocolException, IOException {
@@ -2117,7 +2117,7 @@
      *
      * @param size The number of bytes to allocate.
      * @return <code>true</code> if the operation was successful.
-     * @throws IOException if an error occured during the transmission.
+     * @throws IOException if an error occurred during the transmission.
      */
     public sun.net.ftp.FtpClient allocate(long size) throws sun.net.ftp.FtpProtocolException, IOException {
         issueCommandCheck("ALLO " + size);
@@ -2132,7 +2132,7 @@
      * @param struct a <code>String</code> containing the name of the
      *        structure to mount.
      * @return <code>true</code> if the operation was successful.
-     * @throws IOException if an error occured during the transmission.
+     * @throws IOException if an error occurred during the transmission.
      */
     public sun.net.ftp.FtpClient structureMount(String struct) throws sun.net.ftp.FtpProtocolException, IOException {
         issueCommandCheck("SMNT " + struct);
@@ -2146,7 +2146,7 @@
      *
      * @return a <code>String</code> describing the OS, or <code>null</code>
      *         if the operation was not successful.
-     * @throws IOException if an error occured during the transmission.
+     * @throws IOException if an error occurred during the transmission.
      */
     public String getSystem() throws sun.net.ftp.FtpProtocolException, IOException {
         issueCommandCheck("SYST");
@@ -2166,7 +2166,7 @@
      *        <code>null</code> for the general help
      * @return a <code>String</code> containing the text sent back by the
      *         server, or <code>null</code> if the command failed.
-     * @throws IOException if an error occured during transmission
+     * @throws IOException if an error occurred during transmission
      */
     public String getHelp(String cmd) throws sun.net.ftp.FtpProtocolException, IOException {
         issueCommandCheck("HELP " + cmd);
@@ -2209,7 +2209,7 @@
      *
      * @param cmd the command to be sent.
      * @return <code>true</code> if the command was successful.
-     * @throws IOException if an error occured during transmission
+     * @throws IOException if an error occurred during transmission
      */
     public sun.net.ftp.FtpClient siteCmd(String cmd) throws sun.net.ftp.FtpProtocolException, IOException {
         issueCommandCheck("SITE " + cmd);
--- a/src/share/classes/sun/net/httpserver/Request.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/sun/net/httpserver/Request.java	Mon Nov 11 23:17:30 2013 -0800
@@ -222,7 +222,7 @@
         ByteBuffer chanbuf;
         byte[] one;
         private boolean closed = false, eof = false;
-        ByteBuffer markBuf; /* reads may be satisifed from this buffer */
+        ByteBuffer markBuf; /* reads may be satisfied from this buffer */
         boolean marked;
         boolean reset;
         int readlimit;
--- a/src/share/classes/sun/net/idn/StringPrep.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/sun/net/idn/StringPrep.java	Mon Nov 11 23:17:30 2013 -0800
@@ -153,7 +153,7 @@
         }
     }
 
-    // CharTrie implmentation for reading the trie data
+    // CharTrie implementation for reading the trie data
     private StringPrepTrieImpl sprepTrieImpl;
     // Indexes read from the data file
     private int[] indexes;
--- a/src/share/classes/sun/net/smtp/SmtpProtocolException.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/sun/net/smtp/SmtpProtocolException.java	Mon Nov 11 23:17:30 2013 -0800
@@ -28,7 +28,7 @@
 import java.io.IOException;
 
 /**
- * This exeception is thrown when unexpected results are returned during
+ * This exception is thrown when unexpected results are returned during
  * an SMTP session.
  */
 public class SmtpProtocolException extends IOException {
--- a/src/share/classes/sun/net/www/http/ChunkedInputStream.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/sun/net/www/http/ChunkedInputStream.java	Mon Nov 11 23:17:30 2013 -0800
@@ -755,7 +755,7 @@
      * stream. If the last chunk (and optional trailers) can be read without
      * blocking then the stream is considered hurried.
      * <p>
-     * Note that if an error has occured or we can't get to last chunk
+     * Note that if an error has occurred or we can't get to last chunk
      * without blocking then this stream can't be hurried and should be
      * closed.
      */
--- a/src/share/classes/sun/net/www/http/HttpClient.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/sun/net/www/http/HttpClient.java	Mon Nov 11 23:17:30 2013 -0800
@@ -247,7 +247,7 @@
     }
 
     /* This class has no public constructor for HTTP.  This method is used to
-     * get an HttpClient to the specifed URL.  If there's currently an
+     * get an HttpClient to the specified URL.  If there's currently an
      * active HttpClient to that server/port, you'll get that one.
      */
     public static HttpClient New(URL url)
--- a/src/share/classes/sun/net/www/http/PosterOutputStream.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/sun/net/www/http/PosterOutputStream.java	Mon Nov 11 23:17:30 2013 -0800
@@ -81,7 +81,7 @@
     /**
      * Resets the <code>count</code> field of this output
      * stream to zero, so that all currently accumulated output in the
-     * ouput stream is discarded. The output stream can be used again,
+     * output stream is discarded. The output stream can be used again,
      * reusing the already allocated buffer space. If the output stream
      * has been closed, then this method has no effect.
      *
--- a/src/share/classes/sun/net/www/protocol/http/AuthCacheValue.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/sun/net/www/protocol/http/AuthCacheValue.java	Mon Nov 11 23:17:30 2013 -0800
@@ -29,7 +29,7 @@
 import java.net.PasswordAuthentication;
 
 /**
- * AuthCacheValue: interface to minimise exposure to authentication cache
+ * AuthCacheValue: interface to minimize exposure to authentication cache
  * for external users (ie. plugin)
  *
  * @author Michael McMahon
--- a/src/share/classes/sun/net/www/protocol/http/HttpURLConnection.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/sun/net/www/protocol/http/HttpURLConnection.java	Mon Nov 11 23:17:30 2013 -0800
@@ -2268,7 +2268,7 @@
      * Gets the authentication for an HTTP server, and applies it to
      * the connection.
      * @param authHdr the AuthenticationHeader which tells what auth scheme is
-     * prefered.
+     * preferred.
      */
     @SuppressWarnings("fallthrough")
     private AuthenticationInfo getServerAuthentication (AuthenticationHeader authhdr) {
--- a/src/share/classes/sun/nio/cs/ext/ExtendedCharsets.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/sun/nio/cs/ext/ExtendedCharsets.java	Mon Nov 11 23:17:30 2013 -0800
@@ -128,7 +128,7 @@
                     "gb2312-1980",
                     "euc-cn",
                     "euccn",
-                    "x-EUC-CN", // 1.4 compatability
+                    "x-EUC-CN", // 1.4 compatibility
                     "EUC_CN" //JDK historical
                 });
 
--- a/src/share/classes/sun/print/PSPathGraphics.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/sun/print/PSPathGraphics.java	Mon Nov 11 23:17:30 2013 -0800
@@ -258,7 +258,7 @@
      *
      * @param   img     The image to be drawn.
      *                  This method does nothing if <code>img</code> is null.
-     * @param   xform   Used to tranform the image before drawing.
+     * @param   xform   Used to transform the image before drawing.
      *                  This can be null.
      * @param   bgcolor This color is drawn where the image has transparent
      *                  pixels. If this parameter is null then the
--- a/src/share/classes/sun/print/PSPrinterJob.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/sun/print/PSPrinterJob.java	Mon Nov 11 23:17:30 2013 -0800
@@ -1644,7 +1644,7 @@
     /*
      * Currently CharToByteConverter.getCharacterEncoding() return values are
      * not fixed yet. These are used as the part of the key of
-     * psfont.propeties. When those name are fixed this routine can
+     * psfont.properties. When those name are fixed this routine can
      * be erased.
      */
     private String makeCharsetName(String name, char[] chs) {
--- a/src/share/classes/sun/print/PathGraphics.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/sun/print/PathGraphics.java	Mon Nov 11 23:17:30 2013 -0800
@@ -1340,7 +1340,7 @@
      *
      * @param   img     The image to be drawn.
      *                  This method does nothing if <code>img</code> is null.
-     * @param   xform   Used to tranform the image before drawing.
+     * @param   xform   Used to transform the image before drawing.
      *                  This can be null.
      * @param   bgcolor This color is drawn where the image has transparent
      *                  pixels. If this parameter is null then the
--- a/src/share/classes/sun/print/PrintJob2D.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/sun/print/PrintJob2D.java	Mon Nov 11 23:17:30 2013 -0800
@@ -812,7 +812,7 @@
             currentGraphics.translate(pageFormat.getImageableX(),
                                       pageFormat.getImageableY());
 
-            /* Scale to accomodate AWT's notion of printer resolution */
+            /* Scale to accommodate AWT's notion of printer resolution */
             double awtScale = 72.0/getPageResolutionInternal();
             currentGraphics.scale(awtScale, awtScale);
 
--- a/src/share/classes/sun/print/RasterPrinterJob.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/sun/print/RasterPrinterJob.java	Mon Nov 11 23:17:30 2013 -0800
@@ -118,6 +118,16 @@
     protected static final int STREAM = 2;
 
     /**
+     * Pageable MAX pages
+     */
+    protected static final int MAX_UNKNOWN_PAGES = 9999;
+
+    protected static final int PD_ALLPAGES = 0x00000000;
+    protected static final int PD_SELECTION = 0x00000001;
+    protected static final int PD_PAGENUMS = 0x00000002;
+    protected static final int PD_NOSELECTION = 0x00000004;
+
+    /**
      * Maximum amount of memory in bytes to use for the
      * buffered image "band". 4Mb is a compromise between
      * limiting the number of bands on hi-res printers and
@@ -195,7 +205,7 @@
     /* Instance Variables */
 
     /**
-     * Used to minimise GC & reallocation of band when printing
+     * Used to minimize GC & reallocation of band when printing
      */
     private int cachedBandWidth = 0;
     private int cachedBandHeight = 0;
@@ -800,6 +810,14 @@
         }
    }
 
+   protected PageFormat getPageFormatFromAttributes() {
+       if (attributes == null) {
+            return null;
+        }
+        return attributeToPageFormat(getPrintService(), this.attributes);
+   }
+
+
    /**
      * Presents the user a dialog for changing properties of the
      * print job interactively.
@@ -1359,34 +1377,7 @@
             setAttributes(attributes);
             // throw exception for invalid destination
             if (destinationAttr != null) {
-                // destinationAttr is null for Destination(new URI(""))
-                // because isAttributeValueSupported returns false in setAttributes
-
-                // Destination(new URI(" ")) throws URISyntaxException
-                File f = new File(destinationAttr);
-                try {
-                    // check if this is a new file and if filename chars are valid
-                    if (f.createNewFile()) {
-                        f.delete();
-                    }
-                } catch (IOException ioe) {
-                    throw new PrinterException("Cannot write to file:"+
-                                               destinationAttr);
-                } catch (SecurityException se) {
-                    //There is already file read/write access so at this point
-                    // only delete access is denied.  Just ignore it because in
-                    // most cases the file created in createNewFile gets overwritten
-                    // anyway.
-                }
-
-                File pFile = f.getParentFile();
-                if ((f.exists() &&
-                     (!f.isFile() || !f.canWrite())) ||
-                    ((pFile != null) &&
-                     (!pFile.exists() || (pFile.exists() && !pFile.canWrite())))) {
-                    throw new PrinterException("Cannot write to file:"+
-                                               destinationAttr);
-                }
+                validateDestination(destinationAttr);
             }
         } else {
             spoolToService(psvc, attributes);
@@ -1509,6 +1500,40 @@
         }
     }
 
+    protected void validateDestination(String dest) throws PrinterException {
+        if (dest == null) {
+            return;
+        }
+        // dest is null for Destination(new URI(""))
+        // because isAttributeValueSupported returns false in setAttributes
+
+        // Destination(new URI(" ")) throws URISyntaxException
+        File f = new File(dest);
+        try {
+            // check if this is a new file and if filename chars are valid
+            if (f.createNewFile()) {
+                f.delete();
+            }
+        } catch (IOException ioe) {
+            throw new PrinterException("Cannot write to file:"+
+                                       dest);
+        } catch (SecurityException se) {
+            //There is already file read/write access so at this point
+            // only delete access is denied.  Just ignore it because in
+            // most cases the file created in createNewFile gets overwritten
+            // anyway.
+        }
+
+        File pFile = f.getParentFile();
+        if ((f.exists() &&
+             (!f.isFile() || !f.canWrite())) ||
+            ((pFile != null) &&
+             (!pFile.exists() || (pFile.exists() && !pFile.canWrite())))) {
+            throw new PrinterException("Cannot write to file:"+
+                                       dest);
+        }
+    }
+
     /**
      * updates a Paper object to reflect the current printer's selected
      * paper size and imageable area for that paper size.
@@ -1755,6 +1780,78 @@
             return mCollate;
     }
 
+    protected final int getSelectAttrib() {
+        if (attributes != null) {
+            SunPageSelection pages =
+                (SunPageSelection)attributes.get(SunPageSelection.class);
+            if (pages == SunPageSelection.RANGE) {
+                return PD_PAGENUMS;
+            } else if (pages == SunPageSelection.SELECTION) {
+                return PD_SELECTION;
+            } else if (pages ==  SunPageSelection.ALL) {
+                return PD_ALLPAGES;
+            }
+        }
+        return PD_NOSELECTION;
+    }
+
+    //returns 1-based index for "From" page
+    protected final int getFromPageAttrib() {
+        if (attributes != null) {
+            PageRanges pageRangesAttr =
+                (PageRanges)attributes.get(PageRanges.class);
+            if (pageRangesAttr != null) {
+                int[][] range = pageRangesAttr.getMembers();
+                return range[0][0];
+            }
+        }
+        return getMinPageAttrib();
+    }
+
+    //returns 1-based index for "To" page
+    protected final int getToPageAttrib() {
+        if (attributes != null) {
+            PageRanges pageRangesAttr =
+                (PageRanges)attributes.get(PageRanges.class);
+            if (pageRangesAttr != null) {
+                int[][] range = pageRangesAttr.getMembers();
+                return range[range.length-1][1];
+            }
+        }
+        return getMaxPageAttrib();
+    }
+
+    protected final int getMinPageAttrib() {
+        if (attributes != null) {
+            SunMinMaxPage s =
+                (SunMinMaxPage)attributes.get(SunMinMaxPage.class);
+            if (s != null) {
+                return s.getMin();
+            }
+        }
+        return 1;
+    }
+
+    protected final int getMaxPageAttrib() {
+        if (attributes != null) {
+            SunMinMaxPage s =
+                (SunMinMaxPage)attributes.get(SunMinMaxPage.class);
+            if (s != null) {
+                return s.getMax();
+            }
+        }
+
+        Pageable pageable = getPageable();
+        if (pageable != null) {
+            int numPages = pageable.getNumberOfPages();
+            if (numPages <= Pageable.UNKNOWN_NUMBER_OF_PAGES) {
+                numPages = MAX_UNKNOWN_PAGES;
+            }
+            return  ((numPages == 0) ? 1 : numPages);
+        }
+
+        return Integer.MAX_VALUE;
+    }
     /**
      * Called by the print() method at the start of
      * a print job.
--- a/src/share/classes/sun/rmi/rmic/RemoteClass.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/sun/rmi/rmic/RemoteClass.java	Mon Nov 11 23:17:30 2013 -0800
@@ -621,7 +621,7 @@
 
     /**
      * Sort array of class declarations alphabetically by their mangled
-     * fully-qualfied class name.  This is used to feed a method's exceptions
+     * fully-qualified class name.  This is used to feed a method's exceptions
      * in a canonical order into the digest stream for the interface hash
      * computation.
      */
--- a/src/share/classes/sun/rmi/rmic/Util.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/sun/rmi/rmic/Util.java	Mon Nov 11 23:17:30 2013 -0800
@@ -52,7 +52,7 @@
      * class.
      * @param theClass The fully qualified name of the class.
      * @param rootDir The directory to use as the root of the
-     * package heirarchy.  May be null, in which case the current
+     * package hierarchy.  May be null, in which case the current
      * working directory is used as the root.
      */
     public static File getOutputDirectoryFor(Identifier theClass,
--- a/src/share/classes/sun/rmi/rmic/newrmic/jrmp/StubSkeletonWriter.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/sun/rmi/rmic/newrmic/jrmp/StubSkeletonWriter.java	Mon Nov 11 23:17:30 2013 -0800
@@ -53,7 +53,7 @@
     /** rmic environment for this object */
     private final BatchEnvironment env;
 
-    /** the remote implemention class to generate code for */
+    /** the remote implementation class to generate code for */
     private final RemoteClass remoteClass;
 
     /** version of the JRMP stub protocol to generate code for */
--- a/src/share/classes/sun/rmi/runtime/Log.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/sun/rmi/runtime/Log.java	Mon Nov 11 23:17:30 2013 -0800
@@ -379,7 +379,7 @@
 
         private LogStreamLog(LogStream stream, Level level) {
             if ((stream != null) && (level != null)) {
-                /* if the stream or level is null, dont log any
+                /* if the stream or level is null, don't log any
                  * messages
                  */
                 levelValue = level.intValue();
--- a/src/share/classes/sun/rmi/server/Activation.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/sun/rmi/server/Activation.java	Mon Nov 11 23:17:30 2013 -0800
@@ -684,7 +684,7 @@
                  * Now exit... A System.exit should only be done if
                  * the RMI activation system daemon was started up
                  * by the main method below (in which should always
-                 * be the case since the Activation contructor is private).
+                 * be the case since the Activation constructor is private).
                  */
                 System.err.println(getTextResource("rmid.daemon.shutdown"));
                 System.exit(0);
@@ -784,7 +784,7 @@
     /**
      * Container for group information: group's descriptor, group's
      * instantiator, flag to indicate pending group creation, and
-     * table of the group's actived objects.
+     * table of the objects that are activated in the group.
      *
      * WARNING: GroupEntry objects should not be written into log file
      * updates.  GroupEntrys are inner classes of Activation and they
--- a/src/share/classes/sun/rmi/transport/ObjectTable.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/sun/rmi/transport/ObjectTable.java	Mon Nov 11 23:17:30 2013 -0800
@@ -223,7 +223,7 @@
 
     /**
      * Process client VM signalling reference for given ObjID: forward to
-     * correspoding Target entry.  If ObjID is not found in table,
+     * corresponding Target entry.  If ObjID is not found in table,
      * no action is taken.
      */
     static void referenced(ObjID id, long sequenceNum, VMID vmid) {
@@ -239,7 +239,7 @@
 
     /**
      * Process client VM dropping reference for given ObjID: forward to
-     * correspoding Target entry.  If ObjID is not found in table,
+     * corresponding Target entry.  If ObjID is not found in table,
      * no action is taken.
      */
     static void unreferenced(ObjID id, long sequenceNum, VMID vmid,
--- a/src/share/classes/sun/rmi/transport/tcp/ConnectionMultiplexer.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/sun/rmi/transport/tcp/ConnectionMultiplexer.java	Mon Nov 11 23:17:30 2013 -0800
@@ -367,7 +367,7 @@
     /**
      * Send packet of requested data on connection to remote endpoint.
      * @param info connection information structure
-     * @param buf array containg bytes to send
+     * @param buf array containing bytes to send
      * @param off offset of first array index of packet
      * @param len number of bytes in packet to send
      */
--- a/src/share/classes/sun/rmi/transport/tcp/MultiplexOutputStream.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/sun/rmi/transport/tcp/MultiplexOutputStream.java	Mon Nov 11 23:17:30 2013 -0800
@@ -27,7 +27,7 @@
 import java.io.*;
 
 /**
- * MultiplexOutputStream manages sending data over a conection managed
+ * MultiplexOutputStream manages sending data over a connection managed
  * by a ConnectionMultiplexer object.  Data written is buffered until the
  * internal buffer is full or the flush() method is called, at which
  * point it attempts to push a packet of bytes through to the remote
@@ -171,7 +171,7 @@
     }
 
     /**
-     * Take note of more bytes requested by conection at remote endpoint.
+     * Take note of more bytes requested by connection at remote endpoint.
      * @param num number of additional bytes requested
      */
     void request(int num)
--- a/src/share/classes/sun/rmi/transport/tcp/TCPChannel.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/sun/rmi/transport/tcp/TCPChannel.java	Mon Nov 11 23:17:30 2013 -0800
@@ -515,7 +515,7 @@
     }
 
     /**
-     * Give transport next accepted conection, when available.
+     * Give transport next accepted connection, when available.
      */
     public void run() {
         Connection conn;
--- a/src/share/classes/sun/security/jca/GetInstance.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/sun/security/jca/GetInstance.java	Mon Nov 11 23:17:30 2013 -0800
@@ -165,7 +165,7 @@
         } catch (NoSuchAlgorithmException e) {
             failure = e;
         }
-        // if we cannot get the service from the prefered provider,
+        // if we cannot get the service from the preferred provider,
         // fail over to the next
         for (Service s : list.getServices(type, algorithm)) {
             if (s == firstService) {
--- a/src/share/classes/sun/security/jgss/krb5/Krb5Context.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/sun/security/jgss/krb5/Krb5Context.java	Mon Nov 11 23:17:30 2013 -0800
@@ -867,7 +867,7 @@
     }
 
     /**
-     * Queries the context for largest data size to accomodate
+     * Queries the context for largest data size to accommodate
      * the specified protection and be <= maxTokSize.
      *
      * @param qop the quality of protection that the context will be
--- a/src/share/classes/sun/security/jgss/krb5/Krb5NameElement.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/sun/security/jgss/krb5/Krb5NameElement.java	Mon Nov 11 23:17:30 2013 -0800
@@ -253,7 +253,7 @@
 
     /**
      * Returns the principal name in the form user@REALM or
-     * host/service@REALM but with the following contraints that are
+     * host/service@REALM but with the following constraints that are
      * imposed by RFC 1964:
      * <pre>
      *  (1) all occurrences of the characters `@`,  `/`, and `\` within
@@ -265,7 +265,7 @@
      *   represented, respectively, with `\0`, `\b`, `\t`, or `\n`.
      *
      *   (3) the `\` quoting character shall not be emitted within an
-     *   exported name except to accomodate cases (1) and (2).
+     *   exported name except to accommodate cases (1) and (2).
      * </pre>
      */
     public byte[] export() throws GSSException {
--- a/src/share/classes/sun/security/jgss/krb5/MessageToken.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/sun/security/jgss/krb5/MessageToken.java	Mon Nov 11 23:17:30 2013 -0800
@@ -596,7 +596,7 @@
          * Constructs a MessageTokenHeader for the specified token type with
          * appropriate checksum and encryption algorithms fields.
          *
-         * @param tokenId the token id for this mesage token
+         * @param tokenId the token id for this message token
          * @param conf true if confidentiality will be resuested with this
          * message token, false otherwise.
          * @param qop the value of the quality of protection that will be
--- a/src/share/classes/sun/security/jgss/spi/GSSContextSpi.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/sun/security/jgss/spi/GSSContextSpi.java	Mon Nov 11 23:17:30 2013 -0800
@@ -232,7 +232,7 @@
                         throws GSSException;
 
     /**
-     * Queries the context for largest data size to accomodate
+     * Queries the context for largest data size to accommodate
      * the specified protection and for the token to remain less then
      * maxTokSize.
      *
@@ -313,7 +313,7 @@
                         MessageProp msgProp) throws GSSException;
 
     /**
-     * For apps that want simplicity and dont care about buffer copies.
+     * For apps that want simplicity and don't care about buffer copies.
      */
     public byte[] unwrap(byte inBuf[], int offset, int len,
                          MessageProp msgProp) throws GSSException;
--- a/src/share/classes/sun/security/jgss/spnego/SpNegoContext.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/sun/security/jgss/spnego/SpNegoContext.java	Mon Nov 11 23:17:30 2013 -0800
@@ -541,7 +541,7 @@
                 if (mech_wanted == null) {
                     valid = false;
                 }
-                // save the desired mechansim
+                // save the desired mechanism
                 internal_mech = mech_wanted;
 
                 // get the token for mechanism
@@ -741,7 +741,7 @@
             return null;
         }
 
-        // check if mechansim supports integrity
+        // check if mechanism supports integrity
         if (!mechContext.getIntegState()) {
             if (DEBUG) {
                 System.out.println("SpNegoContext: no MIC token included" +
@@ -783,7 +783,7 @@
             return true;
         }
 
-        // check if mechansim supports integrity
+        // check if mechanism supports integrity
         if (!mechContext.getIntegState()) {
             if (DEBUG) {
                 System.out.println("SpNegoContext: no MIC token validation" +
--- a/src/share/classes/sun/security/krb5/Config.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/sun/security/krb5/Config.java	Mon Nov 11 23:17:30 2013 -0800
@@ -63,7 +63,7 @@
     private static Config singleton = null;
 
     /*
-     * Hashtable used to store configuration infomation.
+     * Hashtable used to store configuration information.
      */
     private Hashtable<String,Object> stanzaTable = new Hashtable<>();
 
--- a/src/share/classes/sun/security/krb5/KdcComm.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/sun/security/krb5/KdcComm.java	Mon Nov 11 23:17:30 2013 -0800
@@ -426,7 +426,7 @@
     }
 
     /**
-     * Returns krb5.conf setting of {@code key} for a specfic realm,
+     * Returns krb5.conf setting of {@code key} for a specific realm,
      * which can be:
      * 1. defined in the sub-stanza for the given realm inside [realms], or
      * 2. defined in [libdefaults], or
--- a/src/share/classes/sun/security/krb5/Realm.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/sun/security/krb5/Realm.java	Mon Nov 11 23:17:30 2013 -0800
@@ -400,7 +400,7 @@
     }
 
     /**
-     * Creates a realm name using components from the given postion.
+     * Creates a realm name using components from the given position.
      * For example, subStringFrom({"A", "B", "C"}, 1) is "B.C".
      */
     private static String subStringFrom(String[] components, int from) {
--- a/src/share/classes/sun/security/krb5/internal/CredentialsUtil.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/sun/security/krb5/internal/CredentialsUtil.java	Mon Nov 11 23:17:30 2013 -0800
@@ -281,7 +281,7 @@
             }
             else {
                 /*
-                 * The new tgt's realm is not in the heirarchy of realms.
+                 * The new tgt's realm is not in the hierarchy of realms.
                  * It's probably not safe to get a tgt from
                  * a tgs that is outside the known list of realms.
                  * Give up now.
--- a/src/share/classes/sun/security/krb5/internal/ccache/FileCredentialsCache.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/sun/security/krb5/internal/ccache/FileCredentialsCache.java	Mon Nov 11 23:17:30 2013 -0800
@@ -513,7 +513,7 @@
                         }
                     });
             if (p == null) {
-                // exception occured in execing the command
+                // exception occurred during executing the command
                 return null;
             }
 
--- a/src/share/classes/sun/security/krb5/internal/crypto/DesCbcEType.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/sun/security/krb5/internal/crypto/DesCbcEType.java	Mon Nov 11 23:17:30 2013 -0800
@@ -94,7 +94,7 @@
         byte[] new_data;
         byte pad;
         /*Data padding: using Kerberos 5 GSS-API mechanism (1.2.2.3), Jun 1996.
-         *Before encryption, plaintext data is padded to the next higest multiple of blocksize.
+         *Before encryption, plain text data is padded to the next highest multiple of blocksize.
          *by appending between 1 and 8 bytes, the value of each such byte being the total number
          *of pad bytes. For example, if new_size = 10, blockSize is 8, we should pad 2 bytes,
          *and the value of each byte is 2.
--- a/src/share/classes/sun/security/pkcs11/P11DHKeyFactory.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/sun/security/pkcs11/P11DHKeyFactory.java	Mon Nov 11 23:17:30 2013 -0800
@@ -38,7 +38,7 @@
 import static sun.security.pkcs11.wrapper.PKCS11Constants.*;
 
 /**
- * DH KeyFactory implemenation.
+ * DH KeyFactory implementation.
  *
  * @author  Andreas Sterbenz
  * @since   1.5
--- a/src/share/classes/sun/security/pkcs11/P11DSAKeyFactory.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/sun/security/pkcs11/P11DSAKeyFactory.java	Mon Nov 11 23:17:30 2013 -0800
@@ -36,7 +36,7 @@
 import static sun.security.pkcs11.wrapper.PKCS11Constants.*;
 
 /**
- * DSA KeyFactory implemenation.
+ * DSA KeyFactory implementation.
  *
  * @author  Andreas Sterbenz
  * @since   1.5
--- a/src/share/classes/sun/security/pkcs11/P11ECKeyFactory.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/sun/security/pkcs11/P11ECKeyFactory.java	Mon Nov 11 23:17:30 2013 -0800
@@ -40,7 +40,7 @@
 import sun.security.util.ECUtil;
 
 /**
- * EC KeyFactory implemenation.
+ * EC KeyFactory implementation.
  *
  * @author  Andreas Sterbenz
  * @since   1.6
--- a/src/share/classes/sun/security/pkcs11/P11RSAKeyFactory.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/sun/security/pkcs11/P11RSAKeyFactory.java	Mon Nov 11 23:17:30 2013 -0800
@@ -38,7 +38,7 @@
 import sun.security.rsa.RSAKeyFactory;
 
 /**
- * RSA KeyFactory implemenation.
+ * RSA KeyFactory implementation.
  *
  * @author  Andreas Sterbenz
  * @since   1.5
--- a/src/share/classes/sun/security/pkcs11/wrapper/PKCS11.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/sun/security/pkcs11/wrapper/PKCS11.java	Mon Nov 11 23:17:30 2013 -0800
@@ -1503,7 +1503,7 @@
      *         (PKCS#11 param: CK_FLAGS flags)
      * @param pReserved reserved. Should be null
      *         (PKCS#11 param: CK_VOID_PTR pReserved)
-     * @return the slot ID where the event occured
+     * @return the slot ID where the event occurred
      *         (PKCS#11 param: CK_SLOT_ID_PTR pSlot)
      * @exception PKCS11Exception If function returns other value than CKR_OK.
      * @preconditions (pRserved == null)
--- a/src/share/classes/sun/security/provider/DSA.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/sun/security/provider/DSA.java	Mon Nov 11 23:17:30 2013 -0800
@@ -529,7 +529,7 @@
          * i.e. FIPS186.
          *
          * @param seed the seed for generating k. This seed should be
-         * secure. This is what is refered to as the KSEED in the DSA
+         * secure. This is what is referred to as the KSEED in the DSA
          * specification.
          *
          * @param g the g parameter from the DSA key pair.
--- a/src/share/classes/sun/security/provider/certpath/AdjacencyList.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/sun/security/provider/certpath/AdjacencyList.java	Mon Nov 11 23:17:30 2013 -0800
@@ -64,7 +64,7 @@
  * The iterator method returns objects of type <code>BuildStep</code>, not
  * objects of type <code>Vertex</code>.
  * A <code>BuildStep</code> contains a <code>Vertex</code> and a result code,
- * accessable via getResult method. There are five result values.
+ * accessible via getResult method. There are five result values.
  * <code>POSSIBLE</code> denotes that the current step represents a
  * <code>Certificate</code> that the builder is considering at this point in
  * the build. <code>FOLLOW</code> denotes a <code>Certificate</code> (one of
--- a/src/share/classes/sun/security/provider/certpath/ForwardBuilder.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/sun/security/provider/certpath/ForwardBuilder.java	Mon Nov 11 23:17:30 2013 -0800
@@ -675,7 +675,7 @@
          * check for looping - abort a loop if
          * ((we encounter the same certificate twice) AND
          * ((policyMappingInhibited = true) OR (no policy mapping
-         * extensions can be found between the occurences of the same
+         * extensions can be found between the occurrences of the same
          * certificate)))
          */
         if (certPathList != null) {
--- a/src/share/classes/sun/security/provider/certpath/ReverseBuilder.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/sun/security/provider/certpath/ReverseBuilder.java	Mon Nov 11 23:17:30 2013 -0800
@@ -364,10 +364,10 @@
          * check for looping - abort a loop if
          * ((we encounter the same certificate twice) AND
          * ((policyMappingInhibited = true) OR (no policy mapping
-         * extensions can be found between the occurences of the same
+         * extensions can be found between the occurrences of the same
          * certificate)))
          * in order to facilitate the check to see if there are
-         * any policy mapping extensions found between the occurences
+         * any policy mapping extensions found between the occurrences
          * of the same certificate, we reverse the certpathlist first
          */
         if ((certPathList != null) && (!certPathList.isEmpty())) {
--- a/src/share/classes/sun/security/rsa/RSAKeyPairGenerator.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/sun/security/rsa/RSAKeyPairGenerator.java	Mon Nov 11 23:17:30 2013 -0800
@@ -117,7 +117,7 @@
 
     // generate the keypair. See JCA doc
     public KeyPair generateKeyPair() {
-        // accomodate odd key sizes in case anybody wants to use them
+        // accommodate odd key sizes in case anybody wants to use them
         int lp = (keySize + 1) >> 1;
         int lq = keySize - lp;
         if (random == null) {
--- a/src/share/classes/sun/security/ssl/HandshakeOutStream.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/sun/security/ssl/HandshakeOutStream.java	Mon Nov 11 23:17:30 2013 -0800
@@ -139,8 +139,8 @@
     /*
      * Tell the OutputRecord that a finished message was
      * contained either in this record or the one immeiately
-     * preceeding it.  We need to reliably pass back notifications
-     * that a finish message occured.
+     * preceding it.  We need to reliably pass back notifications
+     * that a finish message occurred.
      */
     void setFinishedMsg() {
         assert(socket == null);
--- a/src/share/classes/sun/security/ssl/Handshaker.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/sun/security/ssl/Handshaker.java	Mon Nov 11 23:17:30 2013 -0800
@@ -902,7 +902,7 @@
             }
 
             /*
-             * Process the messsage.  We require
+             * Process the message.  We require
              * that processMessage() consumes the entire message.  In
              * lieu of explicit error checks (how?!) we assume that the
              * data will look like garbage on encoding/processing errors,
--- a/src/share/classes/sun/security/ssl/RSASignature.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/sun/security/ssl/RSASignature.java	Mon Nov 11 23:17:30 2013 -0800
@@ -39,7 +39,7 @@
  * negative interaction with the JCA mechanisms for hardware providers.
  *
  * The class should be instantiated via the getInstance() method in this class,
- * which returns the implementation from the prefered provider. The internal
+ * which returns the implementation from the preferred provider. The internal
  * implementation allows the hashes to be explicitly set, which is required
  * for RSA client authentication. It can be obtained via the
  * getInternalInstance() method.
--- a/src/share/classes/sun/security/ssl/Record.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/sun/security/ssl/Record.java	Mon Nov 11 23:17:30 2013 -0800
@@ -102,7 +102,7 @@
      * this is the amount OpenSSL is using.
      */
     static final int    maxLargeRecordSize =
-                maxRecordSize   // Max size with a conforming implemenation
+                maxRecordSize   // Max size with a conforming implementation
               + maxDataSize;    // extra 2^14 bytes for large data packets.
 
 
--- a/src/share/classes/sun/security/ssl/SSLContextImpl.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/sun/security/ssl/SSLContextImpl.java	Mon Nov 11 23:17:30 2013 -0800
@@ -243,7 +243,7 @@
     abstract SSLParameters getDefaultClientSSLParams();
     abstract SSLParameters getSupportedSSLParams();
 
-    // Get suported ProtoclList.
+    // Get supported ProtocolList.
     ProtocolList getSuportedProtocolList() {
         if (supportedProtocolList == null) {
             supportedProtocolList =
@@ -253,7 +253,7 @@
         return supportedProtocolList;
     }
 
-    // Get default ProtoclList.
+    // Get default ProtocolList.
     ProtocolList getDefaultProtocolList(boolean roleIsServer) {
         if (roleIsServer) {
             if (defaultServerProtocolList == null) {
@@ -272,7 +272,7 @@
         }
     }
 
-    // Get suported CipherSuiteList.
+    // Get supported CipherSuiteList.
     CipherSuiteList getSupportedCipherSuiteList() {
         // The maintenance of cipher suites needs to be synchronized.
         synchronized (this) {
--- a/src/share/classes/sun/security/ssl/SSLEngineImpl.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/sun/security/ssl/SSLEngineImpl.java	Mon Nov 11 23:17:30 2013 -0800
@@ -762,7 +762,7 @@
 
     /**
      * Unwraps a buffer.  Does a variety of checks before grabbing
-     * the unwrapLock, which blocks multiple unwraps from occuring.
+     * the unwrapLock, which blocks multiple unwraps from occurring.
      */
     @Override
     public SSLEngineResult unwrap(ByteBuffer netData, ByteBuffer [] appData,
@@ -1143,7 +1143,7 @@
 
     /**
      * Wraps a buffer.  Does a variety of checks before grabbing
-     * the wrapLock, which blocks multiple wraps from occuring.
+     * the wrapLock, which blocks multiple wraps from occurring.
      */
     @Override
     public SSLEngineResult wrap(ByteBuffer [] appData,
--- a/src/share/classes/sun/security/ssl/SSLSocketImpl.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/sun/security/ssl/SSLSocketImpl.java	Mon Nov 11 23:17:30 2013 -0800
@@ -1727,7 +1727,7 @@
 
             while (((state = getConnectionState()) != cs_CLOSED) &&
                    (state != cs_ERROR) && (state != cs_APP_CLOSED)) {
-                // create the InputRecord if it isn't intialized.
+                // create the InputRecord if it isn't initialized.
                 if (inrec == null) {
                     inrec = new InputRecord();
                 }
--- a/src/share/classes/sun/security/ssl/SignatureAndHashAlgorithm.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/sun/security/ssl/SignatureAndHashAlgorithm.java	Mon Nov 11 23:17:30 2013 -0800
@@ -282,7 +282,7 @@
             } else if ((keySize > 0) && (keySize < 512)) {
                 maxDigestLength = HashAlgorithm.SHA1.length;
             }   // Otherwise, cannot determine the key size, prefer the most
-                // perferable hash algorithm.
+                // preferable hash algorithm.
         }
 
         for (SignatureAndHashAlgorithm algorithm : algorithms) {
--- a/src/share/classes/sun/security/ssl/SunJSSE.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/sun/security/ssl/SunJSSE.java	Mon Nov 11 23:17:30 2013 -0800
@@ -112,7 +112,7 @@
         registerAlgorithms(false);
     }
 
-    // prefered constructor to enable FIPS mode at runtime
+    // preferred constructor to enable FIPS mode at runtime
     protected SunJSSE(java.security.Provider cryptoProvider){
         this(checkNull(cryptoProvider), cryptoProvider.getName());
     }
--- a/src/share/classes/sun/security/ssl/SunX509KeyManagerImpl.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/sun/security/ssl/SunX509KeyManagerImpl.java	Mon Nov 11 23:17:30 2013 -0800
@@ -36,7 +36,7 @@
 
 
 /**
- * An implemention of X509KeyManager backed by a KeyStore.
+ * An implementation of X509KeyManager backed by a KeyStore.
  *
  * The backing KeyStore is inspected when this object is constructed.
  * All key entries containing a PrivateKey and a non-empty chain of
--- a/src/share/classes/sun/security/ssl/X509KeyManagerImpl.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/sun/security/ssl/X509KeyManagerImpl.java	Mon Nov 11 23:17:30 2013 -0800
@@ -48,7 +48,7 @@
  *    CallbackHandler) or to have keys within one KeyStore protected by
  *    different keys.
  *  . it can use multiple KeyStores at the same time.
- *  . it is explicitly designed to accomodate KeyStores that change over
+ *  . it is explicitly designed to accommodate KeyStores that change over
  *    the lifetime of the process.
  *  . it makes an effort to choose the key that matches best, i.e. one that
  *    is not expired and has the appropriate certificate extensions.
--- a/src/share/classes/sun/security/tools/jarsigner/Main.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/sun/security/tools/jarsigner/Main.java	Mon Nov 11 23:17:30 2013 -0800
@@ -682,7 +682,7 @@
 
                         // The label finally contains 2 parts separated by '|':
                         // The legend displayed before the entry names, and
-                        // the cert info (if -certs specfied).
+                        // the cert info (if -certs specified).
 
                         if (!output.containsKey(label)) {
                             output.put(label, new ArrayList<String>());
--- a/src/share/classes/sun/security/util/HostnameChecker.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/sun/security/util/HostnameChecker.java	Mon Nov 11 23:17:30 2013 -0800
@@ -212,7 +212,7 @@
     /**
      * Return the subject of a certificate as X500Name, by reparsing if
      * necessary. X500Name should only be used if access to name components
-     * is required, in other cases X500Principal is to be prefered.
+     * is required, in other cases X500Principal is to be preferred.
      *
      * This method is currently used from within JSSE, do not remove.
      */
--- a/src/share/classes/sun/security/x509/AlgIdDSA.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/sun/security/x509/AlgIdDSA.java	Mon Nov 11 23:17:30 2013 -0800
@@ -113,9 +113,9 @@
      * define the algorithm parameters.  Those integers are encoded
      * as big-endian byte arrays.
      *
-     * @param p the DSS/DSA paramter "P"
-     * @param q the DSS/DSA paramter "Q"
-     * @param g the DSS/DSA paramter "G"
+     * @param p the DSS/DSA parameter "P"
+     * @param q the DSS/DSA parameter "Q"
+     * @param g the DSS/DSA parameter "G"
      */
     public AlgIdDSA (byte p [], byte q [], byte g [])
     throws IOException
@@ -130,9 +130,9 @@
      * If all three are null, then the parameters portion of the algorithm id
      * is set to null.  See note in header regarding use.
      *
-     * @param p the DSS/DSA paramter "P"
-     * @param q the DSS/DSA paramter "Q"
-     * @param g the DSS/DSA paramter "G"
+     * @param p the DSS/DSA parameter "P"
+     * @param q the DSS/DSA parameter "Q"
+     * @param g the DSS/DSA parameter "G"
      */
     public AlgIdDSA (BigInteger p, BigInteger q, BigInteger g)
     {
--- a/src/share/classes/sun/swing/plaf/synth/DefaultSynthStyle.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/sun/swing/plaf/synth/DefaultSynthStyle.java	Mon Nov 11 23:17:30 2013 -0800
@@ -276,7 +276,7 @@
     /**
      * Returns a SynthGraphicsUtils.
      *
-     * @param context SynthContext indentifying requestor
+     * @param context SynthContext identifying requestor
      * @return SynthGraphicsUtils
      */
     public SynthGraphicsUtils getGraphicsUtils(SynthContext context) {
@@ -300,7 +300,7 @@
      * insets will be placed in it, otherwise a new Insets object will be
      * created and returned.
      *
-     * @param context SynthContext indentifying requestor
+     * @param context SynthContext identifying requestor
      * @param to Where to place Insets
      * @return Insets.
      */
@@ -332,7 +332,7 @@
     /**
      * Returns the Painter for the passed in Component. This may return null.
      *
-     * @param ss SynthContext indentifying requestor
+     * @param ss SynthContext identifying requestor
      * @return Painter for the border
      */
     public SynthPainter getPainter(SynthContext ss) {
@@ -353,7 +353,7 @@
      * to. A Style should NOT assume the opacity will remain this value, the
      * developer may reset it or override it.
      *
-     * @param ss SynthContext indentifying requestor
+     * @param ss SynthContext identifying requestor
      * @return opaque Whether or not the JComponent is opaque.
      */
     public boolean isOpaque(SynthContext ss) {
@@ -382,7 +382,7 @@
     /**
      * Getter for a region specific style property.
      *
-     * @param state SynthContext indentifying requestor
+     * @param state SynthContext identifying requestor
      * @param key Property being requested.
      * @return Value of the named property
      */
@@ -435,7 +435,7 @@
      * Returns the default value for a particular property.  This is only
      * invoked if this style doesn't define a property for <code>key</code>.
      *
-     * @param state SynthContext indentifying requestor
+     * @param state SynthContext identifying requestor
      * @param key Property being requested.
      * @return Value of the named property
      */
--- a/src/share/classes/sun/swing/plaf/synth/Paint9Painter.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/sun/swing/plaf/synth/Paint9Painter.java	Mon Nov 11 23:17:30 2013 -0800
@@ -83,7 +83,7 @@
     public static final int PAINT_ALL = 512;
 
     /**
-     * Conveniance method for testing the validity of an image.
+     * Convenience method for testing the validity of an image.
      *
      * @param image Image to check.
      * @return true if <code>image</code> is non-null and has a positive
--- a/src/share/classes/sun/text/normalizer/ReplaceableUCharacterIterator.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/sun/text/normalizer/ReplaceableUCharacterIterator.java	Mon Nov 11 23:17:30 2013 -0800
@@ -179,7 +179,7 @@
     // private data members ----------------------------------------------------
 
     /**
-     * Replacable object
+     * Replaceable object
      */
     private Replaceable replaceable;
     /**
--- a/src/share/classes/sun/text/resources/th/CollationData_th.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/sun/text/resources/th/CollationData_th.java	Mon Nov 11 23:17:30 2013 -0800
@@ -144,11 +144,11 @@
                 // Below are thai puntuation marks and Tonal(Accent) marks. According to CLDR 1.9 and
                 // ISO/IEC 14651, Annex C, C.2.1 Thai ordering principles, 0E2F to 0E5B are punctuaion marks that need to be ignored
                 // in the first three leveles.  0E4E to 0E4B are tonal marks to be compared in secondary level.
-                // In real implmentation, set puncutation marks in tertiary as there is no fourth level in Java.
+                // In real implementation, set punctuation marks in tertiary as there is no fourth level in Java.
                 // Set all these special marks after \u0301, the accute accent.
                 + "& \u0301 "   // acute accent
 
-                //puncutation marks
+                //punctuation marks
                 + ", \u0E2F "                   //  PAIYANNOI      (ellipsis, abbreviation)
                 + ", \u0E46 "                   //  MAIYAMOK
                 + ", \u0E4F "                   //  FONGMAN
--- a/src/share/classes/sun/tools/jar/Main.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/sun/tools/jar/Main.java	Mon Nov 11 23:17:30 2013 -0800
@@ -1219,7 +1219,7 @@
     }
 
     /**
-     * Print an error mesage; like something is broken
+     * Print an error message; like something is broken
      */
     protected void error(String s) {
         err.println(s);
--- a/src/share/classes/sun/tools/jar/resources/jar_es.properties	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/sun/tools/jar/resources/jar_es.properties	Mon Nov 11 23:17:30 2013 -0800
@@ -44,4 +44,4 @@
 out.inflated=\ inflado: {0}
 out.size=(entrada = {0}) (salida = {1})
 
-usage=Sintaxis: jar {ctxui}[vfm0Me] [archive-jar] [archive-manifiesto] [punto-entrada] [-C dir] archivos...\nOpciones:\n    -c  crear nuevo archivo\n    -t  crear la tabla de contenido del archivo\n    -x extraer el archive mencionado (o todos) del archivo\n    -u  actualizar archive existente\n    -v  generar salida detallada de los datos de salida est\u00E1ndar\n    -f  especificar nombre de archive de almacenamiento\n    -m  incluir informaci\u00F3n de manifiesto del archive de manifiesto especificado\n    -e  especificar punto de entrada de la aplicaci\u00F3n para la aplicaci\u00F3n aut\u00F3noma \n        que se incluye dentro de un archive jar ejecutable\n    -0  s\u00F3lo almacenar; no utilizar compresi\u00F3n ZIP\n    -M  no crear un archive de manifiesto para las entradas\n    -i  generar informaci\u00F3n de \u00EDndice para los archives jar especificados\n    -C  cambiar al directorio especificado e incluir el archivo siguiente\nSi alg\u00FAn archivo es un directorio, se procesar\u00E1 de forma recurrente.\nEl nombre del archivo de manifiesto, el nombre del archivo de almacenamiento y el nombre del punto de entrada se\nespecifican en el mismo orden que los indicadores 'm', 'f' y 'e'.\n\nEjemplo 1: para archivar archivos de dos clases en un archivo llamado classes.jar: \n       jar cvf classes.jar Foo.class Bar.class \nEjemplo 2: utilice un archivo de manifiesto existente 'mymanifest' y archive todos los\n           archivos del directorio foo/ en 'classes.jar': \n       jar cvfm classes.jar mymanifest -C foo/ .\n
+usage=Sintaxis: jar {ctxui}[vfm0Me] [archive-jar] [archive-manifiesto] [punto-entrada] [-C dir] archivos...\nOpciones:\n    -c  crear nuevo archivo\n    -t  crear la tabla de contenido del archivo\n    -x  extraer el archive mencionado (o todos) del archivo\n    -u  actualizar archive existente\n    -v  generar salida detallada de los datos de salida est\u00E1ndar\n    -f  especificar nombre de archive de almacenamiento\n    -m  incluir informaci\u00F3n de manifiesto del archive de manifiesto especificado\n    -e  especificar punto de entrada de la aplicaci\u00F3n para la aplicaci\u00F3n aut\u00F3noma \n        que se incluye dentro de un archive jar ejecutable\n    -0  s\u00F3lo almacenar; no utilizar compresi\u00F3n ZIP\n    -M  no crear un archive de manifiesto para las entradas\n    -i  generar informaci\u00F3n de \u00EDndice para los archives jar especificados\n    -C  cambiar al directorio especificado e incluir el archivo siguiente\nSi alg\u00FAn archivo es un directorio, se procesar\u00E1 de forma recurrente.\nEl nombre del archivo de manifiesto, el nombre del archivo de almacenamiento y el nombre del punto de entrada se\nespecifican en el mismo orden que los indicadores 'm', 'f' y 'e'.\n\nEjemplo 1: para archivar archivos de dos clases en un archivo llamado classes.jar: \n       jar cvf classes.jar Foo.class Bar.class \nEjemplo 2: utilice un archivo de manifiesto existente 'mymanifest' y archive todos los\n           archivos del directorio foo/ en 'classes.jar': \n       jar cvfm classes.jar mymanifest -C foo/ .\n
--- a/src/share/classes/sun/tools/jar/resources/jar_it.properties	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/sun/tools/jar/resources/jar_it.properties	Mon Nov 11 23:17:30 2013 -0800
@@ -44,4 +44,4 @@
 out.inflated=\ decompresso: {0}
 out.size=(in = {0}) (out = {1})
 
-usage=Uso: jar {ctxui}[vfm0Me] [file-jar] [file-manifest] [punto di ingresso] [-C dir] file ...\nOpzioni:\n    -c  crea un nuovo archivio\n    -t  visualizza l'indice dell'archivio\n    -x  estrae i file con nome (o tutti i file) dall'archivio\n    -u  aggiorna l'archivio esistente\n    -v  genera output commentato dall'output standard\n    -f  specifica il nome file dell'archivio\n    -m  include informazioni manifest dal file manifest specificato\n    -e  specifica il punto di ingresso per l'applicazione stand-alone \n        inclusa nel file jar eseguibile\n    -0  solo memorizzazione; senza compressione ZIP\n    -M  consente di non creare un file manifest per le voci\n    -i  genera informazioni sull'indice per i file jar specificati\n    -C  imposta la directory specificata e include il file seguente\nSe un file \u00E8 una directory, verr\u00E0 elaborato in modo ricorsivo.\nIl nome del file manifest, del file di archivio e del punto di ingresso devono\nessere specificati nello stesso ordine dei flag 'm', 'f' ed 'e'.\n\nEsempio 1: archiviazione di due file di classe in un archivio con il nome classes.jar: \n       jar cvf classes.jar Foo.class Bar.class \nEsempio 2: utilizzo del file manifest esistente 'mymanifest' e archiviazione di tutti i\n           file della directory foo/ in 'classes.jar': \n       jar cvfm classes.jar mymanifest -C foo/.\n
+usage=Uso: jar {ctxui}[vfm0Me] [file-jar] [file-manifest] [punto di ingresso] [-C dir] file ...\nOpzioni:\n    -c  crea un nuovo archivio\n    -t  visualizza l'indice dell'archivio\n    -x  estrae i file con nome (o tutti i file) dall'archivio\n    -u  aggiorna l'archivio esistente\n    -v  genera output commentato dall'output standard\n    -f  specifica il nome file dell'archivio\n    -m  include informazioni manifest dal file manifest specificato\n    -e  specifica il punto di ingresso per l'applicazione stand-alone \n        inclusa nel file jar eseguibile\n    -0  solo memorizzazione; senza compressione ZIP\n    -M  consente di non creare un file manifest per le voci\n    -i  genera informazioni sull'indice per i file jar specificati\n    -C  imposta la directory specificata e include il file seguente\nSe un file \u00E8 una directory, verr\u00E0 elaborato in modo ricorsivo.\nIl nome del file manifest, del file di archivio e del punto di ingresso devono\nessere specificati nello stesso ordine dei flag 'm', 'f' ed 'e'.\n\nEsempio 1: archiviazione di due file di classe in un archivio con il nome classes.jar: \n       jar cvf classes.jar Foo.class Bar.class \nEsempio 2: utilizzo del file manifest esistente 'mymanifest' e archiviazione di tutti i\n           file della directory foo/ in 'classes.jar': \n       jar cvfm classes.jar mymanifest -C foo/ .\n
--- a/src/share/classes/sun/tools/jar/resources/jar_ja.properties	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/sun/tools/jar/resources/jar_ja.properties	Mon Nov 11 23:17:30 2013 -0800
@@ -44,4 +44,4 @@
 out.inflated=\ {0}\u304C\u5C55\u958B\u3055\u308C\u307E\u3057\u305F
 out.size=(\u5165={0})(\u51FA={1})
 
-usage=\u4F7F\u7528\u65B9\u6CD5: jar {ctxui}[vfm0Me] [jar-file] [manifest-file] [entry-point] [-C dir] files ...\n\u30AA\u30D7\u30B7\u30E7\u30F3:\n   -c \u30A2\u30FC\u30AB\u30A4\u30D6\u3092\u65B0\u898F\u4F5C\u6210\u3059\u308B\n   -t \u30A2\u30FC\u30AB\u30A4\u30D6\u306E\u5185\u5BB9\u3092\u4E00\u89A7\u8868\u793A\u3059\u308B\n   -x \u6307\u5B9A\u306E(\u307E\u305F\u306F\u3059\u3079\u3066\u306E)\u30D5\u30A1\u30A4\u30EB\u3092\u30A2\u30FC\u30AB\u30A4\u30D6\u304B\u3089\u62BD\u51FA\u3059\u308B\n   -u \u65E2\u5B58\u30A2\u30FC\u30AB\u30A4\u30D6\u3092\u66F4\u65B0\u3059\u308B\n   -v \u6A19\u6E96\u51FA\u529B\u306B\u8A73\u7D30\u306A\u51FA\u529B\u3092\u751F\u6210\u3059\u308B\n   -f \u30A2\u30FC\u30AB\u30A4\u30D6\u30FB\u30D5\u30A1\u30A4\u30EB\u540D\u3092\u6307\u5B9A\u3059\u308B\n   -m \u6307\u5B9A\u306E\u30DE\u30CB\u30D5\u30A7\u30B9\u30C8\u30FB\u30D5\u30A1\u30A4\u30EB\u304B\u3089\u30DE\u30CB\u30D5\u30A7\u30B9\u30C8\u60C5\u5831\u3092\u53D6\u308A\u8FBC\u3080\n   -e \u5B9F\u884C\u53EF\u80FDjar\u30D5\u30A1\u30A4\u30EB\u306B\u30D0\u30F3\u30C9\u30EB\u3055\u308C\u305F\u30B9\u30BF\u30F3\u30C9\u30A2\u30ED\u30F3\u30FB\u30A2\u30D7\u30EA\u30B1\u30FC\u30B7\u30E7\u30F3\u306E\n      \u30A8\u30F3\u30C8\u30EA\u30FB\u30DD\u30A4\u30F3\u30C8\u3092\u6307\u5B9A\u3059\u308B\n   -0 \u683C\u7D0D\u306E\u307F\u3002ZIP\u5727\u7E2E\u3092\u4F7F\u7528\u3057\u306A\u3044\n   -M \u30A8\u30F3\u30C8\u30EA\u306E\u30DE\u30CB\u30D5\u30A7\u30B9\u30C8\u30FB\u30D5\u30A1\u30A4\u30EB\u3092\u4F5C\u6210\u3057\u306A\u3044\n   -i \u6307\u5B9A\u306Ejar\u30D5\u30A1\u30A4\u30EB\u306E\u7D22\u5F15\u60C5\u5831\u3092\u751F\u6210\u3059\u308B\n   -C \u6307\u5B9A\u306E\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306B\u5909\u66F4\u3057\u3001\u4EE5\u4E0B\u306E\u30D5\u30A1\u30A4\u30EB\u3092\u53D6\u308A\u8FBC\u3080\n\u30D5\u30A1\u30A4\u30EB\u304C\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306E\u5834\u5408\u306F\u518D\u5E30\u7684\u306B\u51E6\u7406\u3055\u308C\u307E\u3059\u3002\n\u30DE\u30CB\u30D5\u30A7\u30B9\u30C8\u30FB\u30D5\u30A1\u30A4\u30EB\u540D\u3001\u30A2\u30FC\u30AB\u30A4\u30D6\u30FB\u30D5\u30A1\u30A4\u30EB\u540D\u304A\u3088\u3073\u30A8\u30F3\u30C8\u30EA\u30FB\u30DD\u30A4\u30F3\u30C8\u540D\u306F\u3001\n\u30D5\u30E9\u30B0'm'\u3001'f'\u3001'e'\u306E\u6307\u5B9A\u3068\u540C\u3058\u9806\u756A\u3067\u6307\u5B9A\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002\n\n\u4F8B1: 2\u3064\u306E\u30AF\u30E9\u30B9\u30FB\u30D5\u30A1\u30A4\u30EB\u3092\u30A2\u30FC\u30AB\u30A4\u30D6classes.jar\u306B\u4FDD\u5B58\u3059\u308B:\n     jar cvf classes.jar Foo.class Bar.class\n\u4F8B2: \u65E2\u5B58\u306E\u30DE\u30CB\u30D5\u30A7\u30B9\u30C8\u30FB\u30D5\u30A1\u30A4\u30EB'mymanifest'\u3092\u4F7F\u7528\u3057\u3001foo/\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306E\n    \u5168\u30D5\u30A1\u30A4\u30EB\u3092'classes.jar'\u306B\u30A2\u30FC\u30AB\u30A4\u30D6\u3059\u308B:\n     jar cvfm classes.jar mymanifest -C foo/ \n
+usage=\u4F7F\u7528\u65B9\u6CD5: jar {ctxui}[vfm0Me] [jar-file] [manifest-file] [entry-point] [-C dir] files ...\n\u30AA\u30D7\u30B7\u30E7\u30F3:\n   -c \u30A2\u30FC\u30AB\u30A4\u30D6\u3092\u65B0\u898F\u4F5C\u6210\u3059\u308B\n   -t \u30A2\u30FC\u30AB\u30A4\u30D6\u306E\u5185\u5BB9\u3092\u4E00\u89A7\u8868\u793A\u3059\u308B\n   -x \u6307\u5B9A\u306E(\u307E\u305F\u306F\u3059\u3079\u3066\u306E)\u30D5\u30A1\u30A4\u30EB\u3092\u30A2\u30FC\u30AB\u30A4\u30D6\u304B\u3089\u62BD\u51FA\u3059\u308B\n   -u \u65E2\u5B58\u30A2\u30FC\u30AB\u30A4\u30D6\u3092\u66F4\u65B0\u3059\u308B\n   -v \u6A19\u6E96\u51FA\u529B\u306B\u8A73\u7D30\u306A\u51FA\u529B\u3092\u751F\u6210\u3059\u308B\n   -f \u30A2\u30FC\u30AB\u30A4\u30D6\u30FB\u30D5\u30A1\u30A4\u30EB\u540D\u3092\u6307\u5B9A\u3059\u308B\n   -m \u6307\u5B9A\u306E\u30DE\u30CB\u30D5\u30A7\u30B9\u30C8\u30FB\u30D5\u30A1\u30A4\u30EB\u304B\u3089\u30DE\u30CB\u30D5\u30A7\u30B9\u30C8\u60C5\u5831\u3092\u53D6\u308A\u8FBC\u3080\n   -e \u5B9F\u884C\u53EF\u80FDjar\u30D5\u30A1\u30A4\u30EB\u306B\u30D0\u30F3\u30C9\u30EB\u3055\u308C\u305F\u30B9\u30BF\u30F3\u30C9\u30A2\u30ED\u30F3\u30FB\u30A2\u30D7\u30EA\u30B1\u30FC\u30B7\u30E7\u30F3\u306E\n      \u30A8\u30F3\u30C8\u30EA\u30FB\u30DD\u30A4\u30F3\u30C8\u3092\u6307\u5B9A\u3059\u308B\n   -0 \u683C\u7D0D\u306E\u307F\u3002ZIP\u5727\u7E2E\u3092\u4F7F\u7528\u3057\u306A\u3044\n   -M \u30A8\u30F3\u30C8\u30EA\u306E\u30DE\u30CB\u30D5\u30A7\u30B9\u30C8\u30FB\u30D5\u30A1\u30A4\u30EB\u3092\u4F5C\u6210\u3057\u306A\u3044\n   -i \u6307\u5B9A\u306Ejar\u30D5\u30A1\u30A4\u30EB\u306E\u7D22\u5F15\u60C5\u5831\u3092\u751F\u6210\u3059\u308B\n   -C \u6307\u5B9A\u306E\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306B\u5909\u66F4\u3057\u3001\u4EE5\u4E0B\u306E\u30D5\u30A1\u30A4\u30EB\u3092\u53D6\u308A\u8FBC\u3080\n\u30D5\u30A1\u30A4\u30EB\u304C\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306E\u5834\u5408\u306F\u518D\u5E30\u7684\u306B\u51E6\u7406\u3055\u308C\u307E\u3059\u3002\n\u30DE\u30CB\u30D5\u30A7\u30B9\u30C8\u30FB\u30D5\u30A1\u30A4\u30EB\u540D\u3001\u30A2\u30FC\u30AB\u30A4\u30D6\u30FB\u30D5\u30A1\u30A4\u30EB\u540D\u304A\u3088\u3073\u30A8\u30F3\u30C8\u30EA\u30FB\u30DD\u30A4\u30F3\u30C8\u540D\u306F\u3001\n\u30D5\u30E9\u30B0'm'\u3001'f'\u3001'e'\u306E\u6307\u5B9A\u3068\u540C\u3058\u9806\u756A\u3067\u6307\u5B9A\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002\n\n\u4F8B1: 2\u3064\u306E\u30AF\u30E9\u30B9\u30FB\u30D5\u30A1\u30A4\u30EB\u3092\u30A2\u30FC\u30AB\u30A4\u30D6classes.jar\u306B\u4FDD\u5B58\u3059\u308B:\n     jar cvf classes.jar Foo.class Bar.class\n\u4F8B2: \u65E2\u5B58\u306E\u30DE\u30CB\u30D5\u30A7\u30B9\u30C8\u30FB\u30D5\u30A1\u30A4\u30EB'mymanifest'\u3092\u4F7F\u7528\u3057\u3001foo/\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306E\n     \u5168\u30D5\u30A1\u30A4\u30EB\u3092'classes.jar'\u306B\u30A2\u30FC\u30AB\u30A4\u30D6\u3059\u308B:\n     jar cvfm classes.jar mymanifest -C foo/ .\n
--- a/src/share/classes/sun/tools/jar/resources/jar_sv.properties	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/sun/tools/jar/resources/jar_sv.properties	Mon Nov 11 23:17:30 2013 -0800
@@ -44,4 +44,4 @@
 out.inflated=\ uppackat: {0}
 out.size=(in = {0}) (ut = {1})
 
-usage=Syntax: jar {ctxui}[vfm0Me] [jar fil] [manifestfil] [startpunkt] [-C-katalog] ...\nAlternativ:\n    -c  skapa nytt arkiv\n    -t  lista inneh\u00E5llsf\u00F6rteckning f\u00F6r arkiv\n    -x  extrahera namngivna (eller alla) filer fr\u00E5n arkiv\n    -u  uppdatera befintligt arkiv\n    -v  generera utf\u00F6rliga utdata vid standardutmatning\n    -f  ange arkivfilens namn\n    -m  inkludera manifestinformation fr\u00E5n angivet manifest\n    -e  ange programstartpunkt f\u00F6r frist\u00E5ende applikation \n        som medf\u00F6ljer i en jar-programfil\n    -0  endast lagra  (ingen zip-komprimering)\n    -M  skapa inte n\u00E5gon manifestfil f\u00F6r posterna\n    -i  generera indexinformation f\u00F6r de angivna jar-filerna\n    -C  \u00E4ndra till den angivna katalogen och inkludera f\u00F6ljande fil\nOm en fil \u00E4r en katalog bearbetas den rekursivt.\nNamnen p\u00E5 manifestfilen, arkivfilen och startpunkten anges i samma\nordning som m-, f- och e-flaggorna.\n\nExempel 1: S\u00E5 h\u00E4r arkiverar du tv\u00E5 klassfiler i ett arkiv med namnet classes.jar: \n       jar cvf classes.jar Foo.class Bar.class \nExempel 2: Anv\u00E4nd en befintlig manifestfil (mymanifest) och arkivera alla\n           filer fr\u00E5n katalogen foo/ i classes.jar: \n       jar cvfm classes.jar mymanifest -C foo/ .\n
+usage=Syntax: jar {ctxui}[vfm0Me] [jar-fil] [manifestfil] [startpunkt] [-C katalog] filer...\nAlternativ:\n    -c  skapa nytt arkiv\n    -t  lista inneh\u00E5llsf\u00F6rteckning f\u00F6r arkiv\n    -x  extrahera namngivna (eller alla) filer fr\u00E5n arkiv\n    -u  uppdatera befintligt arkiv\n    -v  generera utf\u00F6rliga utdata vid standardutmatning\n    -f  ange arkivfilens namn\n    -m  inkludera manifestinformation fr\u00E5n angivet manifest\n    -e  ange programstartpunkt f\u00F6r frist\u00E5ende applikation \n        som medf\u00F6ljer i en jar-programfil\n    -0  endast lagra  (ingen zip-komprimering)\n    -M  skapa inte n\u00E5gon manifestfil f\u00F6r posterna\n    -i  generera indexinformation f\u00F6r de angivna jar-filerna\n    -C  \u00E4ndra till den angivna katalogen och inkludera f\u00F6ljande fil\nOm en fil \u00E4r en katalog bearbetas den rekursivt.\nNamnen p\u00E5 manifestfilen, arkivfilen och startpunkten anges i samma\nordning som m-, f- och e-flaggorna.\n\nExempel 1: S\u00E5 h\u00E4r arkiverar du tv\u00E5 klassfiler i ett arkiv med namnet classes.jar: \n       jar cvf classes.jar Foo.class Bar.class \nExempel 2: Anv\u00E4nd en befintlig manifestfil (mymanifest) och arkivera alla\n           filer fr\u00E5n katalogen foo/ i classes.jar: \n       jar cvfm classes.jar mymanifest -C foo/ .\n
--- a/src/share/classes/sun/tools/jar/resources/jar_zh_CN.properties	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/sun/tools/jar/resources/jar_zh_CN.properties	Mon Nov 11 23:17:30 2013 -0800
@@ -44,4 +44,4 @@
 out.inflated=\  \u5DF2\u89E3\u538B: {0}
 out.size=(\u8F93\u5165 = {0}) (\u8F93\u51FA = {1})
 
-usage=\u7528\u6CD5: jar {ctxui}[vfm0Me] [jar-file] [manifest-file] [entry-point] [-C dir] files ...\n\u9009\u9879\u5305\u62EC: \n    -c  \u521B\u5EFA\u65B0\u7684\u5F52\u6863\u6587\u4EF6\n    -t  \u5217\u51FA\u5F52\u6863\u76EE\u5F55\n    -x  \u4ECE\u6863\u6848\u4E2D\u63D0\u53D6\u6307\u5B9A\u7684 (\u6216\u6240\u6709) \u6587\u4EF6\n    -u  \u66F4\u65B0\u73B0\u6709\u7684\u5F52\u6863\u6587\u4EF6\n    -v  \u5728\u6807\u51C6\u8F93\u51FA\u4E2D\u751F\u6210\u8BE6\u7EC6\u8F93\u51FA\n    -f  \u6307\u5B9A\u5F52\u6863\u6587\u4EF6\u540D\n    -m  \u5305\u542B\u6307\u5B9A\u6E05\u5355\u6587\u4EF6\u4E2D\u7684\u6E05\u5355\u4FE1\u606F\n    -e  \u4E3A\u6346\u7ED1\u5230\u53EF\u6267\u884C jar \u6587\u4EF6\u7684\u72EC\u7ACB\u5E94\u7528\u7A0B\u5E8F\n        \u6307\u5B9A\u5E94\u7528\u7A0B\u5E8F\u5165\u53E3\u70B9\n    -0  \u4EC5\u5B58\u50A8; \u4E0D\u4F7F\u7528\u60C5\u51B5\u4EFB\u4F55 ZIP \u538B\u7F29\n    -M  \u4E0D\u521B\u5EFA\u6761\u76EE\u7684\u6E05\u5355\u6587\u4EF6\n    -i  \u4E3A\u6307\u5B9A\u7684 jar \u6587\u4EF6\u751F\u6210\u7D22\u5F15\u4FE1\u606F\n    -C  \u66F4\u6539\u4E3A\u6307\u5B9A\u7684\u76EE\u5F55\u5E76\u5305\u542B\u5176\u4E2D\u7684\u6587\u4EF6\n\u5982\u679C\u6709\u4EFB\u4F55\u76EE\u5F55\u6587\u4EF6, \u5219\u5BF9\u5176\u8FDB\u884C\u9012\u5F52\u5904\u7406\u3002\n\u6E05\u5355\u6587\u4EF6\u540D, \u5F52\u6863\u6587\u4EF6\u540D\u548C\u5165\u53E3\u70B9\u540D\u79F0\u7684\u6307\u5B9A\u987A\u5E8F\n\u4E0E 'm', 'f' \u548C 'e' \u6807\u8BB0\u7684\u6307\u5B9A\u987A\u5E8F\u76F8\u540C\u3002\n\n\u793A\u4F8B 1: \u5C06\u4E24\u4E2A\u7C7B\u6587\u4EF6\u5F52\u6863\u5230\u4E00\u4E2A\u540D\u4E3A classes.jar \u7684\u5F52\u6863\u6587\u4EF6\u4E2D: \n       jar cvf classes.jar Foo.class Bar.class \n\u793A\u4F8B 2: \u4F7F\u7528\u73B0\u6709\u7684\u6E05\u5355\u6587\u4EF6 'mymanifest' \u5E76\n           \u5C06 foo/ \u76EE\u5F55\u4E2D\u7684\u6240\u6709\u6587\u4EF6\u5F52\u6863\u5230 'classes.jar' \u4E2D: \n       jar cvfm classes.jar mymanifest -C foo/\u3002\n
+usage=\u7528\u6CD5: jar {ctxui}[vfm0Me] [jar-file] [manifest-file] [entry-point] [-C dir] files ...\n\u9009\u9879\u5305\u62EC: \n    -c  \u521B\u5EFA\u65B0\u7684\u5F52\u6863\u6587\u4EF6\n    -t  \u5217\u51FA\u5F52\u6863\u76EE\u5F55\n    -x  \u4ECE\u6863\u6848\u4E2D\u63D0\u53D6\u6307\u5B9A\u7684 (\u6216\u6240\u6709) \u6587\u4EF6\n    -u  \u66F4\u65B0\u73B0\u6709\u7684\u5F52\u6863\u6587\u4EF6\n    -v  \u5728\u6807\u51C6\u8F93\u51FA\u4E2D\u751F\u6210\u8BE6\u7EC6\u8F93\u51FA\n    -f  \u6307\u5B9A\u5F52\u6863\u6587\u4EF6\u540D\n    -m  \u5305\u542B\u6307\u5B9A\u6E05\u5355\u6587\u4EF6\u4E2D\u7684\u6E05\u5355\u4FE1\u606F\n    -e  \u4E3A\u6346\u7ED1\u5230\u53EF\u6267\u884C jar \u6587\u4EF6\u7684\u72EC\u7ACB\u5E94\u7528\u7A0B\u5E8F\n        \u6307\u5B9A\u5E94\u7528\u7A0B\u5E8F\u5165\u53E3\u70B9\n    -0  \u4EC5\u5B58\u50A8; \u4E0D\u4F7F\u7528\u60C5\u51B5\u4EFB\u4F55 ZIP \u538B\u7F29\n    -M  \u4E0D\u521B\u5EFA\u6761\u76EE\u7684\u6E05\u5355\u6587\u4EF6\n    -i  \u4E3A\u6307\u5B9A\u7684 jar \u6587\u4EF6\u751F\u6210\u7D22\u5F15\u4FE1\u606F\n    -C  \u66F4\u6539\u4E3A\u6307\u5B9A\u7684\u76EE\u5F55\u5E76\u5305\u542B\u5176\u4E2D\u7684\u6587\u4EF6\n\u5982\u679C\u6709\u4EFB\u4F55\u76EE\u5F55\u6587\u4EF6, \u5219\u5BF9\u5176\u8FDB\u884C\u9012\u5F52\u5904\u7406\u3002\n\u6E05\u5355\u6587\u4EF6\u540D, \u5F52\u6863\u6587\u4EF6\u540D\u548C\u5165\u53E3\u70B9\u540D\u79F0\u7684\u6307\u5B9A\u987A\u5E8F\n\u4E0E 'm', 'f' \u548C 'e' \u6807\u8BB0\u7684\u6307\u5B9A\u987A\u5E8F\u76F8\u540C\u3002\n\n\u793A\u4F8B 1: \u5C06\u4E24\u4E2A\u7C7B\u6587\u4EF6\u5F52\u6863\u5230\u4E00\u4E2A\u540D\u4E3A classes.jar \u7684\u5F52\u6863\u6587\u4EF6\u4E2D: \n       jar cvf classes.jar Foo.class Bar.class \n\u793A\u4F8B 2: \u4F7F\u7528\u73B0\u6709\u7684\u6E05\u5355\u6587\u4EF6 'mymanifest' \u5E76\n           \u5C06 foo/ \u76EE\u5F55\u4E2D\u7684\u6240\u6709\u6587\u4EF6\u5F52\u6863\u5230 'classes.jar' \u4E2D: \n       jar cvfm classes.jar mymanifest -C foo/ .\n
--- a/src/share/classes/sun/tools/jconsole/BorderedComponent.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/sun/tools/jconsole/BorderedComponent.java	Mon Nov 11 23:17:30 2013 -0800
@@ -266,7 +266,7 @@
      * default position.
      * <p>
      * If the border property value is not
-     * specified in the constuctor or by invoking the appropriate
+     * specified in the constructor or by invoking the appropriate
      * set method, the property value will be defined by the current
      * look and feel, using the following property name in the
      * Defaults Table:
--- a/src/share/classes/sun/tools/jconsole/inspector/XTextField.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/sun/tools/jconsole/inspector/XTextField.java	Mon Nov 11 23:17:30 2013 -0800
@@ -182,19 +182,19 @@
 
     public void changedUpdate(DocumentEvent e) {
         // the user typed something, so remove references
-        // to the obejct that was dropped.
+        // to the object that was dropped.
         clearObject();
     }
 
     public void removeUpdate(DocumentEvent e) {
         // the user typed something, so remove references
-        // to the obejct that was dropped.
+        // to the object that was dropped.
         clearObject();
     }
 
     public void insertUpdate(DocumentEvent e) {
         // the user typed something, so remove references
-        // to the obejct that was dropped.
+        // to the object that was dropped.
         clearObject();
     }
 
--- a/src/share/classes/sun/tools/jinfo/JInfo.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/sun/tools/jinfo/JInfo.java	Mon Nov 11 23:17:30 2013 -0800
@@ -35,7 +35,7 @@
 
 /*
  * This class is the main class for the JInfo utility. It parses its arguments
- * and decides if the command should be satisifed using the VM attach mechanism
+ * and decides if the command should be satisfied using the VM attach mechanism
  * or an SA tool. At this time the only option that uses the VM attach
  * mechanism is the -flag option to set or print a command line option of a
  * running application. All other options are mapped to SA tools.
--- a/src/share/classes/sun/tools/jmap/JMap.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/sun/tools/jmap/JMap.java	Mon Nov 11 23:17:30 2013 -0800
@@ -36,7 +36,7 @@
 
 /*
  * This class is the main class for the JMap utility. It parses its arguments
- * and decides if the command should be satisifed using the VM attach mechanism
+ * and decides if the command should be satisfied using the VM attach mechanism
  * or an SA tool. At this time the only option that uses the VM attach mechanism
  * is the -dump option to get a heap dump of a running application. All other
  * options are mapped to SA tools.
--- a/src/share/classes/sun/tools/jstat/ColumnFormat.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/sun/tools/jstat/ColumnFormat.java	Mon Nov 11 23:17:30 2013 -0800
@@ -57,7 +57,7 @@
         // should allow null data statments
 
         if (expression == null) {
-            // current policy is that a data statment must be specified
+            // current policy is that a data statement must be specified
             throw new ParserException("Missing data statement in column " + number);
         }
         if (header == null) {
--- a/src/share/classes/sun/tools/jstat/resources/jstat_options	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/sun/tools/jstat/resources/jstat_options	Mon Nov 11 23:17:30 2013 -0800
@@ -314,7 +314,7 @@
     format "0.0"
   }
   column {
-    header "^OGCMN^"	/* Old Generation Capacity - Minumum */
+    header "^OGCMN^"	/* Old Generation Capacity - Minimum */
     data sun.gc.generation.1.minCapacity
     scale K
     align right
@@ -776,7 +776,7 @@
 
 option gcoldcapacity {
   column {
-    header "^OGCMN^"	/* Old Generation Capacity - Minumum */
+    header "^OGCMN^"	/* Old Generation Capacity - Minimum */
     data sun.gc.generation.1.minCapacity
     scale K
     align right
--- a/src/share/classes/sun/tools/tree/ExprExpression.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/sun/tools/tree/ExprExpression.java	Mon Nov 11 23:17:30 2013 -0800
@@ -29,7 +29,7 @@
 import java.util.Hashtable;
 
 /**
- * Parenthesised expressions.
+ * Parenthesized expressions.
  *
  * WARNING: The contents of this source file are not part of any
  * supported API.  Code that depends on them does so at its own risk:
--- a/src/share/classes/sun/tools/tree/FieldExpression.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/sun/tools/tree/FieldExpression.java	Mon Nov 11 23:17:30 2013 -0800
@@ -154,7 +154,7 @@
                 return t;
             }
 
-            // These were ommitted earlier in calls to 'toType', but I can't
+            // These were omitted earlier in calls to 'toType', but I can't
             // see any reason for that.  I think it was an oversight.  See
             // 'checkCommon' and 'checkInnerClass'.
             innerClass.noteUsedBy(ctxClass, where, env);
@@ -1121,7 +1121,7 @@
         // either.
         //
         // However, NullPointerException can't happen and initialization must
-        // already have occured if you are dotting into 'this'.  So
+        // already have occurred if you are dotting into 'this'.  So
         // allow fields of 'this' to be eliminated as a special case.
         Expression e = inlineValue(env, ctx);
         if (e instanceof FieldExpression) {
--- a/src/share/classes/sun/util/locale/provider/RuleBasedBreakIterator.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/sun/util/locale/provider/RuleBasedBreakIterator.java	Mon Nov 11 23:17:30 2013 -0800
@@ -822,7 +822,7 @@
     }
 
     /**
-     * Returns true if the specfied position is a boundary position.  As a side
+     * Returns true if the specified position is a boundary position.  As a side
      * effect, leaves the iterator pointing to the first boundary position at
      * or after "offset".
      * @param offset the offset to check.
--- a/src/share/classes/sun/util/logging/PlatformLogger.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/sun/util/logging/PlatformLogger.java	Mon Nov 11 23:17:30 2013 -0800
@@ -135,7 +135,7 @@
 
         static Level valueOf(int level) {
             switch (level) {
-                // ordering per the highest occurences in the jdk source
+                // ordering per the highest occurrences in the jdk source
                 // finest, fine, finer, info first
                 case PlatformLogger.FINEST  : return Level.FINEST;
                 case PlatformLogger.FINE    : return Level.FINE;
--- a/src/share/classes/sun/util/resources/ko/LocaleNames_ko.properties	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/sun/util/resources/ko/LocaleNames_ko.properties	Mon Nov 11 23:17:30 2013 -0800
@@ -1045,7 +1045,7 @@
 PN=\ud54f\ucf00\uc5b8 \uc81c\ub3c4
 PR=\ud478\uc5d0\ub974\ud1a0\ub9ac\ucf54
 PS=\ud314\ub808\uc2a4\ud0c0\uc778
-PT=\ud3ec\ub974\ud2b8\uce7c
+PT=\ud3ec\ub974\ud22c\uce7c
 PW=\ud314\ub77c\uc6b0
 PY=\ud30c\ub77c\uacfc\uc774
 QA=\uce74\ud0c0\ub974
--- a/src/share/classes/sun/util/resources/sv/LocaleNames_sv.properties	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/classes/sun/util/resources/sv/LocaleNames_sv.properties	Mon Nov 11 23:17:30 2013 -0800
@@ -1106,7 +1106,7 @@
 WS=Samoa
 YE=Jemen
 YT=Mayotte
-ZA=Sydafrika 
+ZA=Sydafrika
 ZM=Zambia
 ZW=Zimbabwe
 
--- a/src/share/demo/jfc/Font2DTest/FontPanel.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/demo/jfc/Font2DTest/FontPanel.java	Mon Nov 11 23:17:30 2013 -0800
@@ -524,7 +524,7 @@
              * graphics anti-aliasing hint if the text anti-aliasing hint
              * was set. The dubious element here is that people simply
              * using this program may think this is built-in behaviour
-             * but its not - at least not when the app explictly draws
+             * but its not - at least not when the app explicitly draws
              * outline text.
              * This becomes more dubious in cases such as "GASP" where the
              * size at which text is AA'ed is not something you can easily
--- a/src/share/demo/jfc/TableExample/TableExample4.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/demo/jfc/TableExample/TableExample4.java	Mon Nov 11 23:17:30 2013 -0800
@@ -54,7 +54,7 @@
 /**
  * Another JTable example, showing how column attributes can be refined
  * even when columns have been created automatically. Here we create some
- * specialised renderers and editors as well as changing widths and colors
+ * specialized renderers and editors as well as changing widths and colors
  * for some of the columns in the SwingSet demo table.
  *
  * @author Philip Milne
--- a/src/share/demo/jvmti/hprof/debug_malloc.c	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/demo/jvmti/hprof/debug_malloc.c	Mon Nov 11 23:17:30 2013 -0800
@@ -250,7 +250,7 @@
 static char *debug_check;
 static void *clobbered_ptr;
 
-/* Minumum macro */
+/* Minimum macro */
 #define minimum(a,b) ((a)<(b)?(a):(b))
 
 /* Message routine */
--- a/src/share/demo/nio/zipfs/src/com/sun/nio/zipfs/ZipFileSystem.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/demo/nio/zipfs/src/com/sun/nio/zipfs/ZipFileSystem.java	Mon Nov 11 23:17:30 2013 -0800
@@ -1023,7 +1023,7 @@
     }
 
     // Reads zip file central directory. Returns the file position of first
-    // CEN header, otherwise returns -1 if an error occured. If zip->msg != NULL
+    // CEN header, otherwise returns -1 if an error occurred. If zip->msg != NULL
     // then the error was a zip format error and zip->msg has the error text.
     // Always pass in -1 for knownTotal; it's used for a recursive call.
     private byte[] initCEN() throws IOException {
@@ -1740,7 +1740,7 @@
     static class IndexNode {
         byte[] name;
         int    hashcode;  // node is hashable/hashed by its name
-        int    pos = -1;  // postion in cen table, -1 menas the
+        int    pos = -1;  // position in cen table, -1 menas the
                           // entry does not exists in zip file
         IndexNode(byte[] name, int pos) {
             name(name);
--- a/src/share/javavm/export/jvm.h	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/javavm/export/jvm.h	Mon Nov 11 23:17:30 2013 -0800
@@ -856,7 +856,7 @@
 JVM_GetMethodIxSignatureUTF(JNIEnv *env, jclass cb, jint index);
 
 /*
- * Returns the name of the field refered to at a given constant pool
+ * Returns the name of the field referred to at a given constant pool
  * index.
  *
  * The result is in UTF format and remains valid until JVM_ReleaseUTF
@@ -869,7 +869,7 @@
 JVM_GetCPFieldNameUTF(JNIEnv *env, jclass cb, jint index);
 
 /*
- * Returns the name of the method refered to at a given constant pool
+ * Returns the name of the method referred to at a given constant pool
  * index.
  *
  * The result is in UTF format and remains valid until JVM_ReleaseUTF
@@ -882,7 +882,7 @@
 JVM_GetCPMethodNameUTF(JNIEnv *env, jclass cb, jint index);
 
 /*
- * Returns the signature of the method refered to at a given constant pool
+ * Returns the signature of the method referred to at a given constant pool
  * index.
  *
  * The result is in UTF format and remains valid until JVM_ReleaseUTF
@@ -895,7 +895,7 @@
 JVM_GetCPMethodSignatureUTF(JNIEnv *env, jclass cb, jint index);
 
 /*
- * Returns the signature of the field refered to at a given constant pool
+ * Returns the signature of the field referred to at a given constant pool
  * index.
  *
  * The result is in UTF format and remains valid until JVM_ReleaseUTF
@@ -908,7 +908,7 @@
 JVM_GetCPFieldSignatureUTF(JNIEnv *env, jclass cb, jint index);
 
 /*
- * Returns the class name refered to at a given constant pool index.
+ * Returns the class name referred to at a given constant pool index.
  *
  * The result is in UTF format and remains valid until JVM_ReleaseUTF
  * is called.
@@ -920,7 +920,7 @@
 JVM_GetCPClassNameUTF(JNIEnv *env, jclass cb, jint index);
 
 /*
- * Returns the class name refered to at a given constant pool index.
+ * Returns the class name referred to at a given constant pool index.
  *
  * The constant pool entry must refer to a CONSTANT_Fieldref.
  *
@@ -934,7 +934,7 @@
 JVM_GetCPFieldClassNameUTF(JNIEnv *env, jclass cb, jint index);
 
 /*
- * Returns the class name refered to at a given constant pool index.
+ * Returns the class name referred to at a given constant pool index.
  *
  * The constant pool entry must refer to CONSTANT_Methodref or
  * CONSTANT_InterfaceMethodref.
--- a/src/share/native/com/sun/java/util/jar/pack/zip.cpp	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/native/com/sun/java/util/jar/pack/zip.cpp	Mon Nov 11 23:17:30 2013 -0800
@@ -467,7 +467,7 @@
         zs.avail_in -= TRAILER_LEN;
       } else {
         // Bug: 5023768,we read past the TRAILER_LEN to see if there is
-        // any extraneous data, as we dont support concatenated .gz
+        // any extraneous data, as we don't support concatenated .gz
         // files just yet.
         int extra = (int) read_gzin_fn(u, inbuf, 1, inbuflen);
         zs.avail_in += extra - TRAILER_LEN;
--- a/src/share/native/com/sun/media/sound/PlatformMidi.h	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/native/com/sun/media/sound/PlatformMidi.h	Mon Nov 11 23:17:30 2013 -0800
@@ -222,7 +222,7 @@
 
 /*
  * Return the current time stamp in microseconds.
- * If not supported, or problem occured, returns -1
+ * If not supported, or problem occurred, returns -1
  */
 INT64 MIDI_IN_GetTimeStamp(MidiDeviceHandle* handle);
 
@@ -311,7 +311,7 @@
 /*
  * Return the current time stamp in microseconds (the time since the device
  * was opened).
- * If not supported, or problem occured, returns -1
+ * If not supported, or problem occurred, returns -1
  */
 INT64 MIDI_OUT_GetTimeStamp(MidiDeviceHandle* handle);
 
--- a/src/share/native/common/jni_util.h	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/native/common/jni_util.h	Mon Nov 11 23:17:30 2013 -0800
@@ -40,7 +40,7 @@
  * particularly aware of the fact that these functions are convenience
  * functions, and as such are often compound operations, each one of
  * which may throw an exception. Therefore, the functions this file
- * will often return silently if an exception has occured, and callers
+ * will often return silently if an exception has occurred, and callers
  * must check for exception themselves.
  */
 
@@ -186,7 +186,7 @@
  * pass to it.
  *
  * The method will return an initialized instance if successful.
- * It will return NULL if an error has occured (for example if
+ * It will return NULL if an error has occurred (for example if
  * it ran out of memory) and the appropriate Java exception will
  * have been thrown.
  */
--- a/src/share/native/java/lang/fdlibm/src/k_rem_pio2.c	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/native/java/lang/fdlibm/src/k_rem_pio2.c	Mon Nov 11 23:17:30 2013 -0800
@@ -55,7 +55,7 @@
  *                      z    = (z-x[i])*2**24
  *
  *
- *      y[]     ouput result in an array of double precision numbers.
+ *      y[]     output result in an array of double precision numbers.
  *              The dimension of y[] is:
  *                      24-bit  precision       1
  *                      53-bit  precision       2
--- a/src/share/native/java/util/zip/zip_util.c	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/native/java/util/zip/zip_util.c	Mon Nov 11 23:17:30 2013 -0800
@@ -536,7 +536,7 @@
 
 /*
  * Reads zip file central directory. Returns the file position of first
- * CEN header, otherwise returns -1 if an error occured. If zip->msg != NULL
+ * CEN header, otherwise returns -1 if an error occurred. If zip->msg != NULL
  * then the error was a zip format error and zip->msg has the error text.
  * Always pass in -1 for knownTotal; it's used for a recursive call.
  */
--- a/src/share/native/sun/awt/image/cvutils/img_dcm.h	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/native/sun/awt/image/cvutils/img_dcm.h	Mon Nov 11 23:17:30 2013 -0800
@@ -28,7 +28,7 @@
  * the macros used by the generic scaleloop function.
  *
  * This implementation can decode the pixel information associated
- * with any Java DirectColorModel object.  This implemenation will
+ * with any Java DirectColorModel object.  This implementation will
  * scale the decoded color components to 8-bit quantities if needed.
  * Another file is provided to optimize DCM parsing when the masks
  * are guaranteed to be at least 8-bits wide.  This implementation
--- a/src/share/native/sun/awt/image/cvutils/img_replscale.h	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/native/sun/awt/image/cvutils/img_replscale.h	Mon Nov 11 23:17:30 2013 -0800
@@ -35,7 +35,7 @@
  * more than one output pixel.  Conversely, when scaling smaller than
  * the original image size, the input pixels will be omitted as needed
  * to pare them down to the required number of samples for the output
- * image.  If there is no scaling occuring in one or both directions
+ * image.  If there is no scaling occurring in one or both directions
  * the macros attempt to short-circuit most of the more complicated
  * calculations in an attempt to impose little cost for using this
  * implementation in the general case.  The calculations also do not
--- a/src/share/native/sun/awt/image/jpeg/imageioJPEG.c	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/native/sun/awt/image/jpeg/imageioJPEG.c	Mon Nov 11 23:17:30 2013 -0800
@@ -983,7 +983,7 @@
  * buffer filling be done at the top application level, using this
  * function.  Due to the way that backtracking works, this procedure
  * saves all of the data that was left in the buffer when suspension
- * occured and read new data only at the end.
+ * occurred and read new data only at the end.
  */
 
 GLOBAL(void)
--- a/src/share/native/sun/awt/image/jpeg/jpegdecoder.c	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/native/sun/awt/image/jpeg/jpegdecoder.c	Mon Nov 11 23:17:30 2013 -0800
@@ -310,7 +310,7 @@
  * Note that with I/O suspension turned on, the JPEG library requires
  * that all buffer filling be done at the top application level.  Due
  * to the way that backtracking works, this procedure should save all
- * of the data that was left in the buffer when suspension occured and
+ * of the data that was left in the buffer when suspension occurred and
  * only read new data at the end.
  */
 
--- a/src/share/native/sun/awt/libpng/CHANGES	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/native/sun/awt/libpng/CHANGES	Mon Nov 11 23:17:30 2013 -0800
@@ -2126,7 +2126,7 @@
     png_decompress_chunk(), and remove "chunkdata" from parameter list.
   Put a call to png_check_chunk_name() in png_read_chunk_header().
   Revised png_check_chunk_name() to reject a name with a lowercase 3rd byte.
-  Removed two calls to png_check_chunk_name() occuring later in the process.
+  Removed two calls to png_check_chunk_name() occurring later in the process.
   Define PNG_NO_ERROR_NUMBERS by default in pngconf.h
 
 Version 1.4.0beta25 [July 30, 2008]
--- a/src/share/native/sun/awt/libpng/png.h	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/native/sun/awt/libpng/png.h	Mon Nov 11 23:17:30 2013 -0800
@@ -1351,7 +1351,7 @@
  *
  * When the default gamma of PNG files doesn't match the output gamma.
  *    If you have PNG files with no gamma information png_set_alpha_mode allows
- *    you to provide a default gamma, but it also sets the ouput gamma to the
+ *    you to provide a default gamma, but it also sets the output gamma to the
  *    matching value.  If you know your PNG files have a gamma that doesn't
  *    match the output you can take advantage of the fact that
  *    png_set_alpha_mode always sets the output gamma but only sets the PNG
--- a/src/share/native/sun/awt/libpng/pngconf.h	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/native/sun/awt/libpng/pngconf.h	Mon Nov 11 23:17:30 2013 -0800
@@ -633,7 +633,7 @@
 #  else
      /* This is an attempt to detect an old Windows system where (int) is
       * actually 16 bits, in that case png_malloc must have an argument with a
-      * bigger size to accomodate the requirements of the library.
+      * bigger size to accommodate the requirements of the library.
       */
 #    if (defined(_Windows) || defined(_WINDOWS) || defined(_WINDOWS_)) && \
         (!defined(INT_MAX) || INT_MAX <= 0x7ffffffeL)
--- a/src/share/native/sun/awt/libpng/pngpriv.h	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/native/sun/awt/libpng/pngpriv.h	Mon Nov 11 23:17:30 2013 -0800
@@ -1195,7 +1195,7 @@
     png_warning_parameters p, png_const_charp message);
     /* 'message' follows the X/Open approach of using @1, @2 to insert
      * parameters previously supplied using the above functions.  Errors in
-     * specifying the paramters will simple result in garbage substitutions.
+     * specifying the parameters will simple result in garbage substitutions.
      */
 #endif
 
--- a/src/share/native/sun/awt/libpng/pngrutil.c	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/native/sun/awt/libpng/pngrutil.c	Mon Nov 11 23:17:30 2013 -0800
@@ -126,7 +126,7 @@
 png_uint_16 (PNGAPI
 png_get_uint_16)(png_const_bytep buf)
 {
-   /* ANSI-C requires an int value to accomodate at least 16 bits so this
+   /* ANSI-C requires an int value to accommodate at least 16 bits so this
     * works and allows the compiler not to worry about possible narrowing
     * on 32 bit systems.  (Pre-ANSI systems did not make integers smaller
     * than 16 bits either.)
--- a/src/share/native/sun/font/layout/ArabicLayoutEngine.h	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/native/sun/font/layout/ArabicLayoutEngine.h	Mon Nov 11 23:17:30 2013 -0800
@@ -209,7 +209,7 @@
      * This method converts the Arabic Presentation Forms in the temp glyph array
      * into actual glyph indices using ArabicOpenTypeLayoutEngine::mapCharsToGlyps.
      *
-     * Input paramters:
+     * Input parameters:
      * @param tempGlyphs - the input presentation forms
      * @param tempCharIndices - the input character index array
      * @param tempGlyphCount - the number of Presentation Froms
--- a/src/share/native/sun/font/layout/IndicReordering.h	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/native/sun/font/layout/IndicReordering.h	Mon Nov 11 23:17:30 2013 -0800
@@ -42,7 +42,7 @@
 
 U_NAMESPACE_BEGIN
 
-// Characters that get refered to by name...
+// Characters that get referred to by name...
 #define C_SIGN_ZWNJ           0x200C
 #define C_SIGN_ZWJ            0x200D
 
--- a/src/share/native/sun/font/layout/KhmerReordering.cpp	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/native/sun/font/layout/KhmerReordering.cpp	Mon Nov 11 23:17:30 2013 -0800
@@ -40,7 +40,7 @@
 
 U_NAMESPACE_BEGIN
 
-// Characters that get refered to by name...
+// Characters that get referred to by name...
 enum
 {
     C_SIGN_ZWNJ     = 0x200C,
--- a/src/share/native/sun/font/layout/OpenTypeLayoutEngine.h	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/native/sun/font/layout/OpenTypeLayoutEngine.h	Mon Nov 11 23:17:30 2013 -0800
@@ -59,7 +59,7 @@
  * 3) Glyph post processing - in cases where the font doesn't directly contain a GSUB table,
  *    the previous two steps may have generated "fake" glyph indices to use with a "canned" GSUB
  *    table. This step turns those glyph indices into actual font-specific glyph indices, and may
- *    perform any other adjustments requried by the previous steps.
+ *    perform any other adjustments required by the previous steps.
  *
  * OpenTypeLayoutEngine will also use the font's GPOS table to apply position adjustments
  * such as kerning and accent positioning.
@@ -349,7 +349,7 @@
      * index and character index arrays, assuming that no "fake" glyph indices
      * were needed to do GSUB processing.
      *
-     * Input paramters:
+     * Input parameters:
      * @param tempGlyphs - the input "fake" glyph index array
      * @param tempCharIndices - the input "fake" character index array
      * @param tempGlyphCount - the number of "fake" glyph indices
--- a/src/share/native/sun/font/layout/TibetanReordering.cpp	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/native/sun/font/layout/TibetanReordering.cpp	Mon Nov 11 23:17:30 2013 -0800
@@ -47,7 +47,7 @@
 
 U_NAMESPACE_BEGIN
 
-// Characters that get refered to by name...
+// Characters that get referred to by name...
 enum
 {
     C_DOTTED_CIRCLE = 0x25CC,
--- a/src/share/native/sun/java2d/cmm/lcms/LCMS.c	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/native/sun/java2d/cmm/lcms/LCMS.c	Mon Nov 11 23:17:30 2013 -0800
@@ -31,6 +31,7 @@
 #include "Trace.h"
 #include "Disposer.h"
 #include "lcms2.h"
+#include "jlong.h"
 
 
 #define ALIGNLONG(x) (((x)+3) & ~(3))         // Aligns to DWORD boundary
@@ -98,13 +99,6 @@
     cmsHPROFILE pf;
 } lcmsProfile_t, *lcmsProfile_p;
 
-typedef union storeID_s {    /* store SProfile stuff in a Java Long */
-    lcmsProfile_p lcmsPf;
-    cmsHTRANSFORM xf;
-    jobject jobj;
-    jlong j;
-} storeID_t, *storeID_p;
-
 typedef union {
     cmsTagSignature cms;
     jint j;
@@ -148,23 +142,21 @@
 }
 
 void LCMS_freeProfile(JNIEnv *env, jlong ptr) {
-    storeID_t sProfile;
-    sProfile.j = ptr;
+    lcmsProfile_p p = (lcmsProfile_p)jlong_to_ptr(ptr);
 
-    if (sProfile.lcmsPf != NULL) {
-        if (sProfile.lcmsPf->pf != NULL) {
-            cmsCloseProfile(sProfile.lcmsPf->pf);
+    if (p != NULL) {
+        if (p->pf != NULL) {
+            cmsCloseProfile(p->pf);
         }
-        free(sProfile.lcmsPf);
+        free(p);
     }
 }
 
 void LCMS_freeTransform(JNIEnv *env, jlong ID)
 {
-    storeID_t sTrans;
-    sTrans.j = ID;
+    cmsHTRANSFORM sTrans = jlong_to_ptr(ID);
     /* Passed ID is always valid native ref so there is no check for zero */
-    cmsDeleteTransform(sTrans.xf);
+    cmsDeleteTransform(sTrans);
 }
 
 /*
@@ -179,12 +171,16 @@
 {
     cmsHPROFILE _iccArray[DF_ICC_BUF_SIZE];
     cmsHPROFILE *iccArray = &_iccArray[0];
-    storeID_t sTrans;
+    cmsHTRANSFORM sTrans = NULL;
     int i, j, size;
     jlong* ids;
 
     size = (*env)->GetArrayLength (env, profileIDs);
     ids = (*env)->GetLongArrayElements(env, profileIDs, 0);
+    if (ids == NULL) {
+        // An exception should have already been thrown.
+        return 0L;
+    }
 
 #ifdef _LITTLE_ENDIAN
     /* Reversing data packed into int for LE archs */
@@ -209,11 +205,10 @@
 
     j = 0;
     for (i = 0; i < size; i++) {
-        cmsHPROFILE icc;
         cmsColorSpaceSignature cs;
+        lcmsProfile_p profilePtr = (lcmsProfile_p)jlong_to_ptr(ids[i]);
+        cmsHPROFILE icc = profilePtr->pf;
 
-        sTrans.j = ids[i];
-        icc = sTrans.lcmsPf->pf;
         iccArray[j++] = icc;
 
         /* Middle non-abstract profiles should be doubled before passing to
@@ -228,26 +223,26 @@
         }
     }
 
-    sTrans.xf = cmsCreateMultiprofileTransform(iccArray, j,
+    sTrans = cmsCreateMultiprofileTransform(iccArray, j,
         inFormatter, outFormatter, renderType, 0);
 
     (*env)->ReleaseLongArrayElements(env, profileIDs, ids, 0);
 
-    if (sTrans.xf == NULL) {
+    if (sTrans == NULL) {
         J2dRlsTraceLn(J2D_TRACE_ERROR, "LCMS_createNativeTransform: "
-                                       "sTrans.xf == NULL");
+                                       "sTrans == NULL");
         if ((*env)->ExceptionOccurred(env) == NULL) {
             JNU_ThrowByName(env, "java/awt/color/CMMException",
                             "Cannot get color transform");
         }
     } else {
-        Disposer_AddRecord(env, disposerRef, LCMS_freeTransform, sTrans.j);
+        Disposer_AddRecord(env, disposerRef, LCMS_freeTransform, ptr_to_jlong(sTrans));
     }
 
     if (iccArray != &_iccArray[0]) {
         free(iccArray);
     }
-    return sTrans.j;
+    return ptr_to_jlong(sTrans);
 }
 
 
@@ -261,7 +256,7 @@
 {
     jbyte* dataArray;
     jint dataSize;
-    storeID_t sProf;
+    lcmsProfile_p sProf = NULL;
     cmsHPROFILE pf;
 
     if (JNU_IsNull(env, data)) {
@@ -269,16 +264,14 @@
         return 0L;
     }
 
-    sProf.j = 0L;
-
     dataArray = (*env)->GetByteArrayElements (env, data, 0);
-    dataSize = (*env)->GetArrayLength (env, data);
-
     if (dataArray == NULL) {
-        JNU_ThrowIllegalArgumentException(env, "Invalid profile data");
+        // An exception should have already been thrown.
         return 0L;
     }
 
+    dataSize = (*env)->GetArrayLength (env, data);
+
     pf = cmsOpenProfileFromMem((const void *)dataArray,
                                      (cmsUInt32Number) dataSize);
 
@@ -303,17 +296,17 @@
 
     if (pf != NULL) {
         // create profile holder
-        sProf.lcmsPf = (lcmsProfile_p)malloc(sizeof(lcmsProfile_t));
-        if (sProf.lcmsPf != NULL) {
+        sProf = (lcmsProfile_p)malloc(sizeof(lcmsProfile_t));
+        if (sProf != NULL) {
             // register the disposer record
-            sProf.lcmsPf->pf = pf;
-            Disposer_AddRecord(env, disposerRef, LCMS_freeProfile, sProf.j);
+            sProf->pf = pf;
+            Disposer_AddRecord(env, disposerRef, LCMS_freeProfile, ptr_to_jlong(sProf));
         } else {
             cmsCloseProfile(pf);
         }
     }
 
-    return sProf.j;
+    return ptr_to_jlong(sProf);
 }
 
 /*
@@ -324,11 +317,10 @@
 JNIEXPORT jint JNICALL Java_sun_java2d_cmm_lcms_LCMS_getProfileSizeNative
   (JNIEnv *env, jobject obj, jlong id)
 {
-    storeID_t sProf;
+    lcmsProfile_p sProf = (lcmsProfile_p)jlong_to_ptr(id);
     cmsUInt32Number pfSize = 0;
-    sProf.j = id;
 
-    if (cmsSaveProfileToMem(sProf.lcmsPf->pf, NULL, &pfSize) && ((jint)pfSize > 0)) {
+    if (cmsSaveProfileToMem(sProf->pf, NULL, &pfSize) && ((jint)pfSize > 0)) {
         return (jint)pfSize;
     } else {
       JNU_ThrowByName(env, "java/awt/color/CMMException",
@@ -345,16 +337,14 @@
 JNIEXPORT void JNICALL Java_sun_java2d_cmm_lcms_LCMS_getProfileDataNative
   (JNIEnv *env, jobject obj, jlong id, jbyteArray data)
 {
-    storeID_t sProf;
+    lcmsProfile_p sProf = (lcmsProfile_p)jlong_to_ptr(id);
     jint size;
     jbyte* dataArray;
     cmsUInt32Number pfSize = 0;
     cmsBool status;
 
-    sProf.j = id;
-
     // determine actual profile size
-    if (!cmsSaveProfileToMem(sProf.lcmsPf->pf, NULL, &pfSize)) {
+    if (!cmsSaveProfileToMem(sProf->pf, NULL, &pfSize)) {
         JNU_ThrowByName(env, "java/awt/color/CMMException",
                         "Can not access specified profile.");
         return;
@@ -369,8 +359,12 @@
     }
 
     dataArray = (*env)->GetByteArrayElements (env, data, 0);
+    if (dataArray == NULL) {
+        // An exception should have already been thrown.
+        return;
+    }
 
-    status = cmsSaveProfileToMem(sProf.lcmsPf->pf, dataArray, &pfSize);
+    status = cmsSaveProfileToMem(sProf->pf, dataArray, &pfSize);
 
     (*env)->ReleaseByteArrayElements (env, data, dataArray, 0);
 
@@ -395,7 +389,7 @@
 JNIEXPORT jbyteArray JNICALL Java_sun_java2d_cmm_lcms_LCMS_getTagNative
   (JNIEnv *env, jobject obj, jlong id, jint tagSig)
 {
-    storeID_t sProf;
+    lcmsProfile_p sProf = (lcmsProfile_p)jlong_to_ptr(id);
     TagSignature_t sig;
     cmsInt32Number tagSize;
 
@@ -404,7 +398,6 @@
 
     jint bufSize;
 
-    sProf.j = id;
     sig.j = tagSig;
 
     if (tagSig == SigHead) {
@@ -415,20 +408,18 @@
         data = (*env)->NewByteArray(env, bufSize);
 
         if (data == NULL) {
-            JNU_ThrowByName(env, "java/awt/color/CMMException",
-                            "Unable to allocate buffer");
+            // An exception should have already been thrown.
             return NULL;
         }
 
         dataArray = (*env)->GetByteArrayElements (env, data, 0);
 
         if (dataArray == NULL) {
-           JNU_ThrowByName(env, "java/awt/color/CMMException",
-                            "Unable to get buffer");
-           return NULL;
+            // An exception should have already been thrown.
+            return NULL;
         }
 
-        status = _getHeaderInfo(sProf.lcmsPf->pf, dataArray, bufSize);
+        status = _getHeaderInfo(sProf->pf, dataArray, bufSize);
 
         (*env)->ReleaseByteArrayElements (env, data, dataArray, 0);
 
@@ -441,8 +432,8 @@
         return data;
     }
 
-    if (cmsIsTag(sProf.lcmsPf->pf, sig.cms)) {
-        tagSize = cmsReadRawTag(sProf.lcmsPf->pf, sig.cms, NULL, 0);
+    if (cmsIsTag(sProf->pf, sig.cms)) {
+        tagSize = cmsReadRawTag(sProf->pf, sig.cms, NULL, 0);
     } else {
         JNU_ThrowByName(env, "java/awt/color/CMMException",
                         "ICC profile tag not found");
@@ -452,20 +443,18 @@
     // allocate java array
     data = (*env)->NewByteArray(env, tagSize);
     if (data == NULL) {
-        JNU_ThrowByName(env, "java/awt/color/CMMException",
-                        "Unable to allocate buffer");
+        // An exception should have already been thrown.
         return NULL;
     }
 
     dataArray = (*env)->GetByteArrayElements (env, data, 0);
 
     if (dataArray == NULL) {
-        JNU_ThrowByName(env, "java/awt/color/CMMException",
-                        "Unable to get buffer");
+        // An exception should have already been thrown.
         return NULL;
     }
 
-    bufSize = cmsReadRawTag(sProf.lcmsPf->pf, sig.cms, dataArray, tagSize);
+    bufSize = cmsReadRawTag(sProf->pf, sig.cms, dataArray, tagSize);
 
     (*env)->ReleaseByteArrayElements (env, data, dataArray, 0);
 
@@ -485,7 +474,7 @@
 JNIEXPORT void JNICALL Java_sun_java2d_cmm_lcms_LCMS_setTagDataNative
   (JNIEnv *env, jobject obj, jlong id, jint tagSig, jbyteArray data)
 {
-    storeID_t sProf;
+    lcmsProfile_p sProf = (lcmsProfile_p)jlong_to_ptr(id);
     cmsHPROFILE pfReplace = NULL;
 
     TagSignature_t sig;
@@ -493,7 +482,6 @@
     jbyte* dataArray;
     int tagSize;
 
-    sProf.j = id;
     sig.j = tagSig;
 
     if (JNU_IsNull(env, data)) {
@@ -506,19 +494,19 @@
     dataArray = (*env)->GetByteArrayElements(env, data, 0);
 
     if (dataArray == NULL) {
-        JNU_ThrowIllegalArgumentException(env, "Can not write tag data.");
+        // An exception should have already been thrown.
         return;
     }
 
     if (tagSig == SigHead) {
-        status  = _setHeaderInfo(sProf.lcmsPf->pf, dataArray, tagSize);
+        status  = _setHeaderInfo(sProf->pf, dataArray, tagSize);
     } else {
         /*
         * New strategy for generic tags: create a place holder,
         * dump all existing tags there, dump externally supplied
         * tag, and return the new profile to the java.
         */
-        pfReplace = _writeCookedTag(sProf.lcmsPf->pf, sig.cms, dataArray, tagSize);
+        pfReplace = _writeCookedTag(sProf->pf, sig.cms, dataArray, tagSize);
         status = (pfReplace != NULL);
     }
 
@@ -527,8 +515,8 @@
     if (!status) {
         JNU_ThrowIllegalArgumentException(env, "Can not write tag data.");
     } else if (pfReplace != NULL) {
-        cmsCloseProfile(sProf.lcmsPf->pf);
-        sProf.lcmsPf->pf = pfReplace;
+        cmsCloseProfile(sProf->pf);
+        sProf->pf = pfReplace;
     }
 }
 
@@ -582,7 +570,7 @@
 JNIEXPORT void JNICALL Java_sun_java2d_cmm_lcms_LCMS_colorConvert
   (JNIEnv *env, jclass obj, jobject trans, jobject src, jobject dst)
 {
-    storeID_t sTrans;
+    cmsHTRANSFORM sTrans = NULL;
     int srcDType, dstDType;
     int srcOffset, srcNextRowOffset, dstOffset, dstNextRowOffset;
     int width, height, i;
@@ -603,9 +591,9 @@
     srcAtOnce = (*env)->GetBooleanField(env, src, IL_imageAtOnce_fID);
     dstAtOnce = (*env)->GetBooleanField(env, dst, IL_imageAtOnce_fID);
 
-    sTrans.j = (*env)->GetLongField (env, trans, Trans_ID_fID);
+    sTrans = jlong_to_ptr((*env)->GetLongField (env, trans, Trans_ID_fID));
 
-    if (sTrans.xf == NULL) {
+    if (sTrans == NULL) {
         J2dRlsTraceLn(J2D_TRACE_ERROR, "LCMS_colorConvert: transform == NULL");
         JNU_ThrowByName(env, "java/awt/color/CMMException",
                         "Cannot get color transform");
@@ -617,8 +605,7 @@
 
     if (inputBuffer == NULL) {
         J2dRlsTraceLn(J2D_TRACE_ERROR, "");
-        JNU_ThrowByName(env, "java/awt/color/CMMException",
-                        "Cannot get input data");
+        // An exception should have already been thrown.
         return;
     }
 
@@ -626,8 +613,7 @@
 
     if (outputBuffer == NULL) {
         releaseILData(env, inputBuffer, srcDType, srcData);
-        JNU_ThrowByName(env, "java/awt/color/CMMException",
-                        "Cannot get output data");
+        // An exception should have already been thrown.
         return;
     }
 
@@ -635,10 +621,10 @@
     outputRow = (char*)outputBuffer + dstOffset;
 
     if (srcAtOnce && dstAtOnce) {
-        cmsDoTransform(sTrans.xf, inputRow, outputRow, width * height);
+        cmsDoTransform(sTrans, inputRow, outputRow, width * height);
     } else {
         for (i = 0; i < height; i++) {
-            cmsDoTransform(sTrans.xf, inputRow, outputRow, width);
+            cmsDoTransform(sTrans, inputRow, outputRow, width);
             inputRow += srcNextRowOffset;
             outputRow += dstNextRowOffset;
         }
@@ -656,14 +642,22 @@
 JNIEXPORT jobject JNICALL Java_sun_java2d_cmm_lcms_LCMS_getProfileID
   (JNIEnv *env, jclass cls, jobject pf)
 {
+    jclass clsLcmsProfile;
+    jobject cmmProfile;
     jfieldID fid = (*env)->GetFieldID (env,
         (*env)->GetObjectClass(env, pf),
         "cmmProfile", "Lsun/java2d/cmm/Profile;");
+    if (fid == NULL) {
+        return NULL;
+    }
 
-    jclass clsLcmsProfile = (*env)->FindClass(env,
+    clsLcmsProfile = (*env)->FindClass(env,
             "sun/java2d/cmm/lcms/LCMSProfile");
+    if (clsLcmsProfile == NULL) {
+        return NULL;
+    }
 
-    jobject cmmProfile = (*env)->GetObjectField (env, pf, fid);
+    cmmProfile = (*env)->GetObjectField (env, pf, fid);
 
     if (JNU_IsNull(env, cmmProfile)) {
         return NULL;
@@ -687,18 +681,51 @@
      * unloading
      */
     Trans_renderType_fID = (*env)->GetFieldID (env, Trans, "renderType", "I");
+    if (Trans_renderType_fID == NULL) {
+        return;
+    }
     Trans_ID_fID = (*env)->GetFieldID (env, Trans, "ID", "J");
+    if (Trans_ID_fID == NULL) {
+        return;
+    }
 
     IL_isIntPacked_fID = (*env)->GetFieldID (env, IL, "isIntPacked", "Z");
+    if (IL_isIntPacked_fID == NULL) {
+        return;
+    }
     IL_dataType_fID = (*env)->GetFieldID (env, IL, "dataType", "I");
+    if (IL_dataType_fID == NULL) {
+        return;
+    }
     IL_pixelType_fID = (*env)->GetFieldID (env, IL, "pixelType", "I");
+    if (IL_pixelType_fID == NULL) {
+        return;
+    }
     IL_dataArray_fID = (*env)->GetFieldID(env, IL, "dataArray",
                                           "Ljava/lang/Object;");
+    if (IL_dataArray_fID == NULL) {
+        return;
+    }
     IL_width_fID = (*env)->GetFieldID (env, IL, "width", "I");
+    if (IL_width_fID == NULL) {
+        return;
+    }
     IL_height_fID = (*env)->GetFieldID (env, IL, "height", "I");
+    if (IL_height_fID == NULL) {
+        return;
+    }
     IL_offset_fID = (*env)->GetFieldID (env, IL, "offset", "I");
+    if (IL_offset_fID == NULL) {
+        return;
+    }
     IL_imageAtOnce_fID = (*env)->GetFieldID (env, IL, "imageAtOnce", "Z");
+    if (IL_imageAtOnce_fID == NULL) {
+        return;
+    }
     IL_nextRowOffset_fID = (*env)->GetFieldID (env, IL, "nextRowOffset", "I");
+    if (IL_nextRowOffset_fID == NULL) {
+        return;
+    }
 }
 
 static cmsBool _getHeaderInfo(cmsHPROFILE pf, jbyte* pBuffer, jint bufferSize)
@@ -709,7 +736,7 @@
 
   if (!cmsSaveProfileToMem(pf, NULL, &pfSize) ||
       pfSize < sizeof(cmsICCHeader) ||
-      bufferSize < sizeof(cmsICCHeader))
+      bufferSize < (jint)sizeof(cmsICCHeader))
   {
     return FALSE;
   }
@@ -730,9 +757,9 @@
 
 static cmsBool _setHeaderInfo(cmsHPROFILE pf, jbyte* pBuffer, jint bufferSize)
 {
-  cmsICCHeader pfHeader = { 0 };
+  cmsICCHeader pfHeader;
 
-  if (pBuffer == NULL || bufferSize < sizeof(cmsICCHeader)) {
+  if (pBuffer == NULL || bufferSize < (jint)sizeof(cmsICCHeader)) {
     return FALSE;
   }
 
@@ -765,13 +792,14 @@
     cmsInt32Number i;
     cmsHPROFILE pfSanity = NULL;
 
-    cmsICCHeader hdr = { 0 };
+    cmsICCHeader hdr;
 
     cmsHPROFILE p = cmsCreateProfilePlaceholder(NULL);
 
     if (NULL == p) {
         return NULL;
     }
+    memset(&hdr, 0, sizeof(cmsICCHeader));
 
     // Populate the placeholder's header according to target profile
     hdr.flags = cmsGetHeaderFlags(pfTarget);
--- a/src/share/native/sun/java2d/cmm/lcms/cmsio0.c	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/native/sun/java2d/cmm/lcms/cmsio0.c	Mon Nov 11 23:17:30 2013 -0800
@@ -350,7 +350,7 @@
     return nReaded;
 }
 
-// Postion file pointer in the file
+// Position file pointer in the file
 static
 cmsBool  FileSeek(cmsIOHANDLER* iohandler, cmsUInt32Number offset)
 {
--- a/src/share/native/sun/java2d/cmm/lcms/cmslut.c	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/native/sun/java2d/cmm/lcms/cmslut.c	Mon Nov 11 23:17:30 2013 -0800
@@ -1266,7 +1266,7 @@
 static
 void BlessLUT(cmsPipeline* lut)
 {
-    // We can set the input/ouput channels only if we have elements.
+    // We can set the input/output channels only if we have elements.
     if (lut ->Elements != NULL) {
 
         cmsStage *First, *Last;
--- a/src/share/native/sun/java2d/loops/ProcessPath.c	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/native/sun/java2d/loops/ProcessPath.c	Mon Nov 11 23:17:30 2013 -0800
@@ -641,7 +641,7 @@
 
         /* Checking that we are not running out of the endpoint and bounding
          * violating coordinate.  The check is pretty simple because the curve
-         * passed to the DrawMonotonicQuad already splitted into the monotonic
+         * passed to the DrawMonotonicQuad already split into the monotonic
          * in X and Y pieces
          */
 
@@ -1129,7 +1129,7 @@
             /* Checking that we are not running out of the endpoint and
              * bounding violating coordinate.  The check is pretty simple
              * because the curve passed to the DrawMonotonicCubic already
-             * splitted into the monotonic in X and Y pieces
+             * split into the monotonic in X and Y pieces
              */
 
             /* Bounding x2 by xe */
--- a/src/share/native/sun/java2d/opengl/OGLBlitLoops.c	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/native/sun/java2d/opengl/OGLBlitLoops.c	Mon Nov 11 23:17:30 2013 -0800
@@ -661,7 +661,12 @@
                             (sy2-sy1) != (jint)(dy2-dy1) ||
                             oglc->extraAlpha != 1.0f;
                         break;
-
+#ifdef MACOSX
+                    case OGLC_VENDOR_ATI:
+                        // see 8024461
+                        viaTexture = JNI_TRUE;
+                        break;
+#endif
                     default:
                         // just use the glDrawPixels() codepath
                         viaTexture = JNI_FALSE;
--- a/src/share/native/sun/java2d/opengl/OGLTextRenderer.c	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/native/sun/java2d/opengl/OGLTextRenderer.c	Mon Nov 11 23:17:30 2013 -0800
@@ -772,7 +772,7 @@
             } else if (remainingWidth < ginfo->width) {
                 // in some cases, the x-advance may be slightly smaller
                 // than the actual width of the glyph; if so, adjust our
-                // estimate so that we can accomodate the entire glyph
+                // estimate so that we can accommodate the entire glyph
                 remainingWidth = ginfo->width;
             }
         } else {
--- a/src/share/native/sun/security/pkcs11/wrapper/p11_sessmgmt.c	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/native/sun/security/pkcs11/wrapper/p11_sessmgmt.c	Mon Nov 11 23:17:30 2013 -0800
@@ -539,7 +539,7 @@
 #ifndef NO_CALLBACKS
 
 /*
- * The function handling notify callbacks. It casts the pApplication paramter
+ * The function handling notify callbacks. It casts the pApplication parameter
  * back to a NotifyEncapsulation structure and retrieves the Notify object and
  * the application data from it.
  *
--- a/src/share/sample/jmx/jmx-scandir/index.html	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/sample/jmx/jmx-scandir/index.html	Mon Nov 11 23:17:30 2013 -0800
@@ -1579,7 +1579,7 @@
     <ul>
    <p>The <a 
 href="dist/javadoc/com/sun/jmx/examples/scandir/ScanDirClient.html" 
-title="The ScanDirClient class is a very short example of secure programatic client"
+title="The ScanDirClient class is a very short example of secure programmatic client"
      >ScanDirClient</a> is an example class that shows how a
     programmatic client can connect to a secured <i>scandir</i> application.
     This class contains a <code>main</code> method which creates and
@@ -2025,7 +2025,7 @@
         </p>
    <p>The <a 
 href="dist/javadoc/com/sun/jmx/examples/scandir/ScanDirClient.html" 
-title="The ScanDirClient class is a very short example of secure programatic client"
+title="The ScanDirClient class is a very short example of secure programmatic client"
      >ScanDirClient</a> is an example class that shows how a
     programmatic client can connect to a secured <i>scandir</i> application.
     This class contains a <code>main</code> method which creates and
--- a/src/share/sample/nio/chatserver/ClientReader.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/sample/nio/chatserver/ClientReader.java	Mon Nov 11 23:17:30 2013 -0800
@@ -58,7 +58,7 @@
     }
 
     /**
-     * Runs a cycle of doing a beforeRead action and then enqueing a new
+     * Runs a cycle of doing a beforeRead action and then inquiring a new
      * read on the client. Handles closed channels and errors while reading.
      * If the client is still connected a new round of actions are called.
      */
--- a/src/share/sample/scripting/scriptpad/src/resources/gui.js	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/share/sample/scripting/scriptpad/src/resources/gui.js	Mon Nov 11 23:17:30 2013 -0800
@@ -124,7 +124,7 @@
  *
  * @param title of the dialog box [optional]
  * @param color default color [optional]
- * @return choosen color or default color
+ * @return chosen color or default color
  */
 function colorDialog(title, color) {
     var result;
--- a/src/solaris/classes/java/net/DefaultInterface.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/solaris/classes/java/net/DefaultInterface.java	Mon Nov 11 23:17:30 2013 -0800
@@ -26,7 +26,7 @@
 package java.net;
 
 /**
- * Choose a network inteface to be the default for
+ * Choose a network interface to be the default for
  * outgoing IPv6 traffic that does not specify a scope_id (and which needs one).
  *
  * Platforms that do not require a default interface may return null
--- a/src/solaris/classes/sun/awt/X11/XBaseMenuWindow.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/solaris/classes/sun/awt/X11/XBaseMenuWindow.java	Mon Nov 11 23:17:30 2013 -0800
@@ -187,7 +187,7 @@
      ************************************************/
 
     /**
-     * Returns parent menu window (not the X-heirarchy parent window)
+     * Returns parent menu window (not the X-hierarchy parent window)
      */
     protected abstract XBaseMenuWindow getParentMenuWindow();
 
--- a/src/solaris/classes/sun/awt/X11/XButtonPeer.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/solaris/classes/sun/awt/X11/XButtonPeer.java	Mon Nov 11 23:17:30 2013 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 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
@@ -79,10 +79,17 @@
         return true;
     }
 
-    public void  setLabel(java.lang.String label) {
-        this.label = label;
-        repaint();
+    @Override
+    public void setLabel(String label) {
+        if (label == null) {
+            label = "";
+        }
+        if (!label.equals(this.label)) {
+            this.label = label;
+            repaint();
+        }
     }
+
     public void setBackground(Color c) {
         updateMotifColors(c);
         super.setBackground(c);
@@ -257,10 +264,6 @@
         drawMotif3DRect(g, x, y, w-1, h-1, pressed);
     }
 
-    public void setFont(Font f) {
-        super.setFont(f);
-        target.repaint();
-    }
     protected void paintFocus(Graphics g, int x, int y, int w, int h){
         g.setColor(focusColor);
         g.drawRect(x,y,w,h);
--- a/src/solaris/classes/sun/awt/X11/XCanvasPeer.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/solaris/classes/sun/awt/X11/XCanvasPeer.java	Mon Nov 11 23:17:30 2013 -0800
@@ -103,15 +103,4 @@
     protected boolean doEraseBackground() {
         return !eraseBackgroundDisabled;
     }
-    public void setBackground(Color c) {
-        boolean doRepaint = false;
-        if( getPeerBackground() == null ||
-           !getPeerBackground().equals( c ) ) {
-            doRepaint = true;
-        }
-        super.setBackground(c);
-        if( doRepaint ) {
-            target.repaint();
-        }
-    }
 }
--- a/src/solaris/classes/sun/awt/X11/XCheckboxPeer.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/solaris/classes/sun/awt/X11/XCheckboxPeer.java	Mon Nov 11 23:17:30 2013 -0800
@@ -31,6 +31,7 @@
 import java.awt.image.BufferedImage;
 import javax.swing.plaf.basic.BasicGraphicsUtils;
 import java.awt.geom.AffineTransform;
+import java.util.Objects;
 
 import sun.util.logging.PlatformLogger;
 
@@ -135,14 +136,16 @@
 
     public void keyReleased(KeyEvent e) {}
 
-    public void  setLabel(java.lang.String label) {
-        if ( label == null ) {
-            this.label = "";
-        } else {
+    @Override
+    public void setLabel(String label) {
+        if (label == null) {
+            label = "";
+        }
+        if (!label.equals(this.label)) {
             this.label = label;
+            layout();
+            repaint();
         }
-        layout();
-        repaint();
     }
 
     void handleJavaMouseEvent(MouseEvent e) {
@@ -377,10 +380,6 @@
             g.drawImage(buffer, x, y, null);
         }
     }
-    public void setFont(Font f) {
-        super.setFont(f);
-        target.repaint();
-    }
 
     public void paintRadioButton(Graphics g, int x, int y, int w, int h) {
 
@@ -424,16 +423,21 @@
         g.drawRect(x,y,w,h);
     }
 
+    @Override
     public void setState(boolean state) {
         if (selected != state) {
             selected = state;
             repaint();
         }
     }
-    public void setCheckboxGroup(CheckboxGroup g) {
-        // If changed from grouped/ungrouped, need to repaint()
-        checkBoxGroup = g;
-        repaint();
+
+    @Override
+    public void setCheckboxGroup(final CheckboxGroup g) {
+        if (!Objects.equals(g, checkBoxGroup)) {
+            // If changed from grouped/ungrouped, need to repaint()
+            checkBoxGroup = g;
+            repaint();
+        }
     }
 
     // NOTE: This method is called by privileged threads.
--- a/src/solaris/classes/sun/awt/X11/XChoicePeer.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/solaris/classes/sun/awt/X11/XChoicePeer.java	Mon Nov 11 23:17:30 2013 -0800
@@ -87,7 +87,7 @@
     private boolean firstPress = false;      // mouse was pressed on
                                              // furled Choice so we
                                              // not need to furl the
-                                             // Choice when MOUSE_RELEASED occured
+                                             // Choice when MOUSE_RELEASED occurred
 
     // 6425067. Mouse was pressed on furled choice and dropdown list appeared over Choice itself
     // and then there were no mouse movements until MOUSE_RELEASE.
@@ -814,12 +814,12 @@
                 x = screen.width - width;
             }
 
+            if (y + height > screen.height) {
+                y = global.y - height;
+            }
             if (y < 0) {
                 y = 0;
             }
-            else if (y + height > screen.height) {
-                y = screen.height - height;
-            }
             return new Rectangle(x, y, width, height);
         }
 
--- a/src/solaris/classes/sun/awt/X11/XComponentPeer.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/solaris/classes/sun/awt/X11/XComponentPeer.java	Mon Nov 11 23:17:30 2013 -0800
@@ -61,6 +61,7 @@
 import java.lang.reflect.*;
 import java.security.*;
 import java.util.Collection;
+import java.util.Objects;
 import java.util.Set;
 import sun.util.logging.PlatformLogger;
 import sun.awt.*;
@@ -635,22 +636,30 @@
         g.drawLine(x+width, y+height, x+width, y+1);  // right
     }
 
+    @Override
     public void setBackground(Color c) {
         if (log.isLoggable(PlatformLogger.Level.FINE)) {
             log.fine("Set background to " + c);
         }
         synchronized (getStateLock()) {
+            if (Objects.equals(background, c)) {
+                return;
+            }
             background = c;
         }
         super.setBackground(c);
         repaint();
     }
 
+    @Override
     public void setForeground(Color c) {
         if (log.isLoggable(PlatformLogger.Level.FINE)) {
             log.fine("Set foreground to " + c);
         }
         synchronized (getStateLock()) {
+            if (Objects.equals(foreground, c)) {
+                return;
+            }
             foreground = c;
         }
         repaint();
@@ -674,18 +683,21 @@
         return sun.font.FontDesignMetrics.getMetrics(font);
     }
 
+    @Override
     public void setFont(Font f) {
+        if (f == null) {
+            f = XWindow.getDefaultFont();
+        }
         synchronized (getStateLock()) {
-            if (f == null) {
-                f = XWindow.getDefaultFont();
+            if (f.equals(font)) {
+                return;
             }
             font = f;
         }
-        // as it stands currently we dont need to do layout or repaint since
+        // as it stands currently we don't need to do layout since
         // layout is done in the Component upon setFont.
         //layout();
-        // target.repaint();
-        //repaint()?
+        repaint();
     }
 
     public Font getFont() {
--- a/src/solaris/classes/sun/awt/X11/XContentWindow.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/solaris/classes/sun/awt/X11/XContentWindow.java	Mon Nov 11 23:17:30 2013 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 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
@@ -142,7 +142,7 @@
     }
 
 
-    public void handleExposeEvent(Component target, int x, int y, int w, int h) {
+    public void postPaintEvent(Component target, int x, int y, int w, int h) {
         // TODO: ?
         // get rid of 'istanceof' by subclassing:
         // XContentWindow -> XFrameContentWindow
@@ -160,13 +160,13 @@
             iconifiedExposeEvents.add(new SavedExposeEvent(target, x, y, w, h));
         } else {
             // Normal case: [it is not a frame or] the frame is not iconified.
-            super.handleExposeEvent(target, x, y, w, h);
+            super.postPaintEvent(target, x, y, w, h);
         }
     }
 
     void purgeIconifiedExposeEvents() {
         for (SavedExposeEvent evt : iconifiedExposeEvents) {
-            super.handleExposeEvent(evt.target, evt.x, evt.y, evt.w, evt.h);
+            super.postPaintEvent(evt.target, evt.x, evt.y, evt.w, evt.h);
         }
         iconifiedExposeEvents.clear();
     }
--- a/src/solaris/classes/sun/awt/X11/XDragSourceProtocol.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/solaris/classes/sun/awt/X11/XDragSourceProtocol.java	Mon Nov 11 23:17:30 2013 -0800
@@ -70,7 +70,7 @@
     public abstract String getProtocolName();
 
     /**
-     * Initalizes a drag operation with the specified supported drop actions,
+     * Initializes a drag operation with the specified supported drop actions,
      * contents and data formats.
      *
      * @param actions a bitwise mask of <code>DnDConstants</code> that represent
--- a/src/solaris/classes/sun/awt/X11/XDropTargetRegistry.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/solaris/classes/sun/awt/X11/XDropTargetRegistry.java	Mon Nov 11 23:17:30 2013 -0800
@@ -61,7 +61,7 @@
 
     /**
      * Returns the XID of the topmost window with WM_STATE set in the ancestor
-     * heirarchy of the specified window or 0 if none found.
+     * hierarchy of the specified window or 0 if none found.
      */
     private long getToplevelWindow(long window) {
         XBaseWindow candWindow = XToolkit.windowToXWindow(window);
--- a/src/solaris/classes/sun/awt/X11/XLabelPeer.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/solaris/classes/sun/awt/X11/XLabelPeer.java	Mon Nov 11 23:17:30 2013 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 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
@@ -132,20 +132,22 @@
         }
     }
 
-    public void setText(String text) {
-        label = text;
+    @Override
+    public void setText(String label) {
         if (label == null) {
             label = "";
         }
-        repaint();
-    }
-    public void setFont(Font f) {
-        super.setFont(f);
-        repaint();
+        if (!label.equals(this.label)) {
+            this.label = label;
+            repaint();
+        }
     }
 
-    public void setAlignment(int align) {
-        alignment = align;
-        repaint();
+    @Override
+    public void setAlignment(final int alignment) {
+        if (this.alignment != alignment) {
+            this.alignment = alignment;
+            repaint();
+        }
     }
 }
--- a/src/solaris/classes/sun/awt/X11/XListPeer.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/solaris/classes/sun/awt/X11/XListPeer.java	Mon Nov 11 23:17:30 2013 -0800
@@ -31,8 +31,8 @@
 import java.awt.*;
 import java.awt.event.*;
 import java.awt.peer.*;
+import java.util.Objects;
 import java.util.Vector;
-import java.awt.geom.*;
 import java.awt.image.*;
 import sun.util.logging.PlatformLogger;
 
@@ -409,7 +409,7 @@
         if (g != null) {
             try {
                 painter.paint(g, firstItem, lastItem, options, source, distance);
-                target.paint(g);
+                postPaintEvent(target, 0, 0, getWidth(), getHeight());
             } finally {
                 g.dispose();
             }
@@ -1682,11 +1682,13 @@
      * The bug is due to incorrent caching of the list item size
      * So we should recalculate font metrics on setFont
      */
-    public void setFont(Font f){
-        super.setFont(f);
-        initFontMetrics();
-        layout();
-        repaint();
+    public void setFont(Font f) {
+        if (!Objects.equals(getFont(), f)) {
+            super.setFont(f);
+            initFontMetrics();
+            layout();
+            repaint();
+        }
     }
 
     /**
--- a/src/solaris/classes/sun/awt/X11/XMenuItemPeer.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/solaris/classes/sun/awt/X11/XMenuItemPeer.java	Mon Nov 11 23:17:30 2013 -0800
@@ -60,7 +60,7 @@
      */
 
     /**
-     * Rectange occupied by menu item in container's
+     * Rectangle occupied by menu item in container's
      * coordinates. Filled by map(...) function from
      * XBaseMenuWindow.map()
      */
--- a/src/solaris/classes/sun/awt/X11/XScrollbar.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/solaris/classes/sun/awt/X11/XScrollbar.java	Mon Nov 11 23:17:30 2013 -0800
@@ -564,7 +564,7 @@
      * This method enforces the same constraints as in java.awt.Scrollbar:
      * <UL>
      * <LI> The maximum must be greater than the minimum </LI>
-     * <LI> The value must be greater than or equal to the minumum
+     * <LI> The value must be greater than or equal to the minimum
      *      and less than or equal to the maximum minus the
      *      visible amount </LI>
      * <LI> The visible amount must be greater than 1 and less than or equal
@@ -855,7 +855,7 @@
         }
 
         // There was one final adjustment here in the Motif function, which was
-        // noted to be for backward-compatiblity.  It has been left out for now.
+        // noted to be for backward-compatibility.  It has been left out for now.
 
         return retVal;
     }
--- a/src/solaris/classes/sun/awt/X11/XToolkit.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/solaris/classes/sun/awt/X11/XToolkit.java	Mon Nov 11 23:17:30 2013 -0800
@@ -560,7 +560,7 @@
             awtLock();
             try {
                 if (loop == SECONDARY_LOOP) {
-                    // In the secondary loop we may have already aquired awt_lock
+                    // In the secondary loop we may have already acquired awt_lock
                     // several times, so waitForEvents() might be unable to release
                     // the awt_lock and this causes lock up.
                     // For now, we just avoid waitForEvents in the secondary loop.
--- a/src/solaris/classes/sun/awt/X11/XWindow.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/solaris/classes/sun/awt/X11/XWindow.java	Mon Nov 11 23:17:30 2013 -0800
@@ -32,7 +32,6 @@
 
 import java.lang.ref.WeakReference;
 
-import java.lang.reflect.Field;
 import java.lang.reflect.Method;
 
 import sun.util.logging.PlatformLogger;
@@ -251,7 +250,7 @@
         if (target != null && (c = target.getBackground()) != null) {
             // We need a version of setBackground that does not call repaint !!
             // and one that does not get overridden. The problem is that in postInit
-            // we call setBackground and we dont have all the stuff initialized to
+            // we call setBackground and we don't have all the stuff initialized to
             // do a full paint for most peers. So we cannot call setBackground in postInit.
             // instead we need to call xSetBackground.
             xSetBackground(c);
@@ -437,7 +436,7 @@
 
     // We need a version of setBackground that does not call repaint !!
     // and one that does not get overridden. The problem is that in postInit
-    // we call setBackground and we dont have all the stuff initialized to
+    // we call setBackground and we don't have all the stuff initialized to
     // do a full paint for most peers. So we cannot call setBackground in postInit.
     final public void xSetBackground(Color c) {
         XToolkit.awtLock();
@@ -491,33 +490,31 @@
     public boolean isEmbedded() {
         return embedded;
     }
-    public  void repaint(int x,int y, int width, int height) {
+
+    public final void repaint(int x, int y, int width, int height) {
         if (!isVisible() || getWidth() == 0 || getHeight() == 0) {
             return;
         }
         Graphics g = getGraphics();
         if (g != null) {
             try {
-                g.setClip(x,y,width,height);
-                paint(g);
+                g.setClip(x, y, width, height);
+                if (SunToolkit.isDispatchThreadForAppContext(getTarget())) {
+                    paint(g); // The native and target will be painted in place.
+                } else {
+                    paintPeer(g);
+                    postPaintEvent(target, x, y, width, height);
+                }
             } finally {
                 g.dispose();
             }
         }
     }
+
     void repaint() {
-        if (!isVisible() || getWidth() == 0 || getHeight() == 0) {
-            return;
-        }
-        final Graphics g = getGraphics();
-        if (g != null) {
-            try {
-                paint(g);
-            } finally {
-                g.dispose();
-            }
-        }
+        repaint(0, 0, getWidth(), getHeight());
     }
+
     public void paint(final Graphics g) {
         // paint peer
         paintPeer(g);
@@ -558,11 +555,11 @@
             && compAccessor.getWidth(target) != 0
             && compAccessor.getHeight(target) != 0)
         {
-            handleExposeEvent(target, x, y, w, h);
+            postPaintEvent(target, x, y, w, h);
         }
     }
 
-    public void handleExposeEvent(Component target, int x, int y, int w, int h) {
+    public void postPaintEvent(Component target, int x, int y, int w, int h) {
         PaintEvent event = PaintEventDispatcher.getPaintEventDispatcher().
             createPaintEvent(target, x, y, w, h);
         if (event != null) {
--- a/src/solaris/classes/sun/awt/X11GraphicsConfig.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/solaris/classes/sun/awt/X11GraphicsConfig.java	Mon Nov 11 23:17:30 2013 -0800
@@ -95,7 +95,7 @@
     }
 
     /*
-     * Note this method is currently here for backward compatability
+     * Note this method is currently here for backward compatibility
      * as this was the method used in jdk 1.2 beta4 to create the
      * X11GraphicsConfig objects. Java3D code had called this method
      * explicitly so without this, if a user tries to use JDK1.2 fcs
--- a/src/solaris/classes/sun/font/FontConfigManager.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/solaris/classes/sun/font/FontConfigManager.java	Mon Nov 11 23:17:30 2013 -0800
@@ -108,10 +108,6 @@
     public FontConfigManager() {
     }
 
-    public static String[] getFontConfigNames() {
-        return fontConfigNames;
-    }
-
     /* Called from code that needs to know what are the AA settings
      * that apps using FC would pick up for the default desktop font.
      * Note apps can change the default desktop font. etc, so this
@@ -182,7 +178,6 @@
             t0 = System.nanoTime();
         }
 
-        String[] fontConfigNames = FontConfigManager.getFontConfigNames();
         FcCompFont[] fontArr = new FcCompFont[fontConfigNames.length];
 
         for (int i = 0; i< fontArr.length; i++) {
--- a/src/solaris/classes/sun/font/XMap.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/solaris/classes/sun/font/XMap.java	Mon Nov 11 23:17:30 2013 -0800
@@ -204,7 +204,7 @@
             try {
                 int cbLen = 0;
                 int bbLen = 0;
-                // Since we dont support surrogates in any X11 encoding, skip
+                // Since we don't support surrogates in any X11 encoding, skip
                 // the surrogate area, otherwise the sequence of "Oxdbff0xdc00"
                 // will accidently cause the surrogate-aware nio charset to treat
                 // them as a legal pair and then undesirablly skip 2 "chars"
--- a/src/solaris/classes/sun/java2d/jules/JulesAATileGenerator.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/solaris/classes/sun/java2d/jules/JulesAATileGenerator.java	Mon Nov 11 23:17:30 2013 -0800
@@ -212,9 +212,9 @@
 
     /*
      * Optimization for large fills. Foutunatly cairo does generate an y-sorted
-     * list of trapezoids. This makes it quite simple to check wether a tile is
-     * fully covered by traps by: - Checking wether the tile is fully covered by
-     * traps vertically (trap 2 starts where trap 1 ended) - Checking wether all
+     * list of trapezoids. This makes it quite simple to check whether a tile is
+     * fully covered by traps by: - Checking whether the tile is fully covered by
+     * traps vertically (trap 2 starts where trap 1 ended) - Checking whether all
      * traps cover the tile horizontally This also works, when a single tile
      * coveres the whole tile.
      */
@@ -231,7 +231,7 @@
         int tileEndX = tileStartX + TILE_SIZE_FP;
         int tileEndY = tileStartY + TILE_SIZE_FP;
 
-        // Check wether first tile covers the beginning of the tile vertically
+        // Check whether first tile covers the beginning of the tile vertically
         int firstTop = traps.getTop(trapList.getInt(0));
         int firstBottom = traps.getBottom(trapList.getInt(0));
         if (firstTop > tileStartY || firstBottom < tileStartY) {
--- a/src/solaris/classes/sun/java2d/xr/MaskTileManager.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/solaris/classes/sun/java2d/xr/MaskTileManager.java	Mon Nov 11 23:17:30 2013 -0800
@@ -76,8 +76,9 @@
     public void fillMask(XRSurfaceData dst) {
 
         boolean maskRequired = xrMgr.maskRequired();
+        boolean maskEvaluated = XRUtils.isMaskEvaluated(xrMgr.compRule);
 
-        if (maskRequired) {
+        if (maskRequired && maskEvaluated) {
             mainTile.calculateDirtyAreas();
             DirtyRegion dirtyArea = mainTile.getDirtyArea().cloneRegion();
             mainTile.translate(-dirtyArea.x, -dirtyArea.y);
@@ -106,7 +107,15 @@
                 }
             }
         } else {
-            xrMgr.XRRenderRectangles(dst, mainTile.getRects());
+            /*
+             * If a mask would be required to store geometry (maskRequired)
+             * composition has to be done rectangle-by-rectagle.
+             */
+            if(xrMgr.isSolidPaintActive()) {
+                xrMgr.XRRenderRectangles(dst, mainTile.getRects());
+            } else {
+                xrMgr.XRCompositeRectangles(dst, mainTile.getRects());
+            }
         }
 
         mainTile.reset();
--- a/src/solaris/classes/sun/java2d/xr/XRBackend.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/solaris/classes/sun/java2d/xr/XRBackend.java	Mon Nov 11 23:17:30 2013 -0800
@@ -100,14 +100,13 @@
                                      int xSrc, int ySrc, int xDst, int yDst,
                                      int glyphset, GrowableEltArray elts);
 
-    public int createRadialGradient(Point2D inner, Point2D outer,
+    public int createRadialGradient(float centerX, float centerY,
                                     float innerRadius, float outerRadius,
                                     float[] fractions, int[] pixels,
-                                    int repeat, AffineTransform transform);
+                                    int repeat);
 
     public int createLinearGradient(Point2D p1, Point2D p2, float[] fractions,
-                                    int[] pixels, int repeat,
-                                     AffineTransform transform);
+                                    int[] pixels, int repeat);
 
     public void setGCMode(long gc, boolean copy);
 
--- a/src/solaris/classes/sun/java2d/xr/XRBackendNative.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/solaris/classes/sun/java2d/xr/XRBackendNative.java	Mon Nov 11 23:17:30 2013 -0800
@@ -105,17 +105,14 @@
         XRCreateLinearGradientPaintNative(float[] fractionsArray,
                                           short[] pixelsArray,
                                           int x1, int y1, int x2, int y2,
-                                          int numStops, int repeat,
-                                          int m00, int m01, int m02,
-                                           int m10, int m11, int m12);
+                                          int numStops, int repeat);
 
     private native static int
         XRCreateRadialGradientPaintNative(float[] fractionsArray,
                                           short[] pixelsArray, int numStops,
+                                          int centerX, int centerY,
                                           int innerRadius, int outerRadius,
-                                          int repeat,
-                                          int m00, int m01, int m02,
-                                          int m10, int m11, int m12);
+                                          int repeat);
 
     public native void setFilter(int picture, int filter);
 
@@ -175,40 +172,29 @@
     }
 
     public int createLinearGradient(Point2D p1, Point2D p2, float[] fractions,
-                              int[] pixels,  int repeat, AffineTransform trx) {
+                              int[] pixels,  int repeat) {
 
         short[] colorValues = getRenderColors(pixels);
         int gradient =
            XRCreateLinearGradientPaintNative(fractions, colorValues,
                 XDoubleToFixed(p1.getX()), XDoubleToFixed(p1.getY()),
                 XDoubleToFixed(p2.getX()), XDoubleToFixed(p2.getY()),
-                fractions.length, repeat,
-                XDoubleToFixed(trx.getScaleX()),
-                XDoubleToFixed(trx.getShearX()),
-                XDoubleToFixed(trx.getTranslateX()),
-                XDoubleToFixed(trx.getShearY()),
-                XDoubleToFixed(trx.getScaleY()),
-                XDoubleToFixed(trx.getTranslateY()));
+                fractions.length, repeat);
         return gradient;
     }
 
-    public int createRadialGradient(Point2D inner, Point2D outer,
+    public int createRadialGradient(float centerX, float centerY,
                                    float innerRadius, float outerRadius,
-                                   float[] fractions, int[] pixels, int repeat,
-                                   AffineTransform trx) {
+                                   float[] fractions, int[] pixels, int repeat) {
 
         short[] colorValues = getRenderColors(pixels);
         return XRCreateRadialGradientPaintNative
              (fractions, colorValues, fractions.length,
+              XDoubleToFixed(centerX),
+              XDoubleToFixed(centerY),
               XDoubleToFixed(innerRadius),
               XDoubleToFixed(outerRadius),
-              repeat,
-              XDoubleToFixed(trx.getScaleX()),
-              XDoubleToFixed(trx.getShearX()),
-              XDoubleToFixed(trx.getTranslateX()),
-              XDoubleToFixed(trx.getShearY()),
-              XDoubleToFixed(trx.getScaleY()),
-              XDoubleToFixed(trx.getTranslateY()));
+              repeat);
     }
 
     public void setGCClipRectangles(long gc, Region clip) {
--- a/src/solaris/classes/sun/java2d/xr/XRColor.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/solaris/classes/sun/java2d/xr/XRColor.java	Mon Nov 11 23:17:30 2013 -0800
@@ -54,6 +54,7 @@
     }
 
     public XRColor(Color color) {
+        setColorValues(color);
     }
 
     public void setColorValues(Color color) {
--- a/src/solaris/classes/sun/java2d/xr/XRCompositeManager.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/solaris/classes/sun/java2d/xr/XRCompositeManager.java	Mon Nov 11 23:17:30 2013 -0800
@@ -48,7 +48,12 @@
     private static boolean enableGradCache = true;
     private static XRCompositeManager instance;
 
-    XRSurfaceData src;
+    private final static int SOLID = 0;
+    private final static int TEXTURE = 1;
+    private final static int GRADIENT = 2;
+
+    int srcType;
+    XRSolidSrcPict solidSrc32;
     XRSurfaceData texture;
     XRSurfaceData gradient;
     int alphaMask = XRUtils.None;
@@ -84,7 +89,6 @@
 
     private XRCompositeManager(XRSurfaceData surface) {
         con = new XRBackendNative();
-        // con = XRBackendJava.getInstance();
 
         String gradProp =
             AccessController.doPrivileged(new PrivilegedAction<String>() {
@@ -109,14 +113,7 @@
     public void initResources(XRSurfaceData surface) {
         int parentXid = surface.getXid();
 
-        int solidPixmap = con.createPixmap(parentXid, 32, 1, 1);
-        int solidSrcPictXID = con.createPicture(solidPixmap,
-                XRUtils.PictStandardARGB32);
-        con.setPictureRepeat(solidSrcPictXID, XRUtils.RepeatNormal);
-        con.renderRectangle(solidSrcPictXID, XRUtils.PictOpSrc,
-                XRColor.FULL_ALPHA, 0, 0, 1, 1);
-        solidSrcPict = new XRSurfaceData.XRInternalSurfaceData(con,
-                solidSrcPictXID, null);
+        solidSrc32 = new XRSolidSrcPict(con, parentXid);
         setForeground(0);
 
         int extraAlphaMask = con.createPixmap(parentXid, 8, 1, 1);
@@ -135,9 +132,7 @@
     }
 
     public void setForeground(int pixel) {
-        solidColor.setColorValues(pixel, false);
-        con.renderRectangle(solidSrcPict.picture, XRUtils.PictOpSrc,
-                solidColor, 0, 0, 1, 1);
+        solidColor.setColorValues(pixel, true);
     }
 
     public void setGradientPaint(XRSurfaceData gradient) {
@@ -145,16 +140,16 @@
             con.freePicture(this.gradient.picture);
         }
         this.gradient = gradient;
-        src = gradient;
+        srcType = GRADIENT;
     }
 
     public void setTexturePaint(XRSurfaceData texture) {
         this.texture = texture;
-        src = texture;
+        this.srcType = TEXTURE;
     }
 
     public void XRResetPaint() {
-        src = solidSrcPict;
+        srcType = SOLID;
     }
 
     public void validateCompositeState(Composite comp, AffineTransform xform,
@@ -175,7 +170,7 @@
             validatedComp = comp;
         }
 
-        if (sg2d != null && validatedPixel != sg2d.pixel) {
+        if (sg2d != null && (validatedPixel != sg2d.pixel  || updatePaint)) {
             validatedPixel = sg2d.pixel;
             setForeground(validatedPixel);
         }
@@ -191,14 +186,14 @@
             validatedPaint = paint;
         }
 
-        if (src != solidSrcPict) {
+        if (srcType != SOLID) {
             AffineTransform at = (AffineTransform) xform.clone();
             try {
                 at.invert();
             } catch (NoninvertibleTransformException e) {
                 at.setToIdentity();
             }
-            src.validateAsSource(at, -1, -1);
+            getCurrentSource().validateAsSource(at, -1, XRUtils.ATransOpToXRQuality(sg2d.interpolationType));
         }
     }
 
@@ -234,13 +229,13 @@
 
     public boolean maskRequired() {
         return (!xorEnabled)
-                && ((src != solidSrcPict)
-                        || (src == solidSrcPict && solidColor.alpha != 0xffff) || (extraAlpha != 1.0f));
+                && ((srcType != SOLID)
+                        || (srcType == SOLID && (solidColor.alpha != 0xffff) || (extraAlpha != 1.0f)));
     }
 
     public void XRComposite(int src, int mask, int dst, int srcX, int srcY,
             int maskX, int maskY, int dstX, int dstY, int width, int height) {
-        int cachedSrc = (src == XRUtils.None) ? this.src.picture : src;
+        int cachedSrc = (src == XRUtils.None) ? getCurrentSource().picture : src;
         int cachedX = srcX;
         int cachedY = srcY;
 
@@ -276,7 +271,7 @@
         renderReferenceY = (int) Math.floor(XRUtils
                 .XFixedToDouble(renderReferenceY));
 
-        con.renderCompositeTrapezoids(compRule, src.picture,
+        con.renderCompositeTrapezoids(compRule, getCurrentSource().picture,
                 XRUtils.PictStandardA8, dst, renderReferenceX,
                 renderReferenceY, trapList);
     }
@@ -294,15 +289,46 @@
         }
     }
 
+    public void XRCompositeRectangles(XRSurfaceData dst, GrowableRectArray rects) {
+        int srcPict = getCurrentSource().picture;
+
+        for(int i=0; i < rects.getSize(); i++) {
+            int x = rects.getX(i);
+            int y = rects.getY(i);
+            int width = rects.getWidth(i);
+            int height = rects.getHeight(i);
+
+            con.renderComposite(compRule, srcPict, XRUtils.None, dst.picture, x, y, 0, 0, x, y, width, height);
+        }
+    }
+
+    protected XRSurfaceData getCurrentSource() {
+        switch(srcType) {
+        case SOLID:
+            return solidSrc32.prepareSrcPict(validatedPixel);
+        case TEXTURE:
+            return texture;
+        case GRADIENT:
+            return gradient;
+        }
+
+        return null;
+    }
+
     public void compositeBlit(XRSurfaceData src, XRSurfaceData dst, int sx,
             int sy, int dx, int dy, int w, int h) {
         con.renderComposite(compRule, src.picture, alphaMask, dst.picture, sx,
                 sy, 0, 0, dx, dy, w, h);
     }
 
-    public void compositeText(XRSurfaceData dst, int sx, int sy,
-            int glyphSet, int maskFormat, GrowableEltArray elts) {
-        con.XRenderCompositeText(compRule, src.picture, dst.picture,
+    public void compositeText(XRSurfaceData dst, int sx, int sy, int glyphSet,
+            int maskFormat, GrowableEltArray elts) {
+        /*
+         * Try to emulate the SRC blend mode with SRC_OVER.
+         * We bail out during pipe validation for cases where this is not possible.
+         */
+        byte textCompRule = (compRule != XRUtils.PictOpSrc) ? compRule : XRUtils.PictOpOver;
+        con.XRenderCompositeText(textCompRule, getCurrentSource().picture, dst.picture,
                 maskFormat, sx, sy, 0, 0, glyphSet, elts);
     }
 
@@ -315,7 +341,11 @@
     }
 
     public boolean isTexturePaintActive() {
-        return src == texture;
+        return srcType == TEXTURE;
+    }
+
+    public boolean isSolidPaintActive() {
+        return srcType == SOLID;
     }
 
     public XRColor getAlphaColor() {
--- a/src/solaris/classes/sun/java2d/xr/XRDrawImage.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/solaris/classes/sun/java2d/xr/XRDrawImage.java	Mon Nov 11 23:17:30 2013 -0800
@@ -38,6 +38,7 @@
  */
 
 public class XRDrawImage extends DrawImage {
+
     @Override
     protected void renderImageXform(SunGraphics2D sg, Image img,
             AffineTransform tx, int interpType, int sx1, int sy1, int sx2,
@@ -45,20 +46,24 @@
         SurfaceData dstData = sg.surfaceData;
         SurfaceData srcData = dstData.getSourceSurfaceData(img,
                 SunGraphics2D.TRANSFORM_GENERIC, sg.imageComp, bgColor);
+        int compRule = ((AlphaComposite) sg.composite).getRule();
+        float extraAlpha = ((AlphaComposite) sg.composite).getAlpha();
 
         if (srcData != null && !isBgOperation(srcData, bgColor)
-                && interpType <= AffineTransformOp.TYPE_BILINEAR) {
+                && interpType <= AffineTransformOp.TYPE_BILINEAR
+                && (XRUtils.isMaskEvaluated(XRUtils.j2dAlphaCompToXR(compRule))
+                        || (XRUtils.isTransformQuadrantRotated(tx)) && extraAlpha == 1.0f))
+                         {
             SurfaceType srcType = srcData.getSurfaceType();
             SurfaceType dstType = dstData.getSurfaceType();
 
             TransformBlit blit = TransformBlit.getFromCache(srcType,
                     sg.imageComp, dstType);
-
             if (blit != null) {
                 blit.Transform(srcData, dstData, sg.composite,
                         sg.getCompClip(), tx, interpType, sx1, sy1, 0, 0, sx2
                                 - sx1, sy2 - sy1);
-                return;
+                    return;
             }
         }
 
--- a/src/solaris/classes/sun/java2d/xr/XRMaskBlit.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/solaris/classes/sun/java2d/xr/XRMaskBlit.java	Mon Nov 11 23:17:30 2013 -0800
@@ -84,7 +84,7 @@
 
             int maskPict = maskBuffer.getMaskBuffer().
                          uploadMask(width, height, maskscan, maskoff, mask);
-            maskBuffer.XRComposite(x11sd.getPicture(), maskPict, x11sd.picture,
+            maskBuffer.XRComposite(x11sd.getPicture(), maskPict, x11dst.getPicture(),
                                   srcx, srcy, 0, 0, dstx, dsty, width, height);
             maskBuffer.getMaskBuffer().clearUploadMask(maskPict, width, height);
         } finally {
--- a/src/solaris/classes/sun/java2d/xr/XRPMBlitLoops.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/solaris/classes/sun/java2d/xr/XRPMBlitLoops.java	Mon Nov 11 23:17:30 2013 -0800
@@ -178,9 +178,6 @@
         super(srcType, CompositeType.AnyAlpha, dstType);
     }
 
-    /*
-     * TODO: This breaks scales with non-integer coordinates!?!?!
-     */
     public void Scale(SurfaceData src, SurfaceData dst, Composite comp, Region clip, int sx1, int sy1, int sx2, int sy2, double dx1, double dy1,
             double dx2, double dy2) {
         try {
@@ -199,19 +196,14 @@
             sy1 *= yScale;
             sy2 *= yScale;
 
+            dx1 = Math.ceil(dx1 - 0.5);
+            dy1 = Math.ceil(dy1 - 0.5);
+            dx2 = Math.ceil(dx2 - 0.5);
+            dy2 = Math.ceil(dy2 - 0.5);
+
             AffineTransform xForm = AffineTransform.getScaleInstance(1 / xScale, 1 / yScale);
 
-            x11sdSrc.validateAsSource(xForm, XRUtils.RepeatNone, XRUtils.FAST); /*
-                                                                                 * TODO:
-                                                                                 * padded
-                                                                                 * blit
-                                                                                 * required
-                                                                                 * :
-                                                                                 * -
-                                                                                 * /
-                                                                                 * ?
-                                                                                 * ?
-                                                                                 */
+            x11sdSrc.validateAsSource(xForm, XRUtils.RepeatNone, XRUtils.FAST);
             x11sdDst.maskBuffer.compositeBlit(x11sdSrc, x11sdDst, (int) sx1, (int) sy1, (int) dx1, (int) dy1, (int) (dx2 - dx1), (int) (dy2 - dy1));
         } finally {
             SunToolkit.awtUnlock();
@@ -234,43 +226,55 @@
     }
 
     /*
-     * Calculates the composite-rectangle required for transformed blits. This
-     * method is functionally equal to: Shape shp =
-     * xform.createTransformedShape(rect); Rectangle bounds = shp.getBounds();
-     * but performs significantly better.
-     * Returns true if the destination shape is parallel to x/y axis
+     * Calculates the composition-rectangle required for transformed blits.
+     * For composite operations where the composition-rectangle defines
+     * the modified destination area, coordinates are rounded.
+     * Otherwise the composition window rectangle is sized large enough
+     * to not clip away any pixels.
      */
-    protected boolean adjustCompositeBounds(AffineTransform tr, int dstx, int dsty, int width, int height) {
+    protected void adjustCompositeBounds(boolean isQuadrantRotated, AffineTransform tr,
+            int dstx, int dsty, int width, int height) {
         srcCoords[0] = dstx;
         srcCoords[1] = dsty;
         srcCoords[2] = dstx + width;
-        srcCoords[3] = dsty;
-        srcCoords[4] = dstx + width;
-        srcCoords[5] = dsty + height;
-        srcCoords[6] = dstx;
-        srcCoords[7] = dsty + height;
+        srcCoords[3] = dsty + height;
 
-        tr.transform(srcCoords, 0, dstCoords, 0, 4);
+        double minX, minY, maxX, maxY;
+        if (isQuadrantRotated) {
+            tr.transform(srcCoords, 0, dstCoords, 0, 2);
+
+            minX = Math.min(dstCoords[0], dstCoords[2]);
+            minY = Math.min(dstCoords[1], dstCoords[3]);
+            maxX = Math.max(dstCoords[0], dstCoords[2]);
+            maxY = Math.max(dstCoords[1], dstCoords[3]);
 
-        double minX = Math.min(dstCoords[0], Math.min(dstCoords[2], Math.min(dstCoords[4], dstCoords[6])));
-        double minY = Math.min(dstCoords[1], Math.min(dstCoords[3], Math.min(dstCoords[5], dstCoords[7])));
-        double maxX = Math.max(dstCoords[0], Math.max(dstCoords[2], Math.max(dstCoords[4], dstCoords[6])));
-        double maxY = Math.max(dstCoords[1], Math.max(dstCoords[3], Math.max(dstCoords[5], dstCoords[7])));
+            minX = Math.ceil(minX - 0.5);
+            minY = Math.ceil(minY - 0.5);
+            maxX = Math.ceil(maxX - 0.5);
+            maxY = Math.ceil(maxY - 0.5);
+        } else {
+            srcCoords[4] = dstx;
+            srcCoords[5] = dsty + height;
+            srcCoords[6] = dstx + width;
+            srcCoords[7] = dsty;
 
-        minX = Math.round(minX);
-        minY = Math.round(minY);
-        maxX = Math.round(maxX);
-        maxY = Math.round(maxY);
+            tr.transform(srcCoords, 0, dstCoords, 0, 4);
+
+            minX = Math.min(dstCoords[0], Math.min(dstCoords[2], Math.min(dstCoords[4], dstCoords[6])));
+            minY = Math.min(dstCoords[1], Math.min(dstCoords[3], Math.min(dstCoords[5], dstCoords[7])));
+            maxX = Math.max(dstCoords[0], Math.max(dstCoords[2], Math.max(dstCoords[4], dstCoords[6])));
+            maxY = Math.max(dstCoords[1], Math.max(dstCoords[3], Math.max(dstCoords[5], dstCoords[7])));
+
+            minX = Math.floor(minX);
+            minY = Math.floor(minY);
+            maxX = Math.ceil(maxX);
+            maxY = Math.ceil(maxY);
+        }
 
         compositeBounds.x = (int) minX;
         compositeBounds.y = (int) minY;
         compositeBounds.width = (int) (maxX - minX);
         compositeBounds.height = (int) (maxY - minY);
-
-        boolean is0or180 = (dstCoords[1] == dstCoords[3]) && (dstCoords[2] == dstCoords[4]);
-        boolean is90or270 = (dstCoords[0] == dstCoords[2]) && (dstCoords[3] == dstCoords[5]);
-
-        return is0or180 || is90or270;
     }
 
     public void Transform(SurfaceData src, SurfaceData dst, Composite comp, Region clip, AffineTransform xform,
@@ -280,9 +284,13 @@
 
             XRSurfaceData x11sdDst = (XRSurfaceData) dst;
             XRSurfaceData x11sdSrc = (XRSurfaceData) src;
+            XRCompositeManager xrMgr = XRCompositeManager.getInstance(x11sdSrc);
 
+            float extraAlpha = ((AlphaComposite) comp).getAlpha();
             int filter = XRUtils.ATransOpToXRQuality(hint);
-            boolean isAxisAligned = adjustCompositeBounds(xform, dstx, dsty, width, height);
+            boolean isQuadrantRotated = XRUtils.isTransformQuadrantRotated(xform);
+
+            adjustCompositeBounds(isQuadrantRotated, xform, dstx, dsty, width, height);
 
             x11sdDst.validateAsDestination(null, clip);
             x11sdDst.maskBuffer.validateCompositeState(comp, null, null, null);
@@ -298,21 +306,26 @@
                 trx.setToIdentity();
             }
 
-            boolean omitMask = (filter == XRUtils.FAST)
-                    || (isAxisAligned && ((AlphaComposite) comp).getAlpha() == 1.0f);
-
-            if (!omitMask) {
+            if (filter != XRUtils.FAST && (!isQuadrantRotated || extraAlpha != 1.0f)) {
                 XRMaskImage mask = x11sdSrc.maskBuffer.getMaskImage();
 
+                // For quadrant-transformed blits geometry is not stored inside the mask
+                // therefore we can use a repeating 1x1 mask for applying extra alpha.
+                int maskPicture = isQuadrantRotated ? xrMgr.getExtraAlphaMask()
+                        : mask.prepareBlitMask(x11sdDst, maskTX, width, height);
+
                 x11sdSrc.validateAsSource(trx, XRUtils.RepeatPad, filter);
-                int maskPicture = mask.prepareBlitMask(x11sdDst, maskTX, width, height);
-                x11sdDst.maskBuffer.con.renderComposite(XRCompositeManager.getInstance(x11sdSrc).getCompRule(), x11sdSrc.picture, maskPicture, x11sdDst.picture,
-                        0, 0, 0, 0, compositeBounds.x, compositeBounds.y, compositeBounds.width, compositeBounds.height);
+                x11sdDst.maskBuffer.con.renderComposite(xrMgr.getCompRule(), x11sdSrc.picture,
+                        maskPicture, x11sdDst.picture, 0, 0, 0, 0, compositeBounds.x, compositeBounds.y,
+                        compositeBounds.width, compositeBounds.height);
             } else {
                 int repeat = filter == XRUtils.FAST ? XRUtils.RepeatNone : XRUtils.RepeatPad;
 
                 x11sdSrc.validateAsSource(trx, repeat, filter);
-                x11sdDst.maskBuffer.compositeBlit(x11sdSrc, x11sdDst, 0, 0, compositeBounds.x, compositeBounds.y, compositeBounds.width, compositeBounds.height);
+
+                // compositeBlit takes care of extra alpha
+                x11sdDst.maskBuffer.compositeBlit(x11sdSrc, x11sdDst, 0, 0, compositeBounds.x,
+                        compositeBounds.y, compositeBounds.width, compositeBounds.height);
             }
         } finally {
             SunToolkit.awtUnlock();
@@ -329,9 +342,7 @@
     }
 
     public void Blit(SurfaceData src, SurfaceData dst, Composite comp, Region clip, int sx, int sy, int dx, int dy, int w, int h) {
-        /*
-         * If the blit is write-only (putimge), no need for a temporary VI.
-         */
+        // If the blit is write-only (putimge), no need for a temporary VI.
         if (CompositeType.SrcOverNoEa.equals(comp) && (src.getTransparency() == Transparency.OPAQUE)) {
             Blit opaqueSwToSurfaceBlit = Blit.getFromCache(src.getSurfaceType(), CompositeType.SrcNoEa, dst.getSurfaceType());
             opaqueSwToSurfaceBlit.Blit(src, dst, comp, clip, sx, sy, dx, dy, w, h);
--- a/src/solaris/classes/sun/java2d/xr/XRPaints.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/solaris/classes/sun/java2d/xr/XRPaints.java	Mon Nov 11 23:17:30 2013 -0800
@@ -29,10 +29,9 @@
 import java.awt.MultipleGradientPaint.*;
 import java.awt.geom.*;
 import java.awt.image.*;
-
 import sun.java2d.*;
 import sun.java2d.loops.*;
-import sun.java2d.pipe.*;
+import sun.java2d.xr.XRSurfaceData.XRInternalSurfaceData;
 
 abstract class XRPaints {
     static XRCompositeManager xrCompMan;
@@ -108,27 +107,16 @@
         void setXRPaint(SunGraphics2D sg2d, Paint pt) {
             GradientPaint paint = (GradientPaint) pt;
 
-            int[] pixels = convertToIntArgbPixels(new Color[] { paint.getColor1(), paint.getColor2() }, false);
-
-            float fractions[] = new float[2];
-            fractions[0] = 0;
-            fractions[1] = 1;
+            int repeat = paint.isCyclic() ? XRUtils.RepeatReflect : XRUtils.RepeatPad;
+            float fractions[] = {0, 1};
+            int[] pixels = convertToIntArgbPixels(new Color[] { paint.getColor1(), paint.getColor2() });
 
             Point2D pt1 = paint.getPoint1();
             Point2D pt2 = paint.getPoint2();
 
-            AffineTransform at = (AffineTransform) sg2d.transform.clone();
-            try {
-                at.invert();
-            } catch (NoninvertibleTransformException ex) {
-                at.setToIdentity();
-            }
-
-            int repeat = paint.isCyclic() ? XRUtils.RepeatReflect : XRUtils.RepeatPad;
-
             XRBackend con = xrCompMan.getBackend();
-            int gradient = con.createLinearGradient(pt1, pt2, fractions, pixels, repeat, at);
-            xrCompMan.setGradientPaint(new XRSurfaceData.XRInternalSurfaceData(con, gradient, at));
+            int gradient = con.createLinearGradient(pt1, pt2, fractions, pixels, repeat);
+            xrCompMan.setGradientPaint(new XRSurfaceData.XRInternalSurfaceData(con, gradient));
         }
     }
 
@@ -142,26 +130,22 @@
 
         @Override
         boolean isPaintValid(SunGraphics2D sg2d) {
-            return true;
+            return ((LinearGradientPaint) sg2d.getPaint()).getColorSpace() == ColorSpaceType.SRGB;
         }
 
         @Override
         void setXRPaint(SunGraphics2D sg2d, Paint pt) {
             LinearGradientPaint paint = (LinearGradientPaint) pt;
-            boolean linear = (paint.getColorSpace() == ColorSpaceType.LINEAR_RGB);
 
             Color[] colors = paint.getColors();
             Point2D pt1 = paint.getStartPoint();
             Point2D pt2 = paint.getEndPoint();
 
+            int repeat = XRUtils.getRepeatForCycleMethod(paint.getCycleMethod());
+            float[] fractions = paint.getFractions();
+            int[] pixels = convertToIntArgbPixels(colors);
 
             AffineTransform at = paint.getTransform();
-            at.preConcatenate(sg2d.transform);
-
-            int repeat = XRUtils.getRepeatForCycleMethod(paint.getCycleMethod());
-            float[] fractions = paint.getFractions();
-            int[] pixels = convertToIntArgbPixels(colors, linear);
-
             try {
                 at.invert();
             } catch (NoninvertibleTransformException ex) {
@@ -169,8 +153,10 @@
             }
 
             XRBackend con = xrCompMan.getBackend();
-            int gradient = con.createLinearGradient(pt1, pt2, fractions, pixels, repeat, at);
-            xrCompMan.setGradientPaint(new XRSurfaceData.XRInternalSurfaceData(con, gradient, at));
+            int gradient = con.createLinearGradient(pt1, pt2, fractions, pixels, repeat);
+            XRInternalSurfaceData x11sd = new XRSurfaceData.XRInternalSurfaceData(con, gradient);
+            x11sd.setStaticSrcTx(at);
+            xrCompMan.setGradientPaint(x11sd);
         }
     }
 
@@ -179,136 +165,101 @@
         @Override
         boolean isPaintValid(SunGraphics2D sg2d) {
             RadialGradientPaint grad = (RadialGradientPaint) sg2d.paint;
-            return grad.getFocusPoint().equals(grad.getCenterPoint());
+            return grad.getFocusPoint().equals(grad.getCenterPoint())
+                   && grad.getColorSpace() == ColorSpaceType.SRGB;
         }
 
         @Override
         void setXRPaint(SunGraphics2D sg2d, Paint pt) {
             RadialGradientPaint paint = (RadialGradientPaint) pt;
-            boolean linear = (paint.getColorSpace() == ColorSpaceType.LINEAR_RGB);
             Color[] colors = paint.getColors();
             Point2D center = paint.getCenterPoint();
-            Point2D focus = paint.getFocusPoint();
 
             int repeat = XRUtils.getRepeatForCycleMethod(paint.getCycleMethod());
             float[] fractions = paint.getFractions();
-            int[] pixels = convertToIntArgbPixels(colors, linear);
+            int[] pixels = convertToIntArgbPixels(colors);
             float radius = paint.getRadius();
 
-            // save original (untransformed) center and focus points
-            double cx = center.getX();
-            double cy = center.getY();
-            double fx = focus.getX();
-            double fy = focus.getY();
+            float cx = (float) center.getX();
+            float cy = (float) center.getY();
 
             AffineTransform at = paint.getTransform();
-            at.preConcatenate(sg2d.transform);
-            focus = at.transform(focus, focus);
-
-            // transform unit circle to gradient coords; we start with the
-            // unit circle (center=(0,0), focus on positive x-axis, radius=1)
-            // and then transform into gradient space
-            at.translate(cx, cy);
-            at.rotate(fx - cx, fy - cy);
-            // at.scale(radius, radius);
-
-            // invert to get mapping from device coords to unit circle
             try {
                 at.invert();
-            } catch (Exception e) {
-                at.setToScale(0.0, 0.0);
+            } catch (NoninvertibleTransformException ex) {
+                ex.printStackTrace();
             }
-            focus = at.transform(focus, focus);
-
-            // clamp the focus point so that it does not rest on, or outside
-            // of, the circumference of the gradient circle
-            fx = Math.min(focus.getX(), 0.99);
 
             XRBackend con = xrCompMan.getBackend();
-            int gradient = con.createRadialGradient(new Point2D.Float(0, 0), new Point2D.Float(0, 0), 0, radius, fractions, pixels, repeat, at);
-            xrCompMan.setGradientPaint(new XRSurfaceData.XRInternalSurfaceData(con, gradient, at));
+            int gradient = con.createRadialGradient(cx, cy, 0, radius, fractions, pixels, repeat);
+            XRInternalSurfaceData x11sd = new XRSurfaceData.XRInternalSurfaceData(con, gradient);
+            x11sd.setStaticSrcTx(at);
+            xrCompMan.setGradientPaint(x11sd);
         }
     }
 
     private static class XRTexture extends XRPaints {
 
+        private XRSurfaceData getAccSrcSurface(XRSurfaceData dstData, BufferedImage bi) {
+            // REMIND: this is a hack that attempts to cache the system
+            // memory image from the TexturePaint instance into an
+            // XRender pixmap...
+            SurfaceData srcData = dstData.getSourceSurfaceData(bi, SunGraphics2D.TRANSFORM_ISIDENT, CompositeType.SrcOver, null);
+            if (!(srcData instanceof XRSurfaceData)) {
+                srcData = dstData.getSourceSurfaceData(bi, SunGraphics2D.TRANSFORM_ISIDENT, CompositeType.SrcOver, null);
+                if (!(srcData instanceof XRSurfaceData)) {
+                    throw new InternalError("Surface not cachable");
+                }
+            }
+
+            return (XRSurfaceData) srcData;
+        }
+
         @Override
         boolean isPaintValid(SunGraphics2D sg2d) {
             TexturePaint paint = (TexturePaint) sg2d.paint;
             BufferedImage bi = paint.getImage();
             XRSurfaceData dstData = (XRSurfaceData) sg2d.getDestSurface();
 
-            SurfaceData srcData = dstData.getSourceSurfaceData(bi, SunGraphics2D.TRANSFORM_ISIDENT, CompositeType.SrcOver, null);
-            if (!(srcData instanceof XRSurfaceData)) {
-                // REMIND: this is a hack that attempts to cache the system
-                // memory image from the TexturePaint instance into an
-                // OpenGL texture...
-                srcData = dstData.getSourceSurfaceData(bi, SunGraphics2D.TRANSFORM_ISIDENT, CompositeType.SrcOver, null);
-                if (!(srcData instanceof XRSurfaceData)) {
-                    return false;
-                }
-            }
-
-            return true;
+            return getAccSrcSurface(dstData, bi) != null;
         }
 
         @Override
         void setXRPaint(SunGraphics2D sg2d, Paint pt) {
             TexturePaint paint = (TexturePaint) pt;
-
             BufferedImage bi = paint.getImage();
-            SurfaceData dstData = sg2d.surfaceData;
-            SurfaceData srcData = dstData.getSourceSurfaceData(bi, SunGraphics2D.TRANSFORM_ISIDENT, CompositeType.SrcOver, null);
+            Rectangle2D anchor = paint.getAnchorRect();
 
-            // REMIND: this hack tries to ensure that we have a cached texture
-            if (!(srcData instanceof XRSurfaceData)) {
-                srcData = dstData.getSourceSurfaceData(paint.getImage(), SunGraphics2D.TRANSFORM_ISIDENT, CompositeType.SrcOver, null);
-                if (!(srcData instanceof XRSurfaceData)) {
-                    throw new InternalError("Surface not cachable");
-                }
-            }
+            XRSurfaceData dstData = (XRSurfaceData) sg2d.surfaceData;
+            XRSurfaceData srcData = (XRSurfaceData) getAccSrcSurface(dstData, bi);
 
-            XRSurfaceData x11SrcData = (XRSurfaceData) srcData;
-
-            AffineTransform at = (AffineTransform) sg2d.transform.clone();
-            Rectangle2D anchor = paint.getAnchorRect();
+            AffineTransform at = new AffineTransform();
             at.translate(anchor.getX(), anchor.getY());
             at.scale(anchor.getWidth() / ((double) bi.getWidth()), anchor.getHeight() / ((double) bi.getHeight()));
 
             try {
                 at.invert();
             } catch (NoninvertibleTransformException ex) {
-                at.setToIdentity(); /* TODO: Right thing to do in this case? */
+                at.setToIdentity();
             }
+            srcData.setStaticSrcTx(at);
 
-            x11SrcData.validateAsSource(at, XRUtils.RepeatNormal, XRUtils.ATransOpToXRQuality(sg2d.interpolationType));
-            xrCompMan.setTexturePaint(((XRSurfaceData) srcData));
+            srcData.validateAsSource(at, XRUtils.RepeatNormal, XRUtils.ATransOpToXRQuality(sg2d.interpolationType));
+            xrCompMan.setTexturePaint(srcData);
         }
     }
 
-    public int[] convertToIntArgbPixels(Color[] colors, boolean linear) {
+    public int[] convertToIntArgbPixels(Color[] colors) {
         int[] pixels = new int[colors.length];
         for (int i = 0; i < colors.length; i++) {
-            pixels[i] = colorToIntArgbPixel(colors[i], linear);
+            pixels[i] = colorToIntArgbPixel(colors[i]);
         }
         return pixels;
     }
 
-    public int colorToIntArgbPixel(Color c, boolean linear) {
+    public int colorToIntArgbPixel(Color c) {
         int rgb = c.getRGB();
-
-        int a = rgb >>> 24;
-        int r = (rgb >> 16) & 0xff;
-        int g = (rgb >> 8) & 0xff;
-        int b = (rgb) & 0xff;
-        if (linear) {
-            r = BufferedPaints.convertSRGBtoLinearRGB(r);
-            g = BufferedPaints.convertSRGBtoLinearRGB(g);
-            b = BufferedPaints.convertSRGBtoLinearRGB(b);
-        }
-
-        a *= xrCompMan.getExtraAlpha();
-
-        return ((a << 24) | (r << 16) | (g << 8) | (b));
+        int a = (int) Math.round(xrCompMan.getExtraAlpha() * (rgb >>> 24));
+        return ((a << 24) | (rgb & 0x00FFFFFF));
     }
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/solaris/classes/sun/java2d/xr/XRSolidSrcPict.java	Mon Nov 11 23:17:30 2013 -0800
@@ -0,0 +1,57 @@
+/*
+ * 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.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * 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.
+ */
+
+package sun.java2d.xr;
+
+public class XRSolidSrcPict {
+    XRBackend con;
+
+    XRSurfaceData srcPict;
+    XRColor xrCol;
+    int curPixVal = -1;
+
+    public XRSolidSrcPict(XRBackend con, int parentXid) {
+        this.con = con;
+
+        xrCol = new XRColor();
+        int solidPixmap = con.createPixmap(parentXid, 32, 1, 1);
+        int solidSrcPictXID = con.createPicture(solidPixmap, XRUtils.PictStandardARGB32);
+        con.setPictureRepeat(solidSrcPictXID, XRUtils.RepeatNormal);
+        con.renderRectangle(solidSrcPictXID, XRUtils.PictOpSrc, XRColor.FULL_ALPHA, 0, 0, 1, 1);
+        srcPict = new XRSurfaceData.XRInternalSurfaceData(con, solidSrcPictXID);
+    }
+
+    public XRSurfaceData prepareSrcPict(int pixelVal) {
+        if(pixelVal != curPixVal) {
+            xrCol.setColorValues(pixelVal, false);
+            con.renderRectangle(srcPict.picture, XRUtils.PictOpSrc, xrCol, 0, 0, 1, 1);
+            this.curPixVal = pixelVal;
+        }
+
+        return srcPict;
+    }
+
+}
--- a/src/solaris/classes/sun/java2d/xr/XRSurfaceData.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/solaris/classes/sun/java2d/xr/XRSurfaceData.java	Mon Nov 11 23:17:30 2013 -0800
@@ -109,6 +109,7 @@
         return XRSurfaceDataProxy.createProxy(srcData, graphicsConfig);
     }
 
+    @Override
     public void validatePipe(SunGraphics2D sg2d) {
         TextPipe textpipe;
         boolean validated = false;
@@ -117,14 +118,8 @@
          * The textpipe for now can't handle TexturePaint when extra-alpha is
          * specified nore XOR mode
          */
-        if (sg2d.compositeState < SunGraphics2D.COMP_XOR &&
-            (sg2d.paintState < SunGraphics2D.PAINT_TEXTURE ||
-             sg2d.composite == null ||
-             !(sg2d.composite instanceof AlphaComposite) ||
-             ((AlphaComposite) sg2d.composite).getAlpha() == 1.0f))
+        if ((textpipe = getTextPipe(sg2d)) == null)
         {
-            textpipe = xrtextpipe;
-        } else {
             super.validatePipe(sg2d);
             textpipe = sg2d.textpipe;
             validated = true;
@@ -184,13 +179,38 @@
         sg2d.imagepipe = xrDrawImage;
     }
 
+    protected TextPipe getTextPipe(SunGraphics2D sg2d) {
+        boolean supportedPaint = sg2d.compositeState <= SunGraphics2D.COMP_ALPHA
+                && (sg2d.paintState <= SunGraphics2D.PAINT_ALPHACOLOR || sg2d.composite == null);
+
+        boolean supportedCompOp = false;
+        if (sg2d.composite instanceof AlphaComposite) {
+            int compRule = ((AlphaComposite) sg2d.composite).getRule();
+            supportedCompOp = XRUtils.isMaskEvaluated(XRUtils.j2dAlphaCompToXR(compRule))
+                    || (compRule == AlphaComposite.SRC
+                                && sg2d.paintState <= SunGraphics2D.PAINT_ALPHACOLOR);
+        }
+
+        return (supportedPaint && supportedCompOp) ? xrtextpipe : null;
+    }
+
     protected MaskFill getMaskFill(SunGraphics2D sg2d) {
-        if (sg2d.paintState > SunGraphics2D.PAINT_ALPHACOLOR &&
-            !XRPaints.isValid(sg2d))
-        {
-            return null;
+        AlphaComposite aComp = null;
+        if(sg2d.composite != null
+                && sg2d.composite instanceof AlphaComposite) {
+            aComp = (AlphaComposite) sg2d.composite;
         }
-        return super.getMaskFill(sg2d);
+
+        boolean supportedPaint = sg2d.paintState <= SunGraphics2D.PAINT_ALPHACOLOR
+                || XRPaints.isValid(sg2d);
+
+        boolean supportedCompOp = false;
+        if(aComp != null) {
+            int rule = aComp.getRule();
+            supportedCompOp = XRUtils.isMaskEvaluated(XRUtils.j2dAlphaCompToXR(rule));
+        }
+
+        return (supportedPaint && supportedCompOp) ?  super.getMaskFill(sg2d) : null;
     }
 
     public RenderLoops getRenderLoops(SunGraphics2D sg2d) {
@@ -395,6 +415,7 @@
 
     boolean transformInUse = false;
     AffineTransform validatedSourceTransform = new AffineTransform();
+    AffineTransform staticSrcTx = null;
     int validatedRepeat = XRUtils.RepeatNone;
     int validatedFilter = XRUtils.FAST;
 
@@ -423,13 +444,24 @@
             }
         } else if (!transformInUse ||
                    (transformInUse && !sxForm.equals(validatedSourceTransform))) {
+
             validatedSourceTransform.setTransform(sxForm.getScaleX(),
                                                   sxForm.getShearY(),
                                                   sxForm.getShearX(),
                                                   sxForm.getScaleY(),
                                                   sxForm.getTranslateX(),
                                                   sxForm.getTranslateY());
-            renderQueue.setPictureTransform(picture, validatedSourceTransform);
+
+            AffineTransform srcTransform = validatedSourceTransform;
+            if(staticSrcTx != null) {
+                // Apply static transform set when used as texture or gradient.
+                // Create a copy to not modify validatedSourceTransform as
+                // this would confuse the validation logic.
+                srcTransform = new AffineTransform(validatedSourceTransform);
+                srcTransform.preConcatenate(staticSrcTx);
+            }
+
+            renderQueue.setPictureTransform(picture, srcTransform);
             transformInUse = true;
         }
 
@@ -547,15 +579,10 @@
     }
 
     public static class XRInternalSurfaceData extends XRSurfaceData {
-        public XRInternalSurfaceData(XRBackend renderQueue, int pictXid,
-                                     AffineTransform transform) {
+        public XRInternalSurfaceData(XRBackend renderQueue, int pictXid) {
           super(renderQueue);
           this.picture = pictXid;
-          this.validatedSourceTransform = transform;
-
-          if (validatedSourceTransform != null) {
-              transformInUse = true;
-          }
+          this.transformInUse = false;
         }
 
         public boolean canSourceSendExposures(int x, int y, int w, int h) {
@@ -677,4 +704,8 @@
     public XRGraphicsConfig getGraphicsConfig() {
         return graphicsConfig;
     }
+
+    public void setStaticSrcTx(AffineTransform staticSrcTx) {
+        this.staticSrcTx = staticSrcTx;
+    }
 }
--- a/src/solaris/classes/sun/java2d/xr/XRUtils.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/solaris/classes/sun/java2d/xr/XRUtils.java	Mon Nov 11 23:17:30 2013 -0800
@@ -27,6 +27,7 @@
 
 import java.awt.*;
 import java.awt.MultipleGradientPaint.*;
+import java.awt.geom.AffineTransform;
 import java.awt.image.*;
 import sun.java2d.loops.*;
 import static java.awt.AlphaComposite.*;
@@ -258,4 +259,21 @@
     public static int clampToUShort(int x) {
         return (x > 65535 ? 65535 : (x < 0) ? 0 : x);
     }
+
+    public static boolean isTransformQuadrantRotated(AffineTransform tr) {
+        return ((tr.getType() & (AffineTransform.TYPE_GENERAL_ROTATION |
+                 AffineTransform.TYPE_GENERAL_TRANSFORM)) == 0);
+    }
+
+    public static boolean isMaskEvaluated(byte xrCompRule) {
+        switch (xrCompRule) {
+        case PictOpOver:
+        case PictOpOverReverse:
+        case PictOpAtop:
+        case PictOpXor:
+            return true;
+        }
+
+        return false;
+    }
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/solaris/classes/sun/misc/GThreadHelper.java	Mon Nov 11 23:17:30 2013 -0800
@@ -0,0 +1,87 @@
+/*
+ * 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.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * 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.
+ */
+
+package sun.misc;
+
+import java.util.concurrent.locks.ReentrantLock;
+
+/**
+ * This class is used to prevent multiple calling of g_thread_init ()
+ * and gdk_thread_init ().
+ *
+ * Since version 2.24 of GLib, calling g_thread_init () multiple times is
+ * allowed, but it will crash for older versions. There are two ways to
+ * find out if g_thread_init () has been called:
+ * g_thread_get_initialized (), but it was introduced in 2.20
+ * g_thread_supported (), but it is a macro and cannot be loaded with dlsym.
+ *
+ * usage:
+ * <pre>
+ * lock();
+ * try {
+ *    if (!getAndSetInitializationNeededFlag()) {
+ *        //call to g_thread_init();
+ *        //call to gdk_thread_init();
+ *    }
+ * } finally {
+ *    unlock();
+ * }
+ * </pre>
+ */
+public final class GThreadHelper {
+
+    private static final ReentrantLock LOCK = new ReentrantLock();
+    private static boolean isGThreadInitialized = false;
+
+    /**
+     * Acquires the lock.
+     */
+    public static void lock() {
+        LOCK.lock();
+    }
+
+    /**
+     * Releases the lock.
+     */
+    public static void unlock() {
+        LOCK.unlock();
+    }
+
+    /**
+     * Gets current value of initialization flag and sets it to {@code true}.
+     * MUST be called under the lock.
+     *
+     * A return value of {@code false} indicates that the calling code
+     * should call the g_thread_init() and gdk_thread_init() functions
+     * before releasing the lock.
+     *
+     * @return {@code true} if initialization has been completed.
+     */
+    public static boolean getAndSetInitializationNeededFlag() {
+        boolean ret = isGThreadInitialized;
+        isGThreadInitialized = true;
+        return ret;
+    }
+}
--- a/src/solaris/classes/sun/nio/fs/SolarisWatchService.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/solaris/classes/sun/nio/fs/SolarisWatchService.java	Mon Nov 11 23:17:30 2013 -0800
@@ -668,7 +668,7 @@
                     }
                 }
 
-                // an error occured
+                // an error occurred
                 if (ex != null) {
                     releaseChildren(key);
                     throw ex;
--- a/src/solaris/classes/sun/nio/fs/UnixPath.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/solaris/classes/sun/nio/fs/UnixPath.java	Mon Nov 11 23:17:30 2013 -0800
@@ -493,8 +493,8 @@
 
         // first pass:
         //   1. compute length of names
-        //   2. mark all occurences of "." to ignore
-        //   3. and look for any occurences of ".."
+        //   2. mark all occurrences of "." to ignore
+        //   3. and look for any occurrences of ".."
         for (int i=0; i<count; i++) {
             int begin = offsets[i];
             int len;
@@ -517,7 +517,7 @@
             }
         }
 
-        // multiple passes to eliminate all occurences of name/..
+        // multiple passes to eliminate all occurrences of name/..
         if (hasDotDot) {
             int prevRemaining;
             do {
--- a/src/solaris/classes/sun/nio/fs/UnixUriUtils.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/solaris/classes/sun/nio/fs/UnixUriUtils.java	Mon Nov 11 23:17:30 2013 -0800
@@ -56,7 +56,7 @@
         if (uri.getQuery() != null)
             throw new IllegalArgumentException("URI has a query component");
 
-        // compatability with java.io.File
+        // compatibility with java.io.File
         if (!uri.toString().startsWith("file:///"))
             return new File(uri).toPath();
 
--- a/src/solaris/classes/sun/print/CUPSPrinter.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/solaris/classes/sun/print/CUPSPrinter.java	Mon Nov 11 23:17:30 2013 -0800
@@ -237,8 +237,9 @@
 
     /**
      * Get CUPS default printer using IPP.
+     * Returns 2 values - index 0 is printer name, index 1 is the uri.
      */
-    public static String getDefaultPrinter() {
+    static String[] getDefaultPrinter() {
         try {
             URL url = new URL("http", getServer(), getPort(), "");
             final HttpURLConnection urlConnection =
@@ -264,8 +265,8 @@
                     AttributeClass.ATTRIBUTES_CHARSET,
                     AttributeClass.ATTRIBUTES_NATURAL_LANGUAGE,
                     new AttributeClass("requested-attributes",
-                                       AttributeClass.TAG_KEYWORD,
-                                       "printer-name")
+                                       AttributeClass.TAG_URI,
+                                       "printer-uri")
                 };
 
                 if (IPPPrintService.writeIPPRequest(os,
@@ -273,6 +274,7 @@
                                         attCl)) {
 
                     HashMap defaultMap = null;
+                    String[] printerInfo = new String[2];
                     InputStream is = urlConnection.getInputStream();
                     HashMap[] responseMap = IPPPrintService.readIPPResponse(
                                          is);
@@ -293,21 +295,30 @@
                          * special behaviour for this built in.
                          */
                          if (UnixPrintServiceLookup.isMac()) {
-                             return UnixPrintServiceLookup.
+                             printerInfo[0] = UnixPrintServiceLookup.
                                                    getDefaultPrinterNameSysV();
+                             printerInfo[1] = null;
+                             return (String[])printerInfo.clone();
                          } else {
                              return null;
                          }
                     }
 
+
                     AttributeClass attribClass = (AttributeClass)
                         defaultMap.get("printer-name");
 
                     if (attribClass != null) {
-                        String nameStr = attribClass.getStringValue();
+                        printerInfo[0] = attribClass.getStringValue();
+                        attribClass = (AttributeClass)defaultMap.get("device-uri");
+                        if (attribClass != null) {
+                            printerInfo[1] = attribClass.getStringValue();
+                        } else {
+                            printerInfo[1] = null;
+                        }
                         os.close();
                         urlConnection.disconnect();
-                        return nameStr;
+                        return (String [])printerInfo.clone();
                     }
                 }
                 os.close();
@@ -322,7 +333,7 @@
     /**
      * Get list of all CUPS printers using IPP.
      */
-    public static String[] getAllPrinters() {
+    static String[] getAllPrinters() {
         try {
             URL url = new URL("http", getServer(), getPort(), "");
 
--- a/src/solaris/classes/sun/print/IPPPrintService.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/solaris/classes/sun/print/IPPPrintService.java	Mon Nov 11 23:17:30 2013 -0800
@@ -366,6 +366,7 @@
                                           " IPPPrintService, myURL="+
                                           myURL+" Exception= "+
                                           e);
+            throw new IllegalArgumentException("invalid url");
         }
 
         isCupsPrinter = isCups;
@@ -1145,6 +1146,8 @@
                 // REMIND: check attribute values
                 return (T)PDLOverrideSupported.NOT_ATTEMPTED;
             }
+        } else if (category == PrinterURI.class) {
+            return (T)(new PrinterURI(myURI));
         } else {
             return null;
         }
--- a/src/solaris/classes/sun/print/UnixPrintServiceLookup.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/solaris/classes/sun/print/UnixPrintServiceLookup.java	Mon Nov 11 23:17:30 2013 -0800
@@ -48,6 +48,7 @@
 import javax.print.attribute.PrintServiceAttribute;
 import javax.print.attribute.PrintServiceAttributeSet;
 import javax.print.attribute.standard.PrinterName;
+import javax.print.attribute.standard.PrinterURI;
 import java.io.File;
 import java.io.FileReader;
 import java.net.URL;
@@ -61,7 +62,7 @@
     implements BackgroundServiceLookup, Runnable {
 
     /* Remind: the current implementation is static, as its assumed
-     * its preferable to minimise creation of PrintService instances.
+     * its preferable to minimize creation of PrintService instances.
      * Later we should add logic to add/remove services on the fly which
      * will take a hit of needing to regather the list of services.
      */
@@ -203,6 +204,33 @@
         }
     }
 
+    private int addPrintServiceToList(ArrayList printerList, PrintService ps) {
+        int index = printerList.indexOf(ps);
+        // Check if PrintService with same name is already in the list.
+        if (CUPSPrinter.isCupsRunning() && index != -1) {
+            // Bug in Linux: Duplicate entry of a remote printer
+            // and treats it as local printer but it is returning wrong
+            // information when queried using IPP. Workaround is to remove it.
+            // Even CUPS ignores these entries as shown in lpstat or using
+            // their web configuration.
+            PrinterURI uri = (PrinterURI)ps.getAttribute(PrinterURI.class);
+            if (uri.getURI().getHost().equals("localhost")) {
+                IPPPrintService.debug_println(debugPrefix+"duplicate PrintService, ignoring the new local printer: "+ps);
+                return index;  // Do not add this.
+            }
+            PrintService oldPS = (PrintService)(printerList.get(index));
+            uri = (PrinterURI)oldPS.getAttribute(PrinterURI.class);
+            if (uri.getURI().getHost().equals("localhost")) {
+                IPPPrintService.debug_println(debugPrefix+"duplicate PrintService, removing existing local printer: "+oldPS);
+                printerList.remove(oldPS);
+            } else {
+                return index;
+            }
+        }
+        printerList.add(ps);
+        return (printerList.size() - 1);
+    }
+
 
     // refreshes "printServices"
     public synchronized void refreshServices() {
@@ -246,8 +274,7 @@
             }
             if ((defaultPrintService != null)
                 && printers[p].equals(getPrinterDestName(defaultPrintService))) {
-                printerList.add(defaultPrintService);
-                defaultIndex = printerList.size() - 1;
+                defaultIndex = addPrintServiceToList(printerList, defaultPrintService);
             } else {
                 if (printServices == null) {
                     IPPPrintService.debug_println(debugPrefix+
@@ -255,9 +282,10 @@
 
                     if (CUPSPrinter.isCupsRunning()) {
                         try {
-                            printerList.add(new IPPPrintService(printers[p],
-                                                                printerURIs[p],
-                                                                true));
+                            addPrintServiceToList(printerList,
+                                                  new IPPPrintService(printers[p],
+                                                                   printerURIs[p],
+                                                                   true));
                         } catch (Exception e) {
                             IPPPrintService.debug_println(debugPrefix+
                                                           " getAllPrinters Exception "+
@@ -282,10 +310,10 @@
                     if (j == printServices.length) {      // not found?
                         if (CUPSPrinter.isCupsRunning()) {
                             try {
-                                printerList.add(new IPPPrintService(
-                                                               printers[p],
-                                                               printerURIs[p],
-                                                               true));
+                                addPrintServiceToList(printerList,
+                                             new IPPPrintService(printers[p],
+                                                                 printerURIs[p],
+                                                                 true));
                             } catch (Exception e) {
                                 IPPPrintService.debug_println(debugPrefix+
                                                               " getAllPrinters Exception "+
@@ -312,9 +340,7 @@
 
         //if defaultService is not found in printerList
         if (defaultIndex == -1 && defaultPrintService != null) {
-            //add default to the list
-            printerList.add(defaultPrintService);
-            defaultIndex = printerList.size() - 1;
+            defaultIndex = addPrintServiceToList(printerList, defaultPrintService);
         }
 
         printServices = (PrintService[])printerList.toArray(
@@ -563,11 +589,14 @@
 
         // clear defaultPrintService
         defaultPrintService = null;
+        String psuri = null;
 
         IPPPrintService.debug_println("isRunning ? "+
                                       (CUPSPrinter.isCupsRunning()));
         if (CUPSPrinter.isCupsRunning()) {
-            defaultPrinter = CUPSPrinter.getDefaultPrinter();
+            String[] printerInfo = CUPSPrinter.getDefaultPrinter();
+            defaultPrinter = printerInfo[0];
+            psuri = printerInfo[1];
         } else {
             if (isMac() || isSysV()) {
                 defaultPrinter = getDefaultPrinterNameSysV();
@@ -590,12 +619,17 @@
         if (defaultPrintService == null) {
             if (CUPSPrinter.isCupsRunning()) {
                 try {
-                    PrintService defaultPS =
-                        new IPPPrintService(defaultPrinter,
+                    PrintService defaultPS;
+                    if (psuri != null) {
+                        defaultPS = new IPPPrintService(defaultPrinter,
+                                                        psuri, true);
+                    } else {
+                        defaultPS = new IPPPrintService(defaultPrinter,
                                             new URL("http://"+
                                                     CUPSPrinter.getServer()+":"+
                                                     CUPSPrinter.getPort()+"/"+
                                                     defaultPrinter));
+                    }
                     defaultPrintService = defaultPS;
                 } catch (Exception e) {
                 }
--- a/src/solaris/demo/jni/Poller/Poller.c	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/solaris/demo/jni/Poller/Poller.c	Mon Nov 11 23:17:30 2013 -0800
@@ -73,7 +73,7 @@
  *  6> Could add simpler code for pre-Solaris 7 releases which will
  *     perform slightly better on those OSs.  But again there
  *     are only modest gains to be had from these new code paths,
- *     so they've been ommitted here.
+ *     so they've been omitted here.
  *
  * Compile "cc -G -o <dest_dir>/libpoller.so -I ${JAVA_HOME}/include " \
  * -I ${JAVA_HOME}/include/solaris Poller.c" and place the <dest_dir>
--- a/src/solaris/native/com/sun/media/sound/PLATFORM_API_BsdOS_ALSA_Ports.c	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/solaris/native/com/sun/media/sound/PLATFORM_API_BsdOS_ALSA_Ports.c	Mon Nov 11 23:17:30 2013 -0800
@@ -401,7 +401,7 @@
     numControls = 0;
     elem = portMixer->elems[portIndex];
     if (snd_mixer_selem_has_playback_volume(elem) || snd_mixer_selem_has_capture_volume(elem)) {
-        /* Since we've splitted/duplicated elements with both playback and capture on the recovery
+        /* Since we've split/duplicated elements with both playback and capture on the recovery
            of elements, we now can assume that we handle only to deal with either playback or
            capture. */
         isPlayback = isPlaybackFunction(portMixer->types[portIndex]);
--- a/src/solaris/native/com/sun/media/sound/PLATFORM_API_LinuxOS_ALSA_Ports.c	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/solaris/native/com/sun/media/sound/PLATFORM_API_LinuxOS_ALSA_Ports.c	Mon Nov 11 23:17:30 2013 -0800
@@ -401,7 +401,7 @@
     numControls = 0;
     elem = portMixer->elems[portIndex];
     if (snd_mixer_selem_has_playback_volume(elem) || snd_mixer_selem_has_capture_volume(elem)) {
-        /* Since we've splitted/duplicated elements with both playback and capture on the recovery
+        /* Since we've split/duplicated elements with both playback and capture on the recovery
            of elements, we now can assume that we handle only to deal with either playback or
            capture. */
         isPlayback = isPlaybackFunction(portMixer->types[portIndex]);
--- a/src/solaris/native/com/sun/media/sound/PLATFORM_API_SolarisOS_PCM.c	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/solaris/native/com/sun/media/sound/PLATFORM_API_SolarisOS_PCM.c	Mon Nov 11 23:17:30 2013 -0800
@@ -371,7 +371,7 @@
         }
         AUDIO_INITINFO(&audioInfo);
         if (underrun) {
-            /* if an underrun occured, reset */
+            /* if an underrun occurred, reset */
             ERROR1("DAUDIO_Write/Read: Underrun/overflow: adjusting positionOffset by %d:\n",
                    (devBytes - info->transferedBytes));
             ERROR1("    devBytes from %d to 0, ", devBytes);
--- a/src/solaris/native/com/sun/media/sound/PLATFORM_API_SolarisOS_Utils.h	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/solaris/native/com/sun/media/sound/PLATFORM_API_SolarisOS_Utils.h	Mon Nov 11 23:17:30 2013 -0800
@@ -87,7 +87,7 @@
 
 /*
  * fills adDesc from the audio device given in path
- * returns 0 if an error occured
+ * returns 0 if an error occurred
  * if getNames is 0, only path and pathctl are filled
  */
 int getAudioDeviceDescription(char* path, AudioDeviceDescription* adDesc, int getNames);
--- a/src/solaris/native/java/net/NetworkInterface.c	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/solaris/native/java/net/NetworkInterface.c	Mon Nov 11 23:17:30 2013 -0800
@@ -170,31 +170,56 @@
 JNIEXPORT void JNICALL
 Java_java_net_NetworkInterface_init(JNIEnv *env, jclass cls) {
     ni_class = (*env)->FindClass(env,"java/net/NetworkInterface");
+    CHECK_NULL(ni_class);
     ni_class = (*env)->NewGlobalRef(env, ni_class);
+    CHECK_NULL(ni_class);
     ni_nameID = (*env)->GetFieldID(env, ni_class,"name", "Ljava/lang/String;");
+    CHECK_NULL(ni_nameID);
     ni_indexID = (*env)->GetFieldID(env, ni_class, "index", "I");
+    CHECK_NULL(ni_indexID);
     ni_addrsID = (*env)->GetFieldID(env, ni_class, "addrs", "[Ljava/net/InetAddress;");
+    CHECK_NULL(ni_addrsID);
     ni_bindsID = (*env)->GetFieldID(env, ni_class, "bindings", "[Ljava/net/InterfaceAddress;");
+    CHECK_NULL(ni_bindsID);
     ni_descID = (*env)->GetFieldID(env, ni_class, "displayName", "Ljava/lang/String;");
+    CHECK_NULL(ni_descID);
     ni_virutalID = (*env)->GetFieldID(env, ni_class, "virtual", "Z");
+    CHECK_NULL(ni_virutalID);
     ni_childsID = (*env)->GetFieldID(env, ni_class, "childs", "[Ljava/net/NetworkInterface;");
+    CHECK_NULL(ni_childsID);
     ni_parentID = (*env)->GetFieldID(env, ni_class, "parent", "Ljava/net/NetworkInterface;");
+    CHECK_NULL(ni_parentID);
     ni_ctrID = (*env)->GetMethodID(env, ni_class, "<init>", "()V");
+    CHECK_NULL(ni_ctrID);
 
     ni_iacls = (*env)->FindClass(env, "java/net/InetAddress");
+    CHECK_NULL(ni_iacls);
     ni_iacls = (*env)->NewGlobalRef(env, ni_iacls);
+    CHECK_NULL(ni_iacls);
     ni_ia4cls = (*env)->FindClass(env, "java/net/Inet4Address");
+    CHECK_NULL(ni_ia4cls);
     ni_ia4cls = (*env)->NewGlobalRef(env, ni_ia4cls);
+    CHECK_NULL(ni_ia4cls);
     ni_ia6cls = (*env)->FindClass(env, "java/net/Inet6Address");
+    CHECK_NULL(ni_ia6cls);
     ni_ia6cls = (*env)->NewGlobalRef(env, ni_ia6cls);
+    CHECK_NULL(ni_ia6cls);
     ni_ibcls = (*env)->FindClass(env, "java/net/InterfaceAddress");
+    CHECK_NULL(ni_ibcls);
     ni_ibcls = (*env)->NewGlobalRef(env, ni_ibcls);
+    CHECK_NULL(ni_ibcls);
     ni_ia4ctrID = (*env)->GetMethodID(env, ni_ia4cls, "<init>", "()V");
+    CHECK_NULL(ni_ia4ctrID);
     ni_ia6ctrID = (*env)->GetMethodID(env, ni_ia6cls, "<init>", "()V");
+    CHECK_NULL(ni_ia6ctrID);
     ni_ibctrID = (*env)->GetMethodID(env, ni_ibcls, "<init>", "()V");
+    CHECK_NULL(ni_ibctrID);
     ni_ibaddressID = (*env)->GetFieldID(env, ni_ibcls, "address", "Ljava/net/InetAddress;");
+    CHECK_NULL(ni_ibaddressID);
     ni_ib4broadcastID = (*env)->GetFieldID(env, ni_ibcls, "broadcast", "Ljava/net/Inet4Address;");
+    CHECK_NULL(ni_ib4broadcastID);
     ni_ib4maskID = (*env)->GetFieldID(env, ni_ibcls, "maskLength", "S");
+    CHECK_NULL(ni_ib4maskID);
     ni_defaultIndexID = (*env)->GetStaticFieldID(env, ni_class, "defaultIndex", "I");
 }
 
--- a/src/solaris/native/sun/awt/awt_UNIXToolkit.c	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/solaris/native/sun/awt/awt_UNIXToolkit.c	Mon Nov 11 23:17:30 2013 -0800
@@ -67,7 +67,7 @@
 Java_sun_awt_UNIXToolkit_load_1gtk(JNIEnv *env, jclass klass)
 {
 #ifndef HEADLESS
-    return (jboolean)gtk2_load();
+    return (jboolean)gtk2_load(env);
 #else
     return JNI_FALSE;
 #endif /* !HEADLESS */
--- a/src/solaris/native/sun/awt/gtk2_interface.c	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/solaris/native/sun/awt/gtk2_interface.c	Mon Nov 11 23:17:30 2013 -0800
@@ -81,7 +81,7 @@
 
 static void *gtk2_libhandle = NULL;
 static void *gthread_libhandle = NULL;
-static gboolean flag_g_thread_get_initialized = FALSE;
+
 static jmp_buf j;
 
 /* Widgets */
@@ -502,7 +502,7 @@
     fp_gtk_g_slist_length = dl_symbol("g_slist_length");
 }
 
-gboolean gtk2_load()
+gboolean gtk2_load(JNIEnv *env)
 {
     gboolean result;
     int i;
@@ -533,6 +533,7 @@
         }
 
         /* GLib */
+        fp_glib_check_version = dl_symbol("glib_check_version");
         fp_g_free = dl_symbol("g_free");
         fp_g_object_unref = dl_symbol("g_object_unref");
 
@@ -708,6 +709,9 @@
         /**
          * GLib thread system
          */
+        if (fp_glib_check_version(2, 20, 0) == NULL) {
+            fp_g_thread_get_initialized = dl_symbol_gthread("g_thread_get_initialized");
+        }
         fp_g_thread_init = dl_symbol_gthread("g_thread_init");
         fp_gdk_threads_init = dl_symbol("gdk_threads_init");
         fp_gdk_threads_enter = dl_symbol("gdk_threads_enter");
@@ -810,16 +814,33 @@
     io_handler = XSetIOErrorHandler(NULL);
 
     if (fp_gtk_check_version(2, 2, 0) == NULL) {
+        jclass clazz = (*env)->FindClass(env, "sun/misc/GThreadHelper");
+        jmethodID mid_getAndSetInitializationNeededFlag =
+                (*env)->GetStaticMethodID(env, clazz, "getAndSetInitializationNeededFlag", "()Z");
+        jmethodID mid_lock = (*env)->GetStaticMethodID(env, clazz, "lock", "()V");
+        jmethodID mid_unlock = (*env)->GetStaticMethodID(env, clazz, "unlock", "()V");
+
         // Init the thread system to use GLib in a thread-safe mode
-        if (!flag_g_thread_get_initialized) {
-            flag_g_thread_get_initialized = TRUE;
+        (*env)->CallStaticVoidMethod(env, clazz, mid_lock);
 
-            fp_g_thread_init(NULL);
+        // Calling g_thread_init() multiple times leads to crash on GLib < 2.24
+        // We can use g_thread_get_initialized () but it is available only for
+        // GLib >= 2.20. We rely on GThreadHelper for GLib < 2.20.
+        gboolean is_g_thread_get_initialized = FALSE;
+        if (fp_glib_check_version(2, 20, 0) == NULL) {
+            is_g_thread_get_initialized = fp_g_thread_get_initialized();
+        }
+
+        if (!(*env)->CallStaticBooleanMethod(env, clazz, mid_getAndSetInitializationNeededFlag)) {
+            if (!is_g_thread_get_initialized) {
+                fp_g_thread_init(NULL);
+            }
 
             //According the GTK documentation, gdk_threads_init() should be
             //called before gtk_init() or gtk_init_check()
             fp_gdk_threads_init();
         }
+        (*env)->CallStaticVoidMethod(env, clazz, mid_unlock);
     }
     result = (*fp_gtk_init_check)(NULL, NULL);
 
@@ -1231,7 +1252,7 @@
             if (init_result = (NULL == gtk2_widgets[_GTK_CONTAINER_TYPE]))
             {
                 /* There is no constructor for a container type.  I've
-                 * choosen GtkFixed container since it has a default
+                 * chosen GtkFixed container since it has a default
                  * constructor.
                  */
                 gtk2_widgets[_GTK_CONTAINER_TYPE] =
--- a/src/solaris/native/sun/awt/gtk2_interface.h	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/solaris/native/sun/awt/gtk2_interface.h	Mon Nov 11 23:17:30 2013 -0800
@@ -643,6 +643,14 @@
  */
 const char *getStrFor(JNIEnv *env, jstring value);
 
+/**
+ * Returns :
+ * NULL if the GLib library is compatible with the given version, or a string
+ * describing the version mismatch.
+ */
+gchar* (*fp_glib_check_version)(guint required_major, guint required_minor,
+                       guint required_micro);
+
 /*
  * Check whether the gtk2 library is available and meets the minimum
  * version requirement.  If the library is already loaded this method has no
@@ -663,7 +671,7 @@
  * effect and returns success.
  * Returns FALSE on failure and TRUE on success.
  */
-gboolean gtk2_load();
+gboolean gtk2_load(JNIEnv *env);
 
 /*
  * Loads fp_gtk_show_uri function pointer. This initialization is
@@ -801,6 +809,12 @@
 guint (*fp_gtk_main_level)(void);
 
 
+/**
+ * This function is available for GLIB > 2.20, so it MUST be
+ * called within (fp_glib_check_version(2, 20, 0) == NULL) check.
+ */
+gboolean (*fp_g_thread_get_initialized)(void);
+
 void (*fp_g_thread_init)(GThreadFunctions *vtable);
 void (*fp_gdk_threads_init)(void);
 void (*fp_gdk_threads_enter)(void);
--- a/src/solaris/native/sun/awt/multiVis.c	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/solaris/native/sun/awt/multiVis.c	Mon Nov 11 23:17:30 2013 -0800
@@ -1115,7 +1115,7 @@
                                          * to by pImageVisuals. */
     XVisualInfo ***pImageVisuals;       /* The device's image visuals. */
 {
-    XVisualInfo getVisInfo;             /* Paramters of XGetVisualInfo */
+    XVisualInfo getVisInfo;             /* Parameters of XGetVisualInfo */
     int32_t             mask;
     XVisualInfo *pVis, **pIVis;         /* Faster, local copies */
     OverlayInfo *pOVis;
--- a/src/solaris/native/sun/java2d/x11/XRBackendNative.c	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/solaris/native/sun/java2d/x11/XRBackendNative.c	Mon Nov 11 23:17:30 2013 -0800
@@ -523,12 +523,10 @@
 Java_sun_java2d_xr_XRBackendNative_XRCreateLinearGradientPaintNative
     (JNIEnv *env, jclass xsd, jfloatArray fractionsArray,
      jshortArray pixelsArray, jint x1, jint y1, jint x2, jint y2,
-     jint numStops, jint repeat,
-     jint m00, jint m01, jint m02, jint m10, jint m11, jint m12) {
+     jint numStops, jint repeat) {
    jint i;
    jshort* pixels;
    jfloat* fractions;
-   XTransform tr;
    XRenderPictureAttributes pict_attr;
    Picture gradient = 0;
    XRenderColor *colors;
@@ -594,8 +592,6 @@
    (*env)->ReleasePrimitiveArrayCritical(env, fractionsArray, fractions, JNI_ABORT);
 
     if (gradient != 0) {
-        BUILD_TRANSFORM_MATRIX(tr, m00, m01, m02, m10, m11, m12);
-        XRenderSetPictureTransform (awt_display, gradient, &tr);
         pict_attr.repeat = repeat;
         XRenderChangePicture (awt_display, gradient, CPRepeat, &pict_attr);
     }
@@ -608,12 +604,11 @@
 Java_sun_java2d_xr_XRBackendNative_XRCreateRadialGradientPaintNative
     (JNIEnv *env, jclass xsd, jfloatArray fractionsArray,
      jshortArray pixelsArray, jint numStops,
-     jint innerRadius, jint outerRadius, jint repeat,
-     jint m00, jint m01, jint m02, jint m10, jint m11, jint m12) {
+     jint centerX, jint centerY,
+     jint innerRadius, jint outerRadius, jint repeat) {
    jint i;
    jshort* pixels;
    jfloat* fractions;
-   XTransform tr;
    XRenderPictureAttributes pict_attr;
    Picture gradient = 0;
    XRenderColor *colors;
@@ -637,11 +632,11 @@
        return -1; //TODO release pixels first
    }
 
-    grad.inner.x = 0;
-    grad.inner.y = 0;
+    grad.inner.x = centerX;
+    grad.inner.y = centerY;
     grad.inner.radius = innerRadius;
-    grad.outer.x = 0;
-    grad.outer.y = 0;
+    grad.outer.x = centerX;
+    grad.outer.y = centerY;
     grad.outer.radius = outerRadius;
 
     /*TODO optimized & malloc check*/
@@ -682,8 +677,6 @@
 
 
     if (gradient != 0) {
-        BUILD_TRANSFORM_MATRIX(tr, m00, m01, m02, m10, m11, m12);
-        XRenderSetPictureTransform (awt_display, gradient, &tr);
         pict_attr.repeat = repeat;
         XRenderChangePicture (awt_display, gradient, CPRepeat, &pict_attr);
     }
--- a/src/solaris/native/sun/security/smartcardio/MUSCLE/pcsclite.h	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/solaris/native/sun/security/smartcardio/MUSCLE/pcsclite.h	Mon Nov 11 23:17:30 2013 -0800
@@ -317,8 +317,8 @@
 #endif
 
 /*
- * Enhanced messaging has been added to accomodate newer devices which have
- * more advanced capabilites, such as dedicated secure co-processors which
+ * Enhanced messaging has been added to accommodate newer devices which have
+ * more advanced capabilities, such as dedicated secure co-processors which
  * can stream and encrypt data over USB. In order to used enhanced messaging
  * you must define PCSCLITE_ENHANCED_MESSAGING in the framework(library),
  * the daemon, and your application
@@ -332,7 +332,7 @@
 /*
  * The message and buffer sizes must be multiples of 16.
  * The max message size must be at least large enough
- * to accomodate the transmit_struct
+ * to accommodate the transmit_struct
  */
 #define PCSCLITE_MAX_MESSAGE_SIZE       (1<<17) /* enhanced (128K) msg len */
 #define MAX_BUFFER_SIZE                 (1<<15) /* enhanced (32K) Tx/Rx Buffer */
--- a/src/solaris/native/sun/xawt/awt_Desktop.c	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/solaris/native/sun/xawt/awt_Desktop.c	Mon Nov 11 23:17:30 2013 -0800
@@ -42,7 +42,7 @@
         return JNI_TRUE;
     }
 
-    if (gtk2_load() && gtk2_show_uri_load()) {
+    if (gtk2_load(env) && gtk2_show_uri_load()) {
         gtk_has_been_loaded = TRUE;
         return JNI_TRUE;
     } else if (gnome_load()) {
--- a/src/windows/classes/com/sun/tools/jdi/SharedMemoryAttachingConnector.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/windows/classes/com/sun/tools/jdi/SharedMemoryAttachingConnector.java	Mon Nov 11 23:17:30 2013 -0800
@@ -50,7 +50,7 @@
 
         transport = new Transport() {
             public String name() {
-                return "dt_shmem";              // for compatability reasons
+                return "dt_shmem";              // for compatibility reasons
             }
         };
     }
--- a/src/windows/classes/com/sun/tools/jdi/SharedMemoryListeningConnector.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/windows/classes/com/sun/tools/jdi/SharedMemoryListeningConnector.java	Mon Nov 11 23:17:30 2013 -0800
@@ -49,7 +49,7 @@
 
         transport = new Transport() {
             public String name() {
-                return "dt_shmem";              // compatability
+                return "dt_shmem";              // compatibility
             }
         };
     }
--- a/src/windows/classes/java/net/DefaultInterface.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/windows/classes/java/net/DefaultInterface.java	Mon Nov 11 23:17:30 2013 -0800
@@ -26,7 +26,7 @@
 package java.net;
 
 /**
- * Choose a network inteface to be the default for
+ * Choose a network interface to be the default for
  * outgoing IPv6 traffic that does not specify a scope_id (and which needs one).
  *
  * Platforms that do not require a default interface may return null
--- a/src/windows/classes/sun/awt/windows/WComponentPeer.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/windows/classes/sun/awt/windows/WComponentPeer.java	Mon Nov 11 23:17:30 2013 -0800
@@ -1108,4 +1108,8 @@
     }
 
     private native void setZOrder(long above);
+
+    public boolean isLightweightFramePeer() {
+        return false;
+    }
 }
--- a/src/windows/classes/sun/awt/windows/WLightweightFramePeer.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/windows/classes/sun/awt/windows/WLightweightFramePeer.java	Mon Nov 11 23:17:30 2013 -0800
@@ -90,4 +90,8 @@
     public void updateCursorImmediately() {
         SwingAccessor.getJLightweightFrameAccessor().updateCursor((JLightweightFrame)getLwTarget());
     }
+
+    public boolean isLightweightFramePeer() {
+        return true;
+    }
 }
--- a/src/windows/classes/sun/awt/windows/WPathGraphics.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/windows/classes/sun/awt/windows/WPathGraphics.java	Mon Nov 11 23:17:30 2013 -0800
@@ -870,7 +870,7 @@
      * drawn using GDI to the printer context.
      *
      * @param   img     The image to be drawn.
-     * @param   xform   Used to tranform the image before drawing.
+     * @param   xform   Used to transform the image before drawing.
      *                  This can be null.
      * @param   bgcolor This color is drawn where the image has transparent
      *                  pixels. If this parameter is null then the
--- a/src/windows/classes/sun/awt/windows/WPrinterJob.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/windows/classes/sun/awt/windows/WPrinterJob.java	Mon Nov 11 23:17:30 2013 -0800
@@ -183,10 +183,6 @@
     /**
      * Values must match those defined in wingdi.h & commdlg.h
      */
-    private static final int PD_ALLPAGES = 0x00000000;
-    private static final int PD_SELECTION = 0x00000001;
-    private static final int PD_PAGENUMS = 0x00000002;
-    private static final int PD_NOSELECTION = 0x00000004;
     private static final int PD_COLLATE = 0x00000010;
     private static final int PD_PRINTTOFILE = 0x00000020;
     private static final int DM_ORIENTATION   = 0x00000001;
@@ -1639,63 +1635,7 @@
         }
     }
 
-    //returns 1-based index for "From" page
-    private final int getFromPageAttrib() {
-        if (attributes != null) {
-            PageRanges pageRangesAttr =
-                (PageRanges)attributes.get(PageRanges.class);
-            if (pageRangesAttr != null) {
-                int[][] range = pageRangesAttr.getMembers();
-                return range[0][0];
-            }
-        }
-        return getMinPageAttrib();
-    }
 
-    //returns 1-based index for "To" page
-    private final int getToPageAttrib() {
-        if (attributes != null) {
-            PageRanges pageRangesAttr =
-                (PageRanges)attributes.get(PageRanges.class);
-            if (pageRangesAttr != null) {
-                int[][] range = pageRangesAttr.getMembers();
-                return range[range.length-1][1];
-            }
-        }
-        return getMaxPageAttrib();
-    }
-
-    private final int getMinPageAttrib() {
-        if (attributes != null) {
-            SunMinMaxPage s =
-                (SunMinMaxPage)attributes.get(SunMinMaxPage.class);
-            if (s != null) {
-                return s.getMin();
-            }
-        }
-        return 1;
-    }
-
-    private final int getMaxPageAttrib() {
-        if (attributes != null) {
-            SunMinMaxPage s =
-                (SunMinMaxPage)attributes.get(SunMinMaxPage.class);
-            if (s != null) {
-                return s.getMax();
-            }
-        }
-
-        Pageable pageable = getPageable();
-        if (pageable != null) {
-            int numPages = pageable.getNumberOfPages();
-            if (numPages <= Pageable.UNKNOWN_NUMBER_OF_PAGES) {
-                numPages = MAX_UNKNOWN_PAGES;
-            }
-            return  ((numPages == 0) ? 1 : numPages);
-        }
-
-        return Integer.MAX_VALUE;
-    }
 
     private final boolean getDestAttrib() {
         return (mDestination != null);
@@ -1847,20 +1787,7 @@
         return mAttMediaTray;
     }
 
-    private final int getSelectAttrib() {
-        if (attributes != null) {
-            SunPageSelection pages =
-                (SunPageSelection)attributes.get(SunPageSelection.class);
-            if (pages == SunPageSelection.RANGE) {
-                return PD_PAGENUMS;
-            } else if (pages == SunPageSelection.SELECTION) {
-                return PD_SELECTION;
-            } else if (pages ==  SunPageSelection.ALL) {
-                return PD_ALLPAGES;
-            }
-        }
-        return PD_NOSELECTION;
-    }
+
 
     private final boolean getPrintToFileEnabled() {
         SecurityManager security = System.getSecurityManager();
--- a/src/windows/classes/sun/awt/windows/WRobotPeer.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/windows/classes/sun/awt/windows/WRobotPeer.java	Mon Nov 11 23:17:30 2013 -0800
@@ -56,9 +56,9 @@
     public native void keyRelease( int keycode );
 
     public int getRGBPixel(int x, int y) {
-        return getRGBPixelImpl(x, y);
+         // See 7002846: that's ineffective, but works correctly with non-opaque windows
+        return getRGBPixels(new Rectangle(x, y, 1, 1))[0];
     }
-    public native int getRGBPixelImpl(int x, int y);
 
     public int [] getRGBPixels(Rectangle bounds) {
         int pixelArray[] = new int[bounds.width*bounds.height];
--- a/src/windows/classes/sun/awt/windows/WWindowPeer.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/windows/classes/sun/awt/windows/WWindowPeer.java	Mon Nov 11 23:17:30 2013 -0800
@@ -252,6 +252,13 @@
                 updateWindow(true);
             }
         }
+
+        // See https://javafx-jira.kenai.com/browse/RT-32570
+        WComponentPeer owner = getNativeParent();
+        if (owner != null && owner.isLightweightFramePeer()) {
+            Rectangle b = getBounds();
+            handleExpose(0, 0, b.width, b.height);
+        }
     }
 
     // Synchronize the insets members (here & in helper) with actual window
--- a/src/windows/classes/sun/java2d/d3d/D3DBlitLoops.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/windows/classes/sun/java2d/d3d/D3DBlitLoops.java	Mon Nov 11 23:17:30 2013 -0800
@@ -709,7 +709,7 @@
 }
 
 /**
- * This general Blit implemenation converts any source surface to an
+ * This general Blit implementation converts any source surface to an
  * intermediate IntArgbPre surface, and then uses the more specific
  * IntArgbPre->D3DSurface/Texture loop to get the intermediate
  * (premultiplied) surface down to D3D.
--- a/src/windows/classes/sun/nio/ch/WindowsSelectorImpl.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/windows/classes/sun/nio/ch/WindowsSelectorImpl.java	Mon Nov 11 23:17:30 2013 -0800
@@ -219,7 +219,7 @@
         // Number of helper threads, that did not finish yet.
         private int threadsToFinish;
 
-        // IOException which occured during the last run.
+        // IOException which occurred during the last run.
         IOException exception = null;
 
         // Called before polling.
--- a/src/windows/classes/sun/nio/fs/WindowsPath.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/windows/classes/sun/nio/fs/WindowsPath.java	Mon Nov 11 23:17:30 2013 -0800
@@ -429,7 +429,7 @@
         boolean[] ignore = new boolean[count];      // true => ignore name
         int remaining = count;                      // number of names remaining
 
-        // multiple passes to eliminate all occurences of "." and "name/.."
+        // multiple passes to eliminate all occurrences of "." and "name/.."
         int prevRemaining;
         do {
             prevRemaining = remaining;
--- a/src/windows/classes/sun/security/krb5/internal/tools/Klist.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/windows/classes/sun/security/krb5/internal/tools/Klist.java	Mon Nov 11 23:17:30 2013 -0800
@@ -58,7 +58,7 @@
      * The main program that can be invoked at command line.
      * <br>Usage: klist
      * [[-c] [-f] [-e] [-a [-n]]] [-k [-t] [-K]] [name]
-     * -c specifes that credential cache is to be listed
+     * -c specifies that credential cache is to be listed
      * -k specifies that key tab is to be listed
      * name name of the credentials cache or keytab
      * <br>available options for credential caches:
--- a/src/windows/native/java/io/canonicalize_md.c	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/windows/native/java/io/canonicalize_md.c	Mon Nov 11 23:17:30 2013 -0800
@@ -161,7 +161,7 @@
 {
     char *p = start;
     while (*p) {
-        if ((p = strchr(p, '.')) == NULL) // find next occurence of '.'
+        if ((p = strchr(p, '.')) == NULL) // find next occurrence of '.'
             return 0; // no more dots
         p++; // next char
         while ((*p) == '.') // go to the end of dots
@@ -184,7 +184,7 @@
         p = p + 4;
 
     while (*p) {
-        if ((p = wcschr(p, L'.')) == NULL) // find next occurence of '.'
+        if ((p = wcschr(p, L'.')) == NULL) // find next occurrence of '.'
             return 0; // no more dots
         p++; // next char
         while ((*p) == L'.') // go to the end of dots
--- a/src/windows/native/java/net/DualStackPlainSocketImpl.c	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/windows/native/java/net/DualStackPlainSocketImpl.c	Mon Nov 11 23:17:30 2013 -0800
@@ -172,7 +172,7 @@
     }
 
     /*
-     * Socket is writable or error occured. On some Windows editions
+     * Socket is writable or error occurred. On some Windows editions
      * the socket will appear writable when the connect fails so we
      * check for error rather than writable.
      */
--- a/src/windows/native/java/net/NetworkInterface.c	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/windows/native/java/net/NetworkInterface.c	Mon Nov 11 23:17:30 2013 -0800
@@ -500,32 +500,52 @@
      * Get the various JNI ids that we require
      */
     ni_class = (*env)->NewGlobalRef(env, cls);
+    CHECK_NULL(ni_class);
     ni_nameID = (*env)->GetFieldID(env, ni_class, "name", "Ljava/lang/String;");
+    CHECK_NULL(ni_nameID);
     ni_displayNameID = (*env)->GetFieldID(env, ni_class, "displayName", "Ljava/lang/String;");
+    CHECK_NULL(ni_displayNameID);
     ni_indexID = (*env)->GetFieldID(env, ni_class, "index", "I");
+    CHECK_NULL(ni_indexID);
     ni_addrsID = (*env)->GetFieldID(env, ni_class, "addrs", "[Ljava/net/InetAddress;");
+    CHECK_NULL(ni_addrsID);
     ni_bindsID = (*env)->GetFieldID(env, ni_class, "bindings", "[Ljava/net/InterfaceAddress;");
+    CHECK_NULL(ni_bindsID);
     ni_childsID = (*env)->GetFieldID(env, ni_class, "childs", "[Ljava/net/NetworkInterface;");
+    CHECK_NULL(ni_childsID);
     ni_ctor = (*env)->GetMethodID(env, ni_class, "<init>", "()V");
+    CHECK_NULL(ni_ctor);
 
     ni_iacls = (*env)->FindClass(env, "java/net/InetAddress");
+    CHECK_NULL(ni_iacls);
     ni_iacls = (*env)->NewGlobalRef(env, ni_iacls);
+    CHECK_NULL(ni_iacls);
 
     ni_ia4cls = (*env)->FindClass(env, "java/net/Inet4Address");
+    CHECK_NULL(ni_ia4cls);
     ni_ia4cls = (*env)->NewGlobalRef(env, ni_ia4cls);
+    CHECK_NULL(ni_ia4cls);
     ni_ia4Ctor = (*env)->GetMethodID(env, ni_ia4cls, "<init>", "()V");
+    CHECK_NULL(ni_ia4Ctor);
 
     ni_ia6cls = (*env)->FindClass(env, "java/net/Inet6Address");
+    CHECK_NULL(ni_ia6cls);
     ni_ia6cls = (*env)->NewGlobalRef(env, ni_ia6cls);
+    CHECK_NULL(ni_ia6cls);
     ni_ia6ctrID = (*env)->GetMethodID(env, ni_ia6cls, "<init>", "()V");
+    CHECK_NULL(ni_ia6ctrID);
 
     ni_ibcls = (*env)->FindClass(env, "java/net/InterfaceAddress");
+    CHECK_NULL(ni_ibcls);
     ni_ibcls = (*env)->NewGlobalRef(env, ni_ibcls);
+    CHECK_NULL(ni_ibcls);
     ni_ibctrID = (*env)->GetMethodID(env, ni_ibcls, "<init>", "()V");
+    CHECK_NULL(ni_ibctrID);
     ni_ibaddressID = (*env)->GetFieldID(env, ni_ibcls, "address", "Ljava/net/InetAddress;");
+    CHECK_NULL(ni_ibaddressID);
     ni_ibbroadcastID = (*env)->GetFieldID(env, ni_ibcls, "broadcast", "Ljava/net/Inet4Address;");
+    CHECK_NULL(ni_ibbroadcastID);
     ni_ibmaskID = (*env)->GetFieldID(env, ni_ibcls, "maskLength", "S");
-
 }
 
 /*
--- a/src/windows/native/java/net/icmp.h	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/windows/native/java/net/icmp.h	Mon Nov 11 23:17:30 2013 -0800
@@ -40,7 +40,7 @@
         short   ip_len;                 /* total length */
         unsigned short ip_id;                   /* identification */
         short   ip_off;                 /* fragment offset field */
-#define IP_DF 0x4000                    /* dont fragment flag */
+#define IP_DF 0x4000                    /* don't fragment flag */
 #define IP_MF 0x2000                    /* more fragments flag */
         unsigned char   ip_ttl;                 /* time to live */
         unsigned char   ip_p;                   /* protocol */
--- a/src/windows/native/sun/font/fontpath.c	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/windows/native/sun/font/fontpath.c	Mon Nov 11 23:17:30 2013 -0800
@@ -371,7 +371,7 @@
  * However if a program "installed" a font in the registry the key may
  * not include that. We could also try to "pass" fonts which have no "(..)"
  * at the end. But that turns out to pass a few .FON files that MS supply.
- * If there's no parenthesised type string, we could next try to infer
+ * If there's no parenthesized type string, we could next try to infer
  * the file type from the file name extension. Since the MS entries that
  * have no type string are very few, and have odd names like "MS-DOS CP 437"
  * and would never return a Java Font anyway its currently OK to put these
--- a/src/windows/native/sun/java2d/d3d/D3DBadHardware.h	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/windows/native/sun/java2d/d3d/D3DBadHardware.h	Mon Nov 11 23:17:30 2013 -0800
@@ -53,26 +53,73 @@
 
     // Intel HD
     // Clarkdale (Desktop) GMA HD Lines
-    { 0x8086, 0x0042, D_VERSION(6,14,10,5337), OS_WINXP | OS_WINXP_64 },
-    { 0x8086, 0x0042, D_VERSION(8,15,10,2302), OS_VISTA | OS_WINDOWS7 },
+    { 0x8086, 0x0042, D_VERSION(6,14,10,5394), OS_WINXP | OS_WINXP_64 },
+    { 0x8086, 0x0042, D_VERSION(8,15,10,2993), OS_VISTA | OS_WINDOWS7 },
     // Arrandale (Mobile) GMA HD Lines
-    { 0x8086, 0x0046, D_VERSION(6,14,10,5337), OS_WINXP | OS_WINXP_64 },
-    { 0x8086, 0x0046, D_VERSION(8,15,10,2302), OS_VISTA | OS_WINDOWS7 },
-    // Sandy Bridge GMA HD Lines
-    { 0x8086, 0x0102, D_VERSION(6,14,10,5337), OS_WINXP | OS_WINXP_64 },
-    { 0x8086, 0x0102, D_VERSION(8,15,10,2302), OS_VISTA | OS_WINDOWS7 },
-    { 0x8086, 0x0106, D_VERSION(6,14,10,5337), OS_WINXP | OS_WINXP_64 },
-    { 0x8086, 0x0106, D_VERSION(8,15,10,2302), OS_VISTA | OS_WINDOWS7 },
-    { 0x8086, 0x0112, D_VERSION(6,14,10,5337), OS_WINXP | OS_WINXP_64 },
-    { 0x8086, 0x0112, D_VERSION(8,15,10,2302), OS_VISTA | OS_WINDOWS7 },
-    { 0x8086, 0x0116, D_VERSION(6,14,10,5337), OS_WINXP | OS_WINXP_64 },
-    { 0x8086, 0x0116, D_VERSION(8,15,10,2302), OS_VISTA | OS_WINDOWS7 },
-    { 0x8086, 0x0122, D_VERSION(6,14,10,5337), OS_WINXP | OS_WINXP_64 },
-    { 0x8086, 0x0122, D_VERSION(8,15,10,2302), OS_VISTA | OS_WINDOWS7 },
-    { 0x8086, 0x0126, D_VERSION(6,14,10,5337), OS_WINXP | OS_WINXP_64 },
-    { 0x8086, 0x0126, D_VERSION(8,15,10,2302), OS_VISTA | OS_WINDOWS7 },
-    { 0x8086, 0x010A, D_VERSION(6,14,10,5337), OS_WINXP | OS_WINXP_64 },
-    { 0x8086, 0x010A, D_VERSION(8,15,10,2302), OS_VISTA | OS_WINDOWS7 },
+    { 0x8086, 0x0046, D_VERSION(6,14,10,5394), OS_WINXP | OS_WINXP_64 },
+    { 0x8086, 0x0046, D_VERSION(8,15,10,2993), OS_VISTA | OS_WINDOWS7 },
+
+    // Sandy Bridge HD Graphics 3000/2000
+    { 0x8086, 0x0102, D_VERSION(6,14,10,5437), OS_WINXP | OS_WINXP_64 },
+    { 0x8086, 0x0102, D_VERSION(9,17,10,3223), OS_VISTA | OS_WINDOWS7 },
+    { 0x8086, 0x0106, D_VERSION(6,14,10,5437), OS_WINXP | OS_WINXP_64 },
+    { 0x8086, 0x0106, D_VERSION(9,17,10,3223), OS_VISTA | OS_WINDOWS7 },
+    { 0x8086, 0x0112, D_VERSION(6,14,10,5437), OS_WINXP | OS_WINXP_64 },
+    { 0x8086, 0x0112, D_VERSION(9,17,10,3223), OS_VISTA | OS_WINDOWS7 },
+    { 0x8086, 0x0116, D_VERSION(6,14,10,5437), OS_WINXP | OS_WINXP_64 },
+    { 0x8086, 0x0116, D_VERSION(9,17,10,3223), OS_VISTA | OS_WINDOWS7 },
+    { 0x8086, 0x0122, D_VERSION(6,14,10,5437), OS_WINXP | OS_WINXP_64 },
+    { 0x8086, 0x0122, D_VERSION(9,17,10,3223), OS_VISTA | OS_WINDOWS7 },
+    { 0x8086, 0x0126, D_VERSION(6,14,10,5437), OS_WINXP | OS_WINXP_64 },
+    { 0x8086, 0x0126, D_VERSION(9,17,10,3223), OS_VISTA | OS_WINDOWS7 },
+    { 0x8086, 0x010A, D_VERSION(6,14,10,5437), OS_WINXP | OS_WINXP_64 },
+    { 0x8086, 0x010A, D_VERSION(9,17,10,3223), OS_VISTA | OS_WINDOWS7 },
+
+    // Ivy Bridge
+    { 0x8086, 0x0162, D_VERSION(6,14,10,5437), OS_WINXP | OS_WINXP_64 },
+    { 0x8086, 0x0162, D_VERSION(9,18,10,3257), OS_VISTA | OS_WINDOWS7 },
+    { 0x8086, 0x0166, D_VERSION(6,14,10,5437), OS_WINXP | OS_WINXP_64 },
+    { 0x8086, 0x0166, D_VERSION(9,18,10,3257), OS_VISTA | OS_WINDOWS7 },
+    { 0x8086, 0x016A, D_VERSION(6,14,10,5437), OS_WINXP | OS_WINXP_64 },
+    { 0x8086, 0x016A, D_VERSION(9,18,10,3257), OS_VISTA | OS_WINDOWS7 },
+    { 0x8086, 0x0152, D_VERSION(6,14,10,5437), OS_WINXP | OS_WINXP_64 },
+    { 0x8086, 0x0152, D_VERSION(9,18,10,3257), OS_VISTA | OS_WINDOWS7 },
+    { 0x8086, 0x0156, D_VERSION(6,14,10,5437), OS_WINXP | OS_WINXP_64 },
+    { 0x8086, 0x0156, D_VERSION(9,18,10,3257), OS_VISTA | OS_WINDOWS7 },
+    { 0x8086, 0x015A, D_VERSION(6,14,10,5437), OS_WINXP | OS_WINXP_64 },
+    { 0x8086, 0x015A, D_VERSION(9,18,10,3257), OS_VISTA | OS_WINDOWS7 },
+
+    // Haswell
+    { 0x8086, 0x0402, D_VERSION(6,14,10,5437), OS_WINXP | OS_WINXP_64 },
+    { 0x8086, 0x0402, D_VERSION(9,18,10,3257), OS_VISTA | OS_WINDOWS7 },
+    { 0x8086, 0x0406, D_VERSION(6,14,10,5437), OS_WINXP | OS_WINXP_64 },
+    { 0x8086, 0x0406, D_VERSION(9,18,10,3257), OS_VISTA | OS_WINDOWS7 },
+    { 0x8086, 0x0412, D_VERSION(6,14,10,5437), OS_WINXP | OS_WINXP_64 },
+    { 0x8086, 0x0412, D_VERSION(9,18,10,3257), OS_VISTA | OS_WINDOWS7 },
+    { 0x8086, 0x0416, D_VERSION(6,14,10,5437), OS_WINXP | OS_WINXP_64 },
+    { 0x8086, 0x0416, D_VERSION(9,18,10,3257), OS_VISTA | OS_WINDOWS7 },
+    { 0x8086, 0x041E, D_VERSION(6,14,10,5437), OS_WINXP | OS_WINXP_64 },
+    { 0x8086, 0x041E, D_VERSION(9,18,10,3257), OS_VISTA | OS_WINDOWS7 },
+    { 0x8086, 0x040A, D_VERSION(6,14,10,5437), OS_WINXP | OS_WINXP_64 },
+    { 0x8086, 0x040A, D_VERSION(9,18,10,3257), OS_VISTA | OS_WINDOWS7 },
+    { 0x8086, 0x041A, D_VERSION(6,14,10,5437), OS_WINXP | OS_WINXP_64 },
+    { 0x8086, 0x041A, D_VERSION(9,18,10,3257), OS_VISTA | OS_WINDOWS7 },
+    { 0x8086, 0x0A06, D_VERSION(6,14,10,5437), OS_WINXP | OS_WINXP_64 },
+    { 0x8086, 0x0A06, D_VERSION(9,18,10,3257), OS_VISTA | OS_WINDOWS7 },
+    { 0x8086, 0x0A16, D_VERSION(6,14,10,5437), OS_WINXP | OS_WINXP_64 },
+    { 0x8086, 0x0A16, D_VERSION(9,18,10,3257), OS_VISTA | OS_WINDOWS7 },
+    { 0x8086, 0x0A26, D_VERSION(6,14,10,5437), OS_WINXP | OS_WINXP_64 },
+    { 0x8086, 0x0A26, D_VERSION(9,18,10,3257), OS_VISTA | OS_WINDOWS7 },
+    { 0x8086, 0x0A2E, D_VERSION(6,14,10,5437), OS_WINXP | OS_WINXP_64 },
+    { 0x8086, 0x0A2E, D_VERSION(9,18,10,3257), OS_VISTA | OS_WINDOWS7 },
+    { 0x8086, 0x0A1E, D_VERSION(6,14,10,5437), OS_WINXP | OS_WINXP_64 },
+    { 0x8086, 0x0A1E, D_VERSION(9,18,10,3257), OS_VISTA | OS_WINDOWS7 },
+    { 0x8086, 0x0A0E, D_VERSION(6,14,10,5437), OS_WINXP | OS_WINXP_64 },
+    { 0x8086, 0x0A0E, D_VERSION(9,18,10,3257), OS_VISTA | OS_WINDOWS7 },
+    { 0x8086, 0x0D26, D_VERSION(6,14,10,5437), OS_WINXP | OS_WINXP_64 },
+    { 0x8086, 0x0D26, D_VERSION(9,18,10,3257), OS_VISTA | OS_WINDOWS7 },
+    { 0x8086, 0x0D22, D_VERSION(6,14,10,5437), OS_WINXP | OS_WINXP_64 },
+    { 0x8086, 0x0D22, D_VERSION(9,18,10,3257), OS_VISTA | OS_WINDOWS7 },
 
     // Reason: workaround for 6620073, 6612195
     // Intel 740
@@ -123,33 +170,33 @@
     { 0x8086, 0x2A13, NO_VERSION, OS_ALL },
 
     // Eaglelake (Desktop) GMA 4500 Lines
-    { 0x8086, 0x2E42, D_VERSION(6,14,10,5303), OS_WINXP | OS_WINXP_64 },
-    { 0x8086, 0x2E42, D_VERSION(8,15,10,2302), OS_VISTA | OS_WINDOWS7 },
-    { 0x8086, 0x2E43, D_VERSION(6,14,10,5303), OS_WINXP | OS_WINXP_64 },
-    { 0x8086, 0x2E43, D_VERSION(8,15,10,2302), OS_VISTA | OS_WINDOWS7 },
-    { 0x8086, 0x2E92, D_VERSION(6,14,10,5303), OS_WINXP | OS_WINXP_64 },
-    { 0x8086, 0x2E92, D_VERSION(8,15,10,2302), OS_VISTA | OS_WINDOWS7 },
-    { 0x8086, 0x2E93, D_VERSION(6,14,10,5303), OS_WINXP | OS_WINXP_64 },
-    { 0x8086, 0x2E93, D_VERSION(8,15,10,2302), OS_VISTA | OS_WINDOWS7 },
-    { 0x8086, 0x2E12, D_VERSION(6,14,10,5303), OS_WINXP | OS_WINXP_64 },
-    { 0x8086, 0x2E12, D_VERSION(8,15,10,2302), OS_VISTA | OS_WINDOWS7 },
-    { 0x8086, 0x2E13, D_VERSION(6,14,10,5303), OS_WINXP | OS_WINXP_64 },
-    { 0x8086, 0x2E13, D_VERSION(8,15,10,2302), OS_VISTA | OS_WINDOWS7 },
+    { 0x8086, 0x2E42, D_VERSION(6,14,10,5420), OS_WINXP | OS_WINXP_64 },
+    { 0x8086, 0x2E42, D_VERSION(8,15,10,2869), OS_VISTA | OS_WINDOWS7 },
+    { 0x8086, 0x2E43, D_VERSION(6,14,10,5420), OS_WINXP | OS_WINXP_64 },
+    { 0x8086, 0x2E43, D_VERSION(8,15,10,2869), OS_VISTA | OS_WINDOWS7 },
+    { 0x8086, 0x2E92, D_VERSION(6,14,10,5420), OS_WINXP | OS_WINXP_64 },
+    { 0x8086, 0x2E92, D_VERSION(8,15,10,2869), OS_VISTA | OS_WINDOWS7 },
+    { 0x8086, 0x2E93, D_VERSION(6,14,10,5420), OS_WINXP | OS_WINXP_64 },
+    { 0x8086, 0x2E93, D_VERSION(8,15,10,2869), OS_VISTA | OS_WINDOWS7 },
+    { 0x8086, 0x2E12, D_VERSION(6,14,10,5420), OS_WINXP | OS_WINXP_64 },
+    { 0x8086, 0x2E12, D_VERSION(8,15,10,2869), OS_VISTA | OS_WINDOWS7 },
+    { 0x8086, 0x2E13, D_VERSION(6,14,10,5420), OS_WINXP | OS_WINXP_64 },
+    { 0x8086, 0x2E13, D_VERSION(8,15,10,2869), OS_VISTA | OS_WINDOWS7 },
     // Eaglelake (Desktop) GMA X4500 Lines
-    { 0x8086, 0x2E32, D_VERSION(6,14,10,5303), OS_WINXP | OS_WINXP_64 },
-    { 0x8086, 0x2E32, D_VERSION(8,15,10,2302), OS_VISTA | OS_WINDOWS7 },
-    { 0x8086, 0x2E33, D_VERSION(6,14,10,5303), OS_WINXP | OS_WINXP_64 },
-    { 0x8086, 0x2E33, D_VERSION(8,15,10,2302), OS_VISTA | OS_WINDOWS7 },
-    { 0x8086, 0x2E22, D_VERSION(6,14,10,5303), OS_WINXP | OS_WINXP_64 },
-    { 0x8086, 0x2E22, D_VERSION(8,15,10,2302), OS_VISTA | OS_WINDOWS7 },
+    { 0x8086, 0x2E32, D_VERSION(6,14,10,5420), OS_WINXP | OS_WINXP_64 },
+    { 0x8086, 0x2E32, D_VERSION(8,15,10,2869), OS_VISTA | OS_WINDOWS7 },
+    { 0x8086, 0x2E33, D_VERSION(6,14,10,5420), OS_WINXP | OS_WINXP_64 },
+    { 0x8086, 0x2E33, D_VERSION(8,15,10,2869), OS_VISTA | OS_WINDOWS7 },
+    { 0x8086, 0x2E22, D_VERSION(6,14,10,5420), OS_WINXP | OS_WINXP_64 },
+    { 0x8086, 0x2E22, D_VERSION(8,15,10,2869), OS_VISTA | OS_WINDOWS7 },
     // Eaglelake (Desktop) GMA X4500HD Lines
-    { 0x8086, 0x2E23, D_VERSION(6,14,10,5303), OS_WINXP | OS_WINXP_64 },
-    { 0x8086, 0x2E23, D_VERSION(8,15,10,2302), OS_VISTA | OS_WINDOWS7 },
+    { 0x8086, 0x2E23, D_VERSION(6,14,10,5420), OS_WINXP | OS_WINXP_64 },
+    { 0x8086, 0x2E23, D_VERSION(8,15,10,2869), OS_VISTA | OS_WINDOWS7 },
     // Cantiga (Mobile) GMA 4500MHD Lines
-    { 0x8086, 0x2A42, D_VERSION(6,14,10,5303), OS_WINXP | OS_WINXP_64 },
-    { 0x8086, 0x2A42, D_VERSION(8,15,10,2302), OS_VISTA | OS_WINDOWS7 },
-    { 0x8086, 0x2A43, D_VERSION(6,14,10,5303), OS_WINXP | OS_WINXP_64 },
-    { 0x8086, 0x2A43, D_VERSION(8,15,10,2302), OS_VISTA | OS_WINDOWS7 },
+    { 0x8086, 0x2A42, D_VERSION(6,14,10,5420), OS_WINXP | OS_WINXP_64 },
+    { 0x8086, 0x2A42, D_VERSION(8,15,10,2869), OS_VISTA | OS_WINDOWS7 },
+    { 0x8086, 0x2A43, D_VERSION(6,14,10,5420), OS_WINXP | OS_WINXP_64 },
+    { 0x8086, 0x2A43, D_VERSION(8,15,10,2869), OS_VISTA | OS_WINDOWS7 },
 
     // ATI Mobility Radeon X1600, X1400, X1450, X1300, X1350
     // Reason: workaround for 6613066, 6687166
--- a/src/windows/native/sun/java2d/d3d/D3DTextRenderer.cpp	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/windows/native/sun/java2d/d3d/D3DTextRenderer.cpp	Mon Nov 11 23:17:30 2013 -0800
@@ -444,7 +444,7 @@
             } else if (remainingWidth < ginfo->width) {
                 // in some cases, the x-advance may be slightly smaller
                 // than the actual width of the glyph; if so, adjust our
-                // estimate so that we can accomodate the entire glyph
+                // estimate so that we can accommodate the entire glyph
                 remainingWidth = ginfo->width;
             }
         } else {
--- a/src/windows/native/sun/java2d/windows/GDIBlitLoops.cpp	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/windows/native/sun/java2d/windows/GDIBlitLoops.cpp	Mon Nov 11 23:17:30 2013 -0800
@@ -161,7 +161,7 @@
                 // yet created the byteGrayPalette, create it now and copy
                 // it into our temporary bmi structure.
                 // REMIND: byteGrayPalette is a leak since we do not have
-                // a mechansim to free it up.  This should be fine, since it
+                // a mechanism to free it up.  This should be fine, since it
                 // is only 256 bytes for any process and only gets malloc'd
                 // when using ByteGray surfaces.  Eventually, we should use
                 // the new Disposer mechanism to delete this native memory.
--- a/src/windows/native/sun/java2d/windows/GDIRenderer.cpp	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/windows/native/sun/java2d/windows/GDIRenderer.cpp	Mon Nov 11 23:17:30 2013 -0800
@@ -68,7 +68,7 @@
 
     // Fix for 4298688 - draw(Line) and Polygon omit last pixel
     // We will need to add a point if we need to close it off or
-    // if we need to fix the endpoint to accomodate the Windows
+    // if we need to fix the endpoint to accommodate the Windows
     // habit of never drawing the last pixel of a Polyline.  Note
     // that if the polyline is already closed then neither fix
     // is needed because the last pixel is also the first pixel
--- a/src/windows/native/sun/nio/ch/SocketChannelImpl.c	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/windows/native/sun/nio/ch/SocketChannelImpl.c	Mon Nov 11 23:17:30 2013 -0800
@@ -97,7 +97,7 @@
     }
 
     /*
-     * Socket is writable or error occured. On some Windows editions
+     * Socket is writable or error occurred. On some Windows editions
      * the socket will appear writable when the connect fails so we
      * check for error rather than writable.
      */
--- a/src/windows/native/sun/security/krb5/NativeCreds.c	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/windows/native/sun/security/krb5/NativeCreds.c	Mon Nov 11 23:17:30 2013 -0800
@@ -725,7 +725,7 @@
         return GetLastError();
 
     //
-    // Concatenate the target prefix with the previous reponse's
+    // Concatenate the target prefix with the previous response's
     // target domain.
     //
 
--- a/src/windows/native/sun/windows/ThemeReader.cpp	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/windows/native/sun/windows/ThemeReader.cpp	Mon Nov 11 23:17:30 2013 -0800
@@ -35,7 +35,7 @@
 //
 // These type definitions have been imported from UxTheme.h
 // They have been imported instead of including them, because
-// currently we dont require Platform SDK for building J2SE and
+// currently we don't require Platform SDK for building J2SE and
 // VC6 includes do not have UxTheme.h. When we move to VC7
 // we should remove these imports and just include
 //
--- a/src/windows/native/sun/windows/awt_BitmapUtil.cpp	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/windows/native/sun/windows/awt_BitmapUtil.cpp	Mon Nov 11 23:17:30 2013 -0800
@@ -359,7 +359,7 @@
 
 /**
  * Creates a 32 bit ARGB bitmap. Returns the bitmap handle. The *bitmapBits
- * contains the pointer to the bitmap data or NULL if an error occured.
+ * contains the pointer to the bitmap data or NULL if an error occurred.
  */
 HBITMAP BitmapUtil::CreateARGBBitmap(int width, int height, void ** bitmapBitsPtr)
 {
--- a/src/windows/native/sun/windows/awt_Choice.cpp	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/windows/native/sun/windows/awt_Choice.cpp	Mon Nov 11 23:17:30 2013 -0800
@@ -243,7 +243,7 @@
     RECT    rcWindow;
 
     ::GetWindowRect(GetHWnd(), &rcWindow);
-    // resize the drop down to accomodate added/removed items
+    // resize the drop down to accommodate added/removed items
     int     totalHeight = GetTotalHeight();
     ::SetWindowPos(GetHWnd(), NULL,
                     0, 0, rcWindow.right - rcWindow.left, totalHeight,
--- a/src/windows/native/sun/windows/awt_Component.cpp	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/windows/native/sun/windows/awt_Component.cpp	Mon Nov 11 23:17:30 2013 -0800
@@ -281,7 +281,7 @@
 void AwtComponent::Dispose()
 {
     // NOTE: in case the component/toplevel was focused, Java should
-    // have already taken care of proper transfering it or clearing.
+    // have already taken care of proper transferring it or clearing.
 
     if (m_hdwp != NULL) {
     // end any deferred window positioning, regardless
@@ -2164,7 +2164,7 @@
     // Fix 4530093: Don't Validate if can't actually paint
     if (m_peerObject == NULL || !m_callbacksEnabled) {
 
-        // Fix 4745222: If we dont ValidateRgn,  windows will keep sending
+        // Fix 4745222: If we don't ValidateRgn,  windows will keep sending
         // WM_PAINT messages until we do. This causes java to go into
         // a tight loop that increases CPU to 100% and starves main
         // thread which needs to complete initialization, but cant.
--- a/src/windows/native/sun/windows/awt_Dialog.h	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/windows/native/sun/windows/awt_Dialog.h	Mon Nov 11 23:17:30 2013 -0800
@@ -127,7 +127,7 @@
     // dialog to front
     static LRESULT CALLBACK MouseHookProc(int code,
                                           WPARAM wParam, LPARAM lParam);
-    // WM_MOUSE hook procedure used in modality, similiar to
+    // WM_MOUSE hook procedure used in modality, similar to
     // MouseHookProc but installed on non-toolkit threads, for
     // example on browser's thread when running in Java Plugin
     static LRESULT CALLBACK MouseHookProc_NonTT(int code,
--- a/src/windows/native/sun/windows/awt_DnDDS.cpp	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/windows/native/sun/windows/awt_DnDDS.cpp	Mon Nov 11 23:17:30 2013 -0800
@@ -1524,7 +1524,7 @@
 
     FILETIME now; ::CoFileTimeNow(&now); m_statstg.atime = now;
 
-    return STG_E_CANTSAVE; // dont support writing
+    return STG_E_CANTSAVE; // don't support writing
 
     CATCH_BAD_ALLOC_RET(E_OUTOFMEMORY);
 }
--- a/src/windows/native/sun/windows/awt_Font.h	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/windows/native/sun/windows/awt_Font.h	Mon Nov 11 23:17:30 2013 -0800
@@ -242,7 +242,7 @@
     */
 
 private:
-    /* The array of assocated font handles */
+    /* The array of associated font handles */
     HFONT* m_hFont;
     /* The number of handles. */
     int    m_hFontNum;
--- a/src/windows/native/sun/windows/awt_InputTextInfor.cpp	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/windows/native/sun/windows/awt_InputTextInfor.cpp	Mon Nov 11 23:17:30 2013 -0800
@@ -277,7 +277,7 @@
        have to merge. Or if the current composing string size is 0, we don't have to merge either.
 
        So in clusion, the three conditions not not merge are:
-       1. no commited string
+       1. no committed string
        2. m_pResultTextInfor points to NULL
        3. the current string size is 0;
 
--- a/src/windows/native/sun/windows/awt_PrintJob.cpp	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/windows/native/sun/windows/awt_PrintJob.cpp	Mon Nov 11 23:17:30 2013 -0800
@@ -948,7 +948,7 @@
     // This may happen in other cases too, but was observed for the above.
     // To get a DC compatible with this devmode we should really call
     // CreateDC() again to get a DC for the devmode we are using.
-    // The changes for that are a lot more risk, so to minimise that
+    // The changes for that are a lot more risk, so to minimize that
     // risk, assume its not LANDSCAPE unless width > height, even if the
     // devmode says its LANDSCAPE.
     // if the values were obtained from a rotated device, swap.
--- a/src/windows/native/sun/windows/awt_Robot.cpp	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/windows/native/sun/windows/awt_Robot.cpp	Mon Nov 11 23:17:30 2013 -0800
@@ -192,15 +192,6 @@
     return value;
 }
 
-jint AwtRobot::GetRGBPixel( jint x, jint y)
-{
-    HDC hdc = ::CreateDC(TEXT("DISPLAY"), NULL, NULL, NULL);
-    COLORREF ref = ::GetPixel( hdc, x, y );
-    ::DeleteDC(hdc);
-    jint value = WinToJavaPixel(GetRValue(ref), GetGValue(ref), GetBValue(ref));
-    return value;
-}
-
 void AwtRobot::GetRGBPixels(jint x, jint y, jint width, jint height, jintArray pixelArray)
 {
     DASSERT(width > 0 && height > 0);
@@ -403,15 +394,6 @@
     CATCH_BAD_ALLOC;
 }
 
-JNIEXPORT jint JNICALL Java_sun_awt_windows_WRobotPeer_getRGBPixelImpl(
-    JNIEnv * env, jobject self, jint x, jint y)
-{
-    TRY;
-
-    return AwtRobot::GetRobot(self)->GetRGBPixel(x, y);
-
-    CATCH_BAD_ALLOC_RET(0);
-}
 JNIEXPORT void JNICALL Java_sun_awt_windows_WRobotPeer_getRGBPixels(
     JNIEnv *env, jobject self, jint x, jint y, jint width, jint height, jintArray pixelArray)
 {
--- a/src/windows/native/sun/windows/awt_Robot.h	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/windows/native/sun/windows/awt_Robot.h	Mon Nov 11 23:17:30 2013 -0800
@@ -44,7 +44,6 @@
         void MouseWheel(jint wheelAmt);
         jint getNumberOfButtons();
 
-        jint GetRGBPixel( jint x, jint y);
         void GetRGBPixels(jint x, jint y, jint width, jint height, jintArray pixelArray);
 
         void KeyPress( jint key );
--- a/src/windows/native/sun/windows/awt_TextComponent.cpp	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/windows/native/sun/windows/awt_TextComponent.cpp	Mon Nov 11 23:17:30 2013 -0800
@@ -348,7 +348,7 @@
 }
 
 /*
- * If this Paste is occuring because of a synthetic Java event (e.g.,
+ * If this Paste is occurring because of a synthetic Java event (e.g.,
  * a synthesized <CTRL>-V KeyEvent), then verify that the TextComponent
  * has permission to access the Clipboard before pasting. If permission
  * is denied, we should throw a SecurityException, but currently do not
--- a/src/windows/native/sun/windows/awt_Window.cpp	Mon Nov 04 10:12:18 2013 -0800
+++ b/src/windows/native/sun/windows/awt_Window.cpp	Mon Nov 11 23:17:30 2013 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 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
@@ -1878,11 +1878,28 @@
                 AwtWindow::sm_resizing = TRUE;
                 mr = WmSysCommand(wParam, GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam));
                 if (mr != mrConsume) {
+                    // Perform size-move loop here
                     AwtWindow::DefWindowProc(message, wParam, lParam);
                 }
                 AwtWindow::sm_resizing = FALSE;
                 if (!AwtToolkit::GetInstance().IsDynamicLayoutActive()) {
                     WindowResized();
+                } else {
+                    /*
+                     * 8016356: check whether window snapping occurred after
+                     * resizing, i.e. GetWindowRect() returns the real
+                     * (snapped) window rectangle, e.g. (179, 0)-(483, 1040),
+                     * but GetWindowPlacement() returns the rectangle of
+                     * normal window position, e.g. (179, 189)-(483, 445) and
+                     * they are different. If so, send ComponentResized event.
+                     */
+                    WINDOWPLACEMENT wp;
+                    ::GetWindowPlacement(GetHWnd(), &wp);
+                    RECT rc;
+                    ::GetWindowRect(GetHWnd(), &rc);
+                    if (!::EqualRect(&rc, &wp.rcNormalPosition)) {
+                        WindowResized();
+                    }
                 }
                 mr = mrConsume;
             }
--- a/test/ProblemList.txt	Mon Nov 04 10:12:18 2013 -0800
+++ b/test/ProblemList.txt	Mon Nov 11 23:17:30 2013 -0800
@@ -316,9 +316,6 @@
 # 8007410
 tools/launcher/FXLauncherTest.java                              linux-all
 
-# 7144200
-java/lang/management/ClassLoadingMXBean/LoadCounts.java		generic-all
-
 ############################################################################
 
 # jdk_jdi
@@ -342,4 +339,7 @@
 # Filed 6772009
 java/util/concurrent/locks/ReentrantLock/CancelledLockLoops.java generic-all
 
+# 8026772: test/sun/util/resources/TimeZone/Bug6317929.java failing
+sun/util/resources/TimeZone/Bug6317929.java                     generic-all
+
 ############################################################################
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/com/sun/java/swing/plaf/windows/8016551/bug8016551.java	Mon Nov 11 23:17:30 2013 -0800
@@ -0,0 +1,90 @@
+/*
+ * 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 8016551
+ * @summary JMenuItem in WindowsLookAndFeel can't paint default icons
+ * @author Leonid Romanov
+ * @run main bug8016551
+ */
+
+import javax.swing.*;
+import java.awt.Graphics;
+import java.awt.Toolkit;
+import sun.awt.SunToolkit;
+
+public class bug8016551 {
+    private static volatile RuntimeException exception = null;
+
+    public static void main(String[] args) throws Exception {
+        try {
+            UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
+        } catch (Exception e) {
+            // We intentionally allow the test to run with other l&f
+        }
+
+        SwingUtilities.invokeAndWait(new Runnable() {
+            @Override
+            public void run() {
+                try {
+                    Icon icon = UIManager.getIcon("InternalFrame.closeIcon");
+                    if (icon == null) {
+                        return;
+                    }
+
+                    JMenuItem item = new TestMenuItem(icon);
+                    JFrame f = new JFrame();
+                    f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
+                    f.getContentPane().add(item);
+                    f.pack();
+                    f.setVisible(true);
+                } catch (ClassCastException e) {
+                    throw new RuntimeException(e);
+                }
+            }
+        });
+
+        SunToolkit tk = (SunToolkit)Toolkit.getDefaultToolkit();
+        tk.realSync();
+
+        if (exception != null) {
+            throw exception;
+        }
+    }
+
+    static class TestMenuItem extends JMenuItem {
+        TestMenuItem(Icon icon) {
+            super(icon);
+        }
+
+        @Override
+        public void paint(Graphics g) {
+            try {
+                super.paint(g);
+            } catch (RuntimeException e) {
+                exception = e;
+            }
+        }
+    }
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/com/sun/jdi/LambdaBreakpointTest.java	Mon Nov 11 23:17:30 2013 -0800
@@ -0,0 +1,110 @@
+/*
+ * 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.
+ */
+
+/********** LINE NUMBER SENSITIVE! *****************************************************************/
+
+/**
+ *  @test
+ *  @summary Test setting breakpoints on lambda calls
+ *
+ *  @author Staffan Larsen
+ *
+ *  @run build TestScaffold VMConnection TargetListener TargetAdapter
+ *  @run compile -g LambdaBreakpointTest.java
+ *  @run main LambdaBreakpointTest
+ */
+import java.util.List;
+
+import com.sun.jdi.LocalVariable;
+import com.sun.jdi.Location;
+import com.sun.jdi.Method;
+import com.sun.jdi.ObjectReference;
+import com.sun.jdi.ReferenceType;
+import com.sun.jdi.StackFrame;
+import com.sun.jdi.StringReference;
+import com.sun.jdi.ThreadReference;
+import com.sun.jdi.event.BreakpointEvent;
+import com.sun.jdi.event.StepEvent;
+
+ /********** target program **********/
+
+class LambdaBreakpointTestTarg {
+
+    static int[] breakpointLines = {
+            62, 66, 63, 64, 65, 67
+    };
+
+    public static void main(String[] args) {
+        test();
+    }
+
+    private static void test() {
+        Runnable r = () -> {                          // B1: L62
+            String from = "lambda";                   // B3: L63
+            System.out.println("Hello from " + from); // B4: L64
+        };                                            // B5: L65
+        r.run();                                      // B2: L66
+        System.out.println("Goodbye.");               // B6: L67
+    }
+}
+
+
+ /********** test program **********/
+
+public class LambdaBreakpointTest extends TestScaffold {
+
+    LambdaBreakpointTest (String args[]) {
+        super(args);
+    }
+
+    public static void main(String[] args)
+        throws Exception
+    {
+        new LambdaBreakpointTest (args).startTests();
+    }
+
+    /********** test core **********/
+
+    protected void runTests()
+        throws Exception
+    {
+        startToMain("LambdaBreakpointTestTarg");
+
+        // Put a breakpoint on each location in the order they should happen
+        for (int line : LambdaBreakpointTestTarg.breakpointLines) {
+            System.out.println("Running to line: " + line);
+            BreakpointEvent be = resumeTo("LambdaBreakpointTestTarg", line);
+            int stoppedAt = be.location().lineNumber();
+            System.out.println("Stopped at line: " + stoppedAt);
+            if (stoppedAt != line) {
+                throw new Exception("Stopped on the wrong line: "
+                        + stoppedAt + " != " + line);
+            }
+        }
+
+        /*
+         * resume the target listening for events
+         */
+        listenUntilVMDisconnect();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/com/sun/jdi/LambdaStepTest.java	Mon Nov 11 23:17:30 2013 -0800
@@ -0,0 +1,185 @@
+/*
+ * 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
+ *  @summary Test stepping through lambdas
+ *
+ *  @author Staffan Larsen
+ *
+ *  @run build TestScaffold VMConnection TargetListener TargetAdapter
+ *  @run compile -g LambdaStepTest.java
+ *  @run main LambdaStepTest
+ */
+import com.sun.jdi.LocalVariable;
+import com.sun.jdi.ObjectReference;
+import com.sun.jdi.ReferenceType;
+import com.sun.jdi.StackFrame;
+import com.sun.jdi.StringReference;
+import com.sun.jdi.ThreadReference;
+import com.sun.jdi.event.BreakpointEvent;
+import com.sun.jdi.event.StepEvent;
+
+ /********** target program **********/
+
+interface DefaultTest {
+    default void defaultMethod() {
+        String from = "default";
+        System.out.println("Hello from " + from);
+    }
+}
+class LambdaStepTestTarg implements DefaultTest {
+    private void test() {
+        String from = "test";
+        System.out.println("Hello from " + from);
+    }
+    private static void instanceTest() {
+        LambdaStepTestTarg l = new LambdaStepTestTarg();
+        l.test();
+    }
+    private static void lambdaTest() {
+        Runnable r = () -> {
+            String from = "lambda";
+            System.out.println("Hello from " + from);
+        };
+        r.run();
+    }
+    private static void defaultTest() {
+        LambdaStepTestTarg l = new LambdaStepTestTarg();
+        l.defaultMethod();
+    }
+    public static void main(String[] args) {
+        instanceTest();
+        lambdaTest();
+        defaultTest();
+        System.out.println("Goodbye from LambdaStepTestTarg!");
+    }
+}
+
+
+ /********** test program **********/
+
+public class LambdaStepTest extends TestScaffold {
+    LambdaStepTest (String args[]) {
+        super(args);
+    }
+
+    public static void main(String[] args)
+        throws Exception
+    {
+        new LambdaStepTest (args).startTests();
+    }
+
+    /********** test core **********/
+
+    protected void runTests()
+        throws Exception
+    {
+        // ## Normal instance method
+
+        BreakpointEvent bpe = startTo("LambdaStepTestTarg", "instanceTest", "()V");
+        ThreadReference thread = bpe.thread();
+
+        // step over allocation
+        StepEvent se = stepOverLine(thread);
+        System.out.println(se.thread().frame(0));
+
+        // step into test();
+        se = stepIntoLine(thread);
+        System.out.println(se.thread().frame(0));
+
+        // step over variable initialization
+        se = stepOverLine(thread);
+        System.out.println(se.thread().frame(0));
+
+        // get value of variable "from"
+        StackFrame frame = se.thread().frame(0);
+        LocalVariable lv = frame.visibleVariableByName("from");
+        System.out.println(lv);
+        StringReference sr = (StringReference) frame.getValue(lv);
+        if (!sr.value().equals("test")) {
+            throw new Exception("Unexpected variable value in instanceTest: "+sr.value());
+        }
+
+
+        // ## Lambda method
+
+        bpe = resumeTo("LambdaStepTestTarg", "lambdaTest", "()V");
+        thread = bpe.thread();
+
+        // step over allocation
+        se = stepOverLine(thread);
+        System.out.println(se.thread().frame(0));
+
+        // step into run() of the lambda
+        se = stepIntoLine(thread);
+        System.out.println(se.thread().frame(0));
+
+        // step over variable initialization
+        se = stepOverLine(thread);
+        System.out.println(se.thread().frame(0));
+
+        // get value of variable "from"
+        frame = se.thread().frame(0);
+        lv = frame.visibleVariableByName("from");
+        System.out.println(lv);
+        sr = (StringReference) frame.getValue(lv);
+        if (!sr.value().equals("lambda")) {
+            throw new Exception("Unexpected variable value in lambdaTest: "+sr.value());
+        }
+
+
+        // ## Default method
+
+        bpe = resumeTo("LambdaStepTestTarg", "defaultTest", "()V");
+        thread = bpe.thread();
+
+        // step over allocation
+        se = stepOverLine(thread);
+        System.out.println(se.thread().frame(0));
+
+        // step into defaultMethod()
+        se = stepIntoLine(thread);
+        System.out.println(se.thread().frame(0));
+
+        // step over variable initialization
+        se = stepOverLine(thread);
+        System.out.println(se.thread().frame(0));
+
+        // get value of variable "from"
+        frame = se.thread().frame(0);
+        lv = frame.visibleVariableByName("from");
+        System.out.println(lv);
+        sr = (StringReference) frame.getValue(lv);
+        if (!sr.value().equals("default")) {
+            throw new Exception("Unexpected variable value in lambdaTest: "+sr.value());
+        }
+
+
+        /*
+         * resume the target listening for events
+         */
+        listenUntilVMDisconnect();
+
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/awt/Frame/MaximizedByPlatform/MaximizedByPlatform.java	Mon Nov 11 23:17:30 2013 -0800
@@ -0,0 +1,105 @@
+/*
+ * 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 8026143
+ * @summary [macosx] Maximized state could be inconsistent between peer and frame
+ * @author Petr Pchelko
+ * @run main MaximizedByPlatform
+ */
+
+import sun.awt.OSInfo;
+import sun.awt.SunToolkit;
+
+import java.awt.*;
+
+public class MaximizedByPlatform {
+    private static Frame frame;
+    private static Rectangle availableScreenBounds;
+
+    public static void main(String[] args) {
+        if (OSInfo.getOSType() != OSInfo.OSType.MACOSX) {
+            // Test only for macosx. Pass
+            return;
+        }
+
+        availableScreenBounds = getAvailableScreenBounds();
+
+        // Test 1. The maximized state is set in setBounds
+        try {
+            frame = new Frame();
+            frame.setBounds(100, 100, 100, 100);
+            frame.setVisible(true);
+
+            ((SunToolkit)Toolkit.getDefaultToolkit()).realSync();
+
+            frame.setBounds(availableScreenBounds.x, availableScreenBounds.y,
+                    availableScreenBounds.width, availableScreenBounds.height);
+
+            ((SunToolkit)Toolkit.getDefaultToolkit()).realSync();
+
+            if (frame.getExtendedState() != Frame.MAXIMIZED_BOTH) {
+                throw new RuntimeException("Maximized state was not set for frame in setBounds");
+            }
+        } finally {
+            frame.dispose();
+        }
+
+
+        // Test 2. The maximized state is set in setVisible
+        try {
+            frame = new Frame();
+            frame.setBounds(availableScreenBounds.x, availableScreenBounds.y,
+                    availableScreenBounds.width + 100, availableScreenBounds.height);
+            frame.setVisible(true);
+
+            ((SunToolkit)Toolkit.getDefaultToolkit()).realSync();
+
+            if (frame.getExtendedState() != Frame.MAXIMIZED_BOTH) {
+                throw new RuntimeException("Maximized state was not set for frame in setVisible");
+            }
+        } finally {
+            frame.dispose();
+        }
+    }
+
+    private static Rectangle getAvailableScreenBounds() {
+        final Toolkit toolkit = Toolkit.getDefaultToolkit();
+        final GraphicsEnvironment graphicsEnvironment =
+                GraphicsEnvironment.getLocalGraphicsEnvironment();
+        final GraphicsDevice graphicsDevice =
+                graphicsEnvironment.getDefaultScreenDevice();
+
+        final Dimension screenSize = toolkit.getScreenSize();
+        final Insets screenInsets = toolkit.getScreenInsets(
+                graphicsDevice.getDefaultConfiguration());
+
+        final Rectangle availableScreenBounds = new Rectangle(screenSize);
+
+        availableScreenBounds.x += screenInsets.left;
+        availableScreenBounds.y += screenInsets.top;
+        availableScreenBounds.width -= (screenInsets.left + screenInsets.right);
+        availableScreenBounds.height -= (screenInsets.top + screenInsets.bottom);
+        return availableScreenBounds;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/awt/FullScreen/8013581/bug8013581.java	Mon Nov 11 23:17:30 2013 -0800
@@ -0,0 +1,108 @@
+/*
+ * 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 8013581
+ * @summary [macosx] Key Bindings break with awt GraphicsEnvironment setFullScreenWindow
+ * @author leonid.romanov@oracle.com
+ * @run main bug8013581
+ */
+
+import sun.awt.*;
+import java.awt.*;
+import java.awt.event.*;
+
+public class bug8013581 {
+    private static Frame frame;
+    private static volatile int listenerCallCounter = 0;
+
+    public static void main(String[] args) throws Exception {
+        final GraphicsEnvironment ge = GraphicsEnvironment
+                .getLocalGraphicsEnvironment();
+        final GraphicsDevice[] devices = ge.getScreenDevices();
+
+        final SunToolkit toolkit = (SunToolkit)Toolkit.getDefaultToolkit();
+        final Robot robot = new Robot();
+        robot.setAutoDelay(50);
+
+        createAndShowGUI();
+        toolkit.realSync();
+
+        Exception error = null;
+        for (final GraphicsDevice device : devices) {
+            if (!device.isFullScreenSupported()) {
+                continue;
+            }
+
+            device.setFullScreenWindow(frame);
+            sleep();
+
+            robot.keyPress(KeyEvent.VK_A);
+            robot.keyRelease(KeyEvent.VK_A);
+            toolkit.realSync();
+
+            device.setFullScreenWindow(null);
+            sleep();
+
+            if (listenerCallCounter != 2) {
+                error = new Exception("Test failed: KeyListener called " + listenerCallCounter + " times instead of 2!");
+                break;
+            }
+
+            listenerCallCounter = 0;
+        }
+
+        frame.dispose();
+
+        if (error != null) {
+            throw error;
+        }
+     }
+
+    private static void createAndShowGUI() {
+        frame = new Frame("Test");
+        frame.addKeyListener(new KeyAdapter() {
+            @Override
+            public void keyPressed(KeyEvent e) {
+                listenerCallCounter++;
+            }
+
+            @Override
+            public void keyReleased(KeyEvent e) {
+                listenerCallCounter++;
+            }
+        });
+
+        frame.setUndecorated(true);
+        frame.setVisible(true);
+    }
+
+    private static void sleep() {
+        ((SunToolkit) Toolkit.getDefaultToolkit()).realSync();
+        try {
+            Thread.sleep(2000);
+        } catch (InterruptedException ignored) {
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/awt/GradientPaint/GradientTransformTest.java	Mon Nov 11 23:17:30 2013 -0800
@@ -0,0 +1,126 @@
+/*
+ * 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.*;
+import java.awt.MultipleGradientPaint.*;
+import java.awt.geom.*;
+import java.awt.image.*;
+
+/**
+ * @test
+ * @bug 8023483
+ * @summary tests if the transform-parameter is applied correctly when creating
+ *          a gradient.
+ * @author ceisserer
+ */
+public class GradientTransformTest extends Frame {
+    BufferedImage srcImg;
+    Image dstImg;
+
+    public GradientTransformTest() {
+        srcImg = createSrcImage();
+        dstImg = getGraphicsConfiguration().createCompatibleVolatileImage(20,
+                20);
+    }
+
+    protected void renderToVI(BufferedImage src, Image dst) {
+        Graphics2D g = (Graphics2D) dst.getGraphics();
+
+        g.setColor(Color.WHITE);
+        g.fillRect(0, 0, dst.getWidth(null), dst.getHeight(null));
+
+        AffineTransform at = new AffineTransform();
+        at.translate(-100, 0);
+
+        g.setPaint(new LinearGradientPaint(new Point2D.Float(100, 0),
+                new Point2D.Float(120, 0), new float[] { 0.0f, 0.75f, 1.0f },
+                new Color[] { Color.red, Color.green, Color.blue },
+                CycleMethod.NO_CYCLE, ColorSpaceType.SRGB, at));
+
+        g.fillRect(-10, -10, 30, 30);
+    }
+
+    public void paint(Graphics g1) {
+        Graphics2D g = (Graphics2D) g1;
+        renderToVI(createSrcImage(), dstImg);
+        g.drawImage(dstImg, 20, 20, null);
+    }
+
+    public void showFrame() {
+        setSize(500, 500);
+        setVisible(true);
+    }
+
+    public void test() {
+        renderToVI(createSrcImage(), dstImg);
+
+        BufferedImage validationImg = new BufferedImage(20, 20,
+                BufferedImage.TYPE_INT_RGB);
+        Graphics2D valG = (Graphics2D) validationImg.getGraphics();
+        valG.drawImage(dstImg, 0, 0, null);
+
+        // Loop over all pixel, and count the different pixel values
+        // encountered.
+        boolean gradientTranslated = false;
+        for (int x = 0; x < validationImg.getWidth() && !gradientTranslated; x++) {
+            for (int y = 0; y < validationImg.getHeight()
+                    && !gradientTranslated; y++) {
+                int rgb = validationImg.getRGB(x, y);
+                if (rgb != -65279) {
+                    gradientTranslated = true;
+                }
+            }
+        }
+
+        if (gradientTranslated) {
+            System.out.println("Passed!");
+        } else {
+            throw new RuntimeException("Test FAILED!");
+        }
+    }
+
+    protected BufferedImage createSrcImage() {
+        BufferedImage bi = new BufferedImage(10, 10, BufferedImage.TYPE_INT_RGB);
+        Graphics2D g = (Graphics2D) bi.getGraphics();
+        g.setColor(Color.YELLOW);
+        g.fillRect(0, 0, 10, 10);
+        g.setColor(Color.black);
+        g.drawLine(0, 0, 10, 10);
+        return bi;
+    }
+
+    public static void main(String[] args) throws Exception {
+        boolean show = (args.length > 0 && "-show".equals(args[0]));
+        final GradientTransformTest t = new GradientTransformTest();
+
+        if (show) {
+            EventQueue.invokeAndWait(new Runnable() {
+                public void run() {
+                    t.showFrame();
+                }
+            });
+        } else {
+            t.test();
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/awt/GradientPaint/LinearColorSpaceGradientTest.java	Mon Nov 11 23:17:30 2013 -0800
@@ -0,0 +1,113 @@
+/*
+ * 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.*;
+import java.awt.MultipleGradientPaint.*;
+import java.awt.geom.*;
+import java.awt.image.*;
+
+/**
+ * @test
+ * @bug 8023483
+ * @summary tests wether the colorspace-parameter is applied correctly when
+ *          creating a gradient.
+ * @author ceisserer
+ */
+public class LinearColorSpaceGradientTest extends Frame {
+    BufferedImage srcImg;
+    Image dstImg;
+
+    public LinearColorSpaceGradientTest() {
+        srcImg = createSrcImage();
+        dstImg = getGraphicsConfiguration().createCompatibleVolatileImage(20,
+                20);
+    }
+
+    protected void renderToVI(BufferedImage src, Image dst) {
+        Graphics2D g = (Graphics2D) dst.getGraphics();
+
+        g.setColor(Color.WHITE);
+        g.fillRect(0, 0, dst.getWidth(null), dst.getHeight(null));
+
+        AffineTransform at = new AffineTransform();
+        g.setPaint(new LinearGradientPaint(new Point2D.Float(0, 0),
+                new Point2D.Float(20, 0), new float[] { 0.0f, 1.0f },
+                new Color[] { Color.green, Color.blue }, CycleMethod.NO_CYCLE,
+                ColorSpaceType.LINEAR_RGB, at));
+
+        g.fillRect(-10, -10, 30, 30);
+    }
+
+    public void paint(Graphics g1) {
+        Graphics2D g = (Graphics2D) g1;
+        renderToVI(createSrcImage(), dstImg);
+        g.drawImage(dstImg, 20, 20, null);
+    }
+
+    public void showFrame() {
+        setSize(500, 500);
+        setVisible(true);
+    }
+
+    public void test() {
+        renderToVI(createSrcImage(), dstImg);
+
+        BufferedImage validationImg = new BufferedImage(20, 20,
+                BufferedImage.TYPE_INT_RGB);
+        Graphics2D valG = (Graphics2D) validationImg.getGraphics();
+        valG.drawImage(dstImg, 0, 0, null);
+
+        int b = validationImg.getRGB(10, 10) & 0x000000FF;
+
+        if (b > 150) {
+            System.out.println("Passed!");
+        } else {
+            throw new RuntimeException("Test FAILED!");
+        }
+    }
+
+    protected BufferedImage createSrcImage() {
+        BufferedImage bi = new BufferedImage(10, 10, BufferedImage.TYPE_INT_RGB);
+        Graphics2D g = (Graphics2D) bi.getGraphics();
+        g.setColor(Color.YELLOW);
+        g.fillRect(0, 0, 10, 10);
+        g.setColor(Color.black);
+        g.drawLine(0, 0, 10, 10);
+        return bi;
+    }
+
+    public static void main(String[] args) throws Exception {
+        boolean show = (args.length > 0 && "-show".equals(args[0]));
+
+        final LinearColorSpaceGradientTest t = new LinearColorSpaceGradientTest();
+        if (show) {
+            EventQueue.invokeAndWait(new Runnable() {
+                public void run() {
+                    t.showFrame();
+                }
+            });
+        } else {
+            t.test();
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/awt/InputMethods/DiacriticsTest/DiacriticsTest.html	Mon Nov 11 23:17:30 2013 -0800
@@ -0,0 +1,45 @@
+<!--
+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.
+-->
+
+<html>
+<head>
+<title> DiacriticsTest </title>
+</head>
+<body>
+<applet code="DiacriticsTest.class" width=350 height=200></applet>
+
+Test run requires the following keyboard layouts to be installed:
+Linux OS: English (US, alternative international)
+Windows OS: Hungarian
+
+To test JDK-8000423 fix (Linux only!):
+please switch to US alternative international layout and try to type diacritics
+(using the following combinations: `+e; `+u; etc.)
+
+To test JDK-7197619 fix (Windows only!):
+please switch to Hungarian keyboard layout and try to type diacritics 
+(Ctrl+Alt+2 e; Ctrl+Alt+2 E)
+
+If you can do that then the test is passed; otherwise failed.
+</body>
+</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/awt/InputMethods/DiacriticsTest/DiacriticsTest.java	Mon Nov 11 23:17:30 2013 -0800
@@ -0,0 +1,63 @@
+/*
+ * 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 8000423 7197619 8025649
+  @summary Check if diacritical signs could be typed for TextArea and TextField
+  @run applet/manual=yesno DiacriticsTest.html
+*/
+
+
+import java.applet.Applet;
+import java.awt.*;
+import javax.swing.JPanel;
+
+
+public class DiacriticsTest extends Applet {
+
+    public void init() {
+        this.setLayout(new BorderLayout());
+    }
+
+    public void start() {
+
+        setSize(350, 200);
+
+        JPanel panel = new JPanel();
+        panel.setLayout(new GridLayout(2, 1));
+
+        TextArea txtArea = new TextArea();
+        panel.add(txtArea);
+
+        TextField txtField = new TextField();
+        panel.add(txtField);
+
+        add(panel, BorderLayout.CENTER);
+
+        validate();
+        setVisible(true);
+    }
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/awt/List/FirstItemRemoveTest/FirstItemRemoveTest.html	Mon Nov 11 23:17:30 2013 -0800
@@ -0,0 +1,43 @@
+<html>
+<!--
+  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 6299858
+  @summary PIT. Focused border not shown on List if selected item is removed, XToolkit
+  @author Dmitry.Cherepanov@SUN.COM area=awt.list
+  @run applet FirstItemRemoveTest.html
+  -->
+<head>
+<title>  </title>
+</head>
+<body>
+
+<h1>FirstItemRemoveTest<br>Bug ID: 6299858 </h1>
+
+<p> This is an AUTOMATIC test, simply wait for completion </p>
+
+<APPLET CODE="FirstItemRemoveTest.class" WIDTH=200 HEIGHT=200></APPLET>
+</body>
+</html>
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/awt/List/FirstItemRemoveTest/FirstItemRemoveTest.java	Mon Nov 11 23:17:30 2013 -0800
@@ -0,0 +1,119 @@
+/*
+ * 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 6299858 7124338
+  @summary PIT. Focused border not shown on List if selected item is removed, XToolkit
+  @author Dmitry.Cherepanov@SUN.COM area=awt.list
+  @run applet FirstItemRemoveTest.html
+*/
+
+import java.applet.Applet;
+import java.awt.*;
+import java.awt.event.*;
+
+public class FirstItemRemoveTest extends Applet
+{
+    List list = new List(4, false);
+    Panel panel = new Panel();
+
+    public void init()
+    {
+        list.add("000");
+        list.add("111");
+        list.add("222");
+        list.add("333");
+        list.add("444");
+        list.add("555");
+
+        panel.setLayout(new FlowLayout ());
+        panel.add(list);
+
+        this.add(panel);
+        this.setLayout (new FlowLayout ());
+    }//End  init()
+
+    public void start ()
+    {
+        setSize (200,200);
+        setVisible(true);
+        validate();
+
+        test();
+    }// start()
+
+    private void test(){
+
+        if (sun.awt.OSInfo.getOSType() == sun.awt.OSInfo.OSType.MACOSX) {
+            System.err.println("Skipped. This test is not for OS X.");
+            return;
+        }
+
+        Robot r;
+        try {
+            r = new Robot();
+        } catch(AWTException e) {
+            throw new RuntimeException(e.getMessage());
+        }
+
+        // Removing first item in order to reproduce incorrect behaviour
+        r.delay(1000);
+        list.remove(0);
+        r.delay(1000);
+
+        // Request focus to list
+        Point loc = this.getLocationOnScreen();
+        r.delay(1000);
+
+        r.mouseMove(loc.x+10, loc.y+10);
+        r.delay(10);
+        r.mousePress(InputEvent.BUTTON1_MASK);
+        r.delay(10);
+        r.mouseRelease(InputEvent.BUTTON1_MASK);
+        r.delay(1000);
+
+        list.requestFocusInWindow();
+        r.delay(1000);
+        r.waitForIdle();
+        if (KeyboardFocusManager.getCurrentKeyboardFocusManager().getFocusOwner() != list){
+            throw new RuntimeException("Test failed - list isn't focus owner.");
+        }
+
+        // The focus index should be set to first item after removing
+        // So if we press VK_SPACE then the selected item will be equals 0.
+        r.delay(100);
+        r.keyPress(KeyEvent.VK_SPACE);
+        r.delay(10);
+        r.keyRelease(KeyEvent.VK_SPACE);
+        r.delay(1000);
+        r.waitForIdle();
+
+        int selectedIndex = list.getSelectedIndex();
+        if (selectedIndex != 0){
+            throw new RuntimeException("Test failed. list.getSelectedIndex() = "+selectedIndex);
+        }
+
+    }
+
+}// class AutomaticAppletTest
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/awt/Paint/ButtonRepaint.java	Mon Nov 11 23:17:30 2013 -0800
@@ -0,0 +1,88 @@
+/*
+ * 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.*;
+import java.awt.peer.ButtonPeer;
+
+/**
+ * @test
+ * @bug 7090424
+ * @author Sergey Bylokhov
+ */
+public final class ButtonRepaint extends Button {
+
+    public static void main(final String[] args) {
+        for (int i = 0; i < 10; ++i) {
+            final Frame frame = new Frame();
+            frame.setSize(300, 300);
+            frame.setLocationRelativeTo(null);
+            ButtonRepaint button = new ButtonRepaint();
+            frame.add(button);
+            frame.setVisible(true);
+            sleep();
+            button.test();
+            frame.dispose();
+        }
+    }
+
+    private static void sleep() {
+        try {
+            Thread.sleep(2000);
+        } catch (InterruptedException ignored) {
+        }
+    }
+
+    @Override
+    public void paint(final Graphics g) {
+        super.paint(g);
+        if (!EventQueue.isDispatchThread()) {
+            throw new RuntimeException("Wrong thread");
+        }
+        test();
+    }
+
+    void test() {
+        setLabel("");
+        setLabel(null);
+        setLabel(getLabel());
+        ((ButtonPeer) getPeer()).setLabel("");
+        ((ButtonPeer) getPeer()).setLabel(null);
+        ((ButtonPeer) getPeer()).setLabel(getLabel());
+
+        setFont(null);
+        setFont(getFont());
+        getPeer().setFont(getFont());
+
+        setBackground(null);
+        setBackground(getBackground());
+        getPeer().setBackground(getBackground());
+
+        setForeground(null);
+        setForeground(getForeground());
+        getPeer().setForeground(getForeground());
+
+        setEnabled(isEnabled());
+        getPeer().setEnabled(isEnabled());
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/awt/Paint/CheckboxRepaint.java	Mon Nov 11 23:17:30 2013 -0800
@@ -0,0 +1,93 @@
+/*
+ * 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.*;
+import java.awt.peer.CheckboxPeer;
+
+/**
+ * @test
+ * @bug 7090424
+ * @author Sergey Bylokhov
+ */
+public final class CheckboxRepaint extends Checkbox {
+
+    public static void main(final String[] args) {
+        for (int i = 0; i < 10; ++i) {
+            final Frame frame = new Frame();
+            frame.setSize(300, 300);
+            frame.setLocationRelativeTo(null);
+            CheckboxRepaint checkbox = new CheckboxRepaint();
+            frame.add(checkbox);
+            frame.setVisible(true);
+            sleep();
+            checkbox.test();
+            frame.dispose();
+        }
+    }
+
+    private static void sleep() {
+        try {
+            Thread.sleep(2000);
+        } catch (InterruptedException ignored) {
+        }
+    }
+
+    @Override
+    public void paint(final Graphics g) {
+        super.paint(g);
+        if (!EventQueue.isDispatchThread()) {
+            throw new RuntimeException("Wrong thread");
+        }
+        test();
+    }
+
+    void test() {
+        setState(getState());
+        ((CheckboxPeer) getPeer()).setState(getState());
+
+        setCheckboxGroup(getCheckboxGroup());
+        ((CheckboxPeer) getPeer()).setCheckboxGroup(getCheckboxGroup());
+
+        setLabel("");
+        setLabel(null);
+        setLabel(getLabel());
+        ((CheckboxPeer) getPeer()).setLabel("");
+        ((CheckboxPeer) getPeer()).setLabel(null);
+        ((CheckboxPeer) getPeer()).setLabel(getLabel());
+
+        setFont(null);
+        setFont(getFont());
+        getPeer().setFont(getFont());
+
+        setBackground(null);
+        setBackground(getBackground());
+        getPeer().setBackground(getBackground());
+
+        setForeground(null);
+        setForeground(getForeground());
+        getPeer().setForeground(getForeground());
+
+        setEnabled(isEnabled());
+        getPeer().setEnabled(isEnabled());
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/awt/Paint/ExposeOnEDT.java	Mon Nov 11 23:17:30 2013 -0800
@@ -0,0 +1,293 @@
+/*
+ * 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 sun.awt.SunToolkit;
+
+import java.awt.*;
+
+/**
+ * @test
+ * @bug 7090424
+ * @author Sergey Bylokhov
+ * @run main ExposeOnEDT
+ */
+public final class ExposeOnEDT {
+
+    private static final Button buttonStub = new Button() {
+        @Override
+        public void paint(final Graphics g) {
+            buttonPainted = true;
+            if (!EventQueue.isDispatchThread()) {
+                throw new RuntimeException("Wrong thread");
+            }
+        }
+    };
+    private static final Canvas canvasStub = new Canvas() {
+        @Override
+        public void paint(final Graphics g) {
+            canvasPainted = true;
+            if (!EventQueue.isDispatchThread()) {
+                throw new RuntimeException("Wrong thread");
+            }
+        }
+    };
+    private static final Checkbox checkboxStub = new Checkbox() {
+        @Override
+        public void paint(final Graphics g) {
+            checkboxPainted = true;
+            if (!EventQueue.isDispatchThread()) {
+                throw new RuntimeException("Wrong thread");
+            }
+        }
+    };
+    private static final Choice choiceStub = new Choice() {
+        @Override
+        public void paint(final Graphics g) {
+            choicePainted = true;
+            if (!EventQueue.isDispatchThread()) {
+                throw new RuntimeException("Wrong thread");
+            }
+        }
+    };
+    private static final Component lwComponentStub = new Component() {
+        @Override
+        public void paint(final Graphics g) {
+            lwPainted = true;
+            if (!EventQueue.isDispatchThread()) {
+                throw new RuntimeException("Wrong thread");
+            }
+        }
+    };
+    private static final Container containerStub = new Container() {
+        @Override
+        public void paint(final Graphics g) {
+            containerPainted = true;
+            if (!EventQueue.isDispatchThread()) {
+                throw new RuntimeException("Wrong thread");
+            }
+        }
+    };
+    private static final Frame frame = new Frame() {
+        @Override
+        public void paint(final Graphics g) {
+            super.paint(g);
+            framePainted = true;
+            if (!EventQueue.isDispatchThread()) {
+                throw new RuntimeException("Wrong thread");
+            }
+        }
+    };
+    private static final Label labelStub = new Label() {
+        @Override
+        public void paint(final Graphics g) {
+            labelPainted = true;
+            if (!EventQueue.isDispatchThread()) {
+                throw new RuntimeException("Wrong thread");
+            }
+        }
+    };
+    private static final List listStub = new List() {
+        @Override
+        public void paint(final Graphics g) {
+            listPainted = true;
+            if (!EventQueue.isDispatchThread()) {
+                throw new RuntimeException("Wrong thread");
+            }
+        }
+    };
+    private static final Panel panelStub = new Panel() {
+        @Override
+        public void paint(final Graphics g) {
+            panelPainted = true;
+            if (!EventQueue.isDispatchThread()) {
+                throw new RuntimeException("Wrong thread");
+            }
+        }
+    };
+    private static final Scrollbar scrollbarStub = new Scrollbar() {
+        @Override
+        public void paint(final Graphics g) {
+            scrollbarPainted = true;
+            if (!EventQueue.isDispatchThread()) {
+                throw new RuntimeException("Wrong thread");
+            }
+        }
+    };
+    private static final ScrollPane scrollPaneStub = new ScrollPane() {
+        @Override
+        public void paint(final Graphics g) {
+            scrollPanePainted = true;
+            if (!EventQueue.isDispatchThread()) {
+                throw new RuntimeException("Wrong thread");
+            }
+        }
+    };
+    private static final TextArea textAreaStub = new TextArea() {
+        @Override
+        public void paint(final Graphics g) {
+            textAreaPainted = true;
+            if (!EventQueue.isDispatchThread()) {
+                throw new RuntimeException("Wrong thread");
+            }
+        }
+    };
+    private static final TextField textFieldStub = new TextField() {
+        @Override
+        public void paint(final Graphics g) {
+            textFieldPainted = true;
+            if (!EventQueue.isDispatchThread()) {
+                throw new RuntimeException("Wrong thread");
+            }
+        }
+    };
+    private static volatile boolean lwPainted;
+    private static volatile boolean buttonPainted;
+    private static volatile boolean canvasPainted;
+    private static volatile boolean checkboxPainted;
+    private static volatile boolean choicePainted;
+    private static volatile boolean containerPainted;
+    private static volatile boolean framePainted;
+    private static volatile boolean labelPainted;
+    private static volatile boolean listPainted;
+    private static volatile boolean panelPainted;
+    private static volatile boolean scrollbarPainted;
+    private static volatile boolean scrollPanePainted;
+    private static volatile boolean textAreaPainted;
+    private static volatile boolean textFieldPainted;
+
+    public static void main(final String[] args) throws Exception {
+        //Frame initialisation
+        frame.setLayout(new GridLayout());
+        frame.setSize(new Dimension(200, 200));
+        frame.setLocationRelativeTo(null);
+        frame.setVisible(true);
+        sleep();
+
+        frame.add(buttonStub);
+        frame.add(canvasStub);
+        frame.add(checkboxStub);
+        frame.add(choiceStub);
+        frame.add(lwComponentStub);
+        frame.add(containerStub);
+        frame.add(labelStub);
+        frame.add(listStub);
+        frame.add(panelStub);
+        frame.add(scrollbarStub);
+        frame.add(scrollPaneStub);
+        frame.add(textAreaStub);
+        frame.add(textFieldStub);
+        frame.validate();
+        sleep();
+
+        // Force expose event from the native system.
+        initPaintedFlags();
+        frame.setSize(300, 300);
+        frame.validate();
+        sleep();
+
+        //Check results.
+        validation();
+
+        cleanup();
+    }
+
+    private static void initPaintedFlags() {
+        lwPainted = false;
+        buttonPainted = false;
+        canvasPainted = false;
+        checkboxPainted = false;
+        choicePainted = false;
+        containerPainted = false;
+        framePainted = false;
+        labelPainted = false;
+        listPainted = false;
+        panelPainted = false;
+        scrollbarPainted = false;
+        scrollPanePainted = false;
+        textAreaPainted = false;
+        textFieldPainted = false;
+    }
+
+    private static void validation() {
+        if (!buttonPainted) {
+            fail("Paint is not called a Button ");
+        }
+        if (!canvasPainted) {
+            fail("Paint is not called a Canvas ");
+        }
+        if (!checkboxPainted) {
+            fail("Paint is not called a Checkbox ");
+        }
+        if (!choicePainted) {
+            fail("Paint is not called a Choice ");
+        }
+        if (!lwPainted) {
+            fail("Paint is not called on a lightweight");
+        }
+        if (!containerPainted) {
+            fail("Paint is not called on a Container");
+        }
+        if (!labelPainted) {
+            fail("Paint is not called on a Label");
+        }
+        if (!listPainted) {
+            fail("Paint is not called on a List");
+        }
+        if (!panelPainted) {
+            fail("Paint is not called on a Panel");
+        }
+        if (!scrollbarPainted) {
+            fail("Paint is not called on a Scrollbar");
+        }
+        if (!scrollPanePainted) {
+            fail("Paint is not called on a ScrollPane");
+        }
+        if (!textAreaPainted) {
+            fail("Paint is not called on a TextArea");
+        }
+        if (!textFieldPainted) {
+            fail("Paint is not called on a TextField");
+        }
+        if (!framePainted) {
+            fail("Paint is not called on a Frame when paintAll()");
+        }
+    }
+
+    private static void sleep() {
+        ((SunToolkit) Toolkit.getDefaultToolkit()).realSync();
+        try {
+            Thread.sleep(1000L);
+        } catch (InterruptedException ignored) {
+        }
+    }
+
+    private static void fail(final String message) {
+        cleanup();
+        throw new RuntimeException(message);
+    }
+
+    private static void cleanup() {
+        frame.dispose();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/awt/Paint/LabelRepaint.java	Mon Nov 11 23:17:30 2013 -0800
@@ -0,0 +1,93 @@
+/*
+ * 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.EventQueue;
+import java.awt.Frame;
+import java.awt.Graphics;
+import java.awt.Label;
+import java.awt.peer.LabelPeer;
+
+/**
+ * @test
+ * @bug 7090424
+ * @author Sergey Bylokhov
+ */
+public final class LabelRepaint extends Label {
+
+    public static void main(final String[] args) {
+        for (int i = 0; i < 10; ++i) {
+            final Frame frame = new Frame();
+            frame.setSize(300, 300);
+            frame.setLocationRelativeTo(null);
+            LabelRepaint label = new LabelRepaint();
+            frame.add(label);
+            frame.setVisible(true);
+            sleep();
+            label.test();
+            frame.dispose();
+        }
+    }
+
+    private static void sleep() {
+        try {
+            Thread.sleep(2000);
+        } catch (InterruptedException ignored) {
+        }
+    }
+
+    @Override
+    public void paint(final Graphics g) {
+        super.paint(g);
+        if (!EventQueue.isDispatchThread()) {
+            throw new RuntimeException("Wrong thread");
+        }
+        test();
+    }
+
+    void test() {
+        setAlignment(getAlignment());
+        ((LabelPeer) getPeer()).setAlignment(getAlignment());
+
+        setText("");
+        setText(null);
+        setText(getText());
+        ((LabelPeer) getPeer()).setText("");
+        ((LabelPeer) getPeer()).setText(null);
+        ((LabelPeer) getPeer()).setText(getText());
+
+        setFont(null);
+        setFont(getFont());
+        getPeer().setFont(getFont());
+
+        setBackground(null);
+        setBackground(getBackground());
+        getPeer().setBackground(getBackground());
+
+        setForeground(null);
+        setForeground(getForeground());
+        getPeer().setForeground(getForeground());
+
+        setEnabled(isEnabled());
+        getPeer().setEnabled(isEnabled());
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/awt/Paint/ListRepaint.java	Mon Nov 11 23:17:30 2013 -0800
@@ -0,0 +1,91 @@
+/*
+ * 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.EventQueue;
+import java.awt.Frame;
+import java.awt.Graphics;
+import java.awt.List;
+import java.awt.peer.ListPeer;
+
+/**
+ * @test
+ * @bug 7090424
+ * @author Sergey Bylokhov
+ */
+public final class ListRepaint extends List {
+
+    public static void main(final String[] args) {
+        for (int i = 0; i < 10; ++i) {
+            final Frame frame = new Frame();
+            frame.setSize(300, 300);
+            frame.setLocationRelativeTo(null);
+            ListRepaint list = new ListRepaint();
+            list.add("1");
+            list.add("2");
+            list.add("3");
+            list.add("4");
+            list.select(0);
+            frame.add(list);
+            frame.setVisible(true);
+            sleep();
+            list.test();
+            frame.dispose();
+        }
+    }
+
+    private static void sleep() {
+        try {
+            Thread.sleep(2000);
+        } catch (InterruptedException ignored) {
+        }
+    }
+
+    @Override
+    public void paint(final Graphics g) {
+        super.paint(g);
+        if (!EventQueue.isDispatchThread()) {
+            throw new RuntimeException("Wrong thread");
+        }
+        test();
+    }
+
+    void test() {
+        select(0);
+        ((ListPeer) getPeer()).select(getSelectedIndex());
+
+        setFont(null);
+        setFont(getFont());
+        getPeer().setFont(getFont());
+
+        setBackground(null);
+        setBackground(getBackground());
+        getPeer().setBackground(getBackground());
+
+        setForeground(null);
+        setForeground(getForeground());
+        getPeer().setForeground(getForeground());
+
+        setEnabled(isEnabled());
+        getPeer().setEnabled(isEnabled());
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/awt/Paint/bug8024864.java	Mon Nov 11 23:17:30 2013 -0800
@@ -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.
+ */
+
+/* @test
+ * @bug 8024864
+ * @summary [macosx] Problems with rendering of controls
+ * @author Petr Pchelko
+ * @library ../regtesthelpers
+ * @build Util
+ * @run main bug8024864
+ */
+
+import javax.swing.*;
+import java.awt.*;
+
+import test.java.awt.regtesthelpers.Util;
+
+public class bug8024864
+{
+    private static final int REPEATS = 30;
+
+    private static volatile JFrame frame;
+
+    private static void showTestUI() {
+        frame = new JFrame();
+        frame.setBackground(Color.green);
+        JPanel p = new JPanel();
+        p.setBackground(Color.red);
+        JLabel l = new JLabel("Test!");
+        p.add(l);
+        frame.add(p);
+        frame.pack();
+        frame.setLocation(100,100);
+        frame.setVisible(true);
+    }
+
+    public static void main(String[] args) throws Exception
+    {
+        Robot r = new Robot();
+        for (int i = 0; i < REPEATS; i++) {
+            try {
+                SwingUtilities.invokeAndWait(bug8024864::showTestUI);
+                //Thread.sleep(100);
+                Util.waitTillShown(frame);
+                Util.waitForIdle(r);
+
+                Dimension frameSize = frame.getSize();
+                Point loc = new Point(frameSize.width - 5, frameSize.height - 5);
+                SwingUtilities.convertPointToScreen(loc, frame);
+                Color c = r.getPixelColor(loc.x, loc.y);
+
+                if (c.getGreen() > 200) {
+                    throw new RuntimeException("TEST FAILED. Unexpected pixel color " + c);
+                }
+
+            } finally {
+                if (frame != null) {
+                    frame.dispose();
+                }
+                Util.waitForIdle(r);
+            }
+        }
+    }
+}
--- a/test/java/awt/PrintJob/SaveDialogTitleTest.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/test/java/awt/PrintJob/SaveDialogTitleTest.java	Mon Nov 11 23:17:30 2013 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved.
+ * 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
@@ -23,8 +23,8 @@
 
 /*
  * @test
- * @bug 4851363
- * @summary Tests the save to file dialog has a title
+ * @bug 4851363 8025988 8025990
+ * @summary Tests the save to file dialog has a title.
  * @run main/manual=yesno/othervm SaveDialogTitleTest
  */
 
@@ -37,12 +37,21 @@
         System.out.print("Once the dialog appears, press OK and the ");
         System.out.print("Save to File dialog should appear and it ");
         System.out.println("must have a window title else the test fails.");
+        System.out.println("To test 8025988: Range should be selected with pages 3 to 8.");
+        System.out.println("To test 8025990: Paper should be Legal and in Landscape.");
         Toolkit tk = Toolkit.getDefaultToolkit();
         JobAttributes jobAttributes = new JobAttributes();
         jobAttributes.setDestination(JobAttributes.DestinationType.FILE);
+        jobAttributes.setDefaultSelection(JobAttributes.DefaultSelectionType.RANGE);
+        jobAttributes.setPageRanges(new int[][]{new int[]{3,8}});
+        PageAttributes page = new PageAttributes();
+        page.setMedia(PageAttributes.MediaType.LEGAL);
+        page.setOrientationRequested(PageAttributes.
+                                        OrientationRequestedType.LANDSCAPE);
+
         PrintJob printJob =
             tk.getPrintJob(new Frame(), "Save Title Test",
-                           jobAttributes, null);
+                           jobAttributes, page);
         if (printJob != null) { // in case user cancels.
           printJob.end();
         }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/awt/Window/8027025/Test8027025.java	Mon Nov 11 23:17:30 2013 -0800
@@ -0,0 +1,69 @@
+/*
+ * 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 8027025
+ * @summary [macosx] getLocationOnScreen returns 0 if parent invisible
+ * @author Petr Pchelko
+ * @run main Test8027025
+ */
+
+import sun.awt.SunToolkit;
+
+import javax.swing.*;
+import java.awt.*;
+import java.util.concurrent.atomic.AtomicReference;
+
+public class Test8027025 {
+
+    private static Frame frame;
+    private static Window window;
+
+    public static void main(String[] args) throws Exception {
+        try {
+            SwingUtilities.invokeAndWait(() -> {
+                frame = new Frame("Dummy Frame");
+                window = new Window(frame);
+                window.setSize(200, 200);
+                window.setLocationRelativeTo(frame);
+                window.setVisible(true);
+            });
+
+            ((SunToolkit) Toolkit.getDefaultToolkit()).realSync();
+
+            AtomicReference<Point> point = new AtomicReference<>();
+            SwingUtilities.invokeAndWait(() -> point.set(window.getLocationOnScreen()));
+
+            if (point.get().getX() == 0 || point.get().getY() == 0) {
+                throw new RuntimeException("Test failed. The location was not set");
+            }
+        } finally {
+            if (frame != null) {
+                frame.dispose();
+            }
+            if (window != null) {
+                window.dispose();
+            }
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/awt/Window/OwnedWindowsSerialization/OwnedWindowsSerialization.java	Mon Nov 11 23:17:30 2013 -0800
@@ -0,0 +1,110 @@
+/*
+ * 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 sun.awt.SunToolkit;
+
+import javax.swing.*;
+import java.awt.*;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
+
+/* @test
+ * @bug 8027152
+ * @summary Checks that ownedWindowList is serialized and deserialized properly and alwaysOnTop works after deserialization
+ * @author Petr Pchelko
+ * @run main OwnedWindowsSerialization
+ */
+public class OwnedWindowsSerialization {
+
+    private static final String TOP_FRAME_LABEL = "Top Frame";
+    private static final String DIALOG_LABEL = "Dialog";
+    private static final String SUBDIALOG_LABEL = "Subdialog";
+
+    private static volatile Frame topFrame;
+    private static volatile Dialog dialog;
+    private static volatile Dialog subDialog;
+
+    public static void main(String[] args) throws Exception {
+        SwingUtilities.invokeAndWait(() -> {
+            topFrame = new Frame(TOP_FRAME_LABEL);
+            topFrame.setAlwaysOnTop(true);
+            dialog = new Dialog(topFrame, DIALOG_LABEL);
+            subDialog = new Dialog(dialog, SUBDIALOG_LABEL);
+        });
+
+        ((SunToolkit) Toolkit.getDefaultToolkit()).realSync();
+
+        if (!topFrame.isAlwaysOnTop() || !dialog.isAlwaysOnTop() || !subDialog.isAlwaysOnTop()) {
+            throw new RuntimeException("TEST FAILED: AlwaysOnTop was not set properly");
+        }
+
+        //Serialize
+        byte[] serializedObject;
+        try (ByteArrayOutputStream bytes = new ByteArrayOutputStream();
+             ObjectOutputStream outputStream = new ObjectOutputStream(bytes)) {
+            outputStream.writeObject(topFrame);
+            outputStream.flush();
+            serializedObject = bytes.toByteArray();
+        }
+
+        if (serializedObject == null) {
+            throw new RuntimeException("FAILED: Serialized byte array in null");
+        }
+
+        //Deserialize
+        Frame deserializedFrame;
+        try (ObjectInputStream inputStream = new ObjectInputStream(new ByteArrayInputStream(serializedObject))) {
+            deserializedFrame = (Frame) inputStream.readObject();
+        }
+
+        //Check the state of the deserialized objects
+        if (!TOP_FRAME_LABEL.equals(deserializedFrame.getTitle())) {
+            throw new RuntimeException("FAILED: Top frame deserialized incorrectly");
+        }
+
+        if (!deserializedFrame.isAlwaysOnTop()) {
+            throw new RuntimeException("FAILED: Top frame alwaysOnTop not set after deserialization");
+        }
+
+        Window[] topOwnedWindows = topFrame.getOwnedWindows();
+        if (topOwnedWindows.length != 1 || !DIALOG_LABEL.equals(((Dialog) topOwnedWindows[0]).getTitle())) {
+            throw new RuntimeException("FAILED: Dialog deserialized incorrectly");
+        }
+
+        if (!topOwnedWindows[0].isAlwaysOnTop()) {
+            throw new RuntimeException("FAILED: Dialog alwaysOnTop not set after deserialization");
+        }
+
+        Window dialog = topOwnedWindows[0];
+        Window[] dialogOwnedWindows = dialog.getOwnedWindows();
+        if (dialogOwnedWindows.length != 1 || !SUBDIALOG_LABEL.equals(((Dialog) dialogOwnedWindows[0]).getTitle())) {
+            throw new RuntimeException("FAILED: Subdialog deserialized incorrectly");
+        }
+
+        if (!dialogOwnedWindows[0].isAlwaysOnTop()) {
+            throw new RuntimeException("FAILED: Subdialog alwaysOnTop not set after deserialization");
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/awt/Window/WindowGCInFullScreen/WindowGCInFullScreen.java	Mon Nov 11 23:17:30 2013 -0800
@@ -0,0 +1,77 @@
+/*
+ * 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.Color;
+import java.awt.Frame;
+import java.awt.GraphicsDevice;
+import java.awt.GraphicsEnvironment;
+import java.lang.reflect.InvocationTargetException;
+
+import javax.swing.SwingUtilities;
+
+/**
+ * @test
+ * @bug 8019591
+ * @author Sergey Bylokhov
+ */
+public class WindowGCInFullScreen {
+
+    public static void main(final String[] args)
+            throws InvocationTargetException, InterruptedException {
+        SwingUtilities.invokeAndWait(() -> {
+            final GraphicsDevice[] devices =
+                    GraphicsEnvironment.getLocalGraphicsEnvironment()
+                                       .getScreenDevices();
+            final Frame frame = new Frame();
+            frame.setBackground(Color.GREEN);
+            frame.setUndecorated(true);
+            frame.setSize(100, 100);
+            frame.setLocationRelativeTo(null);
+            frame.setVisible(true);
+            sleep();
+            for (final GraphicsDevice gd : devices) {
+                try {
+                    gd.setFullScreenWindow(frame);
+                    if (gd.getFullScreenWindow() != frame) {
+                        throw new RuntimeException("Wrong window");
+                    }
+                    if (frame.getGraphicsConfiguration().getDevice() != gd) {
+                        throw new RuntimeException("Wrong new GraphicsDevice");
+                    }
+                } finally {
+                    // cleaning up
+                    gd.setFullScreenWindow(null);
+                }
+            }
+            frame.dispose();
+        });
+    }
+
+    private static void sleep() {
+        try {
+            Thread.sleep(1000);
+        } catch (InterruptedException ignored) {
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/awt/event/KeyEvent/8020209/bug8020209.java	Mon Nov 11 23:17:30 2013 -0800
@@ -0,0 +1,120 @@
+/*
+ * Copyright (c) 2012, 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 8020209
+ * @summary [macosx] Mac OS X key event confusion for "COMMAND PLUS"
+ * @author leonid.romanov@oracle.com
+ * @run main bug8020209
+ */
+
+import sun.awt.*;
+import java.awt.*;
+import java.awt.event.*;
+
+public class bug8020209 {
+    static volatile int listenerCallCounter = 0;
+
+    static AWTKeyStroke keyStrokes[] = {
+        AWTKeyStroke.getAWTKeyStroke(KeyEvent.VK_DECIMAL,  InputEvent.META_MASK),
+        AWTKeyStroke.getAWTKeyStroke(KeyEvent.VK_EQUALS,   InputEvent.META_MASK),
+        AWTKeyStroke.getAWTKeyStroke(KeyEvent.VK_ESCAPE,   InputEvent.CTRL_MASK),
+    };
+
+    public static void main(String[] args) throws Exception {
+        if (sun.awt.OSInfo.getOSType() != sun.awt.OSInfo.OSType.MACOSX) {
+            System.out.println("This test is for MacOS only. Automatically passed on other platforms.");
+            return;
+        }
+
+        System.setProperty("apple.laf.useScreenMenuBar", "true");
+
+        SunToolkit toolkit = (SunToolkit) Toolkit.getDefaultToolkit();
+        Robot robot = new Robot();
+        robot.setAutoDelay(50);
+
+        createAndShowGUI();
+        toolkit.realSync();
+
+        for (int i = 0; i < keyStrokes.length; ++i) {
+            AWTKeyStroke ks = keyStrokes[i];
+
+            int modKeyCode = getModKeyCode(ks.getModifiers());
+            robot.keyPress(modKeyCode);
+
+            robot.keyPress(ks.getKeyCode());
+            robot.keyRelease(ks.getKeyCode());
+
+            robot.keyRelease(modKeyCode);
+
+            toolkit.realSync();
+
+            if (listenerCallCounter != 4) {
+                throw new Exception("Test failed: KeyListener for '" + ks.toString() +
+                        "' called " + listenerCallCounter + " times instead of 4!");
+            }
+
+            listenerCallCounter = 0;
+        }
+
+    }
+
+    private static void createAndShowGUI() {
+        Frame frame = new Frame("Test");
+        frame.addKeyListener(new KeyAdapter() {
+            @Override
+            public void keyPressed(KeyEvent e) {
+                listenerCallCounter++;
+            }
+
+            @Override
+            public void keyReleased(KeyEvent e) {
+                listenerCallCounter++;
+            }
+        });
+
+        frame.pack();
+        frame.setVisible(true);
+    }
+
+    private static int getModKeyCode(int mod) {
+        if ((mod & (InputEvent.SHIFT_DOWN_MASK | InputEvent.SHIFT_MASK)) != 0) {
+            return KeyEvent.VK_SHIFT;
+        }
+
+        if ((mod & (InputEvent.CTRL_DOWN_MASK | InputEvent.CTRL_MASK)) != 0) {
+            return KeyEvent.VK_CONTROL;
+        }
+
+        if ((mod & (InputEvent.ALT_DOWN_MASK | InputEvent.ALT_MASK)) != 0) {
+            return KeyEvent.VK_ALT;
+        }
+
+        if ((mod & (InputEvent.META_DOWN_MASK | InputEvent.META_MASK)) != 0) {
+            return KeyEvent.VK_META;
+        }
+
+        return 0;
+    }
+}
--- a/test/java/awt/print/PrinterJob/PrintLatinCJKTest.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/test/java/awt/print/PrinterJob/PrintLatinCJKTest.java	Mon Nov 11 23:17:30 2013 -0800
@@ -23,7 +23,7 @@
 
 /**
  * @test
- * @bug 800535
+ * @bug 800535 8022536
  * @summary JDK7 Printing: CJK and Latin Text in string overlap
  * @run main/manual=yesno PrintLatinCJKTest
  */
@@ -49,6 +49,8 @@
     private PageFormat pf;
 
     static String info =
+       "To test 8022536, if a remote printer is the system default,"+
+       "it should show in the dialog as the selected printer.\n"+
        "You need a printer for this test. If you have none, let "+
        "the test pass. If there is a printer, press Print, send "+
        "the output to the printer, and examine it. It should have "+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/awt/print/PrinterJob/PrintToDir.java	Mon Nov 11 23:17:30 2013 -0800
@@ -0,0 +1,144 @@
+/*
+ * 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 4973278 8015586
+   @run main PrintToDir
+   @summary Must throw exception when printing to an invalid filename - a dir.
+*/
+import java.io.*;
+import java.net.*;
+import java.awt.*;
+import java.awt.geom.*;
+import java.awt.print.*;
+import javax.print.PrintService;
+import javax.print.attribute.*;
+import javax.print.attribute.standard.*;
+import java.util.PropertyPermission;
+
+public class PrintToDir extends Frame implements Printable {
+
+    boolean firstTime = true;
+    double sx, sy;
+    Shape clip, firstClip;
+
+    TextField tf = new TextField();
+    Label tfLabel = new Label ("File Name");
+    Panel p = new Panel (new GridLayout(2,2));
+    Button b = new Button("Print");
+
+    PrintToDir() {
+        add("South", p);
+        p.add(tfLabel);
+        p.add(tf);
+        p.add(b);
+        setSize(300, 300);
+        setVisible(true);
+    }
+
+    public int print(Graphics g, PageFormat pf, int pageIndex)  {
+        Graphics2D g2 = (Graphics2D)g;
+        if (pageIndex>=1) {
+                return Printable.NO_SUCH_PAGE;
+        }
+        g2.drawString("hello world", 100, 100);
+        return Printable.PAGE_EXISTS;
+    }
+
+    void doPrintJob(String fileStr) {
+        PageAttributes pa = new PageAttributes();
+        JobAttributes ja = new JobAttributes();
+        ja.setDialog(JobAttributes.DialogType.NONE);
+        ja.setDestination(JobAttributes.DestinationType.FILE);
+        ja.setFileName(fileStr);
+        try {
+            PrintJob pjob = Toolkit.getDefaultToolkit().getPrintJob(this,
+                                        "PrintDialog Testing", ja, pa);
+            if (pjob != null) {
+                System.out.println("Printjob successfully created: " + pjob);
+                Graphics g = pjob.getGraphics();
+                this.printAll(g);
+                g.dispose();
+                pjob.end();
+            }
+            System.out.println("Printing completed");
+        } catch (IllegalArgumentException e) {
+            System.out.println("PrintJob passed.");
+            return;
+        }
+        throw new RuntimeException("PrintJob::IllegalArgumentException expected but not thrown. \nTEST FAILED");
+    }
+
+    public static void doPrinterJob(String fileStr, OrientationRequested o) {
+        PrinterJob  pj = PrinterJob.getPrinterJob();
+        PrintService ps = pj.getPrintService();
+        if (ps == null) {
+          System.out.println("No print service found.");
+          return;
+        }
+        pj.setPrintable(new PrintToDir());
+        PrintRequestAttributeSet aset = new HashPrintRequestAttributeSet();
+        aset.add(o);
+        File f = new File(fileStr);
+        //      f.deleteOnExit();
+        URI dest = f.toURI();
+        Destination d = new Destination(dest);
+        if (ps.isAttributeValueSupported(d, null, null)) {
+            aset.add(d);
+            try {
+                pj.print(aset);
+            } catch (PrinterException e) {
+                System.out.println("PrinterJob passed.");
+                return;
+            }
+            throw new RuntimeException("PrinterJob:PrinterException expected but not thrown. \nTEST FAILED");
+        } else {
+            System.out.println("Destination attribute is not a supported value.  PrinterJob passed.");
+        }
+    }
+
+
+    public static void main(String arg[]) {
+        SecurityManager security = System.getSecurityManager();
+        if (security != null) {
+            System.out.println("Security manager detected");
+            try {
+                security.checkPermission(new FilePermission("<<ALL FILES>>", "read,write"));
+                security.checkPermission(new PropertyPermission("user.dir", "read"));
+            } catch (SecurityException se) {
+                System.out.println("Security requirement not obtained.  TEST PASSED");
+                return;
+            }
+        }
+        String[] testStr = {".", ""};
+        for (int i=0; i<testStr.length; i++) {
+            System.out.println("Testing file name = \""+testStr[i]+"\"");
+            doPrinterJob(testStr[i], OrientationRequested.PORTRAIT);
+            PrintToDir ptd = new PrintToDir();
+            ptd.doPrintJob(testStr[i]);
+            ptd.dispose();
+        }
+        System.out.println("TEST PASSED");
+    }
+
+}
--- a/test/java/beans/Introspector/TestTypeResolver.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/test/java/beans/Introspector/TestTypeResolver.java	Mon Nov 11 23:17:30 2013 -0800
@@ -115,6 +115,8 @@
         // by private implementations of the various Type interfaces
         if (expect.equals(t) && t.equals(expect))
             System.out.println(", as expected");
+        else if ((expect.equals(t) || t.equals(expect)) && expect.toString().equals(t.toString()))
+            System.out.println(", as workaround of the 8023301 bug");
         else {
             System.out.println(" BUT SHOULD BE " + expect);
             failedCases.add(c);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/beans/XMLEncoder/Test8027066.java	Mon Nov 11 23:17:30 2013 -0800
@@ -0,0 +1,41 @@
+/*
+ * 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 8027066
+ * @summary Tests that the same array can be encoded twice
+ * @author Anton Nashatyrev
+ */
+public class Test8027066 extends AbstractTest<String[][]> {
+    public static void main(String[] args) {
+        new Test8027066().test(true);
+    }
+
+    @Override
+    protected String[][] getObject() {
+        String[] strings = {"first", "second"};
+        String[][] arrays = {strings, strings};
+        return arrays;
+    }
+}
--- a/test/java/io/File/NulFile.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/test/java/io/File/NulFile.java	Mon Nov 11 23:17:30 2013 -0800
@@ -22,7 +22,7 @@
  */
 
 /* @test
- * @bug 8003992
+ * @bug 8003992 8027155
  * @summary Test a file whose path name is embedded with NUL character, and
  *          ensure it is handled correctly.
  * @author Dan Xu
@@ -613,7 +613,7 @@
                 File.createTempFile(prefix, suffix, directory);
             } catch (IOException ex) {
                 String err = "Unable to create temporary file";
-                if (err.equals(ex.getMessage()))
+                if (ex.getMessage() != null && ex.getMessage().startsWith(err))
                     exceptionThrown = true;
                 else {
                     throw new RuntimeException("Get IOException with message, "
--- a/test/java/lang/Thread/ThreadStateTest.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/test/java/lang/Thread/ThreadStateTest.java	Mon Nov 11 23:17:30 2013 -0800
@@ -30,7 +30,7 @@
  * @author  Mandy Chung
  *
  * @build ThreadStateTest
- * @run main ThreadStateTest
+ * @run main/othervm -Xmixed ThreadStateTest
  */
 
 import java.util.concurrent.locks.LockSupport;
--- a/test/java/lang/management/ClassLoadingMXBean/LoadCounts.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/test/java/lang/management/ClassLoadingMXBean/LoadCounts.java	Mon Nov 11 23:17:30 2013 -0800
@@ -28,10 +28,10 @@
  *                             ClassLoadingMXBean.getTotalLoadedClassCount()
  *                             ClassLoadingMXBean.getUnloadedClassCount()
  * @author  Alexei Guibadoulline
+ * @run main/othervm LoadCounts
  */
 
 import java.lang.management.*;
-import java.util.*;
 
 public class LoadCounts {
     private static ClassLoadingMXBean mbean
@@ -55,13 +55,15 @@
             throw new RuntimeException("getLoadedClassCount() > "
                                      + "getTotalLoadedClassCount()");
 
-        if (classesNowPrev + 4 != classesNow)
+        if (classesNowPrev + 4 > classesNow)
             throw new RuntimeException("Number of loaded classes is "
+                                     + "expected to be at least "
                                      + (classesNowPrev + 4) + ", but "
                                      + "MBean.getLoadedClassCount() returned "
                                      + classesNow);
-        if (classesTotalPrev + 4 != classesTotal)
+        if (classesTotalPrev + 4 > classesTotal)
             throw new RuntimeException("Total number of loaded classes is "
+                                     + "expected to be at least "
                                      + (classesTotalPrev + 4) + ", but "
                                      + "MBean.getTotalLoadedClassCount() "
                                      + "returned " + classesTotal);
@@ -95,13 +97,15 @@
 
         // Expected 2 classes got loaded since they are loaded by
         // same defining class loader
-        if (classesNowPrev + 2 != classesNow)
-            throw new RuntimeException("Expected Number of loaded classes is "
+        if (classesNowPrev + 2 > classesNow)
+            throw new RuntimeException("Number of loaded classes is "
+                                     + "expected to be at least "
                                      + (classesNowPrev + 4) + ", but "
                                      + "MBean.getLoadedClassCount() returned "
                                      + classesNow);
-        if (classesTotalPrev + 2 != classesTotal)
+        if (classesTotalPrev + 2 > classesTotal)
             throw new RuntimeException("Total number of loaded classes is "
+                                     + "expected to be at least "
                                      + (classesTotalPrev + 4) + ", but "
                                      + "MBean.getTotalLoadedClassCount() "
                                      + "returned " + classesTotal);
--- a/test/java/lang/management/MemoryPoolMXBean/ThresholdTest.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/test/java/lang/management/MemoryPoolMXBean/ThresholdTest.java	Mon Nov 11 23:17:30 2013 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 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
@@ -28,7 +28,7 @@
  *          MemoryPoolMXBean.isCollectionThresholdExceeded().
  * @author  Mandy Chung
  *
- * @run main ThresholdTest
+ * @run main/othervm ThresholdTest
  */
 
 import java.lang.management.*;
@@ -36,6 +36,9 @@
 
 public class ThresholdTest {
     public static void main(String args[]) throws Exception {
+        long[] bigObject = new long[1000000];
+
+        System.gc(); // force an initial full-gc
         List<MemoryPoolMXBean> pools = ManagementFactory.getMemoryPoolMXBeans();
         try {
             for (MemoryPoolMXBean p : pools) {
@@ -82,6 +85,10 @@
         }
 
         p.setUsageThreshold(1);
+        // force a full gc to minimize the likelihood of running GC
+        // between getting the usage and checking the threshold
+        System.gc();
+
         MemoryUsage u = p.getUsage();
         if (u.getUsed() >= 1) {
             if (!p.isUsageThresholdExceeded()) {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/lang/reflect/AnnotatedElement/TestAnnotatedElementDefaults.java	Mon Nov 11 23:17:30 2013 -0800
@@ -0,0 +1,339 @@
+/*
+ * 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 8005294
+ * @summary Check behavior of default methods of AnnotatedElement
+ * @author Joseph D. Darcy
+ */
+
+import java.lang.annotation.*;
+import java.lang.reflect.*;
+import java.util.*;
+
+/**
+ * For annotation type tokens including, null, DirectlyPresent.class,
+ * IndirectlyPresent.class, etc. the behavior of
+ * AnnotedElementDelegate.foo(arg) is compared for equality to
+ * baseAnnotatedElement.foo(arg) on various kinds of annotated
+ * elements.
+ */
+public class TestAnnotatedElementDefaults {
+    public static void main(String... args) throws SecurityException {
+        int failures = 0;
+
+        for (AnnotatedElement annotElement : elementsToTest()) {
+            System.out.println(annotElement);
+            AnnotatedElementDelegate delegate = new AnnotatedElementDelegate(annotElement);
+            failures += testNullHandling(delegate);
+            for (Class<? extends Annotation> annotType : annotationsToTest()) {
+                failures += AnnotatedElementDelegate.testDelegate(delegate, annotType);
+            }
+        }
+
+        if (failures > 0) {
+            System.err.printf("%d failures%n", failures);
+            throw new RuntimeException();
+        }
+    }
+
+    private static List<AnnotatedElement> elementsToTest() {
+        List<AnnotatedElement> annotatedElements = new ArrayList<>();
+        annotatedElements.add(TestClass1Super.class);
+        annotatedElements.add(TestClass1.class);
+        for (Method method : TestClass1.class.getDeclaredMethods()) {
+            annotatedElements.add(method);
+        }
+        return annotatedElements;
+    }
+
+    private static List<Class<? extends Annotation>> annotationsToTest() {
+        List<Class<? extends Annotation>> annotations = new ArrayList<>();
+        annotations.add(Missing.class);
+
+        annotations.add(MissingRepeatable.class);
+
+        annotations.add(DirectlyPresent.class);
+
+        annotations.add(IndirectlyPresent.class);
+        annotations.add(IndirectlyPresentContainer.class);
+
+        annotations.add(DirectlyAndIndirectlyPresent.class);
+        annotations.add(DirectlyAndIndirectlyPresentContainer.class);
+
+        annotations.add(AssociatedDirectOnSuperClass.class);
+        annotations.add(AssociatedDirectOnSuperClassContainer.class);
+
+        annotations.add(AssociatedDirectOnSuperClassIndirectOnSubclass.class);
+        annotations.add(AssociatedDirectOnSuperClassIndirectOnSubclassContainer.class);
+
+        annotations.add(AssociatedIndirectOnSuperClassDirectOnSubclass.class);
+        annotations.add(AssociatedIndirectOnSuperClassDirectOnSubclassContainer.class);
+        return annotations;
+    }
+
+    private static int testNullHandling(AnnotatedElementDelegate delegate) {
+        int failures = 0;
+        try {
+            Object result = delegate.getDeclaredAnnotationsByType(null);
+            failures++;
+        } catch (NullPointerException npe) {
+            ; // Expected
+        }
+
+        try {
+            Object result = delegate.getAnnotationsByType(null);
+            failures++;
+        } catch (NullPointerException npe) {
+            ; // Expected
+        }
+
+        try {
+            Object result = delegate.getDeclaredAnnotation(null);
+            failures++;
+        } catch (NullPointerException npe) {
+            ; // Expected
+        }
+
+        return failures;
+    }
+
+}
+
+// -----------------------------------------------------
+
+@AssociatedDirectOnSuperClass(123)
+@AssociatedIndirectOnSuperClass(234) @AssociatedIndirectOnSuperClass(345)
+@AssociatedDirectOnSuperClassIndirectOnSubclass(987)
+@AssociatedIndirectOnSuperClassDirectOnSubclass(1111) @AssociatedIndirectOnSuperClassDirectOnSubclass(2222)
+class TestClass1Super {}
+
+@DirectlyPresent(1)
+@IndirectlyPresent(10) @IndirectlyPresent(11)
+@AssociatedDirectOnSuperClassIndirectOnSubclass(876) @AssociatedDirectOnSuperClassIndirectOnSubclass(765)
+@AssociatedIndirectOnSuperClassDirectOnSubclass(3333)
+class TestClass1 extends TestClass1Super {
+
+    @DirectlyPresent(2)
+    @IndirectlyPresentContainer({@IndirectlyPresent(12)})
+    @DirectlyAndIndirectlyPresentContainer({@DirectlyAndIndirectlyPresent(84), @DirectlyAndIndirectlyPresent(96)})
+    public void foo() {return ;}
+
+    @IndirectlyPresentContainer({})
+    @DirectlyAndIndirectlyPresentContainer({@DirectlyAndIndirectlyPresent(11), @DirectlyAndIndirectlyPresent(22)})
+    @DirectlyAndIndirectlyPresent(33)
+    public void bar()  {return ;}
+}
+
+// -----------------------------------------------------
+
+@Retention(RetentionPolicy.RUNTIME)
+@interface Missing {
+    int value();
+}
+
+// -----------------------------------------------------
+
+@Retention(RetentionPolicy.RUNTIME)
+@Repeatable(MissingRepeatableContainer.class)
+@interface MissingRepeatable {
+    int value();
+}
+
+@Retention(RetentionPolicy.RUNTIME)
+@interface MissingRepeatableContainer {
+    MissingRepeatable[] value();
+}
+
+// -----------------------------------------------------
+
+@Retention(RetentionPolicy.RUNTIME)
+@interface DirectlyPresent {
+    int value();
+}
+
+// -----------------------------------------------------
+
+@Retention(RetentionPolicy.RUNTIME)
+@Repeatable(IndirectlyPresentContainer.class)
+@interface IndirectlyPresent {
+    int value();
+}
+
+@Retention(RetentionPolicy.RUNTIME)
+@interface IndirectlyPresentContainer {
+    IndirectlyPresent[] value();
+}
+
+// -----------------------------------------------------
+
+@Retention(RetentionPolicy.RUNTIME)
+@Repeatable(DirectlyAndIndirectlyPresentContainer.class)
+@interface DirectlyAndIndirectlyPresent {
+    int value();
+
+}
+
+@Retention(RetentionPolicy.RUNTIME)
+@interface DirectlyAndIndirectlyPresentContainer {
+    DirectlyAndIndirectlyPresent[] value();
+}
+
+// -----------------------------------------------------
+
+@Retention(RetentionPolicy.RUNTIME)
+@Repeatable(AssociatedDirectOnSuperClassContainer.class)
+@interface AssociatedDirectOnSuperClass {
+    int value();
+}
+
+@Retention(RetentionPolicy.RUNTIME)
+@interface AssociatedDirectOnSuperClassContainer {
+    AssociatedDirectOnSuperClass[] value();
+}
+
+// -----------------------------------------------------
+
+@Retention(RetentionPolicy.RUNTIME)
+@Repeatable(AssociatedIndirectOnSuperClassContainer.class)
+@interface AssociatedIndirectOnSuperClass {
+    int value();
+}
+
+@Retention(RetentionPolicy.RUNTIME)
+@interface AssociatedIndirectOnSuperClassContainer {
+    AssociatedIndirectOnSuperClass[] value();
+}
+
+// -----------------------------------------------------
+
+@Retention(RetentionPolicy.RUNTIME)
+@Repeatable(AssociatedDirectOnSuperClassIndirectOnSubclassContainer.class)
+@interface  AssociatedDirectOnSuperClassIndirectOnSubclass {
+    int value();
+}
+
+@Retention(RetentionPolicy.RUNTIME)
+@interface AssociatedDirectOnSuperClassIndirectOnSubclassContainer {
+    AssociatedDirectOnSuperClassIndirectOnSubclass[] value();
+}
+
+// -----------------------------------------------------
+
+@Retention(RetentionPolicy.RUNTIME)
+@Repeatable(AssociatedIndirectOnSuperClassDirectOnSubclassContainer.class)
+@interface  AssociatedIndirectOnSuperClassDirectOnSubclass {
+    int value();
+}
+
+@Retention(RetentionPolicy.RUNTIME)
+@interface AssociatedIndirectOnSuperClassDirectOnSubclassContainer {
+    AssociatedIndirectOnSuperClassDirectOnSubclass[] value();
+}
+
+// -----------------------------------------------------
+
+/**
+ * Helper class to ease calling the default methods of {@code
+ * AnnotatedElement} and comparing the results to other
+ * implementation.
+ */
+class AnnotatedElementDelegate implements AnnotatedElement {
+    private AnnotatedElement base;
+
+    public AnnotatedElementDelegate(AnnotatedElement base) {
+        Objects.requireNonNull(base);
+        this.base = base;
+    }
+
+    // Delegate to base implemenetation of AnnotatedElement methods
+    // without defaults.
+    @Override
+    public <T extends Annotation> T getAnnotation(Class<T> annotationClass) {
+        return base.getAnnotation(annotationClass);
+    }
+
+    @Override
+    public Annotation[] getAnnotations() {
+        return base.getAnnotations();
+    }
+
+    @Override
+    public Annotation[] getDeclaredAnnotations() {
+        return base.getDeclaredAnnotations();
+    }
+
+    public AnnotatedElement getBase() {
+        return base;
+    }
+
+    static int testDelegate(AnnotatedElementDelegate delegate,
+                            Class<? extends Annotation> annotationClass) {
+        int failures = 0;
+        AnnotatedElement base = delegate.getBase();
+
+        // System.out.println("\tTesting " + delegate + "\ton\t" + annotationClass);
+
+        // <T extends Annotation> T[] getDeclaredAnnotationsByType(Class<T> annotationClass)
+        failures += annotationArrayCheck(delegate.getDeclaredAnnotationsByType(annotationClass),
+                                         base.getDeclaredAnnotationsByType(annotationClass),
+                                         annotationClass,
+                                         "Equality failure on getDeclaredAnnotationsByType(%s) on %s)%n");
+
+        // <T extends Annotation> T[] getAnnotationsByType(Class<T> annotationClass)
+        failures += annotationArrayCheck(delegate.getAnnotationsByType(annotationClass),
+                                         base.getAnnotationsByType(annotationClass),
+                                         annotationClass,
+                                         "Equality failure on getAnnotationsByType(%s) on %s)%n");
+
+        // <T extends Annotation> T getDeclaredAnnotation(Class<T> annotationClass)
+        if (!Objects.equals(delegate.getDeclaredAnnotation(annotationClass),
+                            base.getDeclaredAnnotation(annotationClass))) {
+            failures++;
+            System.err.printf("Equality failure on getDeclaredAnnotation(%s) on %s)%n",
+                              annotationClass, delegate);
+        }
+        return failures;
+    }
+    private static <T extends Annotation> int annotationArrayCheck(T[] delegate,
+                                                           T[] base,
+                                                           Class<? extends Annotation> annotationClass,
+                                                           String message) {
+        int failures = 0;
+
+        if (!Objects.deepEquals(delegate,base)) {
+            failures = 1;
+
+            System.err.printf(message,
+                              annotationClass,
+                              delegate);
+
+            System.err.println("Base result:\t" + Arrays.toString(base));
+            System.err.println("Delegate result:\t " + Arrays.toString(delegate));
+            System.err.println();
+        }
+
+        return failures;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/math/BigInteger/BitLengthOverflow.java	Mon Nov 11 23:17:30 2013 -0800
@@ -0,0 +1,49 @@
+/*
+ * 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 6910473
+ * @summary Test that bitLength() is not negative
+ * @author Dmitry Nadezhin
+ */
+import java.math.BigInteger;
+
+public class BitLengthOverflow {
+
+    public static void main(String[] args) {
+
+        try {
+            BigInteger x = BigInteger.ONE.shiftLeft(Integer.MAX_VALUE); // x = pow(2,Integer.MAX_VALUE)
+            if (x.bitLength() != (1L << 31))
+                throw new RuntimeException("Incorrect bitLength() " + x.bitLength());
+            System.out.println("Surprisingly passed with correct bitLength() " + x.bitLength());
+        } catch (ArithmeticException e) {
+            // expected
+            System.out.println("Overflow is reported by ArithmeticException, as expected");
+        } catch (OutOfMemoryError e) {
+            // possible
+            System.out.println("OutOfMemoryError");
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/math/BigInteger/DivisionOverflow.java	Mon Nov 11 23:17:30 2013 -0800
@@ -0,0 +1,51 @@
+/*
+ * Copyright (c) 2011, 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 8022780
+ * @summary Test division of large values
+ * @author Dmitry Nadezhin
+ */
+import java.math.BigInteger;
+
+public class DivisionOverflow {
+
+    public static void main(String[] args) {
+        try {
+            BigInteger a = BigInteger.ONE.shiftLeft(2147483646);
+            BigInteger b = BigInteger.ONE.shiftLeft(1568);
+            BigInteger[] qr = a.divideAndRemainder(b);
+            BigInteger q = qr[0];
+            BigInteger r = qr[1];
+            if (!r.equals(BigInteger.ZERO))
+                throw new RuntimeException("Incorrect singum() of remainder " + r.signum());
+            if (q.bitLength() != 2147482079)
+                throw new RuntimeException("Incorrect bitLength() of quotient " + q.bitLength());
+            System.out.println("Division of large values passed without overflow.");
+        } catch (OutOfMemoryError e) {
+            // possible
+            System.out.println("OutOfMemoryError");
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/math/BigInteger/DoubleValueOverflow.java	Mon Nov 11 23:17:30 2013 -0800
@@ -0,0 +1,49 @@
+/*
+ * 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 8021203
+ * @summary Test that doubleValue() doesn't overflow
+ * @author Dmitry Nadezhin
+ */
+import java.math.BigInteger;
+
+public class DoubleValueOverflow {
+
+    public static void main(String[] args) {
+
+        try {
+            BigInteger x = BigInteger.valueOf(2).shiftLeft(Integer.MAX_VALUE); // x = pow(2,pow(2,31))
+            if (x.doubleValue() != Double.POSITIVE_INFINITY)
+                throw new RuntimeException("Incorrect doubleValue() " + x.doubleValue());
+            System.out.println("Passed with correct result");
+        } catch (ArithmeticException e) {
+            // expected
+            System.out.println("Overflow is reported by ArithmeticException, as expected");
+        } catch (OutOfMemoryError e) {
+            // possible
+            System.out.println("OutOfMemoryError");
+        }
+    }
+}
--- a/test/java/math/BigInteger/ExtremeShiftingTests.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/test/java/math/BigInteger/ExtremeShiftingTests.java	Mon Nov 11 23:17:30 2013 -0800
@@ -27,22 +27,41 @@
  * @summary Tests of shiftLeft and shiftRight on Integer.MIN_VALUE
  * @author Joseph D. Darcy
  */
+import java.math.BigInteger;
 import static java.math.BigInteger.*;
 
 public class ExtremeShiftingTests {
     public static void main(String... args) {
+        BigInteger bi = ONE.shiftLeft(Integer.MIN_VALUE);
+        if (!bi.equals(ZERO))
+            throw new RuntimeException("1 << " + Integer.MIN_VALUE);
+
+        bi = ZERO.shiftLeft(Integer.MIN_VALUE);
+        if (!bi.equals(ZERO))
+            throw new RuntimeException("0 << " + Integer.MIN_VALUE);
+
+        bi = BigInteger.valueOf(-1);
+        bi = bi.shiftLeft(Integer.MIN_VALUE);
+        if (!bi.equals(BigInteger.valueOf(-1)))
+            throw new RuntimeException("-1 << " + Integer.MIN_VALUE);
+
         try {
-            ONE.shiftLeft(Integer.MIN_VALUE);
-            throw new RuntimeException("Should not reach here.");
+            ONE.shiftRight(Integer.MIN_VALUE);
+            throw new RuntimeException("1 >> " + Integer.MIN_VALUE);
         } catch (ArithmeticException ae) {
             ; // Expected
         }
 
+        bi = ZERO.shiftRight(Integer.MIN_VALUE);
+        if (!bi.equals(ZERO))
+            throw new RuntimeException("0 >> " + Integer.MIN_VALUE);
+
         try {
-            ONE.shiftRight(Integer.MIN_VALUE);
-            throw new RuntimeException("Should not reach here.");
+            BigInteger.valueOf(-1).shiftRight(Integer.MIN_VALUE);
+            throw new RuntimeException("-1 >> " + Integer.MIN_VALUE);
         } catch (ArithmeticException ae) {
             ; // Expected
         }
+
     }
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/math/BigInteger/StringConstructorOverflow.java	Mon Nov 11 23:17:30 2013 -0800
@@ -0,0 +1,59 @@
+/*
+ * 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 8021204
+ * @summary Test constructor BigInteger(String val, int radix) on very long string
+ * @author Dmitry Nadezhin
+ */
+import java.math.BigInteger;
+
+public class StringConstructorOverflow {
+
+    // String with hexadecimal value pow(2,pow(2,34))+1
+    private static String makeLongHexString() {
+        StringBuilder sb = new StringBuilder();
+        sb.append('1');
+        for (int i = 0; i < (1 << 30) - 1; i++) {
+            sb.append('0');
+        }
+        sb.append('1');
+        return sb.toString();
+    }
+
+    public static void main(String[] args) {
+        try {
+            BigInteger bi = new BigInteger(makeLongHexString(), 16);
+            if (bi.compareTo(BigInteger.ONE) <= 0)
+                throw new RuntimeException("Incorrect result " + bi.toString());
+        } catch (ArithmeticException e) {
+            // expected
+            System.out.println("Overflow is reported by ArithmeticException, as expected");
+        } catch (OutOfMemoryError e) {
+            // possible
+            System.out.println("OutOfMemoryError");
+            System.out.println("Run jtreg with -javaoption:-Xmx8g");
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/math/BigInteger/SymmetricRangeTests.java	Mon Nov 11 23:17:30 2013 -0800
@@ -0,0 +1,662 @@
+/*
+ * 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.
+ */
+
+/*
+ * This test is intentionally ignored because of huge memory requirements
+ * @ test
+ * @run main/timeout=180/othervm -Xmx8g SymmetricRangeTests
+ * @bug 6910473 8021204 8021203 9005933
+ * @summary Test range of BigInteger values
+ * @author Dmitry Nadezhin
+ */
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
+import java.util.Arrays;
+import java.util.Random;
+import java.math.BigInteger;
+
+public class SymmetricRangeTests {
+
+    private static final BigInteger MAX_VALUE = makeMaxValue();
+    private static final BigInteger MIN_VALUE = MAX_VALUE.negate();
+
+    private static BigInteger makeMaxValue() {
+        byte[] ba = new byte[1 << 28];
+        Arrays.fill(ba, (byte) 0xFF);
+        ba[0] = (byte) 0x7F;
+        return new BigInteger(ba);
+    }
+
+    private static void check(String msg, BigInteger actual, BigInteger expected) {
+        if (!actual.equals(expected)) {
+            throw new RuntimeException(msg + ".bitLength()=" + actual.bitLength());
+        }
+    }
+
+    private static void check(String msg, double actual, double expected) {
+        if (actual != expected) {
+            throw new RuntimeException(msg + "=" + actual);
+        }
+    }
+
+    private static void check(String msg, float actual, float expected) {
+        if (actual != expected) {
+            throw new RuntimeException(msg + "=" + actual);
+        }
+    }
+
+    private static void check(String msg, long actual, long expected) {
+        if (actual != expected) {
+            throw new RuntimeException(msg + "=" + actual);
+        }
+    }
+
+    private static void check(String msg, int actual, int expected) {
+        if (actual != expected) {
+            throw new RuntimeException(msg + "=" + actual);
+        }
+    }
+
+    private static void testOverflowInMakePositive() {
+        System.out.println("Testing overflow in BigInteger.makePositive");
+        byte[] ba = new byte[Integer.MAX_VALUE - 2];
+        ba[0] = (byte) 0x80;
+        try {
+            BigInteger actual = new BigInteger(ba);
+            throw new RuntimeException("new BigInteger(ba).bitLength()=" + actual.bitLength());
+        } catch (ArithmeticException e) {
+            // expected
+        }
+    }
+
+    private static void testBug8021204() {
+        System.out.println("Testing Bug 8021204");
+        StringBuilder sb = new StringBuilder();
+        sb.append('1');
+        for (int i = 0; i < (1 << 30) - 1; i++) {
+            sb.append('0');
+        }
+        sb.append('1');
+        String s = sb.toString();
+        sb = null;
+        try {
+            BigInteger actual = new BigInteger(s, 16);
+            throw new RuntimeException("new BigInteger(\"1000...001\").bitLength()=" + actual.bitLength());
+        } catch (ArithmeticException e) {
+            // expected
+        }
+    }
+
+    private static void testOverflowInBitSieve() {
+        System.out.println("Testing overflow in BitSieve.sieveSingle");
+        int bitLength = (5 << 27) - 1;
+        try {
+            Random rnd = new Random();
+            BigInteger actual = new BigInteger(bitLength, 0, rnd);
+            throw new RuntimeException("new BigInteger(bitLength, 0, null).bitLength()=" + actual.bitLength());
+        } catch (ArithmeticException e) {
+            // expected
+        }
+        try {
+            BigInteger bi = BigInteger.ONE.shiftLeft(bitLength - 1).subtract(BigInteger.ONE);
+            BigInteger actual = bi.nextProbablePrime();
+            throw new RuntimeException("bi.nextActualPrime().bitLength()=" + actual.bitLength());
+        } catch (ArithmeticException e) {
+            // expected
+        }
+    }
+
+    private static void testAdd() {
+        System.out.println("Testing BigInteger.add");
+        try {
+            BigInteger actual = MAX_VALUE.add(BigInteger.ONE);
+            throw new RuntimeException("BigInteger.MAX_VALUE.add(BigInteger.ONE).bitLength()=" + actual.bitLength());
+        } catch (ArithmeticException e) {
+            // expected
+        }
+    }
+
+    private static void testSubtract() {
+        System.out.println("Testing BigInteger.subtract");
+        try {
+            BigInteger actual = MIN_VALUE.subtract(BigInteger.ONE);
+            throw new RuntimeException("BigInteger.MIN_VALUE.subtract(BigInteger.ONE).bitLength()=" + actual.bitLength());
+        } catch (ArithmeticException e) {
+            // expected
+        }
+    }
+
+    private static void testMultiply() {
+        System.out.println("Testing BigInteger.multiply");
+        int py = 2000;
+        int px = Integer.MAX_VALUE - py;
+        BigInteger x = BigInteger.ONE.shiftLeft(px);
+        BigInteger y = BigInteger.ONE.shiftLeft(py);
+        try {
+            BigInteger actual = x.multiply(y);
+            throw new RuntimeException("(1 << " + px + " ) * (1 << " + py + ").bitLength()=" + actual.bitLength());
+        } catch (ArithmeticException e) {
+            // expected
+        }
+    }
+
+    private static void testDivide() {
+        System.out.println("Testing BigInteger.divide");
+        check("BigInteger.MIN_VALUE.divide(BigInteger.valueOf(-1))",
+                MIN_VALUE.divide(BigInteger.valueOf(-1)), MAX_VALUE);
+        check("BigInteger.MIN_VALUE.divide(BigInteger.ONE)",
+                MIN_VALUE.divide(BigInteger.ONE), MIN_VALUE);
+    }
+
+    private static void testDivideAndRemainder(String msg, BigInteger dividend, BigInteger divisor,
+            BigInteger expectedQuotent, BigInteger expectedRemainder) {
+        BigInteger[] qr = dividend.divideAndRemainder(divisor);
+        check(msg + "[0]", qr[0], expectedQuotent);
+        check(msg + "[1]", qr[1], expectedRemainder);
+    }
+
+    private static void testDivideAndRemainder() {
+        System.out.println("Testing BigInteger.divideAndRemainder");
+        testDivideAndRemainder("BigInteger.MIN_VALUE.divideAndRemainder(BigInteger.valueOf(-1))",
+                MIN_VALUE, BigInteger.valueOf(-1),
+                MAX_VALUE,
+                BigInteger.ZERO);
+    }
+
+    private static void testBug9005933() {
+        System.out.println("Testing Bug 9005933");
+        int dividendPow = 2147483646;
+        int divisorPow = 1568;
+        BigInteger dividend = BigInteger.ONE.shiftLeft(dividendPow);
+        BigInteger divisor = BigInteger.ONE.shiftLeft(divisorPow);
+        testDivideAndRemainder("(1 << " + dividendPow + ").divideAndRemainder(1 << " + divisorPow + ")",
+                dividend, divisor,
+                BigInteger.ONE.shiftLeft(dividendPow - divisorPow),
+                BigInteger.ZERO);
+    }
+
+    private static void testRemainder() {
+        System.out.println("Testing BigInteger.remainder");
+        check("BigInteger.MIN_VALUE.remainder(BigInteger.valueOf(-1))",
+                MIN_VALUE.remainder(BigInteger.valueOf(-1)), BigInteger.ZERO);
+    }
+
+    private static void testPow() {
+        System.out.println("Testing BigInteger.pow");
+        check("BigInteger.MIN_VALUE.pow(1)",
+                MIN_VALUE.pow(1), MIN_VALUE);
+        try {
+            BigInteger actual = BigInteger.valueOf(4).pow(Integer.MAX_VALUE);
+            throw new RuntimeException("BigInteger.valueOf(4).pow(Integer.MAX_VALUE).bitLength()=" + actual.bitLength());
+        } catch (ArithmeticException e) {
+            // expected
+        }
+    }
+
+    private static void testGcd() {
+        System.out.println("Testing BigInteger.gcd");
+        check("BigInteger.MIN_VALUE.gcd(BigInteger.MIN_VALUE)",
+                MIN_VALUE.gcd(MIN_VALUE), MAX_VALUE);
+        check("BigInteger.MIN_VALUE.gcd(BigInteger.ZERO)",
+                MIN_VALUE.gcd(BigInteger.ZERO), MAX_VALUE);
+        check("BigInteger.ZERO.gcd(MIN_VALUE)",
+                BigInteger.ZERO.gcd(MIN_VALUE), MAX_VALUE);
+    }
+
+    private static void testAbs() {
+        System.out.println("Testing BigInteger.abs");
+        check("BigInteger.MIN_VALUE.abs()",
+                MIN_VALUE.abs(), MAX_VALUE);
+        check("BigInteger.MAX_VALUE.abs()",
+                MAX_VALUE.abs(), MAX_VALUE);
+    }
+
+    private static void testNegate() {
+        System.out.println("Testing BigInteger.negate");
+        check("BigInteger.MIN_VALUE.negate()",
+                MIN_VALUE.negate(), MAX_VALUE);
+        check("BigInteger.MAX_VALUE.negate()",
+                MAX_VALUE.negate(), MIN_VALUE);
+    }
+
+    private static void testMod() {
+        System.out.println("Testing BigInteger.mod");
+        check("BigInteger.MIN_VALUE.mod(BigInteger.MAX_VALUE)",
+                MIN_VALUE.mod(MAX_VALUE), BigInteger.ZERO);
+        check("BigInteger.MAX_VALUE.mod(BigInteger.MAX_VALUE)",
+                MIN_VALUE.mod(MAX_VALUE), BigInteger.ZERO);
+    }
+
+    private static void testModPow() {
+        System.out.println("Testing BigInteger.modPow");
+        BigInteger x = BigInteger.valueOf(3);
+        BigInteger m = BigInteger.valueOf(-4).subtract(MIN_VALUE);
+        check("BigInteger.valueOf(3).modPow(BigInteger.ONE, m)",
+                x.modPow(BigInteger.ONE, m), x);
+    }
+
+    // slow test
+    private static void testModInverse() {
+        System.out.println("Testing BigInteger.modInverse");
+        check("BigInteger.MIN_VALUE.modInverse(BigInteger.MAX_VALUE)",
+                MIN_VALUE.modInverse(MAX_VALUE), MAX_VALUE.subtract(BigInteger.ONE));
+    }
+
+    private static void testShiftLeft() {
+        System.out.println("Testing BigInteger.shiftLeft");
+        try {
+            BigInteger actual = MIN_VALUE.shiftLeft(1);
+            throw new RuntimeException("BigInteger.MIN_VALUE.shiftLeft(1).bitLength()=" + actual.bitLength());
+        } catch (ArithmeticException e) {
+            // expected
+        }
+        try {
+            BigInteger actual = MAX_VALUE.shiftLeft(1);
+            throw new RuntimeException("BigInteger.MAX_VALUE.shiftLeft(1).bitLength()=" + actual.bitLength());
+        } catch (ArithmeticException e) {
+            // expected
+        }
+    }
+
+    private static void testShiftRight() {
+        System.out.println("Testing BigInteger.shiftRight");
+        try {
+            BigInteger actual = MIN_VALUE.shiftRight(-1);
+            throw new RuntimeException("BigInteger.MIN_VALUE.shiftRight(-1).bitLength()=" + actual.bitLength());
+        } catch (ArithmeticException e) {
+            // expected
+        }
+        try {
+            BigInteger actual = MAX_VALUE.shiftRight(-1);
+            throw new RuntimeException("BigInteger.MAX_VALUE.shiftRight(-1).bitLength()=" + actual.bitLength());
+        } catch (ArithmeticException e) {
+            // expected
+        }
+    }
+
+    private static void testAnd() {
+        System.out.println("Testing BigInteger.and");
+        check("BigInteger.MIN_VALUE.and(BigInteger.MIN_VALUE)",
+                MIN_VALUE.and(MIN_VALUE), MIN_VALUE);
+        check("BigInteger.MAX_VALUE.and(BigInteger.MAX_VALUE)",
+                MAX_VALUE.and(MAX_VALUE), MAX_VALUE);
+        check("BigInteger.MIN_VALUE.and(BigInteger.MAX_VALUE)",
+                MIN_VALUE.and(MAX_VALUE), BigInteger.ONE);
+        try {
+            BigInteger actual = MIN_VALUE.and(BigInteger.valueOf(-2));
+            throw new RuntimeException("BigInteger.MIN_VALUE.and(-2)).bitLength()=" + actual.bitLength());
+        } catch (ArithmeticException e) {
+            // expected
+        }
+    }
+
+    private static void testOr() {
+        System.out.println("Testing BigInteger.or");
+        check("BigInteger.MIN_VALUE.or(BigInteger.MIN_VALUE)",
+                MIN_VALUE.or(MIN_VALUE), MIN_VALUE);
+        check("BigInteger.MAX_VALUE.or(BigInteger.MAX_VALUE)",
+                MAX_VALUE.or(MAX_VALUE), MAX_VALUE);
+        check("BigInteger.MIN_VALUE.and(BigInteger.MAX_VALUE)",
+                MIN_VALUE.or(MAX_VALUE), BigInteger.valueOf(-1));
+    }
+
+    private static void testXor() {
+        System.out.println("Testing BigInteger.xor");
+        check("BigInteger.MIN_VALUE.xor(BigInteger.MIN_VALUE)",
+                MIN_VALUE.xor(MIN_VALUE), BigInteger.ZERO);
+        check("BigInteger.MAX_VALUE.xor(BigInteger.MAX_VALUE)",
+                MAX_VALUE.xor(MAX_VALUE), BigInteger.ZERO);
+        check("BigInteger.MIN_VALUE.xor(BigInteger.MAX_VALUE)",
+                MIN_VALUE.xor(MAX_VALUE), BigInteger.valueOf(-2));
+        try {
+            BigInteger actual = MIN_VALUE.xor(BigInteger.ONE);
+            throw new RuntimeException("BigInteger.MIN_VALUE.xor(BigInteger.ONE)).bitLength()=" + actual.bitLength());
+        } catch (ArithmeticException e) {
+            // expected
+        }
+    }
+
+    private static void testNot() {
+        System.out.println("Testing BigInteger.not");
+        check("BigInteger.MIN_VALUE.not()",
+                MIN_VALUE.not(), MAX_VALUE.subtract(BigInteger.ONE));
+        try {
+            BigInteger actual = MAX_VALUE.not();
+            throw new RuntimeException("BigInteger.MAX_VALUE.not()).bitLength()=" + actual.bitLength());
+        } catch (ArithmeticException e) {
+            // expected
+        }
+    }
+
+    private static void testSetBit() {
+        System.out.println("Testing BigInteger.setBit");
+        check("BigInteger.MIN_VALUE.setBit(" + Integer.MAX_VALUE + ")",
+                MIN_VALUE.setBit(Integer.MAX_VALUE), MIN_VALUE);
+        try {
+            BigInteger actual = MAX_VALUE.setBit(Integer.MAX_VALUE);
+            throw new RuntimeException("BigInteger.MAX_VALUE.setBit(" + Integer.MAX_VALUE + ").bitLength()=" + actual.bitLength());
+        } catch (ArithmeticException e) {
+            // expected
+        }
+    }
+
+    private static void testClearBit() {
+        System.out.println("Testing BigInteger.clearBit");
+        check("BigInteger.MAX_VALUE.clearBit(" + Integer.MAX_VALUE + ")",
+                MAX_VALUE.clearBit(Integer.MAX_VALUE), MAX_VALUE);
+        try {
+            BigInteger actual = MIN_VALUE.clearBit(Integer.MAX_VALUE);
+            throw new RuntimeException("BigInteger.MIN_VALUE.clearBit(" + Integer.MAX_VALUE + ").bitLength()=" + actual.bitLength());
+        } catch (ArithmeticException e) {
+            // expected
+        }
+        try {
+            BigInteger actual = MIN_VALUE.clearBit(0);
+            throw new RuntimeException("BigInteger.MIN_VALUE.clearBit(0).bitLength()=" + actual.bitLength());
+        } catch (ArithmeticException e) {
+            // expected
+        }
+    }
+
+    private static void testFlipBit() {
+        System.out.println("Testing BigInteger.flipBit");
+        try {
+            BigInteger actual = MIN_VALUE.flipBit(Integer.MAX_VALUE);
+            throw new RuntimeException("BigInteger.MIN_VALUE.flipBit(" + Integer.MAX_VALUE + ").bitLength()=" + actual.bitLength());
+        } catch (ArithmeticException e) {
+            // expected
+        }
+        try {
+            BigInteger actual = MIN_VALUE.flipBit(0);
+            throw new RuntimeException("BigInteger.MIN_VALUE.flipBit(0).bitLength()=" + actual.bitLength());
+        } catch (ArithmeticException e) {
+            // expected
+        }
+        try {
+            BigInteger actual = MAX_VALUE.flipBit(Integer.MAX_VALUE);
+            throw new RuntimeException("BigInteger.MAX_VALUE.flipBit(" + Integer.MAX_VALUE + ").bitLength()=" + actual.bitLength());
+        } catch (ArithmeticException e) {
+            // expected
+        }
+    }
+
+    private static void testGetLowestSetBit() {
+        System.out.println("Testing BigInteger.getLowestSetBit");
+        check("BigInteger.MIN_VALUE.getLowestSetBit()",
+                MIN_VALUE.getLowestSetBit(), 0);
+        check("BigInteger.MAX_VALUE.getLowestSetBit()",
+                MAX_VALUE.getLowestSetBit(), 0);
+    }
+
+    private static void testBitLength() {
+        System.out.println("Testing BigInteger.bitLength");
+        check("BigInteger.MIN_NEXT.bitLength()",
+                MIN_VALUE.bitLength(), Integer.MAX_VALUE);
+        check("BigInteger.MAX_VALUE.bitLength()",
+                MAX_VALUE.bitLength(), Integer.MAX_VALUE);
+    }
+
+    private static void testBitCount() {
+        System.out.println("Testing BigInteger.bitCount");
+        check("BigInteger.MIN_VALUE.bitCount()",
+                MIN_VALUE.bitCount(), Integer.MAX_VALUE - 1);
+        check("BigInteger.MAX_VALUE.bitCount()",
+                MAX_VALUE.bitCount(), Integer.MAX_VALUE);
+    }
+
+    private static void testToString(String msg, int radix, BigInteger bi, int length, String startsWith, char c) {
+        String s = bi.toString(radix);
+        if (s.length() != length) {
+            throw new RuntimeException(msg + ".length=" + s.length());
+        }
+        if (!s.startsWith(startsWith)) {
+            throw new RuntimeException(msg + "[0]=" + s.substring(0, startsWith.length()));
+        }
+        for (int i = startsWith.length(); i < s.length(); i++) {
+            if (s.charAt(i) != c) {
+                throw new RuntimeException(msg + "[" + i + "]='" + s.charAt(i) + "'");
+            }
+        }
+    }
+
+    private static void testToString() {
+        System.out.println("Testing BigInteger.toString");
+        testToString("BigInteger.MIN_VALUE.toString(16)=", 16,
+                BigInteger.valueOf(-1).shiftLeft(Integer.MAX_VALUE - 1),
+                (1 << 29) + 1, "-4", '0');
+    }
+
+    private static void testToByteArrayWithConstructor(String msg, BigInteger bi, int length, byte msb, byte b, byte lsb) {
+        byte[] ba = bi.toByteArray();
+        if (ba.length != length) {
+            throw new RuntimeException(msg + ".length=" + ba.length);
+        }
+        if (ba[0] != msb) {
+            throw new RuntimeException(msg + "[0]=" + ba[0]);
+        }
+        for (int i = 1; i < ba.length - 1; i++) {
+            if (ba[i] != b) {
+                throw new RuntimeException(msg + "[" + i + "]=" + ba[i]);
+            }
+        }
+        if (ba[ba.length - 1] != lsb) {
+            throw new RuntimeException(msg + "[" + (ba.length - 1) + "]=" + ba[ba.length - 1]);
+        }
+        BigInteger actual = new BigInteger(ba);
+        if (!actual.equals(bi)) {
+            throw new RuntimeException(msg + ".bitLength()=" + actual.bitLength());
+        }
+    }
+
+    private static void testToByteArrayWithConstructor() {
+        System.out.println("Testing BigInteger.toByteArray with constructor");
+        testToByteArrayWithConstructor("BigInteger.MIN_VALUE.toByteArray()",
+                MIN_VALUE, (1 << 28), (byte) 0x80, (byte) 0x00, (byte) 0x01);
+        testToByteArrayWithConstructor("BigInteger.MAX_VALUE.toByteArray()",
+                MAX_VALUE, (1 << 28), (byte) 0x7f, (byte) 0xff, (byte) 0xff);
+
+        byte[] ba = new byte[1 << 28];
+        ba[0] = (byte) 0x80;
+        try {
+            BigInteger actual = new BigInteger(-1, ba);
+            throw new RuntimeException("new BigInteger(-1, ba).bitLength()=" + actual.bitLength());
+        } catch (ArithmeticException e) {
+            // expected
+        }
+        try {
+            BigInteger actual = new BigInteger(1, ba);
+            throw new RuntimeException("new BigInteger(1, ba).bitLength()=" + actual.bitLength());
+        } catch (ArithmeticException e) {
+            // expected
+        }
+    }
+
+    private static void testIntValue() {
+        System.out.println("Testing BigInteger.intValue");
+        check("BigInteger.MIN_VALUE.intValue()",
+                MIN_VALUE.intValue(), 1);
+        check("BigInteger.MAX_VALUE.floatValue()",
+                MAX_VALUE.intValue(), -1);
+    }
+
+    private static void testLongValue() {
+        System.out.println("Testing BigInteger.longValue");
+        check("BigInteger.MIN_VALUE.longValue()",
+                MIN_VALUE.longValue(), 1L);
+        check("BigInteger.MAX_VALUE.longValue()",
+                MAX_VALUE.longValue(), -1L);
+    }
+
+    private static void testFloatValue() {
+        System.out.println("Testing BigInteger.floatValue, Bug 8021203");
+        check("BigInteger.MIN_VALUE_.floatValue()",
+                MIN_VALUE.floatValue(), Float.NEGATIVE_INFINITY);
+        check("BigInteger.MAX_VALUE.floatValue()",
+                MAX_VALUE.floatValue(), Float.POSITIVE_INFINITY);
+    }
+
+    private static void testDoubleValue() {
+        System.out.println("Testing BigInteger.doubleValue, Bug 8021203");
+        check("BigInteger.MIN_VALUE.doubleValue()",
+                MIN_VALUE.doubleValue(), Double.NEGATIVE_INFINITY);
+        check("BigInteger.MAX_VALUE.doubleValue()",
+                MAX_VALUE.doubleValue(), Double.POSITIVE_INFINITY);
+    }
+
+    private static void testSerialization(String msg, BigInteger bi) {
+        try {
+            ByteArrayOutputStream baOut = new ByteArrayOutputStream((1 << 28) + 1000);
+            ObjectOutputStream out = new ObjectOutputStream(baOut);
+            out.writeObject(bi);
+            out.close();
+            out = null;
+            byte[] ba = baOut.toByteArray();
+            baOut = null;
+            ObjectInputStream in = new ObjectInputStream(new ByteArrayInputStream(ba));
+            BigInteger actual = (BigInteger) in.readObject();
+            if (!actual.equals(bi)) {
+                throw new RuntimeException(msg + ".bitLength()=" + actual.bitLength());
+            }
+        } catch (IOException | ClassNotFoundException e) {
+            throw new RuntimeException(msg + " raised exception ", e);
+        }
+    }
+
+    private static void testSerialization() {
+        System.out.println("Testing BigInteger serialization");
+        testSerialization("BigInteger.MIN_VALUE.intValue()",
+                MIN_VALUE);
+        testSerialization("BigInteger.MAX_VALUE.floatValue()",
+                MAX_VALUE);
+    }
+
+    private static void testLongValueExact() {
+        System.out.println("Testing BigInteger.longValueExact");
+        try {
+            long actual = MIN_VALUE.longValueExact();
+            throw new RuntimeException("BigInteger.MIN_VALUE.longValueExact()= " + actual);
+        } catch (ArithmeticException e) {
+            // excpected
+        }
+        try {
+            long actual = MAX_VALUE.longValueExact();
+            throw new RuntimeException("BigInteger.MAX_VALUE.longValueExact()= " + actual);
+        } catch (ArithmeticException e) {
+            // excpected
+        }
+    }
+
+    private static void testIntValueExact() {
+        System.out.println("Testing BigInteger.intValueExact");
+        try {
+            long actual = MIN_VALUE.intValueExact();
+            throw new RuntimeException("BigInteger.MIN_VALUE.intValueExact()= " + actual);
+        } catch (ArithmeticException e) {
+            // excpected
+        }
+        try {
+            long actual = MAX_VALUE.intValueExact();
+            throw new RuntimeException("BigInteger.MAX_VALUE.intValueExact()= " + actual);
+        } catch (ArithmeticException e) {
+            // excpected
+        }
+    }
+
+    private static void testShortValueExact() {
+        System.out.println("Testing BigInteger.shortValueExact");
+        try {
+            long actual = MIN_VALUE.shortValueExact();
+            throw new RuntimeException("BigInteger.MIN_VALUE.shortValueExact()= " + actual);
+        } catch (ArithmeticException e) {
+            // excpected
+        }
+        try {
+            long actual = MAX_VALUE.shortValueExact();
+            throw new RuntimeException("BigInteger.MAX_VALUE.shortValueExact()= " + actual);
+        } catch (ArithmeticException e) {
+            // excpected
+        }
+    }
+
+    private static void testByteValueExact() {
+        System.out.println("Testing BigInteger.byteValueExact");
+        try {
+            long actual = MIN_VALUE.byteValueExact();
+            throw new RuntimeException("BigInteger.MIN_VALUE.byteValueExact()= " + actual);
+        } catch (ArithmeticException e) {
+            // excpected
+        }
+        try {
+            long actual = MAX_VALUE.byteValueExact();
+            throw new RuntimeException("BigInteger.MAX_VALUE.byteValueExact()= " + actual);
+        } catch (ArithmeticException e) {
+            // excpected
+        }
+    }
+
+    public static void main(String... args) {
+        testOverflowInMakePositive();
+        testBug8021204();
+        testOverflowInBitSieve();
+        testAdd();
+        testSubtract();
+        testMultiply();
+        testDivide();
+        testDivideAndRemainder();
+        testBug9005933();
+        testRemainder();
+        testPow();
+        testGcd();
+        testAbs();
+        testNegate();
+        testMod();
+        testModPow();
+//        testModInverse();
+        testShiftLeft();
+        testShiftRight();
+        testAnd();
+        testOr();
+        testXor();
+        testNot();
+        testSetBit();
+        testClearBit();
+        testFlipBit();
+        testGetLowestSetBit();
+        testBitLength();
+        testBitCount();
+        testToString();
+        testToByteArrayWithConstructor();
+        testIntValue();
+        testLongValue();
+        testFloatValue();
+        testDoubleValue();
+        testSerialization();
+        testLongValueExact();
+        testIntValueExact();
+        testShortValueExact();
+        testByteValueExact();
+    }
+}
--- a/test/java/net/URLPermission/URLPermissionTest.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/test/java/net/URLPermission/URLPermissionTest.java	Mon Nov 11 23:17:30 2013 -0800
@@ -26,7 +26,7 @@
 
 /**
  * @test
- * @bug 8010464
+ * @bug 8010464 8027570
  */
 
 public class URLPermissionTest {
@@ -110,6 +110,28 @@
         return new ActionImpliesTest(arg1, arg2, expected);
     }
 
+    static class HashCodeTest extends Test {
+        String arg1, arg2;
+        int hash;
+
+        HashCodeTest(String arg1, String arg2, int hash) {
+            this.arg1 = arg1;
+            this.arg2 = arg2;
+            this.hash = hash;
+        }
+
+        @Override
+        boolean execute() {
+            URLPermission p = new URLPermission(arg1, arg2);
+            int h = p.hashCode();
+            return h == hash;
+        }
+    }
+
+    static HashCodeTest hashtest(String arg1, String arg2, int expected) {
+        return new HashCodeTest(arg1, arg2, expected);
+    }
+
     static class URLEqualityTest extends Test {
         String arg1, arg2;
 
@@ -178,6 +200,11 @@
         extest("http:")
     };
 
+    static Test[] hashTests = {
+        hashtest("http://www.foo.com/path", "GET:X-Foo", 388644203),
+        hashtest("http:*", "*:*", 3255810)
+    };
+
     static Test[] pathImplies2 = {
         imtest("http://[FE80::]:99", "http://[fe80:0::]:99", true),
 
@@ -326,6 +353,17 @@
 
         }
 
+        for (int i=0; i<hashTests.length; i++) {
+            HashCodeTest test = (HashCodeTest)hashTests[i];
+            boolean result = test.execute();
+            if (!result) {
+                System.out.printf ("test failed: %s %s %d\n", test.arg1, test.arg2, test.hash);
+                failed = true;
+            } else {
+                System.out.println ("hash test " + i + " OK");
+            }
+        }
+
         for (int i=0; i<exceptionTests.length; i++) {
             ExTest test = (ExTest)exceptionTests[i];
             boolean result = test.execute();
--- a/test/java/security/Signature/SignatureGetAlgorithm.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/test/java/security/Signature/SignatureGetAlgorithm.java	Mon Nov 11 23:17:30 2013 -0800
@@ -49,7 +49,7 @@
 
     public static class TestProvider extends Provider {
         TestProvider() {
-            super("test", 1.0, "test");
+            super("testSignatureGetAlgorithm", 1.0, "test Signatures");
             put("Signature.MySignatureAlg",
                 "SignatureGetAlgorithm$MySignatureAlg");
         }
--- a/test/java/util/stream/test/org/openjdk/tests/java/lang/invoke/SerializedLambdaTest.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/test/java/util/stream/test/org/openjdk/tests/java/lang/invoke/SerializedLambdaTest.java	Mon Nov 11 23:17:30 2013 -0800
@@ -22,9 +22,18 @@
  */
 package org.openjdk.tests.java.lang.invoke;
 
-import org.testng.annotations.Test;
-
-import java.io.*;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.NotSerializableException;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
+import java.io.Serializable;
+import java.lang.invoke.CallSite;
+import java.lang.invoke.LambdaMetafactory;
+import java.lang.invoke.MethodHandle;
+import java.lang.invoke.MethodHandles;
+import java.lang.invoke.MethodType;
 import java.util.ArrayList;
 import java.util.List;
 import java.util.concurrent.atomic.AtomicLong;
@@ -34,6 +43,8 @@
 import java.util.function.Predicate;
 import java.util.function.Supplier;
 
+import org.testng.annotations.Test;
+
 import static org.testng.Assert.assertFalse;
 import static org.testng.Assert.assertTrue;
 import static org.testng.Assert.fail;
@@ -281,4 +292,66 @@
         LongConsumer lc = (LongConsumer & Serializable) a::addAndGet;
         assertSerial(lc, plc -> { plc.accept(3); });
     }
+
+    // Tests of direct use of metafactories
+
+    private static boolean foo(Object s) { return s != null && ((String) s).length() > 0; }
+    private static final MethodType predicateMT = MethodType.methodType(boolean.class, Object.class);
+    private static final MethodType stringPredicateMT = MethodType.methodType(boolean.class, String.class);
+    private static final Consumer<Predicate<String>> fooAsserter = x -> {
+        assertTrue(x.test("foo"));
+        assertFalse(x.test(""));
+        assertFalse(x.test(null));
+    };
+
+    // standard MF: nonserializable supertype
+    public void testDirectStdNonser() throws Throwable {
+        MethodHandle fooMH = MethodHandles.lookup().findStatic(SerializedLambdaTest.class, "foo", predicateMT);
+
+        // Standard metafactory, non-serializable target: not serializable
+        CallSite cs = LambdaMetafactory.metafactory(MethodHandles.lookup(),
+                                                    "test", MethodType.methodType(Predicate.class),
+                                                    predicateMT, fooMH, stringPredicateMT);
+        Predicate<String> p = (Predicate<String>) cs.getTarget().invokeExact();
+        assertNotSerial(p, fooAsserter);
+    }
+
+    // standard MF: serializable supertype
+    public void testDirectStdSer() throws Throwable {
+        MethodHandle fooMH = MethodHandles.lookup().findStatic(SerializedLambdaTest.class, "foo", predicateMT);
+
+        // Standard metafactory, serializable target: not serializable
+        CallSite cs = LambdaMetafactory.metafactory(MethodHandles.lookup(),
+                                                    "test", MethodType.methodType(SerPredicate.class),
+                                                    predicateMT, fooMH, stringPredicateMT);
+        assertNotSerial((SerPredicate<String>) cs.getTarget().invokeExact(), fooAsserter);
+    }
+
+    // alt MF: nonserializable supertype
+    public void testAltStdNonser() throws Throwable {
+        MethodHandle fooMH = MethodHandles.lookup().findStatic(SerializedLambdaTest.class, "foo", predicateMT);
+
+        // Alt metafactory, non-serializable target: not serializable
+        CallSite cs = LambdaMetafactory.altMetafactory(MethodHandles.lookup(),
+                                                       "test", MethodType.methodType(Predicate.class),
+                                                       predicateMT, fooMH, stringPredicateMT, 0);
+        assertNotSerial((Predicate<String>) cs.getTarget().invokeExact(), fooAsserter);
+    }
+
+    // alt MF: serializable supertype
+    public void testAltStdSer() throws Throwable {
+        MethodHandle fooMH = MethodHandles.lookup().findStatic(SerializedLambdaTest.class, "foo", predicateMT);
+
+        // Alt metafactory, serializable target, no FLAG_SERIALIZABLE: not serializable
+        CallSite cs = LambdaMetafactory.altMetafactory(MethodHandles.lookup(),
+                                                       "test", MethodType.methodType(SerPredicate.class),
+                                                       predicateMT, fooMH, stringPredicateMT, 0);
+        assertNotSerial((SerPredicate<String>) cs.getTarget().invokeExact(), fooAsserter);
+
+        // Alt metafactory, serializable marker, no FLAG_SERIALIZABLE: not serializable
+        cs = LambdaMetafactory.altMetafactory(MethodHandles.lookup(),
+                                              "test", MethodType.methodType(Predicate.class),
+                                              predicateMT, fooMH, stringPredicateMT, LambdaMetafactory.FLAG_MARKERS, 1, Serializable.class);
+        assertNotSerial((Predicate<String>) cs.getTarget().invokeExact(), fooAsserter);
+    }
 }
--- a/test/java/util/stream/test/org/openjdk/tests/java/util/stream/DistinctOpTest.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/test/java/util/stream/test/org/openjdk/tests/java/util/stream/DistinctOpTest.java	Mon Nov 11 23:17:30 2013 -0800
@@ -28,8 +28,10 @@
 import java.util.Collection;
 import java.util.Comparator;
 import java.util.List;
+import java.util.Optional;
 import java.util.Spliterator;
 import java.util.Spliterators;
+import java.util.concurrent.ThreadLocalRandom;
 import java.util.stream.*;
 
 import static java.util.stream.LambdaTestHelpers.*;
@@ -48,6 +50,17 @@
         assertCountSum(countTo(10).stream().distinct(), 10, 55);
     }
 
+    public void testWithUnorderedInfiniteStream() {
+        // These tests should short-circuit, otherwise will fail with a time-out
+        // or an OOME
+
+        Integer one = Stream.iterate(1, i -> i + 1).unordered().parallel().distinct().findAny().get();
+        assertEquals(one.intValue(), 1);
+
+        Optional<Integer> oi = ThreadLocalRandom.current().ints().boxed().parallel().distinct().findAny();
+        assertTrue(oi.isPresent());
+    }
+
     @Test(dataProvider = "StreamTestData<Integer>", dataProviderClass = StreamTestDataProvider.class)
     public void testOp(String name, TestData.OfRef<Integer> data) {
         Collection<Integer> result = exerciseOpsInt(data, Stream::distinct, IntStream::distinct, LongStream::distinct, DoubleStream::distinct);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/javax/print/TextFlavorTest.java	Mon Nov 11 23:17:30 2013 -0800
@@ -0,0 +1,61 @@
+/*
+ * 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 6334074 8022536
+  @summary test supported text flavors reported properly
+  @run main TextFlavorTest
+*/
+
+import javax.print.*;
+import javax.print.attribute.standard.*;
+import javax.print.attribute.*;
+import java.io.*;
+
+public class TextFlavorTest {
+
+    public static void main(String[] args) throws Exception {
+
+        PrintService service[] =
+            PrintServiceLookup.lookupPrintServices(null, null);
+
+        if (service.length == 0) {
+            System.out.println("No print service found.");
+            return;
+        }
+
+        for (int y = 0; y < service.length; y ++) {
+            DocFlavor flavors[] = service[y].getSupportedDocFlavors();
+            if (flavors == null) continue;
+            for (int x = 0; x < flavors.length; x ++) {
+                if (!service[y].isDocFlavorSupported(flavors[x])) {
+                    String msg = "DocFlavor " + flavors[x] +
+                        " is not supported by service "+ service[y];
+                    throw new RuntimeException(msg);
+                }
+            }
+        }
+        System.out.println("Test passed.");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/javax/sound/sampled/FileReader/ReadersExceptions.java	Mon Nov 11 23:17:30 2013 -0800
@@ -0,0 +1,133 @@
+/*
+ * 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.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+
+import javax.sound.sampled.AudioSystem;
+import javax.sound.sampled.UnsupportedAudioFileException;
+
+/**
+ * @test
+ * @bug 7058662 7058666 7058672
+ * @author Sergey Bylokhov
+ */
+public final class ReadersExceptions {
+
+    // empty channels
+    static byte[] wrongAIFFCh =
+            {0x46, 0x4f, 0x52, 0x4d, // AiffFileFormat.AIFF_MAGIC
+             0, 0, 0, 0, // length
+             0, 0, 0, 0, // iffType
+             0x43, 0x4f, 0x4d, 0x4d, // chunkName
+             0, 0, 0, 100, // chunkLen
+             0, 0, // channels
+             0, 0, 0, 0, //
+             0, 10  // sampleSize
+                    , 0, 0, 0, 0};
+    // empty sampleSize
+    static byte[] wrongAIFFSSL =
+            {0x46, 0x4f, 0x52, 0x4d, //AiffFileFormat.AIFF_MAGIC
+             0, 0, 0, 0, // length
+             0, 0, 0, 0, // iffType
+             0x43, 0x4f, 0x4d, 0x4d, // chunkName
+             0, 0, 0, 100, // chunkLen
+             0, 10, // channels
+             0, 0, 0, 0, //
+             0, 0  // sampleSize
+                    , 0, 0, 0, 0};
+    // big sampleSize
+    static byte[] wrongAIFFSSH =
+            {0x46, 0x4f, 0x52, 0x4d, //AiffFileFormat.AIFF_MAGIC
+             0, 0, 0, 0, // length
+             0, 0, 0, 0, // iffType
+             0x43, 0x4f, 0x4d, 0x4d, // chunkName
+             0, 0, 0, 100, // chunkLen
+             0, 10, // channels
+             0, 0, 0, 0, //
+             0, 33  // sampleSize
+                    , 0, 0, 0, 0};
+    // empty channels
+    static byte[] wrongAUCh =
+            {0x2e, 0x73, 0x6e, 0x64,//AiffFileFormat.AU_SUN_MAGIC
+             0, 0, 0, 0, // headerSize
+             0, 0, 0, 0, // dataSize
+             0, 0, 0, 1, // encoding_local AuFileFormat.AU_ULAW_8
+             0, 0, 0, 0, // sampleRate
+             0, 0, 0, 0 // channels
+            };
+    // empty channels
+    static byte[] wrongWAVCh =
+            {0x52, 0x49, 0x46, 0x46, // WaveFileFormat.RIFF_MAGIC
+             1, 1, 1, 1, // fileLength
+             0x57, 0x41, 0x56, 0x45, //  waveMagic
+             0x66, 0x6d, 0x74, 0x20, // FMT_MAGIC
+             3, 0, 0, 0, // length
+             1, 0, // wav_type  WAVE_FORMAT_PCM
+             0, 0, // channels
+             0, 0, 0, 0, // sampleRate
+             0, 0, 0, 0, // avgBytesPerSec
+             0, 0, // blockAlign
+             1, 0, // sampleSizeInBits
+             0x64, 0x61, 0x74, 0x61, // WaveFileFormat.DATA_MAGIC
+             0, 0, 0, 0, // dataLength
+            };
+    // empty sampleSizeInBits
+    static byte[] wrongWAVSSB =
+            {0x52, 0x49, 0x46, 0x46, // WaveFileFormat.RIFF_MAGIC
+             1, 1, 1, 1, // fileLength
+             0x57, 0x41, 0x56, 0x45, //  waveMagic
+             0x66, 0x6d, 0x74, 0x20, // FMT_MAGIC
+             3, 0, 0, 0, // length
+             1, 0, // wav_type  WAVE_FORMAT_PCM
+             1, 0, // channels
+             0, 0, 0, 0, // sampleRate
+             0, 0, 0, 0, // avgBytesPerSec
+             0, 0, // blockAlign
+             0, 0, // sampleSizeInBits
+             0x64, 0x61, 0x74, 0x61, // WaveFileFormat.DATA_MAGIC
+             0, 0, 0, 0, // dataLength
+            };
+
+    public static void main(final String[] args) throws IOException {
+        test(wrongAIFFCh);
+        test(wrongAIFFSSL);
+        test(wrongAIFFSSH);
+        test(wrongAUCh);
+        test(wrongWAVCh);
+        test(wrongWAVSSB);
+    }
+
+    private static void test(final byte[] buffer) throws IOException {
+        final InputStream is = new ByteArrayInputStream(buffer);
+        try {
+            AudioSystem.getAudioFileFormat(is);
+        } catch (UnsupportedAudioFileException ignored) {
+            // Expected.
+            return;
+        }
+        throw new RuntimeException("Test Failed");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/javax/swing/JInternalFrame/8020708/bug8020708.java	Mon Nov 11 23:17:30 2013 -0800
@@ -0,0 +1,141 @@
+/*
+ * 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.Point;
+import java.awt.Robot;
+import java.awt.Toolkit;
+import java.awt.event.InputEvent;
+import java.awt.event.KeyEvent;
+import java.util.Locale;
+import javax.swing.JDesktopPane;
+import javax.swing.JFrame;
+import javax.swing.JInternalFrame;
+import javax.swing.SwingUtilities;
+import javax.swing.UIManager;
+import sun.awt.SunToolkit;
+
+/**
+ * @test
+ * @bug 8020708
+ * @author Alexander Scherbatiy
+ * @summary NLS: mnemonics missing in SwingSet2/JInternalFrame demo
+ * @library ../../regtesthelpers
+ * @build Util
+ * @run main bug8020708
+ */
+public class bug8020708 {
+
+    private static final Locale[] SUPPORTED_LOCALES = {
+        Locale.ENGLISH,
+        new Locale("de"),
+        new Locale("es"),
+        new Locale("fr"),
+        new Locale("it"),
+        new Locale("ja"),
+        new Locale("ko"),
+        new Locale("pt", "BR"),
+        new Locale("sv"),
+        new Locale("zh", "CN"),
+        new Locale("zh", "TW")
+    };
+    private static final String[] LOOK_AND_FEELS = {
+        "Nimbus",
+        "Windows",
+        "Motif"
+    };
+    private static JInternalFrame internalFrame;
+    private static JFrame frame;
+
+    public static void main(String[] args) throws Exception {
+        for (Locale locale : SUPPORTED_LOCALES) {
+            for (String laf : LOOK_AND_FEELS) {
+                Locale.setDefault(locale);
+                if (!installLookAndFeel(laf)) {
+                    continue;
+                }
+                testInternalFrameMnemonic();
+            }
+        }
+    }
+
+    static void testInternalFrameMnemonic() throws Exception {
+        SunToolkit toolkit = (SunToolkit) Toolkit.getDefaultToolkit();
+        Robot robot = new Robot();
+        robot.setAutoDelay(50);
+
+        SwingUtilities.invokeAndWait(new Runnable() {
+            @Override
+            public void run() {
+                frame = new JFrame("Test");
+                frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
+                frame.setSize(300, 200);
+
+                JDesktopPane desktop = new JDesktopPane();
+                internalFrame = new JInternalFrame("Test");
+                internalFrame.setSize(200, 100);
+                internalFrame.setClosable(true);
+                desktop.add(internalFrame);
+                internalFrame.setVisible(true);
+                internalFrame.setMaximizable(true);
+
+                frame.getContentPane().add(desktop);
+                frame.setVisible(true);
+            }
+        });
+
+        toolkit.realSync();
+
+        Point clickPoint = Util.getCenterPoint(internalFrame);
+        robot.mouseMove(clickPoint.x, clickPoint.y);
+        robot.mousePress(InputEvent.BUTTON1_MASK);
+        robot.mouseRelease(InputEvent.BUTTON1_MASK);
+        toolkit.realSync();
+
+        Util.hitKeys(robot, KeyEvent.VK_CONTROL, KeyEvent.VK_SPACE);
+        toolkit.realSync();
+
+        Util.hitKeys(robot, KeyEvent.VK_C);
+        toolkit.realSync();
+
+        SwingUtilities.invokeAndWait(new Runnable() {
+            @Override
+            public void run() {
+                if (internalFrame.isVisible()) {
+                    throw new RuntimeException("Close mnemonic does not work");
+                }
+                frame.dispose();
+            }
+        });
+    }
+
+    static final boolean installLookAndFeel(String lafName) throws Exception {
+        UIManager.LookAndFeelInfo[] infos = UIManager.getInstalledLookAndFeels();
+        for (UIManager.LookAndFeelInfo info : infos) {
+            if (info.getClassName().contains(lafName)) {
+                UIManager.setLookAndFeel(info.getClassName());
+                return true;
+            }
+        }
+        return false;
+    }
+}
--- a/test/javax/swing/JMenuItem/ActionListenerCalledTwice/ActionListenerCalledTwiceTest.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/test/javax/swing/JMenuItem/ActionListenerCalledTwice/ActionListenerCalledTwiceTest.java	Mon Nov 11 23:17:30 2013 -0800
@@ -35,13 +35,14 @@
 import javax.swing.*;
 
 public class ActionListenerCalledTwiceTest {
-    static String menuItems[] = { "Item1", "Item2", "Item3", "Item4", "Item5" };
+    static String menuItems[] = { "Item1", "Item2", "Item3", "Item4", "Item5", "Item6" };
     static KeyStroke keyStrokes[] = {
         KeyStroke.getKeyStroke(KeyEvent.VK_E, InputEvent.META_MASK),
         KeyStroke.getKeyStroke(KeyEvent.VK_DELETE, 0),
         KeyStroke.getKeyStroke(KeyEvent.VK_UP, InputEvent.SHIFT_MASK),
         KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, InputEvent.META_MASK),
-        KeyStroke.getKeyStroke(KeyEvent.VK_E, InputEvent.CTRL_MASK)
+        KeyStroke.getKeyStroke(KeyEvent.VK_E, InputEvent.CTRL_MASK),
+        KeyStroke.getKeyStroke(KeyEvent.VK_EQUALS, InputEvent.META_MASK)
     };
 
     static volatile int listenerCallCounter = 0;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/javax/swing/text/html/8005391/bug8005391.java	Mon Nov 11 23:17:30 2013 -0800
@@ -0,0 +1,61 @@
+/*
+ * 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.io.CharArrayReader;
+import java.io.CharArrayWriter;
+import javax.swing.text.html.HTMLDocument;
+import javax.swing.text.html.HTMLEditorKit;
+
+/**
+ * @test
+ * @bug 8005391
+ * @author Alexander Shusherov
+ * @summary Floating behavior of HTMLEditorKit parser
+ * @run main bug8005391
+ */
+public class bug8005391 {
+
+    private static final String htmlDoc = "<html><body><tt><a href='one'>1</a>2</tt></body></html>";
+
+    public static void main(String[] args) throws Exception {
+        int N = 10;
+
+        for (int i = 0; i < N; i++) {
+            HTMLEditorKit kit = new HTMLEditorKit();
+            Class c = Class.forName("javax.swing.text.html.parser.ParserDelegator");
+            HTMLEditorKit.Parser parser = (HTMLEditorKit.Parser) c.newInstance();
+            HTMLDocument doc = (HTMLDocument) kit.createDefaultDocument();
+            HTMLEditorKit.ParserCallback htmlReader = doc.getReader(0);
+            parser.parse(new CharArrayReader(htmlDoc.toCharArray()), htmlReader, true);
+            htmlReader.flush();
+            CharArrayWriter writer = new CharArrayWriter(1000);
+            kit.write(writer, doc, 0, doc.getLength());
+            writer.flush();
+
+            String result = writer.toString();
+            if (!result.contains("<tt><a")) {
+                throw new RuntimeException("The <a> and <tt> tags are swapped");
+            }
+        }
+    }
+}
\ No newline at end of file
--- a/test/javax/xml/jaxp/parsers/8022548/XOMParserTest.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/test/javax/xml/jaxp/parsers/8022548/XOMParserTest.java	Mon Nov 11 23:17:30 2013 -0800
@@ -65,7 +65,7 @@
 
             String inFilename = filePath + "/JDK8022548.xml";
             String xslFilename = filePath + "/JDK8022548.xsl";
-            String outFilename = filePath + "/JDK8022548.out";
+            String outFilename = "JDK8022548.out";
 
             StringWriter sw = new StringWriter();
             // Create transformer factory
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/lib/testlibrary/jdk/testlibrary/Asserts.java	Mon Nov 11 23:17:30 2013 -0800
@@ -0,0 +1,395 @@
+/*
+ * 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.
+ */
+
+package jdk.testlibrary;
+
+/**
+ * Asserts that can be used for verifying assumptions in tests.
+ *
+ * An assertion will throw a {@link RuntimeException} if the assertion isn't
+ * valid.  All the asserts can be imported into a test by using a static
+ * import:
+ *
+ * <pre>
+ * {@code
+ * import static com.oracle.java.testlibrary.Asserts.*;
+ * }
+ *
+ * Always provide a message describing the assumption if the line number of the
+ * failing assertion isn't enough to understand why the assumption failed. For
+ * example, if the assertion is in a loop or in a method that is called
+ * multiple times, then the line number won't provide enough context to
+ * understand the failure.
+ * </pre>
+ */
+public class Asserts {
+
+    /**
+     * Shorthand for {@link #assertLessThan(T, T)}.
+     *
+     * @see #assertLessThan(T, T)
+     */
+    public static <T extends Comparable<T>> void assertLT(T lhs, T rhs) {
+        assertLessThan(lhs, rhs);
+    }
+
+    /**
+     * Shorthand for {@link #assertLessThan(T, T, String)}.
+     *
+     * @see #assertLessThan(T, T, String)
+     */
+    public static <T extends Comparable<T>> void assertLT(T lhs, T rhs, String msg) {
+        assertLessThan(lhs, rhs, msg);
+    }
+
+    /**
+     * Calls {@link #assertLessThan(T, T, String)} with a default message.
+     *
+     * @see #assertLessThan(T, T, String)
+     */
+    public static <T extends Comparable<T>> void assertLessThan(T lhs, T rhs) {
+        String msg = "Expected that " + format(lhs) + " < " + format(rhs);
+        assertLessThan(lhs, rhs, msg);
+    }
+
+    /**
+     * Asserts that {@code lhs} is less than {@code rhs}.
+     *
+     * @param lhs The left hand side of the comparison.
+     * @param rhs The right hand side of the comparison.
+     * @param msg A description of the assumption.
+     * @throws RuntimeException if the assertion isn't valid.
+     */
+    public static <T extends Comparable<T>>void assertLessThan(T lhs, T rhs, String msg) {
+        assertTrue(compare(lhs, rhs, msg) < 0, msg);
+    }
+
+    /**
+     * Shorthand for {@link #assertLessThanOrEqual(T, T)}.
+     *
+     * @see #assertLessThanOrEqual(T, T)
+     */
+    public static <T extends Comparable<T>> void assertLTE(T lhs, T rhs) {
+        assertLessThanOrEqual(lhs, rhs);
+    }
+
+    /**
+     * Shorthand for {@link #assertLessThanOrEqual(T, T, String)}.
+     *
+     * @see #assertLessThanOrEqual(T, T, String)
+     */
+    public static <T extends Comparable<T>> void assertLTE(T lhs, T rhs, String msg) {
+        assertLessThanOrEqual(lhs, rhs, msg);
+    }
+
+    /**
+     * Calls {@link #assertLessThanOrEqual(T, T, String)} with a default message.
+     *
+     * @see #assertLessThanOrEqual(T, T, String)
+     */
+    public static <T extends Comparable<T>> void assertLessThanOrEqual(T lhs, T rhs) {
+        String msg = "Expected that " + format(lhs) + " <= " + format(rhs);
+        assertLessThanOrEqual(lhs, rhs, msg);
+    }
+
+    /**
+     * Asserts that {@code lhs} is less than or equal to {@code rhs}.
+     *
+     * @param lhs The left hand side of the comparison.
+     * @param rhs The right hand side of the comparison.
+     * @param msg A description of the assumption.
+     * @throws RuntimeException if the assertion isn't valid.
+     */
+    public static <T extends Comparable<T>> void assertLessThanOrEqual(T lhs, T rhs, String msg) {
+        assertTrue(compare(lhs, rhs, msg) <= 0, msg);
+    }
+
+    /**
+     * Shorthand for {@link #assertEquals(T, T)}.
+     *
+     * @see #assertEquals(T, T)
+     */
+    public static void assertEQ(Object lhs, Object rhs) {
+        assertEquals(lhs, rhs);
+    }
+
+    /**
+     * Shorthand for {@link #assertEquals(T, T, String)}.
+     *
+     * @see #assertEquals(T, T, String)
+     */
+    public static void assertEQ(Object lhs, Object rhs, String msg) {
+        assertEquals(lhs, rhs, msg);
+    }
+
+    /**
+     * Calls {@link #assertEquals(T, T, String)} with a default message.
+     *
+     * @see #assertEquals(T, T, String)
+     */
+    public static void assertEquals(Object lhs, Object rhs) {
+        String msg = "Expected " + format(lhs) + " to equal " + format(rhs);
+        assertEquals(lhs, rhs, msg);
+    }
+
+    /**
+     * Asserts that {@code lhs} is equal to {@code rhs}.
+     *
+     * @param lhs The left hand side of the comparison.
+     * @param rhs The right hand side of the comparison.
+     * @param msg A description of the assumption.
+     * @throws RuntimeException if the assertion isn't valid.
+     */
+    public static void assertEquals(Object lhs, Object rhs, String msg) {
+        if (lhs == null) {
+            if (rhs != null) {
+                error(msg);
+            }
+        } else {
+            assertTrue(lhs.equals(rhs), msg);
+        }
+    }
+
+    /**
+     * Shorthand for {@link #assertGreaterThanOrEqual(T, T)}.
+     *
+     * @see #assertGreaterThanOrEqual(T, T)
+     */
+    public static <T extends Comparable<T>> void assertGTE(T lhs, T rhs) {
+        assertGreaterThanOrEqual(lhs, rhs);
+    }
+
+    /**
+     * Shorthand for {@link #assertGreaterThanOrEqual(T, T, String)}.
+     *
+     * @see #assertGreaterThanOrEqual(T, T, String)
+     */
+    public static <T extends Comparable<T>> void assertGTE(T lhs, T rhs, String msg) {
+        assertGreaterThanOrEqual(lhs, rhs, msg);
+    }
+
+    /**
+     * Calls {@link #assertGreaterThanOrEqual(T, T, String)} with a default message.
+     *
+     * @see #assertGreaterThanOrEqual(T, T, String)
+     */
+    public static <T extends Comparable<T>> void assertGreaterThanOrEqual(T lhs, T rhs) {
+        String msg = "Expected that " + format(lhs) + " >= " + format(rhs);
+        assertGreaterThanOrEqual(lhs, rhs, msg);
+    }
+
+    /**
+     * Asserts that {@code lhs} is greater than or equal to {@code rhs}.
+     *
+     * @param lhs The left hand side of the comparison.
+     * @param rhs The right hand side of the comparison.
+     * @param msg A description of the assumption.
+     * @throws RuntimeException if the assertion isn't valid.
+     */
+    public static <T extends Comparable<T>> void assertGreaterThanOrEqual(T lhs, T rhs, String msg) {
+        assertTrue(compare(lhs, rhs, msg) >= 0, msg);
+    }
+
+    /**
+     * Shorthand for {@link #assertGreaterThan(T, T)}.
+     *
+     * @see #assertGreaterThan(T, T)
+     */
+    public static <T extends Comparable<T>> void assertGT(T lhs, T rhs) {
+        assertGreaterThan(lhs, rhs);
+    }
+
+    /**
+     * Shorthand for {@link #assertGreaterThan(T, T, String)}.
+     *
+     * @see #assertGreaterThan(T, T, String)
+     */
+    public static <T extends Comparable<T>> void assertGT(T lhs, T rhs, String msg) {
+        assertGreaterThan(lhs, rhs, msg);
+    }
+
+    /**
+     * Calls {@link #assertGreaterThan(T, T, String)} with a default message.
+     *
+     * @see #assertGreaterThan(T, T, String)
+     */
+    public static <T extends Comparable<T>> void assertGreaterThan(T lhs, T rhs) {
+        String msg = "Expected that " + format(lhs) + " > " + format(rhs);
+        assertGreaterThan(lhs, rhs, msg);
+    }
+
+    /**
+     * Asserts that {@code lhs} is greater than {@code rhs}.
+     *
+     * @param lhs The left hand side of the comparison.
+     * @param rhs The right hand side of the comparison.
+     * @param msg A description of the assumption.
+     * @throws RuntimeException if the assertion isn't valid.
+     */
+    public static <T extends Comparable<T>> void assertGreaterThan(T lhs, T rhs, String msg) {
+        assertTrue(compare(lhs, rhs, msg) > 0, msg);
+    }
+
+    /**
+     * Shorthand for {@link #assertNotEquals(T, T)}.
+     *
+     * @see #assertNotEquals(T, T)
+     */
+    public static void assertNE(Object lhs, Object rhs) {
+        assertNotEquals(lhs, rhs);
+    }
+
+    /**
+     * Shorthand for {@link #assertNotEquals(T, T, String)}.
+     *
+     * @see #assertNotEquals(T, T, String)
+     */
+    public static void assertNE(Object lhs, Object rhs, String msg) {
+        assertNotEquals(lhs, rhs, msg);
+    }
+
+    /**
+     * Calls {@link #assertNotEquals(T, T, String)} with a default message.
+     *
+     * @see #assertNotEquals(T, T, String)
+     */
+    public static void assertNotEquals(Object lhs, Object rhs) {
+        String msg = "Expected " + format(lhs) + " to not equal " + format(rhs);
+        assertNotEquals(lhs, rhs, msg);
+    }
+
+    /**
+     * Asserts that {@code lhs} is not equal to {@code rhs}.
+     *
+     * @param lhs The left hand side of the comparison.
+     * @param rhs The right hand side of the comparison.
+     * @param msg A description of the assumption.
+     * @throws RuntimeException if the assertion isn't valid.
+     */
+    public static void assertNotEquals(Object lhs, Object rhs, String msg) {
+        if (lhs == null) {
+            if (rhs == null) {
+                error(msg);
+            }
+        } else {
+            assertFalse(lhs.equals(rhs), msg);
+        }
+    }
+
+    /**
+     * Calls {@link #assertNull(Object, String)} with a default message.
+     *
+     * @see #assertNull(Object, String)
+     */
+    public static void assertNull(Object o) {
+        assertNull(o, "Expected " + format(o) + " to be null");
+    }
+
+    /**
+     * Asserts that {@code o} is null.
+     *
+     * @param o The reference assumed to be null.
+     * @param msg A description of the assumption.
+     * @throws RuntimeException if the assertion isn't valid.
+     */
+    public static void assertNull(Object o, String msg) {
+        assertEquals(o, null, msg);
+    }
+
+    /**
+     * Calls {@link #assertNotNull(Object, String)} with a default message.
+     *
+     * @see #assertNotNull(Object, String)
+     */
+    public static void assertNotNull(Object o) {
+        assertNotNull(o, "Expected non null reference");
+    }
+
+    /**
+     * Asserts that {@code o} is <i>not</i> null.
+     *
+     * @param o The reference assumed <i>not</i> to be null,
+     * @param msg A description of the assumption.
+     * @throws RuntimeException if the assertion isn't valid.
+     */
+    public static void assertNotNull(Object o, String msg) {
+        assertNotEquals(o, null, msg);
+    }
+
+    /**
+     * Calls {@link #assertFalse(boolean, String)} with a default message.
+     *
+     * @see #assertFalse(boolean, String)
+     */
+    public static void assertFalse(boolean value) {
+        assertFalse(value, "Expected value to be false");
+    }
+
+    /**
+     * Asserts that {@code value} is {@code false}.
+     *
+     * @param value The value assumed to be false.
+     * @param msg A description of the assumption.
+     * @throws RuntimeException if the assertion isn't valid.
+     */
+    public static void assertFalse(boolean value, String msg) {
+        assertTrue(!value, msg);
+    }
+
+    /**
+     * Calls {@link #assertTrue(boolean, String)} with a default message.
+     *
+     * @see #assertTrue(boolean, String)
+     */
+    public static void assertTrue(boolean value) {
+        assertTrue(value, "Expected value to be true");
+    }
+
+    /**
+     * Asserts that {@code value} is {@code true}.
+     *
+     * @param value The value assumed to be true.
+     * @param msg A description of the assumption.
+     * @throws RuntimeException if the assertion isn't valid.
+     */
+    public static void assertTrue(boolean value, String msg) {
+        if (!value) {
+            error(msg);
+        }
+    }
+
+    private static <T extends Comparable<T>> int compare(T lhs, T rhs, String msg) {
+        assertNotNull(lhs, msg);
+        assertNotNull(rhs, msg);
+        return lhs.compareTo(rhs);
+    }
+
+    private static String format(Object o) {
+        return o == null? "null" : o.toString();
+    }
+
+    private static void error(String msg) {
+        throw new RuntimeException(msg);
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/lib/testlibrary/jdk/testlibrary/JDKToolFinder.java	Mon Nov 11 23:17:30 2013 -0800
@@ -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.
+ */
+
+package jdk.testlibrary;
+
+import java.io.FileNotFoundException;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+
+public final class JDKToolFinder {
+
+    private JDKToolFinder() {
+    }
+
+    /**
+     * Returns the full path to an executable in jdk/bin based on System
+     * property {@code test.jdk} or {@code compile.jdk} (both are set by the jtreg test suite)
+     *
+     * @return Full path to an executable in jdk/bin
+     */
+    public static String getJDKTool(String tool) {
+
+        // First try to find the executable in test.jdk
+        try {
+            return getTool(tool, "test.jdk");
+        } catch (FileNotFoundException e) {
+
+        }
+
+        // Now see if it's available in compile.jdk
+        try {
+            return getTool(tool, "compile.jdk");
+        } catch (FileNotFoundException e) {
+            throw new RuntimeException("Failed to find " + tool +
+                    ", looked in test.jdk (" + System.getProperty("test.jdk") +
+                    ") and compile.jdk (" + System.getProperty("compile.jdk") + ")");
+        }
+    }
+
+    /**
+     * Returns the full path to an executable in jdk/bin based on System
+     * property {@code compile.jdk}
+     *
+     * @return Full path to an executable in jdk/bin
+     */
+    public static String getCompileJDKTool(String tool) {
+        try {
+            return getTool(tool, "compile.jdk");
+        } catch (FileNotFoundException e) {
+            throw new RuntimeException(e);
+        }
+    }
+
+    /**
+     * Returns the full path to an executable in jdk/bin based on System
+     * property {@code test.jdk}
+     *
+     * @return Full path to an executable in jdk/bin
+     */
+    public static String getTestJDKTool(String tool) {
+        try {
+            return getTool(tool, "test.jdk");
+        } catch (FileNotFoundException e) {
+            throw new RuntimeException(e);
+        }
+    }
+
+    private static String getTool(String tool, String property) throws FileNotFoundException {
+        String jdkPath = System.getProperty(property);
+
+        if (jdkPath == null) {
+            throw new RuntimeException(
+                    "System property '" + property + "' not set. This property is normally set by jtreg. "
+                    + "When running test separately, set this property using '-D" + property + "=/path/to/jdk'.");
+        }
+
+        Path toolName = Paths.get("bin", tool + (Platform.isWindows() ? ".exe" : ""));
+
+        Path jdkTool = Paths.get(jdkPath, toolName.toString());
+        if (!jdkTool.toFile().exists()) {
+            throw new FileNotFoundException("Could not find file " + jdkTool.toAbsolutePath());
+        }
+
+        return jdkTool.toAbsolutePath().toString();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/lib/testlibrary/jdk/testlibrary/JDKToolLauncher.java	Mon Nov 11 23:17:30 2013 -0800
@@ -0,0 +1,134 @@
+/*
+ * 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.
+ */
+
+package jdk.testlibrary;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+/**
+ * A utility for constructing command lines for starting JDK tool processes.
+ *
+ * The JDKToolLauncher can in particular be combined with a
+ * java.lang.ProcessBuilder to easily run a JDK tool. For example, the following
+ * code run {@code jmap -heap} against a process with GC logging turned on for
+ * the {@code jmap} process:
+ *
+ * <pre>
+ * {@code
+ * JDKToolLauncher jmap = JDKToolLauncher.create("jmap")
+ *                                       .addVMArg("-XX:+PrintGC");
+ *                                       .addVMArg("-XX:+PrintGCDetails")
+ *                                       .addToolArg("-heap")
+ *                                       .addToolArg(pid);
+ * ProcessBuilder pb = new ProcessBuilder(jmap.getCommand());
+ * Process p = pb.start();
+ * }
+ * </pre>
+ */
+public class JDKToolLauncher {
+    private final String executable;
+    private final List<String> vmArgs = new ArrayList<String>();
+    private final List<String> toolArgs = new ArrayList<String>();
+
+    private JDKToolLauncher(String tool, boolean useCompilerJDK) {
+        if (useCompilerJDK) {
+            executable = JDKToolFinder.getJDKTool(tool);
+        } else {
+            executable = JDKToolFinder.getTestJDKTool(tool);
+        }
+        vmArgs.addAll(Arrays.asList(ProcessTools.getPlatformSpecificVMArgs()));
+    }
+
+    /**
+     * Creates a new JDKToolLauncher for the specified tool. Using tools path
+     * from the compiler JDK.
+     *
+     * @param tool
+     *            The name of the tool
+     * @return A new JDKToolLauncher
+     */
+    public static JDKToolLauncher create(String tool) {
+        return new JDKToolLauncher(tool, true);
+    }
+
+    /**
+     * Creates a new JDKToolLauncher for the specified tool in the Tested JDK.
+     *
+     * @param tool
+     *            The name of the tool
+     *
+     * @return A new JDKToolLauncher
+     */
+    public static JDKToolLauncher createUsingTestJDK(String tool) {
+        return new JDKToolLauncher(tool, false);
+    }
+
+    /**
+     * Adds an argument to the JVM running the tool.
+     *
+     * The JVM arguments are passed to the underlying JVM running the tool.
+     * Arguments will automatically be prepended with "-J".
+     *
+     * Any platform specific arguments required for running the tool are
+     * automatically added.
+     *
+     *
+     * @param arg
+     *            The argument to VM running the tool
+     * @return The JDKToolLauncher instance
+     */
+    public JDKToolLauncher addVMArg(String arg) {
+        vmArgs.add(arg);
+        return this;
+    }
+
+    /**
+     * Adds an argument to the tool.
+     *
+     * @param arg
+     *            The argument to the tool
+     * @return The JDKToolLauncher instance
+     */
+    public JDKToolLauncher addToolArg(String arg) {
+        toolArgs.add(arg);
+        return this;
+    }
+
+    /**
+     * Returns the command that can be used for running the tool.
+     *
+     * @return An array whose elements are the arguments of the command.
+     */
+    public String[] getCommand() {
+        List<String> command = new ArrayList<String>();
+        command.add(executable);
+        // Add -J in front of all vmArgs
+        for (String arg : vmArgs) {
+            command.add("-J" + arg);
+        }
+        command.addAll(toolArgs);
+        return command.toArray(new String[command.size()]);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/lib/testlibrary/jdk/testlibrary/Platform.java	Mon Nov 11 23:17:30 2013 -0800
@@ -0,0 +1,103 @@
+/*
+ * 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.
+ */
+
+package jdk.testlibrary;
+
+public class Platform {
+    private static final String osName      = System.getProperty("os.name");
+    private static final String dataModel   = System.getProperty("sun.arch.data.model");
+    private static final String vmVersion   = System.getProperty("java.vm.version");
+    private static final String osArch      = System.getProperty("os.arch");
+
+    public static boolean is32bit() {
+        return dataModel.equals("32");
+    }
+
+    public static boolean is64bit() {
+        return dataModel.equals("64");
+    }
+
+    public static boolean isSolaris() {
+        return isOs("sunos");
+    }
+
+    public static boolean isWindows() {
+        return isOs("win");
+    }
+
+    public static boolean isOSX() {
+        return isOs("mac");
+    }
+
+    public static boolean isLinux() {
+        return isOs("linux");
+    }
+
+    private static boolean isOs(String osname) {
+        return osName.toLowerCase().startsWith(osname.toLowerCase());
+    }
+
+    public static String getOsName() {
+        return osName;
+    }
+
+    public static boolean isDebugBuild() {
+        return vmVersion.toLowerCase().contains("debug");
+    }
+
+    public static String getVMVersion() {
+        return vmVersion;
+    }
+
+    // Returns true for sparc and sparcv9.
+    public static boolean isSparc() {
+        return isArch("sparc");
+    }
+
+    public static boolean isARM() {
+        return isArch("arm");
+    }
+
+    public static boolean isPPC() {
+        return isArch("ppc");
+    }
+
+    public static boolean isX86() {
+        // On Linux it's 'i386', Windows 'x86'
+        return (isArch("i386") || isArch("x86"));
+    }
+
+    public static boolean isX64() {
+        // On OSX it's 'x86_64' and on other (Linux, Windows and Solaris) platforms it's 'amd64'
+        return (isArch("amd64") || isArch("x86_64"));
+    }
+
+    private static boolean isArch(String archname) {
+        return osArch.toLowerCase().startsWith(archname.toLowerCase());
+    }
+
+    public static String getOsArch() {
+        return osArch;
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/lib/testlibrary/jdk/testlibrary/ProcessThread.java	Mon Nov 11 23:17:30 2013 -0800
@@ -0,0 +1,151 @@
+/*
+ * 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.
+ */
+
+package jdk.testlibrary;
+
+import static jdk.testlibrary.Asserts.assertNotEquals;
+import static jdk.testlibrary.Asserts.assertTrue;
+
+import java.util.List;
+import java.util.concurrent.CountDownLatch;
+
+/**
+ * The helper class for starting and stopping {@link Process} in a separate thread.
+ */
+public class ProcessThread extends TestThread {
+
+    /**
+     * Creates a new {@code ProcessThread} object.
+     *
+     * @param cmd The list of program and its arguments to pass to {@link ProcessBuilder}
+     */
+    public ProcessThread(List<String> cmd) {
+        super(new ProcessRunnable(cmd));
+    }
+
+    /**
+     * Creates a new {@code ProcessThread} object.
+     *
+     * @param cmd The string array of program and its arguments to pass to {@link ProcessBuilder}
+     */
+    public ProcessThread(String... cmd) {
+        super(new ProcessRunnable(cmd));
+    }
+
+    /**
+     * Creates a new {@code ProcessThread} object.
+     *
+     * @param threadName The name of thread
+     * @param cmd The list of program and its arguments to pass to {@link ProcessBuilder}
+     */
+    public ProcessThread(String threadName, List<String> cmd) {
+        super(new ProcessRunnable(cmd), threadName);
+    }
+
+    /**
+     * Creates a new {@code ProcessThread} object.
+     *
+     * @param threadName The name of thread
+     * @param cmd The string array of program and its arguments to pass to {@link ProcessBuilder}
+     */
+    public ProcessThread(String threadName, String... cmd) {
+        super(new ProcessRunnable(cmd), threadName);
+    }
+
+    /**
+     * Stops {@link Process} started by {@code ProcessRunnable}.
+     *
+     * @throws InterruptedException
+     */
+    public void stopProcess() throws InterruptedException {
+        ((ProcessRunnable) getRunnable()).stopProcess();
+    }
+
+    /**
+     * {@link Runnable} interface for starting and stopping {@link Process}.
+     */
+    static class ProcessRunnable extends XRun {
+
+        private final ProcessBuilder processBuilder;
+        private final CountDownLatch latch;
+        private volatile Process process;
+
+        /**
+         * Creates a new {@code ProcessRunnable} object.
+         *
+         * @param cmd The list of program and its arguments to to pass to {@link ProcessBuilder}
+         */
+        public ProcessRunnable(List<String> cmd) {
+            super();
+            this.processBuilder = new ProcessBuilder(cmd);
+            this.latch = new CountDownLatch(1);
+        }
+
+        /**
+         * Creates a new {@code ProcessRunnable} object.
+         *
+         * @param cmd The string array of program and its arguments to to pass to {@link ProcessBuilder}
+         */
+        public ProcessRunnable(String... cmd) {
+            super();
+            this.processBuilder = new ProcessBuilder(cmd);
+            this.latch = new CountDownLatch(1);
+        }
+
+        /**
+         * Starts the process in {@code ProcessThread}.
+         * All exceptions which occurs here will be caught and stored in {@code ProcessThread}.
+         *
+         * see {@link XRun}
+         */
+        @Override
+        public void xrun() throws Throwable {
+            this.process = processBuilder.start();
+            // Release when process is started
+            latch.countDown();
+
+            // Will block...
+            OutputAnalyzer output = new OutputAnalyzer(this.process);
+
+            assertTrue(output.getOutput().isEmpty(), "Should get an empty output, got: "
+                        + Utils.NEW_LINE + output.getOutput());
+            assertNotEquals(output.getExitValue(), 0,
+                    "Process exited with unexpected exit code");
+        }
+
+        /**
+         * Stops the process.
+         *
+         * @throws InterruptedException
+         */
+        public void stopProcess() throws InterruptedException {
+            // Wait until process is started
+            latch.await();
+            if (this.process != null) {
+                this.process.destroy();
+            }
+        }
+
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/lib/testlibrary/jdk/testlibrary/TestThread.java	Mon Nov 11 23:17:30 2013 -0800
@@ -0,0 +1,249 @@
+/*
+ * 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.
+ */
+
+package jdk.testlibrary;
+
+import java.lang.management.ManagementFactory;
+import java.lang.management.ThreadInfo;
+import java.lang.management.ThreadMXBean;
+import java.util.concurrent.TimeoutException;
+
+/**
+ * Thread which catches exceptions thrown during the execution
+ * and stores them for later analysis.
+ *
+ * <pre>
+ * {@code
+ * TestThread thread = new TestThread(new XRun() {
+ *      public void run() {
+ *      // do something
+ *      }
+ * });
+ * thread.start();
+ * // do something
+ * Throwable uncaught = thread.getUncaught();
+ * }
+ * </pre>
+ */
+public class TestThread extends Thread {
+
+    private final Runnable runnable;
+    private volatile Throwable uncaught;
+
+    /**
+     * Returns {@link Runnable} the thread has been created with.
+     *
+     * @return The object whose {@code run} method is called
+     */
+    public Runnable getRunnable() {
+        return runnable;
+    }
+
+    /**
+     * Creates a new {@code TestThread} object.
+     *
+     * @param target The object whose {@code run} method is called
+     * @param name The thread name
+     */
+    public TestThread(Runnable target, String name) {
+        super(target, name);
+        this.runnable = target;
+    }
+
+    /**
+     * Creates a new {@code TestThread} object.
+     *
+     * @param target The object whose {@code run} method is called
+     */
+    public TestThread(Runnable target) {
+        super(target);
+        this.runnable = target;
+    }
+
+    /**
+     * Creates a new {@code TestThread} object.
+     *
+     * @param group The thread group
+     * @param target The object whose {@code run} method is called
+     * @param name The thread name
+     * @param stackSize Stack size
+     */
+    public TestThread(ThreadGroup group, Runnable target, String name,
+            long stackSize) {
+        super(group, target, name, stackSize);
+        this.runnable = target;
+    }
+
+    /**
+     * Creates a new {@code TestThread} object.
+     *
+     * @param group The thread group
+     * @param target The object whose {@code run} method is called
+     * @param name The thread name
+     */
+    public TestThread(ThreadGroup group, Runnable target, String name) {
+        super(group, target, name);
+        this.runnable = target;
+    }
+
+    /**
+     * Creates a new {@code TestThread} object.
+     *
+     * @param group The thread group
+     * @param target The object whose {@code run} method is called
+     */
+    public TestThread(ThreadGroup group, Runnable target) {
+        super(group, target);
+        this.runnable = target;
+    }
+
+    /**
+     * The thread executor.
+     */
+    @Override
+    public void run() {
+        try {
+            super.run();
+        } catch (Throwable t) {
+            uncaught = t;
+        }
+    }
+
+    /**
+     * Returns exception caught during the execution.
+     *
+     * @return {@link Throwable}
+     */
+    public Throwable getUncaught() {
+        return uncaught;
+    }
+
+    /**
+     * Waits for {@link TestThread} to die
+     * and throws exception caught during the execution.
+     *
+     * @throws InterruptedException
+     * @throws Throwable
+     */
+    public void joinAndThrow() throws InterruptedException, Throwable {
+        join();
+        if (uncaught != null) {
+            throw uncaught;
+        }
+    }
+
+    /**
+     * Waits during {@code timeout} for {@link TestThread} to die
+     * and throws exception caught during the execution.
+     *
+     * @param timeout The time to wait in milliseconds
+     * @throws InterruptedException
+     * @throws Throwable
+     */
+    public void joinAndThrow(long timeout) throws InterruptedException,
+            Throwable {
+        join(timeout);
+        if (isAlive()) {
+            throw new TimeoutException();
+        }
+        if (uncaught != null) {
+            throw uncaught;
+        }
+    }
+
+    /**
+     * Waits for {@link TestThread} to die
+     * and returns exception caught during the execution.
+     *
+     * @return Exception caught during the execution
+     * @throws InterruptedException
+     */
+    public Throwable joinAndReturn() throws InterruptedException {
+        join();
+        if (uncaught != null) {
+            return uncaught;
+        }
+        return null;
+    }
+
+    /**
+     * Waits during {@code timeout} for {@link TestThread} to die
+     * and returns exception caught during the execution.
+     *
+     * @param timeout The time to wait in milliseconds
+     * @return Exception caught during the execution
+     * @throws InterruptedException
+     */
+    public Throwable joinAndReturn(long timeout) throws InterruptedException {
+        join(timeout);
+        if (isAlive()) {
+            return new TimeoutException();
+        }
+        if (uncaught != null) {
+            return uncaught;
+        }
+        return null;
+    }
+
+    /**
+     * Waits until {@link TestThread} is in the certain {@link State}
+     * and blocking on {@code object}.
+     *
+     * @param state The thread state
+     * @param object The object to block on
+     */
+    public void waitUntilBlockingOnObject(Thread.State state, Object object) {
+        String want = object == null ? null : object.getClass().getName() + '@'
+                + Integer.toHexString(System.identityHashCode(object));
+        ThreadMXBean tmx = ManagementFactory.getThreadMXBean();
+        while (isAlive()) {
+            ThreadInfo ti = tmx.getThreadInfo(getId());
+            if (ti.getThreadState() == state
+                    && (want == null || want.equals(ti.getLockName()))) {
+                return;
+            }
+            try {
+                Thread.sleep(1);
+            } catch (InterruptedException e) {
+            }
+        }
+    }
+
+    /**
+     * Waits until {@link TestThread} is in native.
+     */
+    public void waitUntilInNative() {
+        ThreadMXBean tmx = ManagementFactory.getThreadMXBean();
+        while (isAlive()) {
+            ThreadInfo ti = tmx.getThreadInfo(getId());
+            if (ti.isInNative()) {
+                return;
+            }
+            try {
+                Thread.sleep(1);
+            } catch (InterruptedException e) {
+            }
+        }
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/lib/testlibrary/jdk/testlibrary/Utils.java	Mon Nov 11 23:17:30 2013 -0800
@@ -0,0 +1,132 @@
+/*
+ * 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.
+ */
+
+package jdk.testlibrary;
+
+import static jdk.testlibrary.Asserts.assertTrue;
+
+import java.io.IOException;
+import java.net.InetAddress;
+import java.net.ServerSocket;
+import java.net.UnknownHostException;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Common library for various test helper functions.
+ */
+public final class Utils {
+
+    /**
+     * Returns the sequence used by operating system to separate lines.
+     */
+    public static final String NEW_LINE = System.getProperty("line.separator");
+
+    /**
+     * Returns the value of 'test.vm.opts'system property.
+     */
+    public static final String VM_OPTIONS = System.getProperty("test.vm.opts", "");
+
+
+    private Utils() {
+        // Private constructor to prevent class instantiation
+    }
+
+    /**
+     * Returns the list of VM options.
+     *
+     * @return List of VM options
+     */
+    public static List<String> getVmOptions() {
+        return getVmOptions(false);
+    }
+
+    /**
+     * Returns the list of VM options with -J prefix.
+     *
+     * @return The list of VM options with -J prefix
+     */
+    public static List<String> getForwardVmOptions() {
+        return getVmOptions(true);
+    }
+
+    private static List<String> getVmOptions(boolean forward) {
+        List<String> optionsList = new ArrayList<>();
+        String options = VM_OPTIONS.trim();
+        if (!options.isEmpty()) {
+            options = options.replaceAll("\\s+", " ");
+            for (String option : options.split(" ")) {
+                if (forward) {
+                    optionsList.add("-J" + option);
+                } else {
+                    optionsList.add(option);
+                }
+            }
+        }
+
+        return optionsList;
+    }
+
+    /**
+     * Returns the free port on the local host.
+     * The function will spin until a valid port number is found.
+     *
+     * @return The port number
+     * @throws InterruptedException if any thread has interrupted the current thread
+     * @throws IOException if an I/O error occurs when opening the socket
+     */
+    public static int getFreePort() throws InterruptedException, IOException {
+        int port = -1;
+
+        while (port <= 0) {
+            Thread.sleep(100);
+
+            ServerSocket serverSocket = null;
+            try {
+                serverSocket = new ServerSocket(0);
+                port = serverSocket.getLocalPort();
+            } finally {
+                serverSocket.close();
+            }
+        }
+
+        return port;
+    }
+
+    /**
+     * Returns the name of the local host.
+     *
+     * @return The host name
+     * @throws UnknownHostException if IP address of a host could not be determined
+     */
+    public static String getHostname() throws UnknownHostException {
+        InetAddress inetAddress = InetAddress.getLocalHost();
+        String hostName = inetAddress.getHostName();
+
+        assertTrue((hostName != null && !hostName.isEmpty()),
+                "Cannot get hostname");
+
+        return hostName;
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/lib/testlibrary/jdk/testlibrary/XRun.java	Mon Nov 11 23:17:30 2013 -0800
@@ -0,0 +1,56 @@
+/*
+ * 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.
+ */
+
+package jdk.testlibrary;
+
+/**
+ * This type serves no other purpose than to simply allow automatically running
+ * something in a thread, and have all exceptions propagated to
+ * RuntimeExceptions, which are thrown up to thread, which in turn should
+ * probably be a {@link TestThread} to they are stored.
+ */
+public abstract class XRun implements Runnable {
+
+    /**
+     * Invokes {@code xrun()} and throws all exceptions caught in it
+     * up to the thread.
+     */
+    public final void run() {
+        try {
+            xrun();
+        } catch (Error e) {
+            throw e;
+        } catch (RuntimeException e) {
+            throw e;
+        } catch (Throwable e) {
+            throw new RuntimeException(e);
+        }
+    }
+
+    /**
+     * Override this method to implement what to run in the thread.
+     *
+     * @throws Throwable
+     */
+    protected abstract void xrun() throws Throwable;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/sun/awt/AppContext/MultiThread/MultiThreadTest.java	Mon Nov 11 23:17:30 2013 -0800
@@ -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();
+        }
+    }
+}
--- a/test/sun/java2d/DirectX/TransformedPaintTest/TransformedPaintTest.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/test/sun/java2d/DirectX/TransformedPaintTest/TransformedPaintTest.java	Mon Nov 11 23:17:30 2013 -0800
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug 6689025
+ * @bug 6689025 8023483
  * @summary Tests that transformed Paints are rendered correctly
  * @author Dmitri.Trembovetski@sun.com: area=Graphics
  * @run main/othervm TransformedPaintTest
--- a/test/sun/management/jmxremote/bootstrap/CustomLauncherTest.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/test/sun/management/jmxremote/bootstrap/CustomLauncherTest.java	Mon Nov 11 23:17:30 2013 -0800
@@ -35,7 +35,7 @@
 /**
  * @test
  * @bug 6434402 8004926
- * @library ../../../../lib/testlibrary
+ * @library /lib/testlibrary
  * @build TestManager TestApplication CustomLauncherTest
  * @run main CustomLauncherTest
  * @author Jaroslav Bachorik
--- a/test/sun/management/jmxremote/bootstrap/LocalManagementTest.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/test/sun/management/jmxremote/bootstrap/LocalManagementTest.java	Mon Nov 11 23:17:30 2013 -0800
@@ -35,7 +35,7 @@
 
 /**
  * @test
- * @library ../../../../lib/testlibrary
+ * @library /lib/testlibrary
  * @bug 5016507 6173612 6319776 6342019 6484550 8004926
  * @summary Start a managed VM and test that a management tool can connect
  *          without connection or username/password details.
@@ -108,6 +108,8 @@
                 "=com.sun.management.jmxremote.port=7775," +
                 "com.sun.management.jmxremote.authenticate=false," +
                 "com.sun.management.jmxremote.ssl=false",
+                "-cp",
+                TEST_CLASSES,
                 "TestApplication",
                 "-exit"
             );
@@ -160,6 +162,9 @@
 
     private static boolean doTest(String arg) throws Exception {
         List<String> args = new ArrayList<>();
+        args.add("-cp");
+        args.add(TEST_CLASSES);
+
         if (arg != null) {
             args.add(arg);
         }
--- a/test/sun/management/jmxremote/bootstrap/RmiBootstrapTest.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/test/sun/management/jmxremote/bootstrap/RmiBootstrapTest.java	Mon Nov 11 23:17:30 2013 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 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
@@ -24,14 +24,15 @@
 
 import java.io.File;
 import java.io.FileInputStream;
-import java.io.InputStream;
 import java.io.FilenameFilter;
 import java.io.IOException;
+import java.net.BindException;
+import java.net.ServerSocket;
+import java.rmi.server.ExportException;
 
 import java.util.Properties;
 import java.util.Iterator;
 import java.util.Set;
-import java.util.Arrays;
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.Map;
@@ -54,7 +55,7 @@
  * bootstrap & connection test will fail.</p>
  *
  * <p>The rmi port number can be specified with the "rmi.port" system property.
- * If not, this test will use 12424</p>
+ * If not, this test will use the first available port</p>
  *
  * <p>When called with some argument, the main() will interprete its args to
  * be Java M&M configuration file names. The filenames are expected to end
@@ -69,7 +70,8 @@
  * <p>Debug traces are logged in "sun.management.test"</p>
  **/
 public class RmiBootstrapTest {
-
+    // the number of consecutive ports to test for availability
+    private static final int PORT_TEST_LEN = 800;
     static TestLogger log =
         new TestLogger("RmiBootstrapTest");
 
@@ -78,6 +80,7 @@
      * to avoid falling into "port number already in use" problems.
      **/
     static int testPort = 0;
+    static int basePort = 0;
 
     /**
      * Default values for RMI configuration properties.
@@ -624,7 +627,7 @@
      * eventually cleans up by calling ConnectorBootstrap.terminate().
      * @return null if the test succeeds, an error message otherwise.
      **/
-    private String testConfiguration(File file,int port) {
+    private String testConfiguration(File file,int port) throws BindException {
 
         final String path;
         try {
@@ -644,7 +647,7 @@
         System.out.println("***");
 
         System.setProperty("com.sun.management.jmxremote.port",
-                           Integer.toString(port));
+                            Integer.toString(port));
         if (path != null)
             System.setProperty("com.sun.management.config.file", path);
         else
@@ -661,6 +664,11 @@
         try {
             cs = ConnectorBootstrap.initialize();
         } catch (AgentConfigurationError x) {
+            if (x.getCause() instanceof ExportException) {
+                if (x.getCause().getCause() instanceof BindException) {
+                    throw (BindException)x.getCause().getCause();
+                }
+            }
             final String err = "Failed to initialize connector:" +
                 "\n\tcom.sun.management.jmxremote.port=" + port +
                 ((path!=null)?"\n\tcom.sun.management.config.file="+path:
@@ -713,7 +721,15 @@
      * @return null if the test succeeds, an error message otherwise.
      **/
     private String testConfigurationKo(File conf,int port) {
-        final String errStr = testConfiguration(conf,port+testPort++);
+        String errStr = null;
+        for (int i = 0; i < PORT_TEST_LEN; i++) {
+            try {
+                errStr = testConfiguration(conf,port+testPort++);
+                break;
+            } catch (BindException e) {
+                // port conflict; try another port
+            }
+        }
         if (errStr == null) {
             return "Configuration " +
                 conf + " should have failed!";
@@ -733,11 +749,21 @@
      **/
     private String testConfigurationFile(String fileName) {
         File file = new File(fileName);
-        final String portStr = System.getProperty("rmi.port","12424");
-        final int port       = Integer.parseInt(portStr);
+        final String portStr = System.getProperty("rmi.port",null);
+        final int port       = portStr != null ?
+                                Integer.parseInt(portStr) : basePort;
 
         if (fileName.endsWith("ok.properties")) {
-            return testConfiguration(file,port+testPort++);
+            String errStr = null;
+            for (int i = 0; i < PORT_TEST_LEN; i++) {
+                try {
+                    errStr = testConfiguration(file,port+testPort++);
+                    return errStr;
+                } catch (BindException e) {
+                    // port conflict; try another port
+                }
+            }
+            return "Can not locate available port";
         }
         if (fileName.endsWith("ko.properties")) {
             return testConfigurationKo(file,port+testPort++);
@@ -752,8 +778,9 @@
      * @throws RuntimeException if the test fails.
      **/
     public void runko() {
-        final String portStr = System.getProperty("rmi.port","12424");
-        final int port       = Integer.parseInt(portStr);
+        final String portStr = System.getProperty("rmi.port",null);
+        final int port       = portStr != null ?
+                                Integer.parseInt(portStr) : basePort;
         final File[] conf = findConfigurationFilesKo();
         if ((conf == null)||(conf.length == 0))
             throw new RuntimeException("No configuration found");
@@ -774,15 +801,23 @@
      * @throws RuntimeException if the test fails.
      **/
     public void runok() {
-        final String portStr = System.getProperty("rmi.port","12424");
-        final int port       = Integer.parseInt(portStr);
+        final String portStr = System.getProperty("rmi.port",null);
+        final int port       = portStr != null ?
+                                Integer.parseInt(portStr) : basePort;
         final File[] conf = findConfigurationFilesOk();
         if ((conf == null)||(conf.length == 0))
             throw new RuntimeException("No configuration found");
 
-        String errStr;
+        String errStr = null;
         for (int i=0;i<conf.length;i++) {
-            errStr = testConfiguration(conf[i],port+testPort++);
+            for (int j = 0; j < PORT_TEST_LEN; i++) {
+                try {
+                    errStr = testConfiguration(conf[i],port+testPort++);
+                    break;
+                } catch (BindException e) {
+                    // port conflict; try another port
+                }
+            }
             if (errStr != null) {
                 throw new RuntimeException(errStr);
             }
@@ -835,7 +870,8 @@
      * Calls run(args[]).
      * exit(1) if the test fails.
      **/
-    public static void main(String args[]) {
+    public static void main(String args[]) throws Exception {
+        setupBasePort();
         RmiBootstrapTest manager = new RmiBootstrapTest();
         try {
             manager.run(args);
@@ -850,4 +886,9 @@
         System.out.println("**** Test  RmiBootstrap Passed ****");
     }
 
+    private static void setupBasePort() throws IOException {
+        try (ServerSocket s = new ServerSocket(0)) {
+            basePort = s.getLocalPort() + 1;
+        }
+    }
 }
--- a/test/sun/text/resources/LocaleData	Mon Nov 04 10:12:18 2013 -0800
+++ b/test/sun/text/resources/LocaleData	Mon Nov 11 23:17:30 2013 -0800
@@ -7681,3 +7681,9 @@
 
 # bug 8021121
 CurrencyNames/lv_LV/EUR=\u20AC
+
+# bug # 6192407
+LocaleNames/ko/PT=\ud3ec\ub974\ud22c\uce7c
+
+# bug 6931564
+LocaleNames/sv/ZA=Sydafrika
--- a/test/sun/text/resources/LocaleDataTest.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/test/sun/text/resources/LocaleDataTest.java	Mon Nov 11 23:17:30 2013 -0800
@@ -35,7 +35,7 @@
  *      6645405 6650730 6910489 6573250 6870908 6585666 6716626 6914413 6916787
  *      6919624 6998391 7019267 7020960 7025837 7020583 7036905 7066203 7101495
  *      7003124 7085757 7028073 7171028 7189611 8000983 7195759 8004489 8006509
- *      7114053 7074882 7040556 8013836 8021121
+ *      7114053 7074882 7040556 8013836 8021121 6192407 6931564
  * @summary Verify locale data
  *
  */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/sun/tools/jstatd/JstatGCUtilParser.java	Mon Nov 11 23:17:30 2013 -0800
@@ -0,0 +1,156 @@
+/*
+ * 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.util.Arrays;
+
+import jdk.testlibrary.Utils;
+import static jdk.testlibrary.Asserts.*;
+
+/**
+ * The helper class for parsing following output from command 'jstat -gcutil':
+ *
+ *  S0     S1     E      O      M     CCS    YGC     YGCT    FGC    FGCT     GCT
+ *  100.00   0.00  64.68  13.17  73.39  33.46      2    0.003     1    0.156    0.158
+ *  100.00   0.00  76.54  13.17  73.39  33.46      2    0.003     1    0.156    0.158
+ *  100.00   0.00  83.49  13.17  73.39  33.46      2    0.003     1    0.156    0.158
+ *  100.00   0.00  84.53  13.17  73.39  33.46      2    0.003     1    0.156    0.158
+ *  100.00   0.00  85.57  13.17  73.39  33.46      2    0.003     1    0.156    0.158
+ *
+ *  It will be verified that numerical values have defined types and are reasonable,
+ *  for example percentage should fit within 0-100 interval.
+ */
+public class JstatGCUtilParser {
+
+    public enum GcStatisticsType {
+        INTEGER, DOUBLE, PERCENTAGE, PERCENTAGE_OR_DASH;
+    }
+
+    public enum GcStatistics {
+        S0(GcStatisticsType.PERCENTAGE),
+        S1(GcStatisticsType.PERCENTAGE),
+        E(GcStatisticsType.PERCENTAGE),
+        O(GcStatisticsType.PERCENTAGE),
+        M(GcStatisticsType.PERCENTAGE),
+        CCS(GcStatisticsType.PERCENTAGE_OR_DASH),
+        YGC(GcStatisticsType.INTEGER),
+        YGCT(GcStatisticsType.DOUBLE),
+        FGC(GcStatisticsType.INTEGER),
+        FGCT(GcStatisticsType.DOUBLE),
+        GCT(GcStatisticsType.DOUBLE);
+
+        private final GcStatisticsType type;
+
+        private GcStatistics(GcStatisticsType type) {
+            this.type = type;
+        }
+
+        private GcStatisticsType getType() {
+            return type;
+        }
+
+        public static boolean isHeadline(String... valueArray) {
+            if (valueArray.length != values().length) {
+                return false;
+            }
+            int headersCount = 0;
+            for (int i = 0; i < values().length; i++) {
+                if (valueArray[i].equals(values()[i].toString())) {
+                    headersCount++;
+                }
+            }
+            if (headersCount != values().length) {
+                return false;
+            }
+            return true;
+        }
+
+        private static void verifyLength(String... valueArray) throws Exception {
+            assertEquals(valueArray.length, values().length,
+                    "Invalid number of data columns: " + Arrays.toString(valueArray));
+        }
+
+        public static void verify(String... valueArray) throws Exception {
+            verifyLength(valueArray);
+            for (int i = 0; i < values().length; i++) {
+                GcStatisticsType type = values()[i].getType();
+                String value = valueArray[i].trim();
+                if (type.equals(GcStatisticsType.INTEGER)) {
+                    Integer.parseInt(value);
+                    break;
+                }
+                if (type.equals(GcStatisticsType.DOUBLE)) {
+                    Double.parseDouble(value);
+                    break;
+                }
+                if (type.equals(GcStatisticsType.PERCENTAGE_OR_DASH) &&
+                        value.equals("-")) {
+                    break;
+                }
+                double percentage = Double.parseDouble(value);
+                assertTrue(0 <= percentage && percentage <= 100,
+                        "Not a percentage: " + value);
+            }
+        }
+
+    }
+
+    private final String output;
+
+    public JstatGCUtilParser(String output) {
+        this.output = output;
+    }
+
+    public String getOutput() {
+        return output;
+    }
+
+    /**
+     * The function will discard any lines that come before the header line.
+     * This can happen if the JVM outputs a warning message for some reason
+     * before running jstat.
+     */
+    public void parse(int samples) throws Exception {
+        boolean headlineFound = false;
+        int datalineCount = 0;
+
+        String[] lines = output.split(Utils.NEW_LINE);
+        for (String line : lines) {
+            line = line.replaceAll("\\s+", " ").trim();
+            String[] valueArray = line.split(" ");
+
+            if (!headlineFound) {
+                headlineFound = GcStatistics.isHeadline(valueArray);
+                continue;
+            }
+
+            GcStatistics.verify(valueArray);
+            datalineCount++;
+        }
+
+        assertTrue(headlineFound, "No or invalid headline found, expected: " +
+                Utils.NEW_LINE + Arrays.toString(GcStatistics.values()).replaceAll(",", " "));
+        assertEquals(samples, datalineCount,
+                "Expected " + samples + " samples, got " + datalineCount);
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/sun/tools/jstatd/JstatdTest.java	Mon Nov 11 23:17:30 2013 -0800
@@ -0,0 +1,356 @@
+/*
+ * 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.io.File;
+import java.net.UnknownHostException;
+import java.rmi.RemoteException;
+import java.rmi.registry.LocateRegistry;
+import java.rmi.registry.Registry;
+import java.util.Arrays;
+
+import static jdk.testlibrary.Asserts.*;
+import jdk.testlibrary.JDKToolLauncher;
+import jdk.testlibrary.OutputAnalyzer;
+import jdk.testlibrary.ProcessThread;
+import jdk.testlibrary.TestThread;
+import jdk.testlibrary.Utils;
+
+/**
+ * The base class for tests of jstatd.
+ *
+ * The test sequence for TestJstatdDefaults for example is:
+ * <pre>
+ * {@code
+ * // start jstatd process
+ * jstatd -J-XX:+UsePerfData -J-Djava.security.policy=all.policy
+ *
+ * // run jps and verify its output
+ * jps -J-XX:+UsePerfData hostname
+ *
+ * // run jstat and verify its output
+ * jstat -J-XX:+UsePerfData -J-Duser.language=en -gcutil pid@hostname 250 5
+ *
+ * // stop jstatd process and verify that no unexpected exceptions have been thrown
+ * }
+ * </pre>
+ */
+public final class JstatdTest {
+
+    /**
+     * jstat gcutil option: takes JSTAT_GCUTIL_SAMPLES samples at
+     * JSTAT_GCUTIL_INTERVAL_MS millisecond intervals
+     */
+    private static final int JSTAT_GCUTIL_SAMPLES = 5;
+    private static final int JSTAT_GCUTIL_INTERVAL_MS = 250;
+    private static final String JPS_OUTPUT_REGEX = "^\\d+\\s*.*";
+
+    private boolean useDefaultPort = true;
+    private String port;
+    private String serverName;
+    private String jstatdPid;
+    private boolean withExternalRegistry = false;
+
+    public void setServerName(String serverName) {
+        this.serverName = serverName;
+    }
+
+    public void setUseDefaultPort(boolean useDefaultPort) {
+        this.useDefaultPort = useDefaultPort;
+    }
+
+    public void setWithExternalRegistry(boolean withExternalRegistry) {
+        this.withExternalRegistry = withExternalRegistry;
+    }
+
+    /**
+     * Parse pid from jps output
+     */
+    private String parsePid(String tool, OutputAnalyzer output) throws Exception {
+        String[] lines = output.getOutput().split(Utils.NEW_LINE);
+        String pid = null;
+        int count = 0;
+        String processName = tool;
+        if (tool == "rmiregistry") {
+            processName = "registryimpl";
+        }
+        for (String line : lines) {
+            if (line.toLowerCase().matches("^\\d+\\s{1}" + processName + "$")) {
+                pid = line.split(" ")[0];
+                count++;
+            }
+        }
+        if (count > 1) {
+            throw new Exception("Expected one " + tool
+                    + " process, got " + count + ". Test will be canceled.");
+        }
+
+        return pid;
+    }
+
+    private String getToolPid(String tool)
+            throws Exception {
+        OutputAnalyzer output = runJps();
+        return parsePid(tool, output);
+    }
+
+    private String waitOnTool(String tool, TestThread thread) throws Throwable {
+        while (true) {
+            String pid = getToolPid(tool);
+
+            if (pid != null) {
+                System.out.println(tool + " pid: " + pid);
+                return pid;
+            }
+
+            Throwable t = thread.getUncaught();
+            if (t != null) {
+                if (t.getMessage().contains(
+                        "java.rmi.server.ExportException: Port already in use")) {
+                    System.out.println("Port already in use. Trying to restart with a new one...");
+                    Thread.sleep(100);
+                    return null;
+                } else {
+                    // Something unexpected has happened
+                    throw new Throwable(t);
+                }
+            }
+
+            System.out.println("Waiting until " + tool + " is running...");
+            Thread.sleep(100);
+        }
+    }
+
+    private void log(String caption, String... cmd) {
+        System.out.println(Utils.NEW_LINE + caption + ":");
+        System.out.println(Arrays.toString(cmd).replace(",", ""));
+    }
+
+    private String getDestination() throws UnknownHostException {
+        String option = Utils.getHostname();
+        if (port != null) {
+            option += ":" + port;
+        }
+        if (serverName != null) {
+            option += "/" + serverName;
+        }
+        return option;
+    }
+
+    /**
+     * Depending on test settings command line can look like:
+     *
+     * jps -J-XX:+UsePerfData hostname
+     * jps -J-XX:+UsePerfData hostname:port
+     * jps -J-XX:+UsePerfData hostname/serverName
+     * jps -J-XX:+UsePerfData hostname:port/serverName
+     */
+    private OutputAnalyzer runJps() throws Exception {
+        JDKToolLauncher launcher = JDKToolLauncher.createUsingTestJDK("jps");
+        launcher.addVMArg("-XX:+UsePerfData");
+        launcher.addToolArg(getDestination());
+
+        String[] cmd = launcher.getCommand();
+        log("Start jps", cmd);
+
+        ProcessBuilder processBuilder = new ProcessBuilder(cmd);
+        OutputAnalyzer output = new OutputAnalyzer(processBuilder.start());
+        System.out.println(output.getOutput());
+
+        return output;
+    }
+
+    /**
+     * Verifies output form jps contains pids and programs' name information.
+     * The function will discard any lines that come before the first line with pid.
+     * This can happen if the JVM outputs a warning message for some reason
+     * before running jps.
+     *
+     * The output can look like:
+     * 35536 Jstatd
+     * 35417 Main
+     * 31103 org.eclipse.equinox.launcher_1.3.0.v20120522-1813.jar
+     */
+    private void verifyJpsOutput(OutputAnalyzer output) throws Exception {
+        output.shouldHaveExitValue(0);
+        assertFalse(output.getOutput().isEmpty(), "Output should not be empty");
+
+        boolean foundFirstLineWithPid = false;
+        String[] lines = output.getOutput().split(Utils.NEW_LINE);
+        for (String line : lines) {
+            if (!foundFirstLineWithPid) {
+                foundFirstLineWithPid = line.matches(JPS_OUTPUT_REGEX);
+                continue;
+            }
+            assertTrue(line.matches(JPS_OUTPUT_REGEX),
+                    "Output does not match the pattern" + Utils.NEW_LINE + line);
+        }
+        assertTrue(foundFirstLineWithPid, "Invalid output");
+    }
+
+    /**
+     * Depending on test settings command line can look like:
+     *
+     * jstat -J-XX:+UsePerfData -J-Duser.language=en -gcutil pid@hostname 250 5
+     * jstat -J-XX:+UsePerfData -J-Duser.language=en -gcutil pid@hostname:port 250 5
+     * jstat -J-XX:+UsePerfData -J-Duser.language=en -gcutil pid@hostname/serverName 250 5
+     * jstat -J-XX:+UsePerfData -J-Duser.language=en -gcutil pid@hostname:port/serverName 250 5
+     */
+    private OutputAnalyzer runJstat() throws Exception {
+        JDKToolLauncher launcher = JDKToolLauncher.createUsingTestJDK("jstat");
+        launcher.addVMArg("-XX:+UsePerfData");
+        launcher.addVMArg("-Duser.language=en");
+        launcher.addToolArg("-gcutil");
+        launcher.addToolArg(jstatdPid + "@" + getDestination());
+        launcher.addToolArg(Integer.toString(JSTAT_GCUTIL_INTERVAL_MS));
+        launcher.addToolArg(Integer.toString(JSTAT_GCUTIL_SAMPLES));
+
+        String[] cmd = launcher.getCommand();
+        log("Start jstat", cmd);
+
+        ProcessBuilder processBuilder = new ProcessBuilder(cmd);
+        OutputAnalyzer output = new OutputAnalyzer(processBuilder.start());
+        System.out.println(output.getOutput());
+
+        return output;
+    }
+
+    private void verifyJstatOutput(OutputAnalyzer output)
+            throws Exception {
+        output.shouldHaveExitValue(0);
+        assertFalse(output.getOutput().isEmpty(), "Output should not be empty");
+
+        JstatGCUtilParser gcUtilParser = new JstatGCUtilParser(
+                output.getOutput());
+        gcUtilParser.parse(JSTAT_GCUTIL_SAMPLES);
+    }
+
+    private void runToolsAndVerify() throws Exception {
+        OutputAnalyzer output = runJps();
+        verifyJpsOutput(output);
+
+        output = runJstat();
+        verifyJstatOutput(output);
+    }
+
+    private Registry startRegistry()
+            throws InterruptedException, RemoteException {
+        Registry registry = null;
+        try {
+            System.out.println("Start rmiregistry on port " + port);
+            registry = LocateRegistry
+                    .createRegistry(Integer.parseInt(port));
+        } catch (RemoteException e) {
+            if (e.getMessage().contains("Port already in use")) {
+                System.out.println("Port already in use. Trying to restart with a new one...");
+                Thread.sleep(100);
+                return null;
+            } else {
+                throw e;
+            }
+        }
+        return registry;
+    }
+
+    private void cleanUpThread(ProcessThread thread) throws Throwable {
+        if (thread != null) {
+            thread.stopProcess();
+            thread.joinAndThrow();
+        }
+    }
+
+    /**
+     * Depending on test settings command line can look like:
+     *
+     * jstatd -J-XX:+UsePerfData -J-Djava.security.policy=all.policy
+     * jstatd -J-XX:+UsePerfData -J-Djava.security.policy=all.policy -p port
+     * jstatd -J-XX:+UsePerfData -J-Djava.security.policy=all.policy -n serverName
+     * jstatd -J-XX:+UsePerfData -J-Djava.security.policy=all.policy -p port -n serverName
+     */
+    private String[] getJstatdCmd() throws UnknownHostException {
+        JDKToolLauncher launcher = JDKToolLauncher.createUsingTestJDK("jstatd");
+        launcher.addVMArg("-XX:+UsePerfData");
+        String testSrc = System.getProperty("test.src");
+        File policy = new File(testSrc, "all.policy");
+        launcher.addVMArg("-Djava.security.policy=" + policy.getAbsolutePath());
+        if (port != null) {
+            launcher.addToolArg("-p");
+            launcher.addToolArg(port);
+        }
+        if (serverName != null) {
+            launcher.addToolArg("-n");
+            launcher.addToolArg(serverName);
+        }
+
+        String[] cmd = launcher.getCommand();
+        log("Start jstatd", cmd);
+        return cmd;
+    }
+
+    private ProcessThread tryToSetupJstatdProcess() throws Throwable {
+        ProcessThread jstatdThread = new ProcessThread("Jstatd-Thread",
+                getJstatdCmd());
+        try {
+            jstatdThread.start();
+            // Make sure jstatd is up and running
+            jstatdPid = waitOnTool("jstatd", jstatdThread);
+            if (jstatdPid == null) {
+                // The port is already in use. Cancel and try with new one.
+                jstatdThread.stopProcess();
+                jstatdThread.join();
+                return null;
+            }
+        } catch (Throwable t) {
+            // Something went wrong in the product - clean up!
+            cleanUpThread(jstatdThread);
+            throw t;
+        }
+
+        return jstatdThread;
+    }
+
+    public void doTest() throws Throwable {
+        ProcessThread jstatdThread = null;
+        try {
+            while (jstatdThread == null) {
+                if (!useDefaultPort || withExternalRegistry) {
+                    port = Integer.toString(Utils.getFreePort());
+                }
+
+                if (withExternalRegistry) {
+                    Registry registry = startRegistry();
+                    if (registry == null) {
+                        // The port is already in use. Cancel and try with new one.
+                        continue;
+                    }
+                }
+
+                jstatdThread = tryToSetupJstatdProcess();
+            }
+
+            runToolsAndVerify();
+        } finally {
+            cleanUpThread(jstatdThread);
+        }
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/sun/tools/jstatd/TestJstatdDefaults.java	Mon Nov 11 23:17:30 2013 -0800
@@ -0,0 +1,38 @@
+/*
+ * 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 4990825
+ * @library /lib/testlibrary
+ * @build JstatdTest JstatGCUtilParser
+ * @run main/timeout=60 TestJstatdDefaults
+ */
+public class TestJstatdDefaults {
+
+    public static void main(String[] args) throws Throwable {
+        JstatdTest test = new JstatdTest();
+        test.doTest();
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/sun/tools/jstatd/TestJstatdExternalRegistry.java	Mon Nov 11 23:17:30 2013 -0800
@@ -0,0 +1,39 @@
+/*
+ * 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 4990825 7092186
+ * @library /lib/testlibrary
+ * @build JstatdTest JstatGCUtilParser
+ * @run main/timeout=60 TestJstatdExternalRegistry
+ */
+public class TestJstatdExternalRegistry {
+
+    public static void main(String[] args) throws Throwable {
+        JstatdTest test = new JstatdTest();
+        test.setWithExternalRegistry(true);
+        test.doTest();
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/sun/tools/jstatd/TestJstatdPort.java	Mon Nov 11 23:17:30 2013 -0800
@@ -0,0 +1,39 @@
+/*
+ * 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 4990825
+ * @library /lib/testlibrary
+ * @build JstatdTest JstatGCUtilParser
+ * @run main/timeout=60 TestJstatdPort
+ */
+public class TestJstatdPort {
+
+    public static void main(String[] args) throws Throwable {
+        JstatdTest test = new JstatdTest();
+        test.setUseDefaultPort(false);
+        test.doTest();
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/sun/tools/jstatd/TestJstatdPortAndServer.java	Mon Nov 11 23:17:30 2013 -0800
@@ -0,0 +1,40 @@
+/*
+ * 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 4990825
+ * @library /lib/testlibrary
+ * @build JstatdTest JstatGCUtilParser
+ * @run main/timeout=60 TestJstatdPortAndServer
+ */
+public class TestJstatdPortAndServer {
+
+    public static void main(String[] args) throws Throwable {
+        JstatdTest test = new JstatdTest();
+        test.setUseDefaultPort(false);
+        test.setServerName("TestJstatdServer");
+        test.doTest();
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/sun/tools/jstatd/TestJstatdServer.java	Mon Nov 11 23:17:30 2013 -0800
@@ -0,0 +1,39 @@
+/*
+ * 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 4990825
+ * @library /lib/testlibrary
+ * @build JstatdTest JstatGCUtilParser
+ * @run main/timeout=60 TestJstatdServer
+ */
+public class TestJstatdServer {
+
+    public static void main(String[] args) throws Throwable {
+        JstatdTest test = new JstatdTest();
+        test.setServerName("TestJstatdServer");
+        test.doTest();
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/sun/tools/jstatd/TestJstatdUsage.java	Mon Nov 11 23:17:30 2013 -0800
@@ -0,0 +1,51 @@
+/*
+ * 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 jdk.testlibrary.JDKToolLauncher;
+import jdk.testlibrary.OutputAnalyzer;
+
+/*
+ * @test
+ * @bug 4990825
+ * @library /lib/testlibrary
+ * @build jdk.testlibrary.JDKToolLauncher jdk.testlibrary.OutputAnalyzer
+ * @run main TestJstatdUsage
+ */
+public class TestJstatdUsage {
+
+    public static void main(String[] args) throws Exception {
+        testUsage("-help");
+        testUsage("-?");
+    }
+
+    private static void testUsage(String option) throws Exception {
+        JDKToolLauncher launcher = JDKToolLauncher.createUsingTestJDK("jstatd");
+        launcher.addToolArg(option);
+        ProcessBuilder processBuilder = new ProcessBuilder(launcher.getCommand());
+        OutputAnalyzer output = new OutputAnalyzer(processBuilder.start());
+
+        output.shouldContain("usage: jstatd [-nr] [-p port] [-n rminame]");
+        output.shouldHaveExitValue(1);
+    }
+
+}
--- a/test/sun/tools/jstatd/jpsOutput1.awk	Mon Nov 04 10:12:18 2013 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,27 +0,0 @@
-#
-BEGIN	{
-	    totallines=0; matched=0
-	}
-
-/^[0-9]+ [a-z|A-Z][a-z|A-Z|0-9|\$|\.]*$/	{
-	    matched++;
-	}
-
-/^[0-9]+ -- .*$/	{
-	    matched++;
-	}
-
-/^[0-9]+ $/	{
-	    matched++;
-	}
-
-	{ totallines++; print $0 }
-
-END	{
-	    if ((totallines > 0) && (matched == totallines)) {
-	        exit 0
-	    }
-	    else {
-	        exit 1
-	    }
-	}
--- a/test/sun/tools/jstatd/jstatGcutilOutput1.awk	Mon Nov 04 10:12:18 2013 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,34 +0,0 @@
-#
-# matching the following output specified as a pattern that verifies
-# that the numerical values conform to a specific pattern, rather than
-# specific values.
-#
-#  S0     S1     E      O      M     CCS    YGC     YGCT    FGC    FGCT     GCT   
-#  0.00 100.00  56.99   7.81  95.03  87.56      1    0.009     0    0.000    0.009
-#  0.00 100.00  63.64   7.81  95.03  87.56      1    0.009     0    0.000    0.009
-#  0.00 100.00  64.68   7.81  95.03  87.56      1    0.009     0    0.000    0.009
-#  0.00 100.00  65.73   7.81  95.03  87.56      1    0.009     0    0.000    0.009
-#  0.00 100.00  67.22   7.81  95.03  87.56      1    0.009     0    0.000    0.009
-
-BEGIN	{
-	    headerlines=0; datalines=0; totallines=0
-	}
-
-/^  S0     S1     E      O      M     CCS    YGC     YGCT    FGC    FGCT     GCT   $/	{
-	    headerlines++;
-	}
-
-/^[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*([0-9]+\.[0-9]+)|-[ ]*[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+\.[0-9]+$/	{
-	    datalines++;
-	}
-
-	{ totallines++; print $0 }
-
-END	{
-	    if ((headerlines == 1) && (datalines == 5) && (totallines == 6)) {
-	        exit 0
-            }
-            else {
-	        exit 1
-            }
-	}
--- a/test/sun/tools/jstatd/jstatdDefaults.sh	Mon Nov 04 10:12:18 2013 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,79 +0,0 @@
-#
-# Copyright (c) 2004, 2012, 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 4990825
-# @run shell/timeout=60 jstatdDefaults.sh
-# @summary Test functionality of 'jstatd &'
-
-. ${TESTSRC-.}/../../jvmstat/testlibrary/utils.sh
-
-setup
-verify_os
-
-cleanup() {
-  kill_proc ${JSTATD_PID}
-}
-
-trap 'cleanup' 0 HUP INT QUIT TERM
-
-JSTATD="${TESTJAVA}/bin/jstatd"
-JPS="${TESTJAVA}/bin/jps"
-JSTAT="${TESTJAVA}/bin/jstat"
-
-HOSTNAME=`uname -n`
-
-JSTATD_OUT="jstatd_$$.out"
-
-${JSTATD} -J-XX:+UsePerfData -J-Djava.security.policy=${TESTSRC}/all.policy 2>&1 > ${JSTATD_OUT} &
-JSTATD_PID=$!
-
-echo "jstatd started as pid ${JSTATD_PID}"
-sleep 3
-
-${JPS} -J-XX:+UsePerfData ${HOSTNAME} 2>&1 | awk -f ${TESTSRC}/jpsOutput1.awk
-
-if [ $? -ne 0 ]
-then
-    echo "Output of jps differs from expected output. Failed."
-    cleanup
-    exit 1
-fi
-
-${JSTAT} -J-XX:+UsePerfData -J-Duser.language=en -gcutil ${JSTATD_PID}@${HOSTNAME} 250 5 2>&1 | awk -f ${TESTSRC}/jstatGcutilOutput1.awk
-RC=$?
-
-if [ ${RC} -ne 0 ]
-then
-    echo "jstat output differs from expected output"
-fi
-
-if [ -s ${JSTATD_OUT} ]
-then
-    echo "jstatd generated the following, unexpected output:"
-    RC=1
-fi
-
-cleanup
-
-exit ${RC}
--- a/test/sun/tools/jstatd/jstatdExternalRegistry.sh	Mon Nov 04 10:12:18 2013 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,96 +0,0 @@
-#
-# Copyright (c) 2004, 2012, 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 4990825 7092186
-# @run shell/timeout=90 jstatdExternalRegistry.sh
-# @summary Test functionality of 'jstatd -p<port>&' with an external RMI registry
-
-. ${TESTSRC-.}/../../jvmstat/testlibrary/utils.sh
-
-setup
-verify_os
-
-cleanup() {
-  kill_proc ${RMIREGISTRY_PID}
-  kill_proc ${JSTATD_PID}
-}
-
-trap 'cleanup' 0 HUP INT QUIT TERM
-
-RMIREGISTRY="${TESTJAVA}/bin/rmiregistry"
-JSTATD="${TESTJAVA}/bin/jstatd"
-JPS="${TESTJAVA}/bin/jps"
-JSTAT="${TESTJAVA}/bin/jstat"
-
-HOSTNAME=`uname -n`
-PORT=`freePort`
-if [ "${PORT}" = "0" ] ; then
-  echo "Cannot get free port"
-  exit 1
-fi
-
-RMIREGISTRY_OUT="rmiregistry_$$.out"
-JSTATD_OUT="jstatd_$$.out"
-
-${RMIREGISTRY} -J-XX:+UsePerfData ${PORT} > ${RMIREGISTRY_OUT} 2>&1 &
-RMIREGISTRY_PID=$!
-
-echo "rmiregistry started on port ${PORT} as pid ${RMIREGISTRY_PID}"
-sleep 3
-
-${JSTATD} -J-XX:+UsePerfData -J-Djava.security.policy=${TESTSRC}/all.policy -p ${PORT} > ${JSTATD_OUT} 2>&1 &
-JSTATD_PID=$!
-
-echo "jstatd started as pid ${JSTATD_PID}"
-sleep 3
-
-${JPS} -J-XX:+UsePerfData ${HOSTNAME}:${PORT} 2>&1 | awk -f ${TESTSRC}/jpsOutput1.awk
-
-if [ $? -ne 0 ]
-then
-    echo "Output of jps differs from expected output. Failed."
-    exit 1
-fi
-
-${JSTAT} -J-XX:+UsePerfData -J-Duser.language=en -gcutil ${JSTATD_PID}@${HOSTNAME}:${PORT} 250 5 2>&1 | awk -f ${TESTSRC}/jstatGcutilOutput1.awk
-RC=$?
-
-if [ ${RC} -ne 0 ]
-then
-    echo "jstat output differs from expected output"
-fi
-
-if [ -s ${JSTATD_OUT} ]
-then
-    echo "jstatd generated unexpected output: see ${JSTATD_OUT}"
-    RC=1
-fi
-
-if [ -s ${RMIREGISTRY_OUT} ]
-then
-    echo "rmiregistry generated unexpected output: see ${RMIREGISTRY_OUT}"
-    RC=1
-fi
-
-exit ${RC}
--- a/test/sun/tools/jstatd/jstatdPort.sh	Mon Nov 04 10:12:18 2013 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,84 +0,0 @@
-#
-# Copyright (c) 2004, 2012, 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 4990825
-# @run shell/timeout=60 jstatdPort.sh
-# @summary Test functionality of 'jstatd -p <port>&'
-
-. ${TESTSRC-.}/../../jvmstat/testlibrary/utils.sh
-
-setup
-verify_os
-
-cleanup() {
-  kill_proc ${JSTATD_PID}
-}
-
-trap 'cleanup' 0 HUP INT QUIT TERM
-
-JSTATD="${TESTJAVA}/bin/jstatd"
-JPS="${TESTJAVA}/bin/jps"
-JSTAT="${TESTJAVA}/bin/jstat"
-
-HOSTNAME=`uname -n`
-PORT=`freePort`
-if [ "${PORT}" = "0" ] ; then
-  echo "Cannot get free port"
-  exit 1
-fi
-
-JSTATD_OUT="jstatd_$$.out"
-
-${JSTATD} -J-XX:+UsePerfData -J-Djava.security.policy=${TESTSRC}/all.policy -p ${PORT} 2>&1 > ${JSTATD_OUT} &
-JSTATD_PID=$!
-
-echo "jstatd started as pid ${JSTATD_PID} on port ${PORT}"
-sleep 3
-
-${JPS} -J-XX:+UsePerfData ${HOSTNAME}:${PORT} 2>&1 | tee jps.out | awk -f ${TESTSRC}/jpsOutput1.awk
-
-if [ $? -ne 0 ]
-then
-    echo "Output of jps differs from expected output. Failed."
-    cleanup
-    exit 1
-fi
-
-${JSTAT} -J-XX:+UsePerfData -J-Duser.language=en -gcutil ${JSTATD_PID}@${HOSTNAME}:${PORT} 250 5 2>&1 | awk -f ${TESTSRC}/jstatGcutilOutput1.awk
-RC=$?
-
-if [ ${RC} -ne 0 ]
-then
-    echo "jstat output differs from expected output"
-fi
-
-if [ -s ${JSTATD_OUT} ]
-then
-    echo "jstatd generated the following, unexpected output:"
-    RC=1
-fi
-
-cleanup
-
-exit ${RC}
--- a/test/sun/tools/jstatd/jstatdServerName.sh	Mon Nov 04 10:12:18 2013 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,121 +0,0 @@
-#
-# Copyright (c) 2004, 2012, 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 4990825
-# @run shell/timeout=90 jstatdServerName.sh
-# @summary Test functionality of 'jstatd -p <port> -n <servername>&'
-
-. ${TESTSRC-.}/../../jvmstat/testlibrary/utils.sh
-
-setup
-verify_os
-
-cleanup() {
-  kill_proc ${JSTATD_1_PID}
-  kill_proc ${JSTATD_2_PID}
-}
-
-trap 'cleanup' 0 HUP INT QUIT TERM
-
-JSTATD="${TESTJAVA}/bin/jstatd"
-JPS="${TESTJAVA}/bin/jps"
-JSTAT="${TESTJAVA}/bin/jstat"
-
-HOSTNAME=`uname -n`
-PORT_1=`freePort`
-if [ "${PORT_1}" = "0" ] ; then
-  echo "ERROR: No free port"
-  exit 1
-fi
-PORT_2=`expr ${PORT_1} '+' 1`
-SERVERNAME="SecondJstatdServer"
-
-JSTATD_1_OUT="jstatd_$$_1.out"
-JSTATD_2_OUT="jstatd_$$_2.out"
-
-${JSTATD} -J-XX:+UsePerfData -J-Djava.security.policy=${TESTSRC}/all.policy -p ${PORT_1} 2>&1 > ${JSTATD_1_OUT} &
-JSTATD_1_PID=$!
-
-echo "first jstatd started as pid ${JSTATD_1_PID} on port ${PORT_1} with default server name"
-sleep 3
-
-${JSTATD} -J-XX:+UsePerfData -J-Djava.security.policy=${TESTSRC}/all.policy -p ${PORT_2} -n ${SERVERNAME} 2>&1 > ${JSTATD_2_OUT} &
-JSTATD_2_PID=$!
-
-echo "second jstatd started as pid ${JSTATD_2_PID} on port ${PORT_2} with name ${SERVERNAME}"
-sleep 3
-
-echo "running: ${JPS} -J-XX:+UsePerfData ${HOSTNAME}:${PORT_1}"
-${JPS} -J-XX:+UsePerfData ${HOSTNAME}:${PORT_1} 2>&1 | awk -f ${TESTSRC}/jpsOutput1.awk
-
-if [ $? -ne 0 ]
-then
-    echo "Output of jps differs from expected output. Failed."
-    cleanup
-    exit 1
-fi
-
-echo "running: ${JPS} -J-XX:+UsePerfData ${HOSTNAME}:${PORT_2}/${SERVERNAME}"
-${JPS} -J-XX:+UsePerfData ${HOSTNAME}:${PORT_2}/${SERVERNAME} 2>&1 | awk -f ${TESTSRC}/jpsOutput1.awk
-
-if [ $? -ne 0 ]
-then
-    echo "Output of jps differs from expected output. Failed."
-    cleanup
-    exit 1
-fi
-
-echo "running: ${JSTAT} -J-XX:+UsePerfData -J-Duser.language=en -gcutil ${JSTATD_1_PID}@${HOSTNAME}:${PORT_1} 250 5"
-${JSTAT} -J-XX:+UsePerfData -J-Duser.language=en -gcutil ${JSTATD_1_PID}@${HOSTNAME}:${PORT_1} 250 5 2>&1 | awk -f ${TESTSRC}/jstatGcutilOutput1.awk
-RC=$?
-
-if [ ${RC} -ne 0 ]
-then
-    echo "jstat output differs from expected output"
-fi
-
-echo "running: ${JSTAT} -J-XX:+UsePerfData -J-Duser.language=en -gcutil ${JSTATD_1_PID}@${HOSTNAME}:${PORT_2}/${SERVERNAME} 250 5"
-${JSTAT} -J-XX:+UsePerfData -J-Duser.language=en -gcutil ${JSTATD_1_PID}@${HOSTNAME}:${PORT_2}/${SERVERNAME} 250 5 2>&1 | awk -f ${TESTSRC}/jstatGcutilOutput1.awk
-RC=$?
-
-if [ ${RC} -ne 0 ]
-then
-    echo "jstat output differs from expected output"
-fi
-
-if [ -s ${JSTATD_1_OUT} ]
-then
-    echo "first jstatd generated the following, unexpected output:"
-    RC=1
-fi
-
-if [ -s ${JSTATD_2_OUT} ]
-then
-    echo "second jstatd generated the following, unexpected output:"
-    RC=1
-fi
-
-cleanup
-
-exit ${RC}
--- a/test/sun/tools/jstatd/jstatdUsage1.sh	Mon Nov 04 10:12:18 2013 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,56 +0,0 @@
-#
-# Copyright (c) 2004, 2010, 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 4990825
-# @run shell jstatdUsage1.sh
-# @summary Test that output of 'jstatd -help' matches the usage.out file
-
-. ${TESTSRC-.}/../../jvmstat/testlibrary/utils.sh
-
-setup
-
-JSTATD="${TESTJAVA}/bin/jstatd"
-
-JSTATD_1_OUT="jstatd_$$_1.out"
-JSTATD_2_OUT="jstatd_$$_2.out"
-
-${JSTATD} -? > ${JSTATD_1_OUT} 2>&1
-
-diff -w ${JSTATD_1_OUT} ${TESTSRC}/usage.out
-if [ $? != 0 ]
-then
-  echo "Output of jstatd -? differs from expected output. Failed."
-  exit 1
-fi
-
-${JSTATD} -help > ${JSTATD_2_OUT} 2>&1
-
-diff -w ${JSTATD_2_OUT} ${TESTSRC}/usage.out
-if [ $? != 0 ]
-then
-  echo "Output of jstatd -help differs from expected output. Failed."
-  exit 1
-fi
-
-exit 0
--- a/test/sun/tools/jstatd/usage.out	Mon Nov 04 10:12:18 2013 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-usage: jstatd [-nr] [-p port] [-n rminame]
--- a/test/sun/util/resources/TimeZone/Bug6317929.java	Mon Nov 04 10:12:18 2013 -0800
+++ b/test/sun/util/resources/TimeZone/Bug6317929.java	Mon Nov 11 23:17:30 2013 -0800
@@ -130,12 +130,12 @@
                                        "(New South Wales)\"");
         tzLocale = locales2Test[1];
         if (!Currie.getDisplayName(false, TimeZone.LONG, tzLocale).equals
-           ("\u00d6stliche Normalzeit (New South Wales)"))
+           ("Eastern Normalzeit (Neus\u00fcdwales)"))
             throw new RuntimeException("\n" + tzLocale + ": LONG, " +
                                        "non-daylight saving name for " +
                                        "Australia/Currie should be " +
-                                       "\"\u00d6stliche Normalzeit " +
-                                       "(New South Wales)\"");
+                                       "\"Eastern Normalzeit " +
+                                       "(Neus\u00fcdwales)\"");
         tzLocale = locales2Test[2];
         if (!Currie.getDisplayName(false, TimeZone.LONG, tzLocale).equals
            ("Hora est\u00e1ndar Oriental (Nueva Gales del Sur)"))
@@ -154,53 +154,53 @@
                                        "(Nouvelle-Galles du Sud)\"");
         tzLocale = locales2Test[4];
         if (!Currie.getDisplayName(false, TimeZone.LONG, tzLocale).equals
-           ("Ora solare dell'Australia orientale (Nuovo Galles del Sud)"))
+           ("Ora standard dell'Australia orientale (Nuovo Galles del Sud)"))
             throw new RuntimeException("\n" + tzLocale + ": LONG, " +
                                        "non-daylight saving name for " +
                                        "Australia/Currie should be " +
-                                       "\"Ora solare dell'Australia orientale " +
+                                       "\"Ora standard dell'Australia orientale " +
                                        "(Nuovo Galles del Sud)\"");
         tzLocale = locales2Test[5];
         if (!Currie.getDisplayName(false, TimeZone.LONG, tzLocale).equals
-           ("\u6771\u90e8\u6a19\u6e96\u6642 " +
-            "(\u30cb\u30e5\u30fc\u30b5\u30a6\u30b9\u30a6\u30a7\u30fc\u30eb\u30ba)"))
+           ("\u6771\u90E8\u6A19\u6E96\u6642" +
+            "(\u30CB\u30E5\u30FC\u30B5\u30A6\u30B9\u30A6\u30A7\u30FC\u30EB\u30BA)"))
             throw new RuntimeException("\n" + tzLocale + ": LONG, " +
                                        "non-daylight saving name for " +
                                        "Australia/Currie should be " +
-                                       "\"\u6771\u90e8\u6a19\u6e96\u6642 " +
-                                       "(\u30cb\u30e5\u30fc\u30b5\u30a6\u30b9" +
-                                       "\u30a6\u30a7\u30fc\u30eb\u30ba)\"");
+                                       "\"\u6771\u90E8\u6A19\u6E96\u6642" +
+                                       "(\u30CB\u30E5\u30FC\u30B5\u30A6\u30B9" +
+                                       "\u30A6\u30A7\u30FC\u30EB\u30BA)\"");
         tzLocale = locales2Test[6];
         if (!Currie.getDisplayName(false, TimeZone.LONG, tzLocale).equals
-           ("\ub3d9\ubd80 \ud45c\uc900\uc2dc(\ub274 \uc0ac\uc6b0\uc2a4 \uc6e8\uc77c\uc988)"))
+           ("\uB3D9\uBD80 \uD45C\uC900\uC2DC(\uB274\uC0AC\uC6B0\uC2A4\uC6E8\uC77C\uC988)"))
             throw new RuntimeException("\n" + tzLocale + ": LONG, " +
                                        "non-daylight saving name for " +
                                        "Australia/Currie should be " +
-                                       "\"\ub3d9\ubd80 \ud45c\uc900\uc2dc" +
-                                       "(\ub274 \uc0ac\uc6b0\uc2a4 \uc6e8\uc77c\uc988)\"");
+                                       "\"\uB3D9\uBD80 \uD45C\uC900\uC2DC" +
+                                       "(\uB274\uC0AC\uC6B0\uC2A4\uC6E8\uC77C\uC988)\"");
         tzLocale = locales2Test[7];
         if (!Currie.getDisplayName(false, TimeZone.LONG, tzLocale).equals
-           ("Eastern, normaltid (Nya Sydwales)"))
+           ("\u00D6stlig standardtid (New South Wales)"))
             throw new RuntimeException("\n" + tzLocale + ": LONG, " +
                                        "non-daylight saving name for " +
                                        "Australia/Currie should be " +
-                                       "\"Eastern, normaltid " +
-                                       "(Nya Sydwales)\"");
+                                       "\"\u00D6stlig standardtid " +
+                                       "(New South Wales)\"");
         tzLocale = locales2Test[8];
         if (!Currie.getDisplayName(false, TimeZone.LONG, tzLocale).equals
-           ("\u4e1c\u90e8\u6807\u51c6\u65f6\u95f4\uff08\u65b0\u5357\u5a01\u5c14\u65af\uff09"))
+           ("\u4E1C\u90E8\u6807\u51C6\u65F6\u95F4 (\u65B0\u5357\u5A01\u5C14\u65AF)"))
             throw new RuntimeException("\n" + tzLocale + ": LONG, " +
                                        "non-daylight saving name for " +
                                        "Australia/Currie should be " +
-                                       "\"\u4e1c\u90e8\u6807\u51c6\u65f6\u95f4 " +
-                                       "\uff08\u65b0\u5357\u5a01\u5c14\u65af\uff09\"");
+                                       "\"\u4E1C\u90E8\u6807\u51C6\u65F6\u95F4 " +
+                                       "(\u65B0\u5357\u5A01\u5C14\u65AF)\"");
         tzLocale = locales2Test[9];
         if (!Currie.getDisplayName(false, TimeZone.LONG, tzLocale).equals
-           ("\u6771\u65b9\u6a19\u6e96\u6642\u9593 (\u65b0\u5357\u5a01\u723e\u65af)"))
+           ("\u6771\u90E8\u6A19\u6E96\u6642\u9593 (\u65B0\u5357\u5A01\u723E\u65AF)"))
             throw new RuntimeException("\n" + tzLocale + ": LONG, " +
                                        "non-daylight saving name for " +
                                        "Australia/Currie should be " +
-                                       "\"\u6771\u65b9\u6a19\u6e96\u6642\u9593 " +
-                                       "(\u65b0\u5357\u5a01\u723e\u65af)\"");
+                                       "\"\u6771\u90E8\u6A19\u6E96\u6642\u9593 " +
+                                       "(\u65B0\u5357\u5A01\u723E\u65AF)\"");
    }
 }