Merge
authorchegar
Tue, 15 Oct 2013 13:54:01 +0100
changeset 20854 242194ae1563
parent 20853 505b28fe2b98 (current diff)
parent 20792 8d5c16e4f64c (diff)
child 20855 000e45ee4aea
Merge
jdk/src/share/classes/java/awt/datatransfer/DataFlavor.java
jdk/src/share/classes/java/lang/ClassLoader.java
jdk/src/share/classes/java/net/HttpURLPermission.java
jdk/src/share/classes/javax/swing/JTable.java
jdk/src/share/classes/javax/swing/UIDefaults.java
jdk/src/share/classes/javax/swing/text/DefaultFormatter.java
jdk/src/share/classes/javax/swing/text/NumberFormatter.java
jdk/test/java/net/HttpURLPermission/HttpURLPermissionTest.java
jdk/test/java/net/HttpURLPermission/URLTest.java
jdk/test/java/net/HttpURLPermission/policy.1
jdk/test/java/net/HttpURLPermission/policy.2
jdk/test/java/net/HttpURLPermission/policy.3
--- a/jdk/make/tools/src/build/tools/buildmetaindex/BuildMetaIndex.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/make/tools/src/build/tools/buildmetaindex/BuildMetaIndex.java	Tue Oct 15 13:54:01 2013 +0100
@@ -173,6 +173,12 @@
      */
     private HashMap<String, HashSet<String>> knownPrefixMap = new HashMap<>();
 
+    /**
+     * Special value for the HashSet to indicate that there are classes in
+     * the top-level package.
+     */
+    private static final String TOP_LEVEL = "TOP";
+
     /*
      * A class for mapping package prefixes to the number of
      * levels of package elements to include.
@@ -212,7 +218,7 @@
 
 
     /*
-     * We add maximum 5 second level entries to "sun", "java" and
+     * We add maximum 5 second level entries to "sun", "jdk", "java" and
      * "javax" entries. Tune this parameter to get a balance on the
      * cold start and footprint.
      */
@@ -223,6 +229,7 @@
     JarMetaIndex(String fileName) throws IOException {
         jar = new JarFile(fileName);
         knownPrefixMap.put("sun", new HashSet<String>());
+        knownPrefixMap.put("jdk", new HashSet<String>());
         knownPrefixMap.put("java", new HashSet<String>());
         knownPrefixMap.put("javax", new HashSet<String>());
     }
@@ -336,12 +343,12 @@
             return false;
         }
 
-        String secondPkgElement = name.substring(firstSlashIndex + 1,
-                                                 name.indexOf("/",
-                                                              firstSlashIndex + 1));
-
         /* Add the second level package name to the corresponding hashset. */
-        if (secondPkgElement != null) {
+        int secondSlashIndex = name.indexOf("/", firstSlashIndex+1);
+        if (secondSlashIndex == -1) {
+            pkgSet.add(TOP_LEVEL);
+        } else {
+            String secondPkgElement = name.substring(firstSlashIndex+1, secondSlashIndex);
             pkgSet.add(secondPkgElement);
         }
 
@@ -368,8 +375,9 @@
             if (setSize == 0) {
                 continue;
             }
-            else if (setSize > JarMetaIndex.MAX_PKGS_WITH_KNOWN_PREFIX) {
-                indexSet.add(key + "/");
+            if (setSize > JarMetaIndex.MAX_PKGS_WITH_KNOWN_PREFIX ||
+                pkgSetStartsWithKey.contains(TOP_LEVEL)) {
+                 indexSet.add(key + "/");
             } else {
                 /* If the set contains less than MAX_PKGS_WITH_KNOWN_PREFIX, add
                  * them to the indexSet of the MetaIndex object.
--- a/jdk/makefiles/CreateJars.gmk	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/makefiles/CreateJars.gmk	Tue Oct 15 13:54:01 2013 +0100
@@ -983,8 +983,6 @@
 		JARINDEX:=true))
 endif
 
-##########################################################################################
-
 # This file is imported from hotspot in Import.gmk. Copying it into images/lib so that
 # all jars can be found in one place when creating images in Images.gmk. It needs to be
 # done here so that clean targets can be simple and accurate.
--- a/jdk/src/macosx/classes/apple/applescript/AppleScriptEngine.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/macosx/classes/apple/applescript/AppleScriptEngine.java	Tue Oct 15 13:54:01 2013 +0100
@@ -155,7 +155,7 @@
         TRACE("init()");
         // set up our context
 /* TODO -- name of current executable?  bad java documentation at:
- * http://java.sun.com/javase/6/docs/api/javax/script/ScriptEngine.html#FILENAME */
+ * http://docs.oracle.com/javase/6/docs/api/javax/script/ScriptEngine.html#FILENAME */
         put(ScriptEngine.FILENAME, "");
         put(ScriptEngine.ENGINE, getEngine());
         put(ScriptEngine.ENGINE_VERSION, getEngineVersion());
--- a/jdk/src/macosx/classes/com/apple/eawt/_AppEventLegacyHandler.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/macosx/classes/com/apple/eawt/_AppEventLegacyHandler.java	Tue Oct 15 13:54:01 2013 +0100
@@ -31,10 +31,6 @@
 
 import com.apple.eawt.AppEvent.*;
 
-interface _OpenAppHandler {
-    void handleOpenApp();
-}
-
 @SuppressWarnings("deprecation")
 class _AppEventLegacyHandler implements AboutHandler, PreferencesHandler, _OpenAppHandler, AppReOpenedListener, OpenFilesHandler, PrintFilesHandler, QuitHandler {
     final _AppEventHandler parent;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/macosx/classes/com/apple/eawt/_OpenAppHandler.java	Tue Oct 15 13:54:01 2013 +0100
@@ -0,0 +1,30 @@
+/*
+ * 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.  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 com.apple.eawt;
+
+interface _OpenAppHandler {
+    void handleOpenApp();
+}
\ No newline at end of file
--- a/jdk/src/macosx/classes/com/apple/laf/AquaComboBoxRenderer.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/macosx/classes/com/apple/laf/AquaComboBoxRenderer.java	Tue Oct 15 13:54:01 2013 +0100
@@ -25,141 +25,11 @@
 
 package com.apple.laf;
 
-import java.awt.*;
-
 import javax.swing.*;
 import javax.swing.plaf.UIResource;
 
-import sun.swing.SwingUtilities2;
-
 class AquaComboBoxRenderer extends AquaComboBoxRendererInternal implements UIResource {
     public AquaComboBoxRenderer(final JComboBox comboBox) {
         super(comboBox);
     }
 }
-
-class AquaComboBoxRendererInternal extends JLabel implements ListCellRenderer {
-    final JComboBox fComboBox;
-    boolean fSelected;
-    boolean fChecked;
-    boolean fInList;
-    boolean fEditable;
-    boolean fDrawCheckedItem = true;
-
-    // Provides space for a checkbox, and is translucent
-    public AquaComboBoxRendererInternal(final JComboBox comboBox) {
-        super();
-        fComboBox = comboBox;
-    }
-
-    // Don't include checkIcon space, because this is also used for button size calculations
-    // - the popup-size calc will get checkIcon space from getInsets
-    public Dimension getPreferredSize() {
-        // From BasicComboBoxRenderer - trick to avoid zero-height items
-        final Dimension size;
-
-        final String text = getText();
-        if ((text == null) || ("".equals(text))) {
-            setText(" ");
-            size = super.getPreferredSize();
-            setText("");
-        } else {
-            size = super.getPreferredSize();
-        }
-        return size;
-    }
-
-    // Don't paint the border here, it gets painted by the UI
-    protected void paintBorder(final Graphics g) {
-
-    }
-
-    public int getBaseline(int width, int height) {
-        return super.getBaseline(width, height) - 1;
-    }
-
-    // Really means is the one with the mouse over it
-    public Component getListCellRendererComponent(final JList list, final Object value, int index, final boolean isSelected, final boolean cellHasFocus) {
-        fInList = (index >= 0); // When the button wants the item painted, it passes in -1
-        fSelected = isSelected;
-        if (index < 0) {
-            index = fComboBox.getSelectedIndex();
-        }
-
-        // changed this to not ask for selected index but directly compare the current item and selected item
-        // different from basic because basic has no concept of checked, just has the last one selected,
-        // and the user changes selection. We have selection and a check mark.
-        // we used to call fComboBox.getSelectedIndex which ends up being a very bad call for large checkboxes
-        // it does a linear compare of every object in the checkbox until it finds the selected one, so if
-        // we have a 5000 element list we will 5000 * (selected index) .equals() of objects.
-        // See Radar #3141307
-
-        // Fix for Radar # 3204287 where we ask for an item at a negative index!
-        if (index >= 0) {
-            final Object item = fComboBox.getItemAt(index);
-            fChecked = fInList && item != null && item.equals(fComboBox.getSelectedItem());
-        } else {
-            fChecked = false;
-        }
-
-        fEditable = fComboBox.isEditable();
-        if (isSelected) {
-            if (fEditable) {
-                setBackground(UIManager.getColor("List.selectionBackground"));
-                setForeground(UIManager.getColor("List.selectionForeground"));
-            } else {
-                setBackground(list.getSelectionBackground());
-                setForeground(list.getSelectionForeground());
-            }
-        } else {
-            if (fEditable) {
-                setBackground(UIManager.getColor("List.background"));
-                setForeground(UIManager.getColor("List.foreground"));
-            } else {
-                setBackground(list.getBackground());
-                setForeground(list.getForeground());
-            }
-        }
-
-        setFont(list.getFont());
-
-        if (value instanceof Icon) {
-            setIcon((Icon)value);
-        } else {
-            setText((value == null) ? " " : value.toString());
-        }
-        return this;
-    }
-
-    public Insets getInsets(Insets insets) {
-        if (insets == null) insets = new Insets(0, 0, 0, 0);
-        insets.top = 1;
-        insets.bottom = 1;
-        insets.right = 5;
-        insets.left = (fInList && !fEditable ? 16 + 7 : 5);
-        return insets;
-    }
-
-    protected void setDrawCheckedItem(final boolean drawCheckedItem) {
-        this.fDrawCheckedItem = drawCheckedItem;
-    }
-
-    // Paint this component, and a checkbox if it's the selected item and not in the button
-    protected void paintComponent(final Graphics g) {
-        if (fInList) {
-            if (fSelected && !fEditable) {
-                AquaMenuPainter.instance().paintSelectedMenuItemBackground(g, getWidth(), getHeight());
-            } else {
-                g.setColor(getBackground());
-                g.fillRect(0, 0, getWidth(), getHeight());
-            }
-
-            if (fChecked && !fEditable && fDrawCheckedItem) {
-                final int y = getHeight() - 4;
-                g.setColor(getForeground());
-                SwingUtilities2.drawString(fComboBox, g, "\u2713", 6, y);
-            }
-        }
-        super.paintComponent(g);
-    }
-}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/macosx/classes/com/apple/laf/AquaComboBoxRendererInternal.java	Tue Oct 15 13:54:01 2013 +0100
@@ -0,0 +1,157 @@
+/*
+ * 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 com.apple.laf;
+
+import sun.swing.SwingUtilities2;
+
+import javax.swing.*;
+import java.awt.*;
+
+class AquaComboBoxRendererInternal extends JLabel implements ListCellRenderer {
+    final JComboBox fComboBox;
+    boolean fSelected;
+    boolean fChecked;
+    boolean fInList;
+    boolean fEditable;
+    boolean fDrawCheckedItem = true;
+
+    // Provides space for a checkbox, and is translucent
+    public AquaComboBoxRendererInternal(final JComboBox comboBox) {
+        super();
+        fComboBox = comboBox;
+    }
+
+    // Don't include checkIcon space, because this is also used for button size calculations
+    // - the popup-size calc will get checkIcon space from getInsets
+    public Dimension getPreferredSize() {
+        // From BasicComboBoxRenderer - trick to avoid zero-height items
+        final Dimension size;
+
+        final String text = getText();
+        if ((text == null) || ("".equals(text))) {
+            setText(" ");
+            size = super.getPreferredSize();
+            setText("");
+        } else {
+            size = super.getPreferredSize();
+        }
+        return size;
+    }
+
+    // Don't paint the border here, it gets painted by the UI
+    protected void paintBorder(final Graphics g) {
+
+    }
+
+    public int getBaseline(int width, int height) {
+        return super.getBaseline(width, height) - 1;
+    }
+
+    // Really means is the one with the mouse over it
+    public Component getListCellRendererComponent(final JList list, final Object value, int index, final boolean isSelected, final boolean cellHasFocus) {
+        fInList = (index >= 0); // When the button wants the item painted, it passes in -1
+        fSelected = isSelected;
+        if (index < 0) {
+            index = fComboBox.getSelectedIndex();
+        }
+
+        // changed this to not ask for selected index but directly compare the current item and selected item
+        // different from basic because basic has no concept of checked, just has the last one selected,
+        // and the user changes selection. We have selection and a check mark.
+        // we used to call fComboBox.getSelectedIndex which ends up being a very bad call for large checkboxes
+        // it does a linear compare of every object in the checkbox until it finds the selected one, so if
+        // we have a 5000 element list we will 5000 * (selected index) .equals() of objects.
+        // See Radar #3141307
+
+        // Fix for Radar # 3204287 where we ask for an item at a negative index!
+        if (index >= 0) {
+            final Object item = fComboBox.getItemAt(index);
+            fChecked = fInList && item != null && item.equals(fComboBox.getSelectedItem());
+        } else {
+            fChecked = false;
+        }
+
+        fEditable = fComboBox.isEditable();
+        if (isSelected) {
+            if (fEditable) {
+                setBackground(UIManager.getColor("List.selectionBackground"));
+                setForeground(UIManager.getColor("List.selectionForeground"));
+            } else {
+                setBackground(list.getSelectionBackground());
+                setForeground(list.getSelectionForeground());
+            }
+        } else {
+            if (fEditable) {
+                setBackground(UIManager.getColor("List.background"));
+                setForeground(UIManager.getColor("List.foreground"));
+            } else {
+                setBackground(list.getBackground());
+                setForeground(list.getForeground());
+            }
+        }
+
+        setFont(list.getFont());
+
+        if (value instanceof Icon) {
+            setIcon((Icon)value);
+        } else {
+            setText((value == null) ? " " : value.toString());
+        }
+        return this;
+    }
+
+    public Insets getInsets(Insets insets) {
+        if (insets == null) insets = new Insets(0, 0, 0, 0);
+        insets.top = 1;
+        insets.bottom = 1;
+        insets.right = 5;
+        insets.left = (fInList && !fEditable ? 16 + 7 : 5);
+        return insets;
+    }
+
+    protected void setDrawCheckedItem(final boolean drawCheckedItem) {
+        this.fDrawCheckedItem = drawCheckedItem;
+    }
+
+    // Paint this component, and a checkbox if it's the selected item and not in the button
+    protected void paintComponent(final Graphics g) {
+        if (fInList) {
+            if (fSelected && !fEditable) {
+                AquaMenuPainter.instance().paintSelectedMenuItemBackground(g, getWidth(), getHeight());
+            } else {
+                g.setColor(getBackground());
+                g.fillRect(0, 0, getWidth(), getHeight());
+            }
+
+            if (fChecked && !fEditable && fDrawCheckedItem) {
+                final int y = getHeight() - 4;
+                g.setColor(getForeground());
+                SwingUtilities2.drawString(fComboBox, g, "\u2713", 6, y);
+            }
+        }
+        super.paintComponent(g);
+    }
+}
--- a/jdk/src/macosx/classes/com/apple/laf/AquaComboBoxUI.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/macosx/classes/com/apple/laf/AquaComboBoxUI.java	Tue Oct 15 13:54:01 2013 +0100
@@ -281,12 +281,16 @@
         actionMap.put("aquaSelectPageUp", highlightPageUpAction);
         actionMap.put("aquaSelectPageDown", highlightPageDownAction);
 
+        actionMap.put("aquaHidePopup", hideAction);
+
         SwingUtilities.replaceUIActionMap(comboBox, actionMap);
     }
 
-    abstract class ComboBoxAction extends AbstractAction {
+    private abstract class ComboBoxAction extends AbstractAction {
         public void actionPerformed(final ActionEvent e) {
-            if (!comboBox.isEnabled() || !comboBox.isShowing()) return;
+            if (!comboBox.isEnabled() || !comboBox.isShowing()) {
+                return;
+            }
 
             if (comboBox.isPopupVisible()) {
                 final AquaComboBoxUI ui = (AquaComboBoxUI)comboBox.getUI();
@@ -302,7 +306,7 @@
     /**
      * Hilight _but do not select_ the next item in the list.
      */
-    Action highlightNextAction = new ComboBoxAction() {
+    private Action highlightNextAction = new ComboBoxAction() {
         @Override
         public void performComboBoxAction(AquaComboBoxUI ui) {
             final int si = listBox.getSelectedIndex();
@@ -318,7 +322,7 @@
     /**
      * Hilight _but do not select_ the previous item in the list.
      */
-    Action highlightPreviousAction = new ComboBoxAction() {
+    private Action highlightPreviousAction = new ComboBoxAction() {
         @Override
         void performComboBoxAction(final AquaComboBoxUI ui) {
             final int si = listBox.getSelectedIndex();
@@ -330,7 +334,7 @@
         }
     };
 
-    Action highlightFirstAction = new ComboBoxAction() {
+    private Action highlightFirstAction = new ComboBoxAction() {
         @Override
         void performComboBoxAction(final AquaComboBoxUI ui) {
             listBox.setSelectedIndex(0);
@@ -338,7 +342,7 @@
         }
     };
 
-    Action highlightLastAction = new ComboBoxAction() {
+    private Action highlightLastAction = new ComboBoxAction() {
         @Override
         void performComboBoxAction(final AquaComboBoxUI ui) {
             final int size = listBox.getModel().getSize();
@@ -347,7 +351,7 @@
         }
     };
 
-    Action highlightPageUpAction = new ComboBoxAction() {
+    private Action highlightPageUpAction = new ComboBoxAction() {
         @Override
         void performComboBoxAction(final AquaComboBoxUI ui) {
             final int current = listBox.getSelectedIndex();
@@ -367,7 +371,7 @@
         }
     };
 
-    Action highlightPageDownAction = new ComboBoxAction() {
+    private Action highlightPageDownAction = new ComboBoxAction() {
         @Override
         void performComboBoxAction(final AquaComboBoxUI ui) {
             final int current = listBox.getSelectedIndex();
@@ -482,13 +486,13 @@
 
     // This is somewhat messy.  The difference here from BasicComboBoxUI.EnterAction is that
     // arrow up or down does not automatically select the
-    static final Action triggerSelectionAction = new AbstractAction() {
+    private static final Action triggerSelectionAction = new AbstractAction() {
         public void actionPerformed(final ActionEvent e) {
             triggerSelectionEvent((JComboBox)e.getSource(), e);
         }
     };
 
-    static final Action toggleSelectionAction = new AbstractAction() {
+    private static final Action toggleSelectionAction = new AbstractAction() {
         public void actionPerformed(final ActionEvent e) {
             final JComboBox comboBox = (JComboBox)e.getSource();
             if (!comboBox.isEnabled()) return;
@@ -506,6 +510,18 @@
         }
     };
 
+    private static Action hideAction = new AbstractAction() {
+        @Override
+        public void actionPerformed(final ActionEvent e) {
+            final JComboBox comboBox = (JComboBox)e.getSource();
+
+            if (comboBox.isPopupVisible()) {
+                comboBox.firePopupMenuCanceled();
+                comboBox.setPopupVisible(false);
+            }
+        }
+    };
+
     public void applySizeFor(final JComponent c, final Size size) {
         if (arrowButton == null) return;
         final Border border = arrowButton.getBorder();
--- a/jdk/src/macosx/classes/com/apple/laf/AquaKeyBindings.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/macosx/classes/com/apple/laf/AquaKeyBindings.java	Tue Oct 15 13:54:01 2013 +0100
@@ -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
@@ -209,7 +209,7 @@
 
     LateBoundInputMap getComboBoxInputMap() {
         return new LateBoundInputMap(new SimpleBinding(new String[] {
-            "ESCAPE", "hidePopup",
+            "ESCAPE", "aquaHidePopup",
             "PAGE_UP", "aquaSelectPageUp",
             "PAGE_DOWN", "aquaSelectPageDown",
             "HOME", "aquaSelectHome",
--- a/jdk/src/macosx/classes/com/apple/laf/AquaMenuBarUI.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/macosx/classes/com/apple/laf/AquaMenuBarUI.java	Tue Oct 15 13:54:01 2013 +0100
@@ -73,8 +73,9 @@
 
     public Dimension getPreferredSize(final JComponent c) {
         if (isScreenMenuBar((JMenuBar)c)) {
-            if (setScreenMenuBar((JFrame)(c.getTopLevelAncestor()))) ;
-            return new Dimension(0, 0);
+            if (setScreenMenuBar((JFrame)(c.getTopLevelAncestor()))) {
+                return new Dimension(0, 0);
+            }
         }
         return null;
     }
--- a/jdk/src/macosx/classes/sun/awt/CGraphicsEnvironment.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/macosx/classes/sun/awt/CGraphicsEnvironment.java	Tue Oct 15 13:54:01 2013 +0100
@@ -181,6 +181,9 @@
             initDevices();
 
             d = devices.get(mainDisplayID);
+            if (d == null) {
+                throw new AWTError("no screen devices");
+            }
         }
         return d;
     }
--- a/jdk/src/macosx/classes/sun/lwawt/LWComponentPeer.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/macosx/classes/sun/lwawt/LWComponentPeer.java	Tue Oct 15 13:54:01 2013 +0100
@@ -385,11 +385,6 @@
 
     // ---- PEER METHODS ---- //
 
-    @Override
-    public Toolkit getToolkit() {
-        return LWToolkit.getLWToolkit();
-    }
-
     // Just a helper method
     public LWToolkit getLWToolkit() {
         return LWToolkit.getLWToolkit();
@@ -1010,13 +1005,13 @@
     @Override
     public boolean prepareImage(Image img, int w, int h, ImageObserver o) {
         // TODO: is it a right/complete implementation?
-        return getToolkit().prepareImage(img, w, h, o);
+        return Toolkit.getDefaultToolkit().prepareImage(img, w, h, o);
     }
 
     @Override
     public int checkImage(Image img, int w, int h, ImageObserver o) {
         // TODO: is it a right/complete implementation?
-        return getToolkit().checkImage(img, w, h, o);
+        return Toolkit.getDefaultToolkit().checkImage(img, w, h, o);
     }
 
     @Override
--- a/jdk/src/macosx/classes/sun/lwawt/LWTextComponentPeer.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/macosx/classes/sun/lwawt/LWTextComponentPeer.java	Tue Oct 15 13:54:01 2013 +0100
@@ -71,13 +71,14 @@
         }
         setEditable(getTarget().isEditable());
         setText(getTarget().getText());
+        setCaretPosition(getTarget().getCaretPosition());
         getTarget().addInputMethodListener(this);
         final int start = getTarget().getSelectionStart();
         final int end = getTarget().getSelectionEnd();
         if (end > start) {
+            // Should be called after setText() and setCaretPosition()
             select(start, end);
         }
-        setCaretPosition(getTarget().getCaretPosition());
         firstChangeSkipped = true;
     }
 
@@ -122,7 +123,7 @@
     }
 
     @Override
-    public final void setText(final String l) {
+    public final void setText(final String text) {
         synchronized (getDelegateLock()) {
             // JTextArea.setText() posts two different events (remove & insert).
             // Since we make no differences between text events,
@@ -130,7 +131,7 @@
             // JTextArea.setText() is called.
             final Document document = getTextComponent().getDocument();
             document.removeDocumentListener(this);
-            getTextComponent().setText(l);
+            getTextComponent().setText(text);
             revalidate();
             if (firstChangeSkipped) {
                 postEvent(new TextEvent(getTarget(),
--- a/jdk/src/macosx/classes/sun/lwawt/LWWindowPeer.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/macosx/classes/sun/lwawt/LWWindowPeer.java	Tue Oct 15 13:54:01 2013 +0100
@@ -317,9 +317,25 @@
             op |= SET_SIZE;
         }
 
+        // 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);
+    }
+
+    public Rectangle constrainBounds(Rectangle bounds) {
+        return constrainBounds(bounds.x, bounds.y, bounds.width, bounds.height);
+    }
+
+    public Rectangle constrainBounds(int x, int y, int w, int h) {
+
         if (w < MINIMUM_WIDTH) {
             w = MINIMUM_WIDTH;
         }
+
         if (h < MINIMUM_HEIGHT) {
             h = MINIMUM_HEIGHT;
         }
@@ -334,12 +350,7 @@
             h = maxH;
         }
 
-        // Don't post ComponentMoved/Resized and Paint events
-        // until we've got a notification from the delegate
-        setBounds(x, y, w, h, 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);
+        return new Rectangle(x, y, w, h);
     }
 
     @Override
@@ -393,8 +404,12 @@
     @Override
     public void setModalBlocked(Dialog blocker, boolean blocked) {
         synchronized (getPeerTreeLock()) {
-            this.blocker = !blocked ? null :
-            (LWWindowPeer) AWTAccessor.getComponentAccessor().getPeer(blocker);
+            ComponentPeer peer =  AWTAccessor.getComponentAccessor().getPeer(blocker);
+            if (blocked && (peer instanceof LWWindowPeer)) {
+                this.blocker = (LWWindowPeer) peer;
+            } else {
+                this.blocker = null;
+            }
         }
 
         platformWindow.setModalBlocked(blocked);
@@ -1146,8 +1161,11 @@
             return false;
         }
 
-        Window currentActive = KeyboardFocusManager.
-            getCurrentKeyboardFocusManager().getActiveWindow();
+        AppContext targetAppContext = AWTAccessor.getComponentAccessor().getAppContext(getTarget());
+        KeyboardFocusManager kfm = AWTAccessor.getKeyboardFocusManagerAccessor()
+                .getCurrentKeyboardFocusManager(targetAppContext);
+        Window currentActive = kfm.getActiveWindow();
+
 
         Window opposite = LWKeyboardFocusManagerPeer.getInstance().
             getCurrentFocusedWindow();
--- a/jdk/src/macosx/classes/sun/lwawt/macosx/CDropTargetContextPeer.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/macosx/classes/sun/lwawt/macosx/CDropTargetContextPeer.java	Tue Oct 15 13:54:01 2013 +0100
@@ -26,6 +26,7 @@
 package sun.lwawt.macosx;
 
 import java.awt.*;
+import java.awt.dnd.DropTarget;
 
 import sun.awt.dnd.SunDropTargetContextPeer;
 import sun.awt.dnd.SunDropTargetEvent;
@@ -38,7 +39,7 @@
     private long    fNativeDropTransfer = 0;
     private long    fNativeDataAvailable = 0;
     private Object  fNativeData    = null;
-    private boolean insideTarget = true;
+    private DropTarget insideTarget = null;
 
     Object awtLockAccess = new Object();
 
@@ -88,26 +89,19 @@
         return fNativeData;
     }
 
-    // We need to take care of dragExit message because for some reason it is not being
-    // generated for lightweight components
+    // We need to take care of dragEnter and dragExit messages because
+    // native system generates them only for heavyweights
     @Override
     protected void processMotionMessage(SunDropTargetEvent event, boolean operationChanged) {
-        Component eventSource = (Component)event.getComponent();
-        Point screenPoint = event.getPoint();
-        SwingUtilities.convertPointToScreen(screenPoint, eventSource);
-        Rectangle screenBounds = new Rectangle(eventSource.getLocationOnScreen().x,
-                eventSource.getLocationOnScreen().y,
-                eventSource.getWidth(), eventSource.getHeight());
-        if(insideTarget) {
-            if(!screenBounds.contains(screenPoint)) {
+        boolean eventInsideTarget = isEventInsideTarget(event);
+        if (event.getComponent().getDropTarget() == insideTarget) {
+            if (!eventInsideTarget) {
                 processExitMessage(event);
-                insideTarget = false;
                 return;
             }
         } else {
-            if(screenBounds.contains(screenPoint)) {
+            if (eventInsideTarget) {
                 processEnterMessage(event);
-                insideTarget = true;
             } else {
                 return;
             }
@@ -115,17 +109,52 @@
         super.processMotionMessage(event, operationChanged);
     }
 
+    /**
+     * Could be called when DnD enters a heavyweight or synthesized in processMotionMessage
+     */
+    @Override
+    protected void processEnterMessage(SunDropTargetEvent event) {
+        Component c = event.getComponent();
+        DropTarget dt = event.getComponent().getDropTarget();
+        if (isEventInsideTarget(event)
+                && dt != insideTarget
+                && c.isShowing()
+                && dt != null
+                && dt.isActive()) {
+            insideTarget = dt;
+            super.processEnterMessage(event);
+        }
+    }
+
+    /**
+     * Could be called when DnD exits a heavyweight or synthesized in processMotionMessage
+     */
+    @Override
+    protected void processExitMessage(SunDropTargetEvent event) {
+        if (event.getComponent().getDropTarget() == insideTarget) {
+            insideTarget = null;
+            super.processExitMessage(event);
+        }
+    }
+
     @Override
     protected void processDropMessage(SunDropTargetEvent event) {
-        Component eventSource = (Component)event.getComponent();
+        if (isEventInsideTarget(event)) {
+            super.processDropMessage(event);
+            insideTarget = null;
+        }
+    }
+
+    private boolean isEventInsideTarget(SunDropTargetEvent event) {
+        Component eventSource = event.getComponent();
         Point screenPoint = event.getPoint();
         SwingUtilities.convertPointToScreen(screenPoint, eventSource);
-        Rectangle screenBounds = new Rectangle(eventSource.getLocationOnScreen().x,
-                eventSource.getLocationOnScreen().y,
-                eventSource.getWidth(), eventSource.getHeight());
-        if(screenBounds.contains(screenPoint)) {
-            super.processDropMessage(event);
-        }
+        Point locationOnScreen = eventSource.getLocationOnScreen();
+        Rectangle screenBounds = new Rectangle(locationOnScreen.x,
+                                               locationOnScreen.y,
+                                               eventSource.getWidth(),
+                                               eventSource.getHeight());
+        return screenBounds.contains(screenPoint);
     }
 
     @Override
--- a/jdk/src/macosx/classes/sun/lwawt/macosx/CFileDialog.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/macosx/classes/sun/lwawt/macosx/CFileDialog.java	Tue Oct 15 13:54:01 2013 +0100
@@ -327,11 +327,6 @@
     }
 
     @Override
-    public Toolkit getToolkit() {
-        return Toolkit.getDefaultToolkit();
-    }
-
-    @Override
     public void handleEvent(AWTEvent e) {
     }
 
--- a/jdk/src/macosx/classes/sun/lwawt/macosx/CPlatformWindow.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/macosx/classes/sun/lwawt/macosx/CPlatformWindow.java	Tue Oct 15 13:54:01 2013 +0100
@@ -210,7 +210,6 @@
     private boolean undecorated; // initialized in getInitialStyleBits()
     private Rectangle normalBounds = null; // not-null only for undecorated maximized windows
     private CPlatformResponder responder;
-    private volatile boolean zoomed = false; // from native perspective
 
     public CPlatformWindow() {
         super(0, true);
@@ -231,7 +230,9 @@
         contentView.initialize(peer, responder);
 
         final long ownerPtr = owner != null ? owner.getNSWindowPtr() : 0L;
-        final long nativeWindowPtr = nativeCreateNSWindow(contentView.getAWTView(), ownerPtr, styleBits, 0, 0, 0, 0);
+        Rectangle bounds = _peer.constrainBounds(_target.getBounds());
+        final long nativeWindowPtr = nativeCreateNSWindow(contentView.getAWTView(),
+                ownerPtr, styleBits, bounds.x, bounds.y, bounds.width, bounds.height);
         setPtr(nativeWindowPtr);
 
         if (target instanceof javax.swing.RootPaneContainer) {
@@ -466,7 +467,8 @@
     }
 
     private boolean isMaximized() {
-        return undecorated ? this.normalBounds != null : zoomed;
+        return undecorated ? this.normalBounds != null
+                : CWrapper.NSWindow.isZoomed(getNSWindowPtr());
     }
 
     private void maximize() {
@@ -474,7 +476,6 @@
             return;
         }
         if (!undecorated) {
-            zoomed = true;
             CWrapper.NSWindow.zoom(getNSWindowPtr());
         } else {
             deliverZoom(true);
@@ -496,7 +497,6 @@
             return;
         }
         if (!undecorated) {
-            zoomed = false;
             CWrapper.NSWindow.zoom(getNSWindowPtr());
         } else {
             deliverZoom(false);
--- a/jdk/src/macosx/classes/sun/lwawt/macosx/CWrapper.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/macosx/classes/sun/lwawt/macosx/CWrapper.java	Tue Oct 15 13:54:01 2013 +0100
@@ -68,6 +68,7 @@
 
         public static native void miniaturize(long window);
         public static native void deminiaturize(long window);
+        public static native boolean isZoomed(long window);
         public static native void zoom(long window);
 
         public static native void makeFirstResponder(long window, long responder);
--- a/jdk/src/macosx/lib/flavormap.properties	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/macosx/lib/flavormap.properties	Tue Oct 15 13:54:01 2013 +0100
@@ -76,5 +76,6 @@
 text/uri-list=application/x-java-file-list;class=java.util.List
 PNG=image/x-java-image;class=java.awt.Image
 JFIF=image/x-java-image;class=java.awt.Image
+TIFF=image/x-java-image;class=java.awt.Image
 RICH_TEXT=text/rtf
 HTML=text/html;charset=utf-8;eoln="\r\n";terminators=1
--- a/jdk/src/macosx/native/sun/awt/AWTWindow.m	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/macosx/native/sun/awt/AWTWindow.m	Tue Oct 15 13:54:01 2013 +0100
@@ -366,7 +366,7 @@
 
 - (BOOL) canBecomeMainWindow {
 AWT_ASSERT_APPKIT_THREAD;
-    if(!self.isEnabled){
+    if (!self.isEnabled) {
         // Native system can bring up the NSWindow to
         // the top even if the window is not main.
         // We should bring up the modal dialog manually
@@ -377,7 +377,7 @@
         if (platformWindow != NULL) {
             static JNF_MEMBER_CACHE(jm_checkBlockingAndOrder, jc_CPlatformWindow,
                                     "checkBlockingAndOrder", "()Z");
-            JNFCallVoidMethod(env, platformWindow, jm_checkBlockingAndOrder);
+            JNFCallBooleanMethod(env, platformWindow, jm_checkBlockingAndOrder);
             (*env)->DeleteLocalRef(env, platformWindow);
         }
     }
--- a/jdk/src/macosx/native/sun/awt/CDropTarget.m	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/macosx/native/sun/awt/CDropTarget.m	Tue Oct 15 13:54:01 2013 +0100
@@ -477,6 +477,8 @@
         sDraggingExited = FALSE;
         sDraggingLocation = [sender draggingLocation];
         NSPoint javaLocation = [fView convertPoint:sDraggingLocation fromView:nil];
+        javaLocation.y = fView.window.frame.size.height - javaLocation.y;
+
         DLog5(@"+ dragEnter: loc native %f, %f, java %f, %f\n", sDraggingLocation.x, sDraggingLocation.y, javaLocation.x, javaLocation.y);
 
                 ////////// BEGIN Calculate the current drag actions //////////
@@ -570,8 +572,7 @@
     // Should we notify Java things have changed?
     if (sDraggingError == FALSE && notifyJava) {
         NSPoint javaLocation = [fView convertPoint:sDraggingLocation fromView:nil];
-                // For some reason even after the convertPoint drag events come with the y coordinate reverted
-                javaLocation.y = fView.window.frame.size.height - javaLocation.y;
+        javaLocation.y = fView.window.frame.size.height - javaLocation.y;
         //DLog5(@"  : dragMoved: loc native %f, %f, java %f, %f\n", sDraggingLocation.x, sDraggingLocation.y, javaLocation.x, javaLocation.y);
 
         jlongArray formats = sDraggingFormats;
--- a/jdk/src/macosx/native/sun/awt/CFileDialog.m	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/macosx/native/sun/awt/CFileDialog.m	Tue Oct 15 13:54:01 2013 +0100
@@ -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
@@ -93,6 +93,14 @@
 - (void)safeSaveOrLoad {
     NSSavePanel *thePanel = nil;
 
+    /* 
+     * 8013553: turns off extension hiding for the native file dialog.
+     * This way is used because setExtensionHidden(NO) doesn't work
+     * as expected.
+     */
+    NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
+    [defaults setBool:NO forKey:@"NSNavLastUserSetHideExtensionButtonState"];
+
     if (fMode == java_awt_FileDialog_SAVE) {
         thePanel = [NSSavePanel savePanel];
         [thePanel setAllowsOtherFileTypes:YES];
@@ -110,7 +118,7 @@
         if (fMode == java_awt_FileDialog_LOAD) {
             NSOpenPanel *openPanel = (NSOpenPanel *)thePanel;
             [openPanel setAllowsMultipleSelection:fMultipleMode];
-            [openPanel setCanChooseFiles:YES];
+            [openPanel setCanChooseFiles:!fChooseDirectories];
             [openPanel setCanChooseDirectories:fChooseDirectories];
             [openPanel setCanCreateDirectories:YES];
         }
--- a/jdk/src/macosx/native/sun/awt/CWrapper.m	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/macosx/native/sun/awt/CWrapper.m	Tue Oct 15 13:54:01 2013 +0100
@@ -437,6 +437,29 @@
 
 /*
  * Class:     sun_lwawt_macosx_CWrapper$NSWindow
+ * Method:    isZoomed
+ * Signature: (J)Z
+ */
+JNIEXPORT jboolean JNICALL
+Java_sun_lwawt_macosx_CWrapper_00024NSWindow_isZoomed
+(JNIEnv *env, jclass cls, jlong windowPtr)
+{
+    __block jboolean isZoomed = JNI_FALSE;
+    
+JNF_COCOA_ENTER(env);
+    
+    NSWindow *window = (NSWindow *)jlong_to_ptr(windowPtr);
+    [ThreadUtilities performOnMainThreadWaiting:YES block:^(){
+        isZoomed = [window isZoomed];
+    }];
+    
+JNF_COCOA_EXIT(env);
+    
+    return isZoomed;
+}
+
+/*
+ * Class:     sun_lwawt_macosx_CWrapper$NSWindow
  * Method:    zoom
  * Signature: (J)V
  */
--- a/jdk/src/macosx/native/sun/awt/awt.m	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/macosx/native/sun/awt/awt.m	Tue Oct 15 13:54:01 2013 +0100
@@ -227,7 +227,7 @@
     id jrsAppKitAWTClass = objc_getClass("JRSAppKitAWT");
     SEL markAppSel = @selector(markAppIsDaemon);
     if (![jrsAppKitAWTClass respondsToSelector:markAppSel]) return NO;
-    return (BOOL)[jrsAppKitAWTClass performSelector:markAppSel];
+    return [jrsAppKitAWTClass performSelector:markAppSel] ? YES : NO;
 }
 
 + (void)appKitIsRunning:(id)arg {
@@ -337,6 +337,8 @@
 
     // Headless mode trumps either ordinary AWT or SWT-in-AWT mode.  Declare us a daemon and return.
     if (headless) {
+        // Note that we don't install run loop observers in headless mode
+        // because we don't need them (see 7174704)
         if (!forceEmbeddedMode) {
             setUpAppKitThreadName();
         }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/share/classes/com/sun/imageio/plugins/bmp/BMPCompressionTypes.java	Tue Oct 15 13:54:01 2013 +0100
@@ -0,0 +1,47 @@
+/*
+ * 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 com.sun.imageio.plugins.bmp;
+
+public class BMPCompressionTypes {
+
+    private static final String[] compressionTypeNames =
+        {"BI_RGB", "BI_RLE8", "BI_RLE4", "BI_BITFIELDS", "BI_JPEG", "BI_PNG"};
+
+    static int getType(String typeString) {
+        for (int i = 0; i < compressionTypeNames.length; i++)
+            if (compressionTypeNames[i].equals(typeString))
+                return i;
+        return 0;
+    }
+
+    static String getName(int type) {
+        return compressionTypeNames[type];
+    }
+
+    public static String[] getCompressionTypes() {
+        return compressionTypeNames.clone();
+    }
+}
--- a/jdk/src/share/classes/com/sun/imageio/plugins/bmp/BMPConstants.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/com/sun/imageio/plugins/bmp/BMPConstants.java	Tue Oct 15 13:54:01 2013 +0100
@@ -47,7 +47,4 @@
     static final int BI_BITFIELDS = 3;
     static final int BI_JPEG = 4;
     static final int BI_PNG = 5;
-
-    static final String[] compressionTypeNames =
-        {"BI_RGB", "BI_RLE8", "BI_RLE4", "BI_BITFIELDS", "BI_JPEG", "BI_PNG"};
 }
--- a/jdk/src/share/classes/com/sun/imageio/plugins/bmp/BMPImageWriter.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/com/sun/imageio/plugins/bmp/BMPImageWriter.java	Tue Oct 15 13:54:01 2013 +0100
@@ -25,7 +25,6 @@
 
 package com.sun.imageio.plugins.bmp;
 
-import java.awt.Point;
 import java.awt.Rectangle;
 import java.awt.image.ColorModel;
 import java.awt.image.ComponentSampleModel;
@@ -42,7 +41,6 @@
 import java.awt.image.RenderedImage;
 import java.awt.image.SampleModel;
 import java.awt.image.SinglePixelPackedSampleModel;
-import java.awt.image.WritableRaster;
 import java.awt.image.BufferedImage;
 
 import java.io.IOException;
@@ -51,22 +49,16 @@
 import java.util.Iterator;
 
 import javax.imageio.IIOImage;
-import javax.imageio.IIOException;
 import javax.imageio.ImageIO;
 import javax.imageio.ImageTypeSpecifier;
 import javax.imageio.ImageWriteParam;
 import javax.imageio.ImageWriter;
 import javax.imageio.metadata.IIOMetadata;
-import javax.imageio.metadata.IIOMetadataNode;
-import javax.imageio.metadata.IIOMetadataFormatImpl;
-import javax.imageio.metadata.IIOInvalidTreeException;
 import javax.imageio.spi.ImageWriterSpi;
 import javax.imageio.stream.ImageOutputStream;
 import javax.imageio.event.IIOWriteProgressListener;
 import javax.imageio.event.IIOWriteWarningListener;
 
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
 
 import javax.imageio.plugins.bmp.BMPImageWriteParam;
 import com.sun.imageio.plugins.common.ImageUtil;
@@ -129,7 +121,7 @@
         meta.compression = getPreferredCompressionType(imageType);
         if (param != null
             && param.getCompressionMode() == ImageWriteParam.MODE_EXPLICIT) {
-            meta.compression = getCompressionType(param.getCompressionType());
+            meta.compression = BMPCompressionTypes.getType(param.getCompressionType());
         }
         meta.bitsPerPixel = (short)imageType.getColorModel().getPixelSize();
         return meta;
@@ -308,7 +300,7 @@
 
         switch(bmpParam.getCompressionMode()) {
         case ImageWriteParam.MODE_EXPLICIT:
-            compressionType = getCompressionType(bmpParam.getCompressionType());
+            compressionType = BMPCompressionTypes.getType(bmpParam.getCompressionType());
             break;
         case ImageWriteParam.MODE_COPY_FROM_METADATA:
             compressionType = bmpImageMetadata.compression;
@@ -323,12 +315,12 @@
 
         if (!canEncodeImage(compressionType, colorModel, sampleModel)) {
             throw new IOException("Image can not be encoded with compression type "
-                                  + compressionTypeNames[compressionType]);
+                                  + BMPCompressionTypes.getName(compressionType));
         }
 
         byte r[] = null, g[] = null, b[] = null, a[] = null;
 
-        if (compressionType == BMPConstants.BI_BITFIELDS) {
+        if (compressionType == BI_BITFIELDS) {
             bitsPerPixel =
                 DataBuffer.getDataTypeSize(sampleModel.getDataType());
 
@@ -372,7 +364,7 @@
                     // an exception related to unsupported image format
                     throw new IOException("Image can not be encoded with " +
                                           "compression type " +
-                                          compressionTypeNames[compressionType]);
+                                          BMPCompressionTypes.getName(compressionType));
                 }
             }
             writeMaskToPalette(rmask, 0, r, g, b, a);
@@ -511,8 +503,8 @@
          * Images with any other compression type must be wrote in the
          * bottom-up layout.
          */
-        if (compressionType == BMPConstants.BI_RGB ||
-            compressionType == BMPConstants.BI_BITFIELDS)
+        if (compressionType == BI_RGB ||
+            compressionType == BI_BITFIELDS)
         {
             isTopDown = bmpParam.isTopDown();
         } else {
@@ -543,7 +535,7 @@
         if (isPalette == true) {
 
             // write palette
-            if (compressionType == BMPConstants.BI_BITFIELDS) {
+            if (compressionType == BI_BITFIELDS) {
                 // write masks for red, green and blue components.
                 for (int i=0; i<3; i++) {
                     int mask = (a[i]&0xFF) + ((r[i]&0xFF)*0x100) + ((g[i]&0xFF)*0x10000) + ((b[i]&0xFF)*0x1000000);
@@ -571,8 +563,8 @@
 
         int l;
 
-        if (compressionType == BMPConstants.BI_JPEG ||
-            compressionType == BMPConstants.BI_PNG) {
+        if (compressionType == BI_JPEG ||
+            compressionType == BI_PNG) {
 
             // prepare embedded buffer
             embedded_stream = new ByteArrayOutputStream();
@@ -657,7 +649,7 @@
                     pos = sppsm.getOffset(startX, startY);
                 }
 
-                if (compressionType == BMPConstants.BI_RGB || compressionType == BMPConstants.BI_BITFIELDS){
+                if (compressionType == BI_RGB || compressionType == BI_BITFIELDS){
                     switch(dataType) {
                     case DataBuffer.TYPE_BYTE:
                         byte[] bdata =
@@ -687,7 +679,7 @@
                     for(int k=0; k<padding; k++) {
                         stream.writeByte(0);
                     }
-                } else if (compressionType == BMPConstants.BI_RLE4) {
+                } else if (compressionType == BI_RLE4) {
                     if (bpixels == null || bpixels.length < scanlineBytes)
                         bpixels = new byte[scanlineBytes];
                     src.getPixels(srcRect.x, srcRect.y,
@@ -696,7 +688,7 @@
                         bpixels[h] = (byte)pixels[h];
                     }
                     encodeRLE4(bpixels, scanlineBytes);
-                } else if (compressionType == BMPConstants.BI_RLE8) {
+                } else if (compressionType == BI_RLE8) {
                     //byte[] bdata =
                     //    ((DataBufferByte)src.getDataBuffer()).getData();
                     //System.out.println("bdata.length="+bdata.length);
@@ -734,8 +726,8 @@
             processImageProgress(100.0f * (((float)i) / ((float)h)));
         }
 
-        if (compressionType == BMPConstants.BI_RLE4 ||
-            compressionType == BMPConstants.BI_RLE8) {
+        if (compressionType == BI_RLE4 ||
+            compressionType == BI_RLE8) {
             // Write the RLE EOF marker and
             stream.writeByte(0);
             stream.writeByte(1);
@@ -793,7 +785,7 @@
             break;
 
         case 4:
-            if (compressionType == BMPConstants.BI_RLE4){
+            if (compressionType == BI_RLE4){
                 byte[] bipixels = new byte[scanlineBytes];
                 for (int h=0; h<scanlineBytes; h++) {
                     bipixels[h] = (byte)pixels[l++];
@@ -814,7 +806,7 @@
             break;
 
         case 8:
-            if(compressionType == BMPConstants.BI_RLE8) {
+            if(compressionType == BI_RLE8) {
                 for (int h=0; h<scanlineBytes; h++) {
                     bpixels[h] = (byte)pixels[l++];
                 }
@@ -841,7 +833,7 @@
              */
             for (int j = 0, m = 0; j < scanlineBytes; m++) {
                 spixels[m] = 0;
-                if (compressionType == BMPConstants.BI_RGB) {
+                if (compressionType == BI_RGB) {
                     /*
                      * please note that despite other cases,
                      * the 16bpp BI_RGB requires the RGB data order
@@ -910,7 +902,7 @@
                  */
                 for (int j = 0, m = 0; j < scanlineBytes; m++) {
                     ipixels[m] = 0;
-                    if (compressionType == BMPConstants.BI_RGB) {
+                    if (compressionType == BI_RGB) {
                         ipixels[m] =
                             ((0xff & pixels[j + 2]) << 16) |
                             ((0xff & pixels[j + 1]) <<  8) |
@@ -945,8 +937,8 @@
         }
 
         // Write out the padding
-        if (compressionType == BMPConstants.BI_RGB ||
-            compressionType == BMPConstants.BI_BITFIELDS)
+        if (compressionType == BI_RGB ||
+            compressionType == BI_BITFIELDS)
         {
             for(k=0; k<padding; k++) {
                 stream.writeByte(0);
@@ -1329,17 +1321,10 @@
         stream = null;
     }
 
-    private int getCompressionType(String typeString) {
-        for (int i = 0; i < BMPConstants.compressionTypeNames.length; i++)
-            if (BMPConstants.compressionTypeNames[i].equals(typeString))
-                return i;
-        return 0;
-    }
-
     private void writeEmbedded(IIOImage image,
                                ImageWriteParam bmpParam) throws IOException {
         String format =
-            compressionType == BMPConstants.BI_JPEG ? "jpeg" : "png";
+            compressionType == BI_JPEG ? "jpeg" : "png";
         Iterator iterator = ImageIO.getImageWritersByFormatName(format);
         ImageWriter writer = null;
         if (iterator.hasNext())
--- a/jdk/src/share/classes/com/sun/imageio/plugins/bmp/BMPMetadata.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/com/sun/imageio/plugins/bmp/BMPMetadata.java	Tue Oct 15 13:54:01 2013 +0100
@@ -219,7 +219,7 @@
 
         // CompressionTypeName
         IIOMetadataNode subNode = new IIOMetadataNode("CompressionTypeName");
-        subNode.setAttribute("value", compressionTypeNames[compression]);
+        subNode.setAttribute("value", BMPCompressionTypes.getName(compression));
         node.appendChild(subNode);
         return node;
     }
--- a/jdk/src/share/classes/com/sun/imageio/plugins/gif/GIFStreamMetadata.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/com/sun/imageio/plugins/gif/GIFStreamMetadata.java	Tue Oct 15 13:54:01 2013 +0100
@@ -25,11 +25,8 @@
 
 package com.sun.imageio.plugins.gif;
 
-import javax.imageio.ImageTypeSpecifier;
 import javax.imageio.metadata.IIOInvalidTreeException;
-import javax.imageio.metadata.IIOMetadata;
 import javax.imageio.metadata.IIOMetadataNode;
-import javax.imageio.metadata.IIOMetadataFormat;
 import javax.imageio.metadata.IIOMetadataFormatImpl;
 import org.w3c.dom.Node;
 
@@ -41,7 +38,7 @@
     static final String
         nativeMetadataFormatName = "javax_imageio_gif_stream_1.0";
 
-    public static final String[] versionStrings = { "87a", "89a" };
+    static final String[] versionStrings = { "87a", "89a" };
 
     public String version; // 87a or 89a
     public int logicalScreenWidth;
@@ -52,7 +49,7 @@
     public int backgroundColorIndex; // Valid if globalColorTable != null
     public boolean sortFlag; // Valid if globalColorTable != null
 
-    public static final String[] colorTableSizes = {
+    static final String[] colorTableSizes = {
         "2", "4", "8", "16", "32", "64", "128", "256"
     };
 
--- a/jdk/src/share/classes/com/sun/imageio/plugins/jpeg/JPEG.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/com/sun/imageio/plugins/jpeg/JPEG.java	Tue Oct 15 13:54:01 2013 +0100
@@ -25,14 +25,11 @@
 
 package com.sun.imageio.plugins.jpeg;
 
-import javax.imageio.metadata.IIOMetadataFormatImpl;
 import javax.imageio.ImageTypeSpecifier;
 import javax.imageio.plugins.jpeg.JPEGQTable;
 import javax.imageio.plugins.jpeg.JPEGHuffmanTable;
 
 import java.awt.image.ColorModel;
-import java.awt.image.BufferedImage;
-import java.awt.image.DataBuffer;
 import java.awt.color.ColorSpace;
 import java.awt.color.ICC_ColorSpace;
 
@@ -172,9 +169,9 @@
     public static final String vendor = "Oracle Corporation";
     public static final String version = "0.5";
     // Names of the formats we can read or write
-    public static final String [] names = {"JPEG", "jpeg", "JPG", "jpg"};
-    public static final String [] suffixes = {"jpg", "jpeg"};
-    public static final String [] MIMETypes = {"image/jpeg"};
+    static final String [] names = {"JPEG", "jpeg", "JPG", "jpg"};
+    static final String [] suffixes = {"jpg", "jpeg"};
+    static final String [] MIMETypes = {"image/jpeg"};
     public static final String nativeImageMetadataFormatName =
         "javax_imageio_jpeg_image_1.0";
     public static final String nativeImageMetadataFormatClassName =
@@ -201,12 +198,12 @@
     public static final int NUM_JCS_CODES = JCS_YCCK+1;
 
     /** IJG can handle up to 4-channel JPEGs */
-    public static final int [] [] bandOffsets = {{0},
+    static final int [] [] bandOffsets = {{0},
                                           {0, 1},
                                           {0, 1, 2},
                                           {0, 1, 2, 3}};
 
-    public static final int [] bOffsRGB = { 2, 1, 0 };
+    static final int [] bOffsRGB = { 2, 1, 0 };
 
     /* These are kept in the inner class to avoid static initialization
      * of the CMM class until someone actually needs it.
--- a/jdk/src/share/classes/com/sun/imageio/plugins/png/PNGMetadata.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/com/sun/imageio/plugins/png/PNGMetadata.java	Tue Oct 15 13:54:01 2013 +0100
@@ -29,12 +29,10 @@
 import java.awt.image.IndexColorModel;
 import java.awt.image.SampleModel;
 import java.util.ArrayList;
-import java.util.Iterator;
 import java.util.StringTokenizer;
 import javax.imageio.ImageTypeSpecifier;
 import javax.imageio.metadata.IIOInvalidTreeException;
 import javax.imageio.metadata.IIOMetadata;
-import javax.imageio.metadata.IIOMetadataFormat;
 import javax.imageio.metadata.IIOMetadataFormatImpl;
 import javax.imageio.metadata.IIOMetadataNode;
 import org.w3c.dom.Node;
@@ -49,42 +47,42 @@
         = "com.sun.imageio.plugins.png.PNGMetadataFormat";
 
     // Color types for IHDR chunk
-    public static final String[] IHDR_colorTypeNames = {
+    static final String[] IHDR_colorTypeNames = {
         "Grayscale", null, "RGB", "Palette",
         "GrayAlpha", null, "RGBAlpha"
     };
 
-    public static final int[] IHDR_numChannels = {
+    static final int[] IHDR_numChannels = {
         1, 0, 3, 3, 2, 0, 4
     };
 
     // Bit depths for IHDR chunk
-    public static final String[] IHDR_bitDepths = {
+    static final String[] IHDR_bitDepths = {
         "1", "2", "4", "8", "16"
     };
 
     // Compression methods for IHDR chunk
-    public static final String[] IHDR_compressionMethodNames = {
+    static final String[] IHDR_compressionMethodNames = {
         "deflate"
     };
 
     // Filter methods for IHDR chunk
-    public static final String[] IHDR_filterMethodNames = {
+    static final String[] IHDR_filterMethodNames = {
         "adaptive"
     };
 
     // Interlace methods for IHDR chunk
-    public static final String[] IHDR_interlaceMethodNames = {
+    static final String[] IHDR_interlaceMethodNames = {
         "none", "adam7"
     };
 
     // Compression methods for iCCP chunk
-    public static final String[] iCCP_compressionMethodNames = {
+    static final String[] iCCP_compressionMethodNames = {
         "deflate"
     };
 
     // Compression methods for zTXt chunk
-    public static final String[] zTXt_compressionMethodNames = {
+    static final String[] zTXt_compressionMethodNames = {
         "deflate"
     };
 
@@ -95,12 +93,12 @@
     public static final int PHYS_UNIT_METER = 1;
 
     // Unit specifiers for pHYs chunk
-    public static final String[] unitSpecifierNames = {
+    static final String[] unitSpecifierNames = {
         "unknown", "meter"
     };
 
     // Rendering intents for sRGB chunk
-    public static final String[] renderingIntentNames = {
+    static final String[] renderingIntentNames = {
         "Perceptual", // 0
         "Relative colorimetric", // 1
         "Saturation", // 2
@@ -109,7 +107,7 @@
     };
 
     // Color space types for Chroma->ColorSpaceType node
-    public static final String[] colorSpaceTypeNames = {
+    static final String[] colorSpaceTypeNames = {
         "GRAY", null, "RGB", "RGB",
         "GRAY", null, "RGB"
     };
--- a/jdk/src/share/classes/com/sun/imageio/plugins/wbmp/WBMPImageReaderSpi.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/com/sun/imageio/plugins/wbmp/WBMPImageReaderSpi.java	Tue Oct 15 13:54:01 2013 +0100
@@ -85,42 +85,42 @@
         ImageInputStream stream = (ImageInputStream)source;
 
         stream.mark();
-        int type = stream.readByte();   // TypeField
-        int fixHeaderField = stream.readByte();
-        // check WBMP "header"
-        if (type != 0 || fixHeaderField != 0) {
-            // while WBMP reader does not support ext WBMP headers
-            stream.reset();
-            return false;
-        }
+        try {
+            int type = stream.readByte();   // TypeField
+            int fixHeaderField = stream.readByte();
+            // check WBMP "header"
+            if (type != 0 || fixHeaderField != 0) {
+                // while WBMP reader does not support ext WBMP headers
+                return false;
+            }
 
-        int width = ReaderUtil.readMultiByteInteger(stream);
-        int height = ReaderUtil.readMultiByteInteger(stream);
-        // check image dimension
-        if (width <= 0 || height <= 0) {
-            stream.reset();
-            return false;
-        }
+            int width = ReaderUtil.readMultiByteInteger(stream);
+            int height = ReaderUtil.readMultiByteInteger(stream);
+            // check image dimension
+            if (width <= 0 || height <= 0) {
+                return false;
+            }
 
-        long dataLength = stream.length();
-        if (dataLength == -1) {
-            // We can't verify that amount of data in the stream
-            // corresponds to image dimension because we do not know
-            // the length of the data stream.
-            // Assuming that wbmp image are used for mobile devices,
-            // let's introduce an upper limit for image dimension.
-            // In case if exact amount of raster data is unknown,
-            // let's reject images with dimension above the limit.
+            long dataLength = stream.length();
+            if (dataLength == -1) {
+                // We can't verify that amount of data in the stream
+                // corresponds to image dimension because we do not know
+                // the length of the data stream.
+                // Assuming that wbmp image are used for mobile devices,
+                // let's introduce an upper limit for image dimension.
+                // In case if exact amount of raster data is unknown,
+                // let's reject images with dimension above the limit.
+                return (width < MAX_WBMP_WIDTH) && (height < MAX_WBMP_HEIGHT);
+            }
+
+            dataLength -= stream.getStreamPosition();
+
+            long scanSize = (width / 8) + ((width % 8) == 0 ? 0 : 1);
+
+            return (dataLength == scanSize * height);
+        } finally {
             stream.reset();
-            return (width < MAX_WBMP_WIDTH) && (height < MAX_WBMP_HEIGHT);
         }
-
-        dataLength -= stream.getStreamPosition();
-        stream.reset();
-
-        long scanSize = (width / 8) + ((width % 8) == 0 ? 0 : 1);
-
-        return (dataLength == scanSize * height);
     }
 
     public ImageReader createReaderInstance(Object extension)
--- a/jdk/src/share/classes/com/sun/media/sound/JSSecurityManager.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/com/sun/media/sound/JSSecurityManager.java	Tue Oct 15 13:54:01 2013 +0100
@@ -187,9 +187,18 @@
 
     static <T> List<T> getProviders(final Class<T> providerClass) {
         List<T> p = new ArrayList<>();
-        // ServiceLoader creates "lazy" iterator instance, so it doesn't,
-        // require do be called from privileged section
-        final Iterator<T> ps = ServiceLoader.load(providerClass).iterator();
+        // ServiceLoader creates "lazy" iterator instance, but it ensures that
+        // next/hasNext run with permissions that are restricted by whatever
+        // creates the ServiceLoader instance, so it requires to be called from
+        // privileged section
+        final PrivilegedAction<Iterator<T>> psAction =
+                new PrivilegedAction<Iterator<T>>() {
+                    @Override
+                    public Iterator<T> run() {
+                        return ServiceLoader.load(providerClass).iterator();
+                    }
+                };
+        final Iterator<T> ps = AccessController.doPrivileged(psAction);
 
         // the iterator's hasNext() method looks through classpath for
         // the provider class names, so it requires read permissions
--- a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/keys/content/x509/XMLX509SKI.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/keys/content/x509/XMLX509SKI.java	Tue Oct 15 13:54:01 2013 +0100
@@ -35,7 +35,7 @@
 /**
  * Handles SubjectKeyIdentifier (SKI) for X.509v3.
  *
- * @see <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/security/cert/X509Extension.html">
+ * @see <A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/security/cert/X509Extension.html">
  * Interface X509Extension</A>
  */
 public class XMLX509SKI extends SignatureElementProxy implements XMLX509DataContent {
--- a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/utils/resolver/implementations/ResolverDirectHTTP.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/utils/resolver/implementations/ResolverDirectHTTP.java	Tue Oct 15 13:54:01 2013 +0100
@@ -56,7 +56,7 @@
  * </PRE>
  *
  * @see <A HREF="http://www.javaworld.com/javaworld/javatips/jw-javatip42_p.html">Java Tip 42: Write Java apps that work with proxy-based firewalls</A>
- * @see <A HREF="http://java.sun.com/j2se/1.4/docs/guide/net/properties.html">SUN J2SE docs for network properties</A>
+ * @see <A HREF="http://docs.oracle.com/javase/1.4.2/docs/guide/net/properties.html">SUN J2SE docs for network properties</A>
  * @see <A HREF="http://metalab.unc.edu/javafaq/javafaq.html#proxy">The JAVA FAQ Question 9.5: How do I make Java work with a proxy server?</A>
  */
 public class ResolverDirectHTTP extends ResourceResolverSpi {
--- a/jdk/src/share/classes/java/applet/Applet.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/java/applet/Applet.java	Tue Oct 15 13:54:01 2013 +0100
@@ -143,11 +143,11 @@
      * For example, suppose an applet is contained
      * within the document:
      * <blockquote><pre>
-     *    http://java.sun.com/products/jdk/1.2/index.html
+     *    http://www.oracle.com/technetwork/java/index.html
      * </pre></blockquote>
      * The document base is:
      * <blockquote><pre>
-     *    http://java.sun.com/products/jdk/1.2/index.html
+     *    http://www.oracle.com/technetwork/java/index.html
      * </pre></blockquote>
      *
      * @return  the {@link java.net.URL} of the document that contains this
--- a/jdk/src/share/classes/java/applet/AppletStub.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/java/applet/AppletStub.java	Tue Oct 15 13:54:01 2013 +0100
@@ -54,11 +54,11 @@
      * For example, suppose an applet is contained
      * within the document:
      * <blockquote><pre>
-     *    http://java.sun.com/products/jdk/1.2/index.html
+     *    http://www.oracle.com/technetwork/java/index.html
      * </pre></blockquote>
      * The document base is:
      * <blockquote><pre>
-     *    http://java.sun.com/products/jdk/1.2/index.html
+     *    http://www.oracle.com/technetwork/java/index.html
      * </pre></blockquote>
      *
      * @return  the {@link java.net.URL} of the document that contains the
--- a/jdk/src/share/classes/java/awt/BorderLayout.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/java/awt/BorderLayout.java	Tue Oct 15 13:54:01 2013 +0100
@@ -96,7 +96,7 @@
  * alt="Diagram of an applet demonstrating BorderLayout.
  *      Each section of the BorderLayout contains a Button corresponding to its position in the layout, one of:
  *      North, West, Center, East, or South."
- * ALIGN=center HSPACE=10 VSPACE=7>
+ * style="float:center; margin: 7px 10px;">
  * <p>
  * The code for this applet is as follows:
  * <p>
--- a/jdk/src/share/classes/java/awt/Button.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/java/awt/Button.java	Tue Oct 15 13:54:01 2013 +0100
@@ -40,7 +40,7 @@
  * under the Solaris operating system:
  * <p>
  * <img src="doc-files/Button-1.gif" alt="The following context describes the graphic"
- * ALIGN=center HSPACE=10 VSPACE=7>
+ * style="float:center; margin: 7px 10px;">
  * <p>
  * The first view shows the button as it appears normally.
  * The second view shows the button
--- a/jdk/src/share/classes/java/awt/Checkbox.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/java/awt/Checkbox.java	Tue Oct 15 13:54:01 2013 +0100
@@ -53,7 +53,7 @@
  * created by this code example:
  * <p>
  * <img src="doc-files/Checkbox-1.gif" alt="The following context describes the graphic."
- * ALIGN=center HSPACE=10 VSPACE=7>
+ * style="float:center; margin: 7px 10px;">
  * <p>
  * The button labeled <code>one</code> is in the "on" state, and the
  * other two are in the "off" state. In this example, which uses the
--- a/jdk/src/share/classes/java/awt/CheckboxGroup.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/java/awt/CheckboxGroup.java	Tue Oct 15 13:54:01 2013 +0100
@@ -48,7 +48,7 @@
  * <p>
  * <img src="doc-files/CheckboxGroup-1.gif"
  * alt="Shows three checkboxes, arranged vertically, labeled one, two, and three. Checkbox one is in the on state."
- * ALIGN=center HSPACE=10 VSPACE=7>
+ * style="float:center; margin: 7px 10px;">
  * <p>
  * @author      Sami Shaio
  * @see         java.awt.Checkbox
--- a/jdk/src/share/classes/java/awt/CheckboxMenuItem.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/java/awt/CheckboxMenuItem.java	Tue Oct 15 13:54:01 2013 +0100
@@ -44,7 +44,7 @@
  * <p>
  * <img src="doc-files/MenuBar-1.gif"
  * alt="Menu labeled Examples, containing items Basic, Simple, Check, and More Examples. The Check item is a CheckBoxMenuItem instance, in the off state."
- * ALIGN=center HSPACE=10 VSPACE=7>
+ * style="float:center; margin: 7px 10px;">
  * <p>
  * The item labeled <code>Check</code> shows a check box menu item
  * in its "off" state.
--- a/jdk/src/share/classes/java/awt/Choice.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/java/awt/Choice.java	Tue Oct 15 13:54:01 2013 +0100
@@ -52,7 +52,7 @@
  * it appears as follows in its normal state:
  * <p>
  * <img src="doc-files/Choice-1.gif" alt="The following text describes the graphic"
- * ALIGN=center HSPACE=10 VSPACE=7>
+ * style="float:center; margin: 7px 10px;">
  * <p>
  * In the picture, <code>"Green"</code> is the current choice.
  * Pushing the mouse button down on the object causes a menu to
--- a/jdk/src/share/classes/java/awt/Color.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/java/awt/Color.java	Tue Oct 15 13:54:01 2013 +0100
@@ -823,7 +823,7 @@
      * <p>
      * The integer that is returned by <code>HSBtoRGB</code> encodes the
      * value of a color in bits 0-23 of an integer value that is the same
-     * format used by the method {@link #getRGB() <code>getRGB</code>}.
+     * format used by the method {@link #getRGB() getRGB}.
      * This integer can be supplied as an argument to the
      * <code>Color</code> constructor that takes a single integer argument.
      * @param     hue   the hue component of the color
--- a/jdk/src/share/classes/java/awt/Component.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/java/awt/Component.java	Tue Oct 15 13:54:01 2013 +0100
@@ -173,10 +173,10 @@
  * <b>Note</b>: For more information on the paint mechanisms utilitized
  * by AWT and Swing, including information on how to write the most
  * efficient painting code, see
- * <a href="http://java.sun.com/products/jfc/tsc/articles/painting/index.html">Painting in AWT and Swing</a>.
+ * <a href="http://www.oracle.com/technetwork/java/painting-140037.html">Painting in AWT and Swing</a>.
  * <p>
  * For details on the focus subsystem, see
- * <a href="http://java.sun.com/docs/books/tutorial/uiswing/misc/focus.html">
+ * <a href="http://docs.oracle.com/javase/tutorial/uiswing/misc/focus.html">
  * How to Use the Focus Subsystem</a>,
  * a section in <em>The Java Tutorial</em>, and the
  * <a href="../../java/awt/doc-files/FocusSpec.html">Focus Specification</a>
@@ -1223,10 +1223,6 @@
      * be called on the toolkit thread.
      */
     final Toolkit getToolkitImpl() {
-        ComponentPeer peer = this.peer;
-        if ((peer != null) && ! (peer instanceof LightweightPeer)){
-            return peer.getToolkit();
-        }
         Container parent = this.parent;
         if (parent != null) {
             return parent.getToolkitImpl();
@@ -3205,7 +3201,7 @@
      * <b>Note</b>: For more information on the paint mechanisms utilitized
      * by AWT and Swing, including information on how to write the most
      * efficient painting code, see
-     * <a href="http://java.sun.com/products/jfc/tsc/articles/painting/index.html">Painting in AWT and Swing</a>.
+     * <a href="http://www.oracle.com/technetwork/java/painting-140037.html">Painting in AWT and Swing</a>.
      *
      * @param g the graphics context to use for painting
      * @see       #update
@@ -3240,7 +3236,7 @@
      * <b>Note</b>: For more information on the paint mechanisms utilitized
      * by AWT and Swing, including information on how to write the most
      * efficient painting code, see
-     * <a href="http://java.sun.com/products/jfc/tsc/articles/painting/index.html">Painting in AWT and Swing</a>.
+     * <a href="http://www.oracle.com/technetwork/java/painting-140037.html">Painting in AWT and Swing</a>.
      *
      * @param g the specified context to use for updating
      * @see       #paint
@@ -3301,7 +3297,7 @@
      * <b>Note</b>: For more information on the paint mechanisms utilitized
      * by AWT and Swing, including information on how to write the most
      * efficient painting code, see
-     * <a href="http://java.sun.com/products/jfc/tsc/articles/painting/index.html">Painting in AWT and Swing</a>.
+     * <a href="http://www.oracle.com/technetwork/java/painting-140037.html">Painting in AWT and Swing</a>.
 
      *
      * @see       #update(Graphics)
@@ -3319,7 +3315,7 @@
      * <b>Note</b>: For more information on the paint mechanisms utilitized
      * by AWT and Swing, including information on how to write the most
      * efficient painting code, see
-     * <a href="http://java.sun.com/products/jfc/tsc/articles/painting/index.html">Painting in AWT and Swing</a>.
+     * <a href="http://www.oracle.com/technetwork/java/painting-140037.html">Painting in AWT and Swing</a>.
      *
      * @param tm maximum time in milliseconds before update
      * @see #paint
@@ -3341,7 +3337,7 @@
      * <b>Note</b>: For more information on the paint mechanisms utilitized
      * by AWT and Swing, including information on how to write the most
      * efficient painting code, see
-     * <a href="http://java.sun.com/products/jfc/tsc/articles/painting/index.html">Painting in AWT and Swing</a>.
+     * <a href="http://www.oracle.com/technetwork/java/painting-140037.html">Painting in AWT and Swing</a>.
      *
      * @param     x   the <i>x</i> coordinate
      * @param     y   the <i>y</i> coordinate
@@ -3366,7 +3362,7 @@
      * <b>Note</b>: For more information on the paint mechanisms utilitized
      * by AWT and Swing, including information on how to write the most
      * efficient painting code, see
-     * <a href="http://java.sun.com/products/jfc/tsc/articles/painting/index.html">Painting in AWT and Swing</a>.
+     * <a href="http://www.oracle.com/technetwork/java/painting-140037.html">Painting in AWT and Swing</a>.
      *
      * @param     tm   maximum time in milliseconds before update
      * @param     x    the <i>x</i> coordinate
--- a/jdk/src/share/classes/java/awt/Container.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/java/awt/Container.java	Tue Oct 15 13:54:01 2013 +0100
@@ -75,7 +75,7 @@
  * (and hence to the bottom of the stacking order).
  * <p>
  * <b>Note</b>: For details on the focus subsystem, see
- * <a href="http://java.sun.com/docs/books/tutorial/uiswing/misc/focus.html">
+ * <a href="http://docs.oracle.com/javase/tutorial/uiswing/misc/focus.html">
  * How to Use the Focus Subsystem</a>,
  * a section in <em>The Java Tutorial</em>, and the
  * <a href="../../java/awt/doc-files/FocusSpec.html">Focus Specification</a>
--- a/jdk/src/share/classes/java/awt/DefaultFocusTraversalPolicy.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/java/awt/DefaultFocusTraversalPolicy.java	Tue Oct 15 13:54:01 2013 +0100
@@ -54,7 +54,7 @@
  * impact, the focusability of the Component itself.
  * <p>
  * Please see
- * <a href="http://java.sun.com/docs/books/tutorial/uiswing/misc/focus.html">
+ * <a href="http://docs.oracle.com/javase/tutorial/uiswing/misc/focus.html">
  * How to Use the Focus Subsystem</a>,
  * a section in <em>The Java Tutorial</em>, and the
  * <a href="../../java/awt/doc-files/FocusSpec.html">Focus Specification</a>
--- a/jdk/src/share/classes/java/awt/DefaultKeyboardFocusManager.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/java/awt/DefaultKeyboardFocusManager.java	Tue Oct 15 13:54:01 2013 +0100
@@ -49,7 +49,7 @@
  * Container's FocusTraversalPolicy.
  * <p>
  * Please see
- * <a href="http://java.sun.com/docs/books/tutorial/uiswing/misc/focus.html">
+ * <a href="http://docs.oracle.com/javase/tutorial/uiswing/misc/focus.html">
  * How to Use the Focus Subsystem</a>,
  * a section in <em>The Java Tutorial</em>, and the
  * <a href="../../java/awt/doc-files/FocusSpec.html">Focus Specification</a>
--- a/jdk/src/share/classes/java/awt/DisplayMode.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/java/awt/DisplayMode.java	Tue Oct 15 13:54:01 2013 +0100
@@ -35,7 +35,7 @@
  * (see {@link GraphicsDevice#isDisplayChangeSupported}).
  * <p>
  * For more information on full-screen exclusive mode API, see the
- * <a href="http://java.sun.com/docs/books/tutorial/extra/fullscreen/index.html">
+ * <a href="http://docs.oracle.com/javase/tutorial/extra/fullscreen/index.html">
  * Full-Screen Exclusive Mode API Tutorial</a>.
  *
  * @see GraphicsDevice
--- a/jdk/src/share/classes/java/awt/EventQueue.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/java/awt/EventQueue.java	Tue Oct 15 13:54:01 2013 +0100
@@ -652,7 +652,7 @@
      * Dispatches an event. The manner in which the event is
      * dispatched depends upon the type of the event and the
      * type of the event's source object:
-     * <p> </p>
+     * <p>
      * <table border=1 summary="Event types, source types, and dispatch methods">
      * <tr>
      *     <th>Event Type</th>
@@ -680,7 +680,7 @@
      *     <td>No action (ignored)</td>
      * </tr>
      * </table>
-     * <p> </p>
+     * <p>
      * @param event an instance of <code>java.awt.AWTEvent</code>,
      *          or a subclass of it
      * @throws NullPointerException if <code>event</code> is <code>null</code>
--- a/jdk/src/share/classes/java/awt/FileDialog.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/java/awt/FileDialog.java	Tue Oct 15 13:54:01 2013 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1995, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 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
@@ -457,9 +457,16 @@
      * specified file. This file becomes the default file if it is set
      * before the file dialog window is first shown.
      * <p>
+     * When the dialog is shown, the specified file is selected. The kind of
+     * selection depends on the file existence, the dialog type, and the native
+     * platform. E.g., the file could be highlighted in the file list, or a
+     * file name editbox could be populated with the file name.
+     * <p>
+     * This method accepts either a full file path, or a file name with an
+     * extension if used together with the {@code setDirectory} method.
+     * <p>
      * Specifying "" as the file is exactly equivalent to specifying
-     * <code>null</code>
-     * as the file.
+     * {@code null} as the file.
      *
      * @param    file   the file being set
      * @see      #getFile
--- a/jdk/src/share/classes/java/awt/FlowLayout.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/java/awt/FlowLayout.java	Tue Oct 15 13:54:01 2013 +0100
@@ -54,7 +54,7 @@
  * <p>
  * <img src="doc-files/FlowLayout-1.gif"
  * ALT="Graphic of Layout for Three Buttons"
- * ALIGN=center HSPACE=10 VSPACE=7>
+ * style="float:center; margin: 7px 10px;">
  * <p>
  * Here is the code for this applet:
  * <p>
--- a/jdk/src/share/classes/java/awt/FocusTraversalPolicy.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/java/awt/FocusTraversalPolicy.java	Tue Oct 15 13:54:01 2013 +0100
@@ -49,7 +49,7 @@
  * policy is used to perform the search operation.
  * <p>
  * Please see
- * <a href="http://java.sun.com/docs/books/tutorial/uiswing/misc/focus.html">
+ * <a href="http://docs.oracle.com/javase/tutorial/uiswing/misc/focus.html">
  * How to Use the Focus Subsystem</a>,
  * a section in <em>The Java Tutorial</em>, and the
  * <a href="../../java/awt/doc-files/FocusSpec.html">Focus Specification</a>
--- a/jdk/src/share/classes/java/awt/Font.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/java/awt/Font.java	Tue Oct 15 13:54:01 2013 +0100
@@ -127,7 +127,7 @@
  * <p>
  * For a discussion of the relative advantages and disadvantages of using
  * physical or logical fonts, see the
- * <a href="http://java.sun.com/j2se/corejava/intl/reference/faqs/index.html#desktop-rendering">Internationalization FAQ</a>
+ * <a href="http://www.oracle.com/technetwork/java/javase/tech/faq-jsp-138165.html">Internationalization FAQ</a>
  * document.
  *
  * <h4>Font Faces and Names</h4>
--- a/jdk/src/share/classes/java/awt/FontMetrics.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/java/awt/FontMetrics.java	Tue Oct 15 13:54:01 2013 +0100
@@ -51,8 +51,8 @@
  * <li>{@link #charsWidth(char[], int, int)}
  * </ul>
  * <p>
- * <img src="doc-files/FontMetrics-1.gif" alt="The letter 'p' showing its 'reference point'" border=15 align
- * ALIGN=right HSPACE=10 VSPACE=7>
+ * <img src="doc-files/FontMetrics-1.gif" alt="The letter 'p' showing its 'reference point'"
+ * style="border:15px; float:right; margin: 7px 10px;">
  * Note that the implementations of these methods are
  * inefficient, so they are usually overridden with more efficient
  * toolkit-specific implementations.
--- a/jdk/src/share/classes/java/awt/Frame.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/java/awt/Frame.java	Tue Oct 15 13:54:01 2013 +0100
@@ -83,7 +83,7 @@
  * <img src="doc-files/MultiScreen.gif"
  * alt="Diagram of virtual device encompassing three physical screens and one primary physical screen. The primary physical screen
  * shows (0,0) coords while a different physical screen shows (-80,-100) coords."
- * ALIGN=center HSPACE=10 VSPACE=7>
+ * style="float:center; margin: 7px 10px;">
  * <p>
  * In such an environment, when calling <code>setLocation</code>,
  * you must pass a virtual coordinate to this method.  Similarly,
--- a/jdk/src/share/classes/java/awt/GraphicsDevice.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/java/awt/GraphicsDevice.java	Tue Oct 15 13:54:01 2013 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2009, 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
@@ -69,7 +69,7 @@
  * </pre>
  * <p>
  * For more information on full-screen exclusive mode API, see the
- * <a href="http://java.sun.com/docs/books/tutorial/extra/fullscreen/index.html">
+ * <a href="http://docs.oracle.com/javase/tutorial/extra/fullscreen/index.html">
  * Full-Screen Exclusive Mode API Tutorial</a>.
  *
  * @see GraphicsEnvironment
@@ -334,11 +334,12 @@
     }
 
     /**
-     * Returns the <code>Window</code> object representing the
+     * Returns the {@code Window} object representing the
      * full-screen window if the device is in full-screen mode.
      *
-     * @return the full-screen window, or <code>null</code> if the device is
-     * not in full-screen mode.
+     * @return the full-screen window, or {@code null} if the device is
+     * not in full-screen mode. The {@code Window} object can differ
+     * from the object previously set by {@code setFullScreenWindow}.
      * @see #setFullScreenWindow(Window)
      * @since 1.4
      */
--- a/jdk/src/share/classes/java/awt/GridBagLayout.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/java/awt/GridBagLayout.java	Tue Oct 15 13:54:01 2013 +0100
@@ -125,9 +125,9 @@
  * <center><table BORDER=0 WIDTH=800
  *        SUMMARY="absolute, relative and baseline values as described above">
  * <tr>
- * <th><P ALIGN="LEFT">Absolute Values</th>
- * <th><P ALIGN="LEFT">Orientation Relative Values</th>
- * <th><P 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>
@@ -201,7 +201,7 @@
  * <tr ALIGN=CENTER>
  * <td>
  * <img src="doc-files/GridBagLayout-baseline.png"
- *  alt="The following text describes this graphic (Figure 1)." ALIGN=center>
+ *  alt="The following text describes this graphic (Figure 1)." style="float:center">
  * </td>
  * </table></center>
  * This layout consists of three components:
@@ -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)." ALIGN=center HSPACE=10 VSPACE=7>
+ * <img src="doc-files/GridBagLayout-1.gif" alt="The preceeding 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)." ALIGN=center HSPACE=10 VSPACE=7>
+ * <img src="doc-files/GridBagLayout-2.gif" alt="The preceeding text describes this graphic (Figure 2)." style="float:center; margin: 7px 10px;">
  * </td>
  * <tr ALIGN=CENTER>
  * <td>Figure 2: Horizontal, Left-to-Right</td>
--- a/jdk/src/share/classes/java/awt/GridLayout.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/java/awt/GridLayout.java	Tue Oct 15 13:54:01 2013 +0100
@@ -55,7 +55,7 @@
  * If the container's <code>ComponentOrientation</code> property is horizontal
  * and right-to-left, the example produces the output shown in Figure 2.
  * <p>
- * <center><table WIDTH=600 summary="layout">
+ * <table style="float:center" WIDTH=600 summary="layout">
  * <tr ALIGN=CENTER>
  * <td><img SRC="doc-files/GridLayout-1.gif"
  *      alt="Shows 6 buttons in rows of 2. Row 1 shows buttons 1 then 2.
@@ -73,7 +73,7 @@
  *
  * <td>Figure 2: Horizontal, Right-to-Left</td>
  * </tr>
- * </table></center>
+ * </table>
  * <p>
  * When both the number of rows and the number of columns have
  * been set to non-zero values, either by a constructor or
--- a/jdk/src/share/classes/java/awt/KeyboardFocusManager.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/java/awt/KeyboardFocusManager.java	Tue Oct 15 13:54:01 2013 +0100
@@ -88,7 +88,7 @@
  * ClassLoader.
  * <p>
  * Please see
- * <a href="http://java.sun.com/docs/books/tutorial/uiswing/misc/focus.html">
+ * <a href="http://docs.oracle.com/javase/tutorial/uiswing/misc/focus.html">
  * How to Use the Focus Subsystem</a>,
  * a section in <em>The Java Tutorial</em>, and the
  * <a href="../../java/awt/doc-files/FocusSpec.html">Focus Specification</a>
@@ -590,6 +590,7 @@
      *
      * @see Component#requestFocus()
      * @see java.awt.event.FocusEvent#FOCUS_LOST
+     * @since 1.8
      */
     public void clearFocusOwner() {
         if (getFocusOwner() != null) {
--- a/jdk/src/share/classes/java/awt/Label.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/java/awt/Label.java	Tue Oct 15 13:54:01 2013 +0100
@@ -46,7 +46,7 @@
  * produces the following labels:
  * <p>
  * <img src="doc-files/Label-1.gif" alt="Two labels: 'Hi There!' and 'Another label'"
- * ALIGN=center HSPACE=10 VSPACE=7>
+ * style="float:center; margin: 7px 10px;">
  *
  * @author      Sami Shaio
  * @since       JDK1.0
--- a/jdk/src/share/classes/java/awt/LinearGradientPaint.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/java/awt/LinearGradientPaint.java	Tue Oct 15 13:54:01 2013 +0100
@@ -94,7 +94,7 @@
  * of the three cycle methods:
  * <p>
  * <center>
- * <img src = "doc-files/LinearGradientPaint.png">
+ * <img src = "doc-files/LinearGradientPaint.png" alt="LinearGradientPaint">
  * </center>
  *
  * @see java.awt.Paint
--- a/jdk/src/share/classes/java/awt/List.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/java/awt/List.java	Tue Oct 15 13:54:01 2013 +0100
@@ -61,7 +61,7 @@
  * scrolling list:
  * <p>
  * <img src="doc-files/List-1.gif"
- * alt="Shows a list containing: Venus, Earth, JavaSoft, and Mars. Javasoft is selected." ALIGN=center HSPACE=10 VSPACE=7>
+ * alt="Shows a list containing: Venus, Earth, JavaSoft, and Mars. Javasoft is selected." style="float:center; margin: 7px 10px;">
  * <p>
  * If the List allows multiple selections, then clicking on
  * an item that is already selected deselects it. In the preceding
--- a/jdk/src/share/classes/java/awt/MenuBar.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/java/awt/MenuBar.java	Tue Oct 15 13:54:01 2013 +0100
@@ -45,7 +45,7 @@
  * <img src="doc-files/MenuBar-1.gif"
  * alt="Diagram of MenuBar containing 2 menus: Examples and Options.
  * Examples menu is expanded showing items: Basic, Simple, Check, and More Examples."
- * ALIGN=center HSPACE=10 VSPACE=7>
+ * style="float:center; margin: 7px 10px;">
  * <p>
  * A menu bar handles keyboard shortcuts for menu items, passing them
  * along to its child menus.
--- a/jdk/src/share/classes/java/awt/MenuItem.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/java/awt/MenuItem.java	Tue Oct 15 13:54:01 2013 +0100
@@ -42,8 +42,8 @@
  * <p>
  * This picture of a menu bar shows five menu items:
  * <IMG SRC="doc-files/MenuBar-1.gif" alt="The following text describes this graphic."
- * ALIGN=CENTER HSPACE=10 VSPACE=7>
- * <br CLEAR=LEFT>
+ * style="float:center; margin: 7px 10px;">
+ * <br style="clear:left;">
  * The first two items are simple menu items, labeled
  * <code>"Basic"</code> and <code>"Simple"</code>.
  * Following these two items is a separator, which is itself
--- a/jdk/src/share/classes/java/awt/RadialGradientPaint.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/java/awt/RadialGradientPaint.java	Tue Oct 15 13:54:01 2013 +0100
@@ -80,14 +80,14 @@
  * 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">
+ * <img src = "doc-files/RadialGradientPaint-3.png" alt="RadialGradientPaint-3">
  * </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">
+ * <img src = "doc-files/RadialGradientPaint-4.png" alt="RadialGradientPaint-4">
  * </center>
  * Note that some minor variations in distances may occur due to sampling at
  * the granularity of a pixel.
@@ -117,7 +117,7 @@
  * (centered) focus for each of the three cycle methods:
  * <p>
  * <center>
- * <img src = "doc-files/RadialGradientPaint-1.png">
+ * <img src = "doc-files/RadialGradientPaint-1.png" alt="RadialGradientPaint-1">
  * </center>
  *
  * <p>
@@ -141,7 +141,7 @@
  * focus for each of the three cycle methods:
  * <p>
  * <center>
- * <img src = "doc-files/RadialGradientPaint-2.png">
+ * <img src = "doc-files/RadialGradientPaint-2.png" alt="RadialGradientPaint-2">
  * </center>
  *
  * @see java.awt.Paint
--- a/jdk/src/share/classes/java/awt/Scrollbar.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/java/awt/Scrollbar.java	Tue Oct 15 13:54:01 2013 +0100
@@ -42,7 +42,7 @@
  * the red, green, and blue components of a color:
  * <p>
  * <img src="doc-files/Scrollbar-1.gif" alt="Image shows 3 vertical sliders, side-by-side."
- * ALIGN=center HSPACE=10 VSPACE=7>
+ * style="float:center; margin: 7px 10px;">
  * <p>
  * Each scroll bar in this example could be created with
  * code similar to the following:
@@ -60,7 +60,7 @@
  * <p>
  * <img src="doc-files/Scrollbar-2.gif"
  * alt="Image shows horizontal slider with starting range of 0 and ending range of 300. The slider thumb is labeled 60."
- * ALIGN=center HSPACE=10 VSPACE=7>
+ * style="float:center; margin: 7px 10px;">
  * <p>
  * The value range represented by the bubble in this example
  * is the <em>visible amount</em>. The horizontal scroll bar
@@ -295,7 +295,7 @@
      * Constructs a new vertical scroll bar.
      * The default properties of the scroll bar are listed in
      * the following table:
-     * <p> </p>
+     * <p>
      * <table border=1 summary="Scrollbar default properties">
      * <tr>
      *   <th>Property</th>
--- a/jdk/src/share/classes/java/awt/SystemTray.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/java/awt/SystemTray.java	Tue Oct 15 13:54:01 2013 +0100
@@ -361,7 +361,7 @@
     /**
      * Adds a {@code PropertyChangeListener} to the list of listeners for the
      * specific property. The following properties are currently supported:
-     * <p> </p>
+     * <p>
      * <table border=1 summary="SystemTray properties">
      * <tr>
      *    <th>Property</th>
@@ -384,7 +384,7 @@
      *        The property is accessed by the {@link #getSystemTray} method.</td>
      * </tr>
      * </table>
-     * <p> </p>
+     * <p>
      * The {@code listener} listens to property changes only in this context.
      * <p>
      * If {@code listener} is {@code null}, no exception is thrown
--- a/jdk/src/share/classes/java/awt/TextArea.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/java/awt/TextArea.java	Tue Oct 15 13:54:01 2013 +0100
@@ -42,7 +42,7 @@
  * The following image shows the appearance of a text area:
  * <p>
  * <img src="doc-files/TextArea-1.gif" alt="A TextArea showing the word 'Hello!'"
- * ALIGN=center HSPACE=10 VSPACE=7>
+ * style="float:center; margin: 7px 10px;">
  * <p>
  * This text area could be created by the following line of code:
  * <p>
--- a/jdk/src/share/classes/java/awt/TextComponent.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/java/awt/TextComponent.java	Tue Oct 15 13:54:01 2013 +0100
@@ -822,37 +822,6 @@
 // Accessibility support
 ////////////////
 
-
-    /**
-     *
-     */
-    int getIndexAtPoint(Point p) {
-        return -1;
-/* To be fully implemented in a future release
-        if (peer == null) {
-            return -1;
-        }
-        TextComponentPeer peer = (TextComponentPeer)this.peer;
-        return peer.getIndexAtPoint(p.x, p.y);
-*/
-    }
-
-
-    /**
-     *
-     */
-    Rectangle getCharacterBounds(int i) {
-        return null;
-/* To be fully implemented in a future release
-        if (peer == null) {
-            return null;
-        }
-        TextComponentPeer peer = (TextComponentPeer)this.peer;
-        return peer.getCharacterBounds(i);
-*/
-    }
-
-
     /**
      * Gets the AccessibleContext associated with this TextComponent.
      * For text components, the AccessibleContext takes the form of an
@@ -963,7 +932,7 @@
          * @return the zero-based index of the character under Point p.
          */
         public int getIndexAtPoint(Point p) {
-            return TextComponent.this.getIndexAtPoint(p);
+            return -1;
         }
 
         /**
@@ -976,7 +945,7 @@
          * @return the screen coordinates of the character's bounding box
          */
         public Rectangle getCharacterBounds(int i) {
-            return TextComponent.this.getCharacterBounds(i);
+            return null;
         }
 
         /**
--- a/jdk/src/share/classes/java/awt/TextField.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/java/awt/TextField.java	Tue Oct 15 13:54:01 2013 +0100
@@ -42,7 +42,7 @@
  * display the predefined text <code>"Hello"</code>.
  * <p>
  * <img src="doc-files/TextField-1.gif" alt="The preceding text describes this image."
- * ALIGN=center HSPACE=10 VSPACE=7>
+ * style="float:center; margin: 7px 10px;">
  * <p>
  * Here is the code that produces these four text fields:
  * <p>
--- a/jdk/src/share/classes/java/awt/Toolkit.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/java/awt/Toolkit.java	Tue Oct 15 13:54:01 2013 +0100
@@ -83,7 +83,7 @@
  * <p>
  * <li>Moving the focus from one component to another.
  * <br>For more information, see
- * <a href="http://java.sun.com/docs/books/tutorial/uiswing/misc/focus.html#transferTiming">Timing
+ * <a href="http://docs.oracle.com/javase/tutorial/uiswing/misc/focus.html#transferTiming">Timing
  * Focus Transfers</a>, a section in
  * <a href="http://java.sun.com/docs/books/tutorial/uiswing/">The Swing
  * Tutorial</a>.
--- a/jdk/src/share/classes/java/awt/Window.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/java/awt/Window.java	Tue Oct 15 13:54:01 2013 +0100
@@ -85,7 +85,7 @@
  * <p>
  * <img src="doc-files/MultiScreen.gif"
  * alt="Diagram shows virtual device containing 4 physical screens. Primary physical screen shows coords (0,0), other screen shows (-80,-100)."
- * ALIGN=center HSPACE=10 VSPACE=7>
+ * style="float:center; margin: 7px 10px;">
  * <p>
  * In such an environment, when calling {@code setLocation},
  * you must pass a virtual coordinate to this method.  Similarly,
@@ -226,6 +226,7 @@
     boolean     syncLWRequests = false;
     transient boolean beforeFirstShow = true;
     private transient boolean disposing = false;
+    transient WindowDisposerRecord disposerRecord = null;
 
     static final int OPENED = 0x01;
 
@@ -437,18 +438,28 @@
 
     transient Object anchor = new Object();
     static class WindowDisposerRecord implements sun.java2d.DisposerRecord {
-        final WeakReference<Window> owner;
+        WeakReference<Window> owner;
         final WeakReference<Window> weakThis;
         final WeakReference<AppContext> context;
+
         WindowDisposerRecord(AppContext context, Window victim) {
-            owner = new WeakReference<Window>(victim.getOwner());
             weakThis = victim.weakThis;
             this.context = new WeakReference<AppContext>(context);
         }
+
+        public void updateOwner() {
+            Window victim = weakThis.get();
+            owner = (victim == null)
+                    ? null
+                    : new WeakReference<Window>(victim.getOwner());
+        }
+
         public void dispose() {
-            Window parent = owner.get();
-            if (parent != null) {
-                parent.removeOwnedWindow(weakThis);
+            if (owner != null) {
+                Window parent = owner.get();
+                if (parent != null) {
+                    parent.removeOwnedWindow(weakThis);
+                }
             }
             AppContext ac = context.get();
             if (null != ac) {
@@ -502,6 +513,8 @@
         }
 
         modalExclusionType = Dialog.ModalExclusionType.NO_EXCLUDE;
+        disposerRecord = new WindowDisposerRecord(appContext, this);
+        sun.java2d.Disposer.addRecord(anchor, disposerRecord);
 
         SunToolkit.checkAndSetPolicy(this);
     }
@@ -617,11 +630,16 @@
         this.parent = owner;
         if (owner != null) {
             owner.addOwnedWindow(weakThis);
+            if (owner.isAlwaysOnTop()) {
+                try {
+                    setAlwaysOnTop(true);
+                } catch (SecurityException ignore) {
+                }
+            }
         }
 
-        // Fix for 6758673: this call is moved here from init(gc), because
         // WindowDisposerRecord requires a proper value of parent field.
-        Disposer.addRecord(anchor, new WindowDisposerRecord(appContext, this));
+        disposerRecord.updateOwner();
     }
 
     /**
@@ -1022,7 +1040,9 @@
             closeSplashScreen();
             Dialog.checkShouldBeBlocked(this);
             super.show();
-            locationByPlatform = false;
+            synchronized (getTreeLock()) {
+                this.locationByPlatform = false;
+            }
             for (int i = 0; i < ownedWindowList.size(); i++) {
                 Window child = ownedWindowList.elementAt(i).get();
                 if ((child != null) && child.showWithParent) {
@@ -1095,6 +1115,9 @@
             modalBlocker.unblockWindow(this);
         }
         super.hide();
+        synchronized (getTreeLock()) {
+            this.locationByPlatform = false;
+        }
     }
 
     final void clearMostRecentFocusOwnerOnHide() {
@@ -2180,8 +2203,8 @@
      * windows.  To detect if always-on-top windows are supported by the
      * current platform, use {@link Toolkit#isAlwaysOnTopSupported()} and
      * {@link Window#isAlwaysOnTopSupported()}.  If always-on-top mode
-     * isn't supported by the toolkit or for this window, calling this
-     * method has no effect.
+     * isn't supported for this window or this window's toolkit does not
+     * support always-on-top windows, calling this method has no effect.
      * <p>
      * If a SecurityManager is installed, the calling thread must be
      * granted the AWTPermission "setWindowAlwaysOnTop" in
@@ -2194,11 +2217,13 @@
      *        windows
      * @throws SecurityException if the calling thread does not have
      *         permission to set the value of always-on-top property
+     *
      * @see #isAlwaysOnTop
      * @see #toFront
      * @see #toBack
      * @see AWTPermission
      * @see #isAlwaysOnTopSupported
+     * @see #getToolkit
      * @see Toolkit#isAlwaysOnTopSupported
      * @since 1.5
      */
@@ -2224,6 +2249,15 @@
             }
             firePropertyChange("alwaysOnTop", oldAlwaysOnTop, alwaysOnTop);
         }
+        for (WeakReference<Window> ref : ownedWindowList) {
+            Window window = ref.get();
+            if (window != null) {
+                try {
+                    window.setAlwaysOnTop(alwaysOnTop);
+                } catch (SecurityException ignore) {
+                }
+            }
+        }
     }
 
     /**
@@ -2231,11 +2265,13 @@
      * window. Some platforms may not support always-on-top windows, some
      * may support only some kinds of top-level windows; for example,
      * a platform may not support always-on-top modal dialogs.
-     * @return {@code true}, if the always-on-top mode is
-     *         supported by the toolkit and for this window,
-     *         {@code false}, if always-on-top mode is not supported
-     *         for this window or toolkit doesn't support always-on-top windows.
+     *
+     * @return {@code true}, if the always-on-top mode is supported for
+     *         this window and this window's toolkit supports always-on-top windows,
+     *         {@code false} otherwise
+     *
      * @see #setAlwaysOnTop(boolean)
+     * @see #getToolkit
      * @see Toolkit#isAlwaysOnTopSupported
      * @since 1.6
      */
@@ -2774,6 +2810,7 @@
     void connectOwnedWindow(Window child) {
         child.parent = this;
         addOwnedWindow(child.weakThis);
+        child.disposerRecord.updateOwner();
     }
 
     private void addToWindowList() {
@@ -2936,7 +2973,8 @@
         weakThis = new WeakReference<>(this);
 
         anchor = new Object();
-        sun.java2d.Disposer.addRecord(anchor, new WindowDisposerRecord(appContext, this));
+        disposerRecord = new WindowDisposerRecord(appContext, this);
+        sun.java2d.Disposer.addRecord(anchor, disposerRecord);
 
         addToWindowList();
         initGC(null);
--- a/jdk/src/share/classes/java/awt/datatransfer/DataFlavor.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/java/awt/datatransfer/DataFlavor.java	Tue Oct 15 13:54:01 2013 +0100
@@ -93,7 +93,7 @@
  * the same results.
  * <p>
  * For more information on the using data transfer with Swing see
- * the <a href="http://java.sun.com/docs/books/tutorial/uiswing/misc/dnd.html">
+ * the <a href="http://docs.oracle.com/javase/tutorial/uiswing/dnd/index.html">
  * How to Use Drag and Drop and Data Transfer</a>,
  * section in <em>Java Tutorial</em>.
  *
--- a/jdk/src/share/classes/java/awt/datatransfer/Transferable.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/java/awt/datatransfer/Transferable.java	Tue Oct 15 13:54:01 2013 +0100
@@ -32,7 +32,7 @@
  * for a transfer operation.
  * <p>
  * For information on using data transfer with Swing, see
- * <a href="http://java.sun.com/docs/books/tutorial/uiswing/misc/dnd.html">
+ * <a href="http://docs.oracle.com/javase/tutorial/uiswing/dnd/index.html">
  * How to Use Drag and Drop and Data Transfer</a>,
  * a section in <em>The Java Tutorial</em>, for more information.
  *
--- a/jdk/src/share/classes/java/awt/event/ActionEvent.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/java/awt/event/ActionEvent.java	Tue Oct 15 13:54:01 2013 +0100
@@ -52,7 +52,7 @@
  * in the range from {@code ACTION_FIRST} to {@code ACTION_LAST}.
  *
  * @see ActionListener
- * @see <a href="http://java.sun.com/docs/books/tutorial/uiswing/events/actionlistener.html">Tutorial: How to Write an Action Listener</a>
+ * @see <a href="http://docs.oracle.com/javase/tutorial/uiswing/events/actionlistener.html">Tutorial: How to Write an Action Listener</a>
  *
  * @author Carl Quinn
  * @since 1.1
--- a/jdk/src/share/classes/java/awt/event/ActionListener.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/java/awt/event/ActionListener.java	Tue Oct 15 13:54:01 2013 +0100
@@ -37,7 +37,7 @@
  * invoked.
  *
  * @see ActionEvent
- * @see <a href="http://java.sun.com/docs/books/tutorial/post1.0/ui/eventmodel.html">Tutorial: Java 1.1 Event Model</a>
+ * @see <a href="http://docs.oracle.com/javase/tutorial/uiswing/events/actionlistener.html">How to Write an Action Listener</a>
  *
  * @author Carl Quinn
  * @since 1.1
--- a/jdk/src/share/classes/java/awt/event/ComponentAdapter.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/java/awt/event/ComponentAdapter.java	Tue Oct 15 13:54:01 2013 +0100
@@ -44,7 +44,7 @@
  *
  * @see ComponentEvent
  * @see ComponentListener
- * @see <a href="http://java.sun.com/docs/books/tutorial/post1.0/ui/componentlistener.html">Tutorial: Writing a Component Listener</a>
+ * @see <a href="http://docs.oracle.com/javase/tutorial/uiswing/events/componentlistener.html">Tutorial: Writing a Component Listener</a>
  *
  * @author Carl Quinn
  * @since 1.1
--- a/jdk/src/share/classes/java/awt/event/ComponentEvent.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/java/awt/event/ComponentEvent.java	Tue Oct 15 13:54:01 2013 +0100
@@ -60,7 +60,7 @@
  *
  * @see ComponentAdapter
  * @see ComponentListener
- * @see <a href="http://java.sun.com/docs/books/tutorial/post1.0/ui/componentlistener.html">Tutorial: Writing a Component Listener</a>
+ * @see <a href="http://docs.oracle.com/javase/tutorial/uiswing/events/componentlistener.html">Tutorial: Writing a Component Listener</a>
  *
  * @author Carl Quinn
  * @since 1.1
--- a/jdk/src/share/classes/java/awt/event/ComponentListener.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/java/awt/event/ComponentListener.java	Tue Oct 15 13:54:01 2013 +0100
@@ -46,7 +46,7 @@
  *
  * @see ComponentAdapter
  * @see ComponentEvent
- * @see <a href="http://java.sun.com/docs/books/tutorial/post1.0/ui/componentlistener.html">Tutorial: Writing a Component Listener</a>
+ * @see <a href="http://docs.oracle.com/javase/tutorial/uiswing/events/componentlistener.html">Tutorial: Writing a Component Listener</a>
  *
  * @author Carl Quinn
  * @since 1.1
--- a/jdk/src/share/classes/java/awt/event/ContainerAdapter.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/java/awt/event/ContainerAdapter.java	Tue Oct 15 13:54:01 2013 +0100
@@ -44,7 +44,7 @@
  *
  * @see ContainerEvent
  * @see ContainerListener
- * @see <a href="http://java.sun.com/docs/books/tutorial/post1.0/ui/containerlistener.html">Tutorial: Writing a Container Listener</a>
+ * @see <a href="http://docs.oracle.com/javase/tutorial/uiswing/events/containerlistener.html">Tutorial: Writing a Container Listener</a>
  *
  * @author Amy Fowler
  * @since 1.1
--- a/jdk/src/share/classes/java/awt/event/ContainerEvent.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/java/awt/event/ContainerEvent.java	Tue Oct 15 13:54:01 2013 +0100
@@ -52,7 +52,7 @@
  *
  * @see ContainerAdapter
  * @see ContainerListener
- * @see <a href="http://java.sun.com/docs/books/tutorial/post1.0/ui/containerlistener.html">Tutorial: Writing a Container Listener</a>
+ * @see <a href="http://docs.oracle.com/javase/tutorial/uiswing/events/containerlistener.html">Tutorial: Writing a Container Listener</a>
  *
  * @author Tim Prinzing
  * @author Amy Fowler
--- a/jdk/src/share/classes/java/awt/event/ContainerListener.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/java/awt/event/ContainerListener.java	Tue Oct 15 13:54:01 2013 +0100
@@ -46,7 +46,7 @@
  *
  * @see ContainerAdapter
  * @see ContainerEvent
- * @see <a href="http://java.sun.com/docs/books/tutorial/post1.0/ui/containerlistener.html">Tutorial: Writing a Container Listener</a>
+ * @see <a href="http://docs.oracle.com/javase/tutorial/uiswing/events/containerlistener.html">Tutorial: Writing a Container Listener</a>
  *
  * @author Tim Prinzing
  * @author Amy Fowler
--- a/jdk/src/share/classes/java/awt/event/FocusAdapter.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/java/awt/event/FocusAdapter.java	Tue Oct 15 13:54:01 2013 +0100
@@ -44,7 +44,7 @@
  *
  * @see FocusEvent
  * @see FocusListener
- * @see <a href="http://java.sun.com/docs/books/tutorial/post1.0/ui/focuslistener.html">Tutorial: Writing a Focus Listener</a>
+ * @see <a href="http://docs.oracle.com/javase/tutorial/uiswing/events/focuslistener.html">Tutorial: Writing a Focus Listener</a>
  *
  * @author Carl Quinn
  * @since 1.1
--- a/jdk/src/share/classes/java/awt/event/FocusEvent.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/java/awt/event/FocusEvent.java	Tue Oct 15 13:54:01 2013 +0100
@@ -57,7 +57,7 @@
  *
  * @see FocusAdapter
  * @see FocusListener
- * @see <a href="http://java.sun.com/docs/books/tutorial/post1.0/ui/focuslistener.html">Tutorial: Writing a Focus Listener</a>
+ * @see <a href="http://docs.oracle.com/javase/tutorial/uiswing/events/focuslistener.html">Tutorial: Writing a Focus Listener</a>
  *
  * @author Carl Quinn
  * @author Amy Fowler
--- a/jdk/src/share/classes/java/awt/event/FocusListener.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/java/awt/event/FocusListener.java	Tue Oct 15 13:54:01 2013 +0100
@@ -42,7 +42,7 @@
  *
  * @see FocusAdapter
  * @see FocusEvent
- * @see <a href="http://java.sun.com/docs/books/tutorial/post1.0/ui/focuslistener.html">Tutorial: Writing a Focus Listener</a>
+ * @see <a href="http://docs.oracle.com/javase/tutorial/uiswing/events/focuslistener.html">Tutorial: Writing a Focus Listener</a>
  *
  * @author Carl Quinn
  * @since 1.1
--- a/jdk/src/share/classes/java/awt/event/InputEvent.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/java/awt/event/InputEvent.java	Tue Oct 15 13:54:01 2013 +0100
@@ -445,7 +445,7 @@
      * <PRE>
      *    int onmask = SHIFT_DOWN_MASK | BUTTON1_DOWN_MASK;
      *    int offmask = CTRL_DOWN_MASK;
-     *    if ((event.getModifiersEx() & (onmask | offmask)) == onmask) {
+     *    if ((event.getModifiersEx() &amp; (onmask | offmask)) == onmask) {
      *        ...
      *    }
      * </PRE>
--- a/jdk/src/share/classes/java/awt/event/ItemEvent.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/java/awt/event/ItemEvent.java	Tue Oct 15 13:54:01 2013 +0100
@@ -58,7 +58,7 @@
  *
  * @see java.awt.ItemSelectable
  * @see ItemListener
- * @see <a href="http://java.sun.com/docs/books/tutorial/post1.0/ui/itemlistener.html">Tutorial: Writing an Item Listener</a>
+ * @see <a href="http://docs.oracle.com/javase/tutorial/uiswing/events/itemlistener.html">Tutorial: Writing an Item Listener</a>
  *
  * @since 1.1
  */
--- a/jdk/src/share/classes/java/awt/event/ItemListener.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/java/awt/event/ItemListener.java	Tue Oct 15 13:54:01 2013 +0100
@@ -40,7 +40,7 @@
  *
  * @see java.awt.ItemSelectable
  * @see ItemEvent
- * @see <a href="http://java.sun.com/docs/books/tutorial/post1.0/ui/itemlistener.html">Tutorial: Writing an Item Listener</a>
+ * @see <a href="http://docs.oracle.com/javase/tutorial/uiswing/events/itemlistener.html">Tutorial: Writing an Item Listener</a>
  *
  * @since 1.1
  */
--- a/jdk/src/share/classes/java/awt/event/KeyAdapter.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/java/awt/event/KeyAdapter.java	Tue Oct 15 13:54:01 2013 +0100
@@ -46,7 +46,7 @@
  *
  * @see KeyEvent
  * @see KeyListener
- * @see <a href="http://java.sun.com/docs/books/tutorial/post1.0/ui/keylistener.html">Tutorial: Writing a Key Listener</a>
+ * @see <a href="http://docs.oracle.com/javase/tutorial/uiswing/events/keylistener.html">Tutorial: Writing a Key Listener</a>
  *
  * @since 1.1
  */
--- a/jdk/src/share/classes/java/awt/event/KeyEvent.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/java/awt/event/KeyEvent.java	Tue Oct 15 13:54:01 2013 +0100
@@ -145,7 +145,7 @@
  *
  * @see KeyAdapter
  * @see KeyListener
- * @see <a href="http://java.sun.com/docs/books/tutorial/post1.0/ui/keylistener.html">Tutorial: Writing a Key Listener</a>
+ * @see <a href="http://docs.oracle.com/javase/tutorial/uiswing/events/keylistener.html">Tutorial: Writing a Key Listener</a>
  *
  * @since 1.1
  */
--- a/jdk/src/share/classes/java/awt/event/MouseAdapter.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/java/awt/event/MouseAdapter.java	Tue Oct 15 13:54:01 2013 +0100
@@ -63,7 +63,7 @@
  * @see MouseListener
  * @see MouseMotionListener
  * @see MouseWheelListener
- * @see <a href="http://java.sun.com/docs/books/tutorial/post1.0/ui/mouselistener.html">Tutorial: Writing a Mouse Listener</a>
+ * @see <a href="http://docs.oracle.com/javase/tutorial/uiswing/events/mouselistener.html">Tutorial: Writing a Mouse Listener</a>
  *
  * @since 1.1
  */
--- a/jdk/src/share/classes/java/awt/event/MouseEvent.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/java/awt/event/MouseEvent.java	Tue Oct 15 13:54:01 2013 +0100
@@ -146,12 +146,12 @@
  * {@link InputEvent#getMaskForButton(int) getMaskForButton(button)} method may be used
  * as button masks.
  * <p>
- * <code>MOUSE_DRAGGED</code> events are delivered to the <code>Component</code>
+ * {@code MOUSE_DRAGGED} events are delivered to the {@code Component}
  * in which the mouse button was pressed until the mouse button is released
  * (regardless of whether the mouse position is within the bounds of the
- * <code>Component</code>).  Due to platform-dependent Drag&Drop implementations,
- * <code>MOUSE_DRAGGED</code> events may not be delivered during a native
- * Drag&Drop operation.
+ * {@code Component}).  Due to platform-dependent Drag&amp;Drop implementations,
+ * {@code MOUSE_DRAGGED} events may not be delivered during a native
+ * Drag&amp;Drop operation.
  *
  * In a multi-screen environment mouse drag events are delivered to the
  * <code>Component</code> even if the mouse position is outside the bounds of the
@@ -182,8 +182,8 @@
  * @see MouseMotionAdapter
  * @see MouseMotionListener
  * @see MouseWheelListener
- * @see <a href="http://java.sun.com/docs/books/tutorial/post1.0/ui/mouselistener.html">Tutorial: Writing a Mouse Listener</a>
- * @see <a href="http://java.sun.com/docs/books/tutorial/post1.0/ui/mousemotionlistener.html">Tutorial: Writing a Mouse Motion Listener</a>
+ * @see <a href="http://docs.oracle.com/javase/tutorial/uiswing/events/mouselistener.html">Tutorial: Writing a Mouse Listener</a>
+ * @see <a href="http://docs.oracle.com/javase/tutorial/uiswing/events/mousemotionlistener.html">Tutorial: Writing a Mouse Motion Listener</a>
  *
  * @since 1.1
  */
@@ -327,7 +327,7 @@
      * For all other events the count will be 0.
      *
      * @serial
-     * @see #getClickCount().
+     * @see #getClickCount()
      */
     int clickCount;
 
@@ -403,7 +403,7 @@
 
     /**
      * Initialize JNI field and method IDs for fields that may be
-       accessed from C.
+     *  accessed from C.
      */
     private static native void initIDs();
 
--- a/jdk/src/share/classes/java/awt/event/MouseListener.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/java/awt/event/MouseListener.java	Tue Oct 15 13:54:01 2013 +0100
@@ -50,7 +50,7 @@
  *
  * @see MouseAdapter
  * @see MouseEvent
- * @see <a href="http://java.sun.com/docs/books/tutorial/post1.0/ui/mouselistener.html">Tutorial: Writing a Mouse Listener</a>
+ * @see <a href="http://docs.oracle.com/javase/tutorial/uiswing/events/mouselistener.html">Tutorial: Writing a Mouse Listener</a>
  *
  * @since 1.1
  */
--- a/jdk/src/share/classes/java/awt/event/MouseMotionAdapter.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/java/awt/event/MouseMotionAdapter.java	Tue Oct 15 13:54:01 2013 +0100
@@ -49,7 +49,7 @@
  *
  * @see MouseEvent
  * @see MouseMotionListener
- * @see <a href="http://java.sun.com/docs/books/tutorial/post1.0/ui/mousemotionlistener.html">Tutorial: Writing a Mouse Motion Listener</a>
+ * @see <a href="http://docs.oracle.com/javase/tutorial/uiswing/events/mousemotionlistener.html">Tutorial: Writing a Mouse Motion Listener</a>
  *
  * @since 1.1
  */
--- a/jdk/src/share/classes/java/awt/event/MouseMotionListener.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/java/awt/event/MouseMotionListener.java	Tue Oct 15 13:54:01 2013 +0100
@@ -47,7 +47,7 @@
  *
  * @see MouseMotionAdapter
  * @see MouseEvent
- * @see <a href="http://java.sun.com/docs/books/tutorial/post1.0/ui/mousemotionlistener.html">Tutorial: Writing a Mouse Motion Listener</a>
+ * @see <a href="http://docs.oracle.com/javase/tutorial/uiswing/events/mousemotionlistener.html">Tutorial: Writing a Mouse Motion Listener</a>
  *
  * @since 1.1
  */
--- a/jdk/src/share/classes/java/awt/event/WindowAdapter.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/java/awt/event/WindowAdapter.java	Tue Oct 15 13:54:01 2013 +0100
@@ -45,7 +45,7 @@
  *
  * @see WindowEvent
  * @see WindowListener
- * @see <a href="http://java.sun.com/docs/books/tutorial/post1.0/ui/windowlistener.html">Tutorial: Writing a Window Listener</a>
+ * @see <a href="http://docs.oracle.com/javase/tutorial/uiswing/events/windowlistener.html">Tutorial: Writing a Window Listener</a>
  *
  * @author Carl Quinn
  * @author Amy Fowler
--- a/jdk/src/share/classes/java/awt/event/WindowEvent.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/java/awt/event/WindowEvent.java	Tue Oct 15 13:54:01 2013 +0100
@@ -52,7 +52,7 @@
  *
  * @see WindowAdapter
  * @see WindowListener
- * @see <a href="http://java.sun.com/docs/books/tutorial/post1.0/ui/windowlistener.html">Tutorial: Writing a Window Listener</a>
+ * @see <a href="http://docs.oracle.com/javase/tutorial/uiswing/events/windowlistener.html">Tutorial: Writing a Window Listener</a>
  *
  * @since JDK1.1
  */
--- a/jdk/src/share/classes/java/awt/event/WindowFocusListener.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/java/awt/event/WindowFocusListener.java	Tue Oct 15 13:54:01 2013 +0100
@@ -47,7 +47,7 @@
  *
  * @see WindowAdapter
  * @see WindowEvent
- * @see <a href="http://java.sun.com/docs/books/tutorial/post1.0/ui/windowlistener.html">Tutorial: Writing a Window Listener</a>
+ * @see <a href="http://docs.oracle.com/javase/tutorial/uiswing/events/windowlistener.html">Tutorial: Writing a Window Listener</a>
  *
  * @since 1.4
  */
--- a/jdk/src/share/classes/java/awt/event/WindowListener.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/java/awt/event/WindowListener.java	Tue Oct 15 13:54:01 2013 +0100
@@ -44,7 +44,7 @@
  *
  * @see WindowAdapter
  * @see WindowEvent
- * @see <a href="http://java.sun.com/docs/books/tutorial/uiswing/events/windowlistener.html">Tutorial: How to Write Window Listeners</a>
+ * @see <a href="http://docs.oracle.com/javase/tutorial/uiswing/events/windowlistener.html">Tutorial: How to Write Window Listeners</a>
  *
  * @since 1.1
  */
--- a/jdk/src/share/classes/java/awt/font/TextAttribute.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/java/awt/font/TextAttribute.java	Tue Oct 15 13:54:01 2013 +0100
@@ -97,10 +97,10 @@
  * <h4>Summary of attributes</h4>
  * <p>
  * <font size="-1">
- * <table align="center" border="0" cellspacing="0" cellpadding="2" width="%95"
+ * <table style="float:center" border="0" cellspacing="0" cellpadding="2" width="%95"
  *     summary="Key, value type, principal constants, and default value
  *     behavior of all TextAttributes">
- * <tr bgcolor="#ccccff">
+ * <tr style="background-color:#ccccff">
  * <th valign="TOP" align="CENTER">Key</th>
  * <th valign="TOP" align="CENTER">Value Type</th>
  * <th valign="TOP" align="CENTER">Principal Constants</th>
@@ -115,7 +115,7 @@
 </td>
  * <td valign="TOP">"Default" (use platform default)</td>
  * </tr>
- * <tr bgcolor="#eeeeff">
+ * <tr style="background-color:#eeeeff">
  * <td valign="TOP">{@link #WEIGHT}</td>
  * <td valign="TOP">Number</td>
  * <td valign="TOP">WEIGHT_REGULAR, WEIGHT_BOLD</td>
@@ -127,7 +127,7 @@
  * <td valign="TOP">WIDTH_CONDENSED, WIDTH_REGULAR,<br>WIDTH_EXTENDED</td>
  * <td valign="TOP">WIDTH_REGULAR</td>
  * </tr>
- * <tr bgcolor="#eeeeff">
+ * <tr style="background-color:#eeeeff">
  * <td valign="TOP">{@link #POSTURE}</td>
  * <td valign="TOP">Number</td>
  * <td valign="TOP">POSTURE_REGULAR, POSTURE_OBLIQUE</td>
@@ -139,7 +139,7 @@
  * <td valign="TOP">none</td>
  * <td valign="TOP">12.0</td>
  * </tr>
- * <tr bgcolor="#eeeeff">
+ * <tr style="background-color:#eeeeff">
  * <td valign="TOP">{@link #TRANSFORM}</td>
  * <td valign="TOP">{@link TransformAttribute}</td>
  * <td valign="TOP">See TransformAttribute {@link TransformAttribute#IDENTITY IDENTITY}</td>
@@ -151,7 +151,7 @@
  * <td valign="TOP">SUPERSCRIPT_SUPER, SUPERSCRIPT_SUB</td>
  * <td valign="TOP">0 (use the standard glyphs and metrics)</td>
  * </tr>
- * <tr bgcolor="#eeeeff">
+ * <tr style="background-color:#eeeeff">
  * <td valign="TOP">{@link #FONT}</td>
  * <td valign="TOP">{@link java.awt.Font}</td>
  * <td valign="TOP">none</td>
@@ -163,7 +163,7 @@
  * <td valign="TOP">none</td>
  * <td valign="TOP">null (draw text using font glyphs)</td>
  * </tr>
- * <tr bgcolor="#eeeeff">
+ * <tr style="background-color:#eeeeff">
  * <td valign="TOP">{@link #FOREGROUND}</td>
  * <td valign="TOP">{@link java.awt.Paint}</td>
  * <td valign="TOP">none</td>
@@ -175,7 +175,7 @@
  * <td valign="TOP">none</td>
  * <td valign="TOP">null (do not render background)</td>
  * </tr>
- * <tr bgcolor="#eeeeff">
+ * <tr style="background-color:#eeeeff">
  * <td valign="TOP">{@link #UNDERLINE}</td>
  * <td valign="TOP">Integer</td>
  * <td valign="TOP">UNDERLINE_ON</td>
@@ -187,7 +187,7 @@
  * <td valign="TOP">STRIKETHROUGH_ON</td>
  * <td valign="TOP">false (do not render strikethrough)</td>
  * </tr>
- * <tr bgcolor="#eeeeff">
+ * <tr style="background-color:#eeeeff">
  * <td valign="TOP">{@link #RUN_DIRECTION}</td>
  * <td valign="TOP">Boolean</td>
  * <td valign="TOP">RUN_DIRECTION_LTR<br>RUN_DIRECTION_RTL</td>
@@ -199,7 +199,7 @@
  * <td valign="TOP">none</td>
  * <td valign="TOP">0 (use base line direction)</td>
  * </tr>
- * <tr bgcolor="#eeeeff">
+ * <tr style="background-color:#eeeeff">
  * <td valign="TOP">{@link #JUSTIFICATION}</td>
  * <td valign="TOP">Number</td>
  * <td valign="TOP">JUSTIFICATION_FULL</td>
@@ -211,7 +211,7 @@
  * <td valign="TOP">(see class)</td>
  * <td valign="TOP">null (do not apply input highlighting)</td>
  * </tr>
- * <tr bgcolor="#eeeeff">
+ * <tr style="background-color:#eeeeff">
  * <td valign="TOP">{@link #INPUT_METHOD_UNDERLINE}</td>
  * <td valign="TOP">Integer</td>
  * <td valign="TOP">UNDERLINE_LOW_ONE_PIXEL,<br>UNDERLINE_LOW_TWO_PIXEL</td>
@@ -223,7 +223,7 @@
  * <td valign="TOP">SWAP_COLORS_ON</td>
  * <td valign="TOP">false (do not swap colors)</td>
  * </tr>
- * <tr bgcolor="#eeeeff">
+ * <tr style="background-color:#eeeeff">
  * <td valign="TOP">{@link #NUMERIC_SHAPING}</td>
  * <td valign="TOP">{@link java.awt.font.NumericShaper}</td>
  * <td valign="TOP">none</td>
@@ -235,7 +235,7 @@
  * <td valign="TOP">KERNING_ON</td>
  * <td valign="TOP">0 (do not request kerning)</td>
  * </tr>
- * <tr bgcolor="#eeeeff">
+ * <tr style="background-color:#eeeeff">
  * <td valign="TOP">{@link #LIGATURES}</td>
  * <td valign="TOP">Integer</td>
  * <td valign="TOP">LIGATURES_ON</td>
--- a/jdk/src/share/classes/java/awt/geom/AffineTransform.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/java/awt/geom/AffineTransform.java	Tue Oct 15 13:54:01 2013 +0100
@@ -47,7 +47,7 @@
  *      [ 1 ]   [   0    0    1   ] [ 1 ]   [         1         ]
  * </pre>
  * <p>
- * <a name="quadrantapproximation"><h4>Handling 90-Degree Rotations</h4></a>
+ * <a name="quadrantapproximation"></a><h4>Handling 90-Degree Rotations</h4>
  * <p>
  * In some variations of the <code>rotate</code> methods in the
  * <code>AffineTransform</code> class, a double-precision argument
--- a/jdk/src/share/classes/java/awt/geom/Line2D.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/java/awt/geom/Line2D.java	Tue Oct 15 13:54:01 2013 +0100
@@ -35,7 +35,7 @@
  * default coordinate system called <i>user space</i> in which the y-axis
  * values increase downward and x-axis values increase to the right.  For
  * more information on the user space coordinate system, see the
- * <a href="http://java.sun.com/j2se/1.3/docs/guide/2d/spec/j2d-intro.fm2.html#61857">
+ * <a href="http://docs.oracle.com/javase/1.3/docs/guide/2d/spec/j2d-intro.fm2.html#61857">
  * Coordinate Systems</a> section of the Java 2D Programmer's Guide.
  * <p>
  * This class is only the abstract superclass for all objects that
@@ -82,7 +82,7 @@
         public float y2;
 
         /**
-         * Constructs and initializes a Line with coordinates (0, 0) -> (0, 0).
+         * Constructs and initializes a Line with coordinates (0, 0) &rarr; (0, 0).
          * @since 1.2
          */
         public Float() {
@@ -249,7 +249,7 @@
         public double y2;
 
         /**
-         * Constructs and initializes a Line with coordinates (0, 0) -> (0, 0).
+         * Constructs and initializes a Line with coordinates (0, 0) &rarr; (0, 0).
          * @since 1.2
          */
         public Double() {
@@ -623,7 +623,7 @@
      *           specified line segment
      * @param y2 the Y coordinate of the end point of the
      *           specified line segment
-     * @return <true> if this line segment and the specified line segment
+     * @return {@code <true>} if this line segment and the specified line segment
      *                  intersect each other; <code>false</code> otherwise.
      * @since 1.2
      */
--- a/jdk/src/share/classes/java/awt/im/InputContext.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/java/awt/im/InputContext.java	Tue Oct 15 13:54:01 2013 +0100
@@ -118,7 +118,6 @@
      * Otherwise, an input method or keyboard layout that supports the requested
      * locale is selected in an implementation dependent way.</li>
      *
-     * <p>
      * </ul>
      * Before switching away from an input method, any currently uncommitted text
      * is committed. If no input method or keyboard layout supporting the requested
--- a/jdk/src/share/classes/java/awt/im/InputMethodHighlight.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/java/awt/im/InputMethodHighlight.java	Tue Oct 15 13:54:01 2013 +0100
@@ -51,8 +51,8 @@
 * mappings from abstract to concrete styles. Currently defined state values
 * are raw (unconverted) and converted.
 * These state values are recommended for use before and after the
-* main conversion step of text composition, say, before and after kana->kanji
-* or pinyin->hanzi conversion.
+* main conversion step of text composition, say, before and after kana-&gt;kanji
+* or pinyin-&gt;hanzi conversion.
 * The <code>variation</code> field allows input methods to express additional
 * information about the conversion results.
 * <p>
--- a/jdk/src/share/classes/java/awt/peer/ComponentPeer.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/java/awt/peer/ComponentPeer.java	Tue Oct 15 13:54:01 2013 +0100
@@ -260,15 +260,6 @@
     ColorModel getColorModel();
 
     /**
-     * Returns the toolkit that is responsible for the component.
-     *
-     * @return the toolkit that is responsible for the component
-     *
-     * @see Component#getToolkit()
-     */
-    Toolkit getToolkit();
-
-    /**
      * Returns a graphics object to paint on the component.
      *
      * @return a graphics object to paint on the component
--- a/jdk/src/share/classes/java/awt/peer/TextComponentPeer.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/java/awt/peer/TextComponentPeer.java	Tue Oct 15 13:54:01 2013 +0100
@@ -60,11 +60,11 @@
     /**
      * Sets the content for the text component.
      *
-     * @param l the content to set
+     * @param text the content to set
      *
      * @see TextComponent#setText(String)
      */
-    void setText(String l);
+    void setText(String text);
 
     /**
      * Returns the start index of the current selection.
--- a/jdk/src/share/classes/java/awt/print/PrinterJob.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/java/awt/print/PrinterJob.java	Tue Oct 15 13:54:01 2013 +0100
@@ -98,7 +98,7 @@
      * Calling this method is equivalent to calling
      * {@link javax.print.PrintServiceLookup#lookupPrintServices(
      * DocFlavor, AttributeSet)
-     * <code>PrintServiceLookup.lookupPrintServices()</code>}
+     * PrintServiceLookup.lookupPrintServices()}
      * and specifying a Pageable DocFlavor.
      * @return a possibly empty array of 2D print services.
      * @since     1.4
@@ -136,8 +136,8 @@
      * <code>PrinterJob</code> instances which support print services.
      * Calling this method is equivalent to calling
      * {@link javax.print.StreamPrintServiceFactory#lookupStreamPrintServiceFactories(DocFlavor, String)
-     * <code>StreamPrintServiceFactory.lookupStreamPrintServiceFactories()
-     * </code>} and specifying a Pageable DocFlavor.
+     * StreamPrintServiceFactory.lookupStreamPrintServiceFactories()
+     * } and specifying a Pageable DocFlavor.
      *
      * @param mimeType the required output format, or null to mean any format.
      * @return a possibly empty array of 2D stream print service factories.
@@ -155,7 +155,7 @@
 
     /**
      * A <code>PrinterJob</code> object should be created using the
-     * static {@link #getPrinterJob() <code>getPrinterJob</code>} method.
+     * static {@link #getPrinterJob() getPrinterJob} method.
      */
     public PrinterJob() {
     }
--- a/jdk/src/share/classes/java/beans/EventHandler.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/java/beans/EventHandler.java	Tue Oct 15 13:54:01 2013 +0100
@@ -33,6 +33,7 @@
 import java.security.PrivilegedAction;
 
 import sun.reflect.misc.MethodUtil;
+import sun.reflect.misc.ReflectUtil;
 
 /**
  * The <code>EventHandler</code> class provides
@@ -677,22 +678,38 @@
      *
      * @see EventHandler
      */
-    @SuppressWarnings("unchecked")
     public static <T> T create(Class<T> listenerInterface,
                                Object target, String action,
                                String eventPropertyName,
                                String listenerMethodName)
     {
         // Create this first to verify target/action are non-null
-        EventHandler eventHandler = new EventHandler(target, action,
+        final EventHandler handler = new EventHandler(target, action,
                                                      eventPropertyName,
                                                      listenerMethodName);
         if (listenerInterface == null) {
             throw new NullPointerException(
                           "listenerInterface must be non-null");
         }
-        return (T)Proxy.newProxyInstance(target.getClass().getClassLoader(),
-                                         new Class<?>[] {listenerInterface},
-                                         eventHandler);
+        final ClassLoader loader = getClassLoader(listenerInterface);
+        final Class<?>[] interfaces = {listenerInterface};
+        return AccessController.doPrivileged(new PrivilegedAction<T>() {
+            @SuppressWarnings("unchecked")
+            public T run() {
+                return (T) Proxy.newProxyInstance(loader, interfaces, handler);
+            }
+        });
+    }
+
+    private static ClassLoader getClassLoader(Class<?> type) {
+        ReflectUtil.checkPackageAccess(type);
+        ClassLoader loader = type.getClassLoader();
+        if (loader == null) {
+            loader = Thread.currentThread().getContextClassLoader(); // avoid use of BCP
+            if (loader == null) {
+                loader = ClassLoader.getSystemClassLoader();
+            }
+        }
+        return loader;
     }
 }
--- a/jdk/src/share/classes/java/beans/Introspector.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/java/beans/Introspector.java	Tue Oct 15 13:54:01 2013 +0100
@@ -87,7 +87,7 @@
  * <p>
  * For more information about introspection and design patterns, please
  * consult the
- *  <a href="http://java.sun.com/products/javabeans/docs/index.html">JavaBeans&trade; specification</a>.
+ *  <a href="http://www.oracle.com/technetwork/java/javase/documentation/spec-136004.html">JavaBeans&trade; specification</a>.
  */
 
 public class Introspector {
--- a/jdk/src/share/classes/java/lang/ClassLoader.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/java/lang/ClassLoader.java	Tue Oct 15 13:54:01 2013 +0100
@@ -1069,6 +1069,10 @@
      * built-in to the virtual machine is searched.  That failing, this method
      * will invoke {@link #findResource(String)} to find the resource.  </p>
      *
+     * @apiNote When overriding this method it is recommended that an
+     * implementation ensures that any delegation is consistent with the {@link
+     * #getResources(java.lang.String) getResources(String)} method.
+     *
      * @param  name
      *         The resource name
      *
@@ -1102,6 +1106,13 @@
      * <p> The search order is described in the documentation for {@link
      * #getResource(String)}.  </p>
      *
+     * @apiNote When overriding this method it is recommended that an
+     * implementation ensures that any delegation is consistent with the {@link
+     * #getResource(java.lang.String) getResource(String)} method. This should
+     * ensure that the first element returned by the Enumeration's
+     * {@code nextElement} method is the same resource that the
+     * {@code getResource(String)} method would return.
+     *
      * @param  name
      *         The resource name
      *
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/share/classes/java/net/HostPortrange.java	Tue Oct 15 13:54:01 2013 +0100
@@ -0,0 +1,251 @@
+/*
+ * 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 java.net;
+
+import java.net.*;
+import java.util.Formatter;
+import java.util.Locale;
+import sun.net.util.IPAddressUtil;
+
+/**
+ * Parses a string containing a host/domain name and port range
+ */
+class HostPortrange {
+
+    String hostname;
+    String scheme;
+    int[] portrange;
+
+    boolean wildcard;
+    boolean literal;
+    boolean ipv6, ipv4;
+    static final int PORT_MIN = 0;
+    static final int PORT_MAX = (1 << 16) -1;
+
+    boolean equals(HostPortrange that) {
+        return this.hostname.equals(that.hostname)
+            && this.portrange[0] == that.portrange[0]
+            && this.portrange[1] == that.portrange[1]
+            && this.wildcard == that.wildcard
+            && this.literal == that.literal;
+    }
+
+    public int hashCode() {
+        return hostname.hashCode() + portrange[0] + portrange[1];
+    }
+
+    HostPortrange(String scheme, String str) {
+        // Parse the host name.  A name has up to three components, the
+        // hostname, a port number, or two numbers representing a port
+        // range.   "www.sun.com:8080-9090" is a valid host name.
+
+        // With IPv6 an address can be 2010:836B:4179::836B:4179
+        // An IPv6 address needs to be enclose in []
+        // For ex: [2010:836B:4179::836B:4179]:8080-9090
+        // Refer to RFC 2732 for more information.
+
+        // first separate string into two fields: hoststr, portstr
+        String hoststr, portstr = null;
+        this.scheme = scheme;
+
+        // check for IPv6 address
+        if (str.charAt(0) == '[') {
+            ipv6 = literal = true;
+            int rb = str.indexOf(']');
+            if (rb != -1) {
+                hoststr = str.substring(1, rb);
+            } else {
+                throw new IllegalArgumentException("invalid IPv6 address: " + str);
+            }
+            int sep = str.indexOf(':', rb + 1);
+            if (sep != -1 && str.length() > sep) {
+                portstr = str.substring(sep + 1);
+            }
+            // need to normalize hoststr now
+            byte[] ip = IPAddressUtil.textToNumericFormatV6(hoststr);
+            if (ip == null) {
+                throw new IllegalArgumentException("illegal IPv6 address");
+            }
+            StringBuilder sb = new StringBuilder();
+            Formatter formatter = new Formatter(sb, Locale.US);
+            formatter.format("%02x%02x:%02x%02x:%02x%02x:%02x"
+                    + "%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x",
+                    ip[0], ip[1], ip[2], ip[3], ip[4], ip[5], ip[6], ip[7], ip[8],
+                    ip[9], ip[10], ip[11], ip[12], ip[13], ip[14], ip[15]);
+            hostname = sb.toString();
+        } else {
+            // not IPv6 therefore ':' is the port separator
+
+            int sep = str.indexOf(':');
+            if (sep != -1 && str.length() > sep) {
+                hoststr = str.substring(0, sep);
+                portstr = str.substring(sep + 1);
+            } else {
+                hoststr = sep == -1 ? str : str.substring(0, sep);
+            }
+            // is this a domain wildcard specification?
+            if (hoststr.lastIndexOf('*') > 0) {
+                throw new IllegalArgumentException("invalid host wildcard specification");
+            } else if (hoststr.startsWith("*")) {
+                wildcard = true;
+                if (hoststr.equals("*")) {
+                    hoststr = "";
+                } else if (hoststr.startsWith("*.")) {
+                    hoststr = hoststr.substring(1).toLowerCase(); // leave the '.' ?
+                } else {
+                    throw new IllegalArgumentException("invalid host wildcard specification");
+                }
+            } else {
+                // check if ipv4 (if rightmost label a number)
+                // The normal way to specify ipv4 is 4 decimal labels
+                // but actually three, two or single label formats valid also
+                // So, we recognise ipv4 by just testing the rightmost label
+                // being a number.
+                int lastdot = hoststr.lastIndexOf('.');
+                if (lastdot != -1 && (hoststr.length() > 1)) {
+                    boolean ipv4 = true;
+
+                    for (int i = lastdot + 1, len = hoststr.length(); i < len; i++) {
+                        char c = hoststr.charAt(i);
+                        if (c < '0' || c > '9') {
+                            ipv4 = false;
+                            break;
+                        }
+                    }
+                    this.ipv4 = this.literal = ipv4;
+                    if (ipv4) {
+                        byte[] ip = IPAddressUtil.textToNumericFormatV4(hoststr);
+                        if (ip == null) {
+                            throw new IllegalArgumentException("illegal IPv4 address");
+                        }
+                        StringBuilder sb = new StringBuilder();
+                        Formatter formatter = new Formatter(sb, Locale.US);
+                        formatter.format("%d.%d.%d.%d", ip[0], ip[1], ip[2], ip[3]);
+                        hoststr = sb.toString();
+                    } else {
+                        // regular domain name
+                        hoststr = hoststr.toLowerCase();
+                    }
+                }
+            }
+            hostname = hoststr;
+        }
+
+        try {
+            portrange = parsePort(portstr);
+        } catch (Exception e) {
+            throw new IllegalArgumentException("invalid port range: " + portstr);
+        }
+    }
+
+    public boolean literal() {
+        return literal;
+    }
+
+    public boolean ipv4Literal() {
+        return ipv4;
+    }
+
+    public boolean ipv6Literal() {
+        return ipv6;
+    }
+
+    public String hostname() {
+        return hostname;
+    }
+
+    public int[] portrange() {
+        return portrange;
+    }
+
+    /**
+     * returns true if the hostname part started with *
+     * hostname returns the remaining part of the host component
+     * eg "*.foo.com" -> ".foo.com" or "*" -> ""
+     *
+     * @return
+     */
+    public boolean wildcard() {
+        return wildcard;
+    }
+
+    // these shouldn't leak outside the implementation
+    final static int[] HTTP_PORT = {80, 80};
+    final static int[] HTTPS_PORT = {443, 443};
+    final static int[] NO_PORT = {-1, -1};
+
+    int[] defaultPort() {
+        if (scheme.equals("http")) {
+            return HTTP_PORT;
+        } else if (scheme.equals("https")) {
+            return HTTPS_PORT;
+        }
+        return NO_PORT;
+    }
+
+    int[] parsePort(String port)
+    {
+
+        if (port == null || port.equals("")) {
+            return defaultPort();
+        }
+
+        if (port.equals("*")) {
+            return new int[] {PORT_MIN, PORT_MAX};
+        }
+
+        try {
+            int dash = port.indexOf('-');
+
+            if (dash == -1) {
+                int p = Integer.parseInt(port);
+                return new int[] {p, p};
+            } else {
+                String low = port.substring(0, dash);
+                String high = port.substring(dash+1);
+                int l,h;
+
+                if (low.equals("")) {
+                    l = PORT_MIN;
+                } else {
+                    l = Integer.parseInt(low);
+                }
+
+                if (high.equals("")) {
+                    h = PORT_MAX;
+                } else {
+                    h = Integer.parseInt(high);
+                }
+                if (l < 0 || h < 0 || h<l) {
+                    return defaultPort();
+                }
+                return new int[] {l, h};
+             }
+        } catch (IllegalArgumentException e) {
+            return defaultPort();
+        }
+    }
+}
--- a/jdk/src/share/classes/java/net/HttpURLConnection.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/java/net/HttpURLConnection.java	Tue Oct 15 13:54:01 2013 +0100
@@ -57,7 +57,7 @@
  * attempt to open a connection, the caller must possess either:-
  * <ul><li>a "connect" {@link SocketPermission} to the host/port combination of the
  * destination URL or</li>
- * <li>a {@link HttpURLPermission} that permits this request.</li>
+ * <li>a {@link URLPermission} that permits this request.</li>
  * </ul><p>
  * If automatic redirection is enabled, and this request is redirected to another
  * destination, then the caller must also have permission to connect to the
--- a/jdk/src/share/classes/java/net/HttpURLPermission.java	Tue Oct 15 09:27:32 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,408 +0,0 @@
-/*
- * 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 java.net;
-
-import java.io.ObjectInputStream;
-import java.io.IOException;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.security.Permission;
-
-/**
- * Represents permission to access a resource or set of resources defined by a
- * given http or https url, and for a given set of user-settable request methods
- * and request headers. The <i>name</i> of the permission is the url string.
- * The <i>actions</i> string is a concatenation of the request methods and headers.
- * The range of method and header names is not restricted by this class.
- * <p><b>The url</b><p>
- * The url string is also used to instantiate a {@link URI} object which is
- * used for comparison with other HttpURLPermission instances. Therefore, any
- * references in this specification to url, mean this URI object.
- * The path component of the url comprises a sequence of path segments, separated
- * by '/' characters. The path is specified in a similar way to the path
- * in {@link java.io.FilePermission}. There are three different ways
- * as the following examples show:
- * <table border>
- * <caption>URL Examples</caption>
- * <tr><th>Example url</th><th>Description</th></tr>
- * <tr><td style="white-space:nowrap;">http://www.oracle.com/a/b/c.html</td>
- *   <td>A url which identifies a specific (single) resource</td>
- * </tr>
- * <tr><td>http://www.oracle.com/a/b/*</td>
- *   <td>The '*' character refers to all resources in the same "directory" - in
- *       other words all resources with the same number of path components, and
- *       which only differ in the final path component, represented by the '*'.
- *   </td>
- * </tr>
- * <tr><td>http://www.oracle.com/a/b/-</td>
- *   <td>The '-' character refers to all resources recursively below the
- *       preceding path (eg. http://www.oracle.com/a/b/c/d/e.html matches this
- *       example).
- *   </td>
- * </tr>
- * </table>
- * <p>
- * The '*' and '-' may only be specified in the final segment of a path and must be
- * the only character in that segment. Any query or fragment components of the
- * url are ignored when constructing HttpURLPermissions.
- * <p>
- * As a special case, urls of the form, "http:*" or "https:*" are accepted to
- * mean any url of the given scheme.
- * <p><b>The actions string</b><p>
- * The actions string of a HttpURLPermission is a concatenation of the <i>method list</i>
- * and the <i>request headers list</i>. These are lists of the permitted HTTP request
- * methods and permitted request headers of the permission (respectively). The two lists
- * are separated by a colon ':' character and elements of each list are comma separated.
- * Some examples are:
- * <pre>
- *         "POST,GET,DELETE"
- *         "GET:X-Foo-Request,X-Bar-Request"
- *         "POST,GET:Header1,Header2"
- * </pre>
- * The first example specifies the methods: POST, GET and DELETE, but no request headers.
- * The second example specifies one request method and two headers. The third
- * example specifies two request methods, and two headers.
- * <p>
- * The colon separator need not be present if the request headers list is empty.
- * No white-space is permitted in the actions string. The action strings supplied to
- * the HttpURLPermission constructors are case-insensitive and are normalized by converting
- * method names to upper-case and header names to the form defines in RFC2616 (lower case
- * with initial letter of each word capitalized). Either list can contain a wild-card '*'
- * character which signifies all request methods or headers respectively.
- * <p>
- * Note. Depending on the context of use, some request methods and headers may be permitted
- * at all times, and others may not be permitted at any time. For example, the
- * HTTP protocol handler might disallow certain headers such as Content-Length
- * from being set by application code, regardless of whether the security policy
- * in force, permits it.
- *
- * @since 1.8
- */
-public final class HttpURLPermission extends Permission {
-
-    private static final long serialVersionUID = -2702463814894478682L;
-
-    private transient URI uri;
-    private transient List<String> methods;
-    private transient List<String> requestHeaders;
-
-    // serialized field
-    private String actions;
-
-    /**
-     * Creates a new HttpURLPermission from a url string and which permits the given
-     * request methods and user-settable request headers.
-     * The name of the permission is its url string. Only the scheme, authority
-     * and path components of the url are used. Any fragment or query
-     * components are ignored. The permissions action string is as specified above.
-     *
-     * @param url the url string
-     *
-     * @param actions the actions string
-     *
-     * @throws    IllegalArgumentException if url does not result in a valid {@link URI},
-     *            its scheme is not http or https, or if actions contains white-space.
-     */
-    public HttpURLPermission(String url, String actions) {
-        super(url);
-        init(actions);
-    }
-
-    private void init(String actions) {
-        URI uri = parseURI(getName());
-        int colon = actions.indexOf(':');
-        if (actions.lastIndexOf(':') != colon) {
-            throw new IllegalArgumentException("invalid actions string");
-        }
-
-        String methods, headers;
-        if (colon == -1) {
-            methods = actions;
-            headers = "";
-        } else {
-            methods = actions.substring(0, colon);
-            headers = actions.substring(colon+1);
-        }
-
-        List<String> l = normalizeMethods(methods);
-        Collections.sort(l);
-        this.methods = Collections.unmodifiableList(l);
-
-        l = normalizeHeaders(headers);
-        Collections.sort(l);
-        this.requestHeaders = Collections.unmodifiableList(l);
-
-        this.actions = actions();
-        this.uri = uri;
-    }
-
-    /**
-     * Creates a HttpURLPermission with the given url string and unrestricted
-     * methods and request headers by invoking the two argument
-     * constructor as follows: HttpURLPermission(url, "*:*")
-     *
-     * @param url the url string
-     *
-     * @throws    IllegalArgumentException if url does not result in a valid {@link URI}
-     */
-    public HttpURLPermission(String url) {
-        this(url, "*:*");
-    }
-
-    /**
-     * Returns the normalized method list and request
-     * header list, in the form:
-     * <pre>
-     *      "method-names : header-names"
-     * </pre>
-     * <p>
-     * where method-names is the list of methods separated by commas
-     * and header-names is the list of permitted headers separated by commas.
-     * There is no white space in the returned String. If header-names is empty
-     * then the colon separator will not be present.
-     */
-    public String getActions() {
-        return actions;
-    }
-
-    /**
-     * Checks if this HttpURLPermission implies the given permission.
-     * Specifically, the following checks are done as if in the
-     * following sequence:
-     * <p><ul>
-     * <li>if 'p' is not an instance of HttpURLPermission return false</li>
-     * <li>if any of p's methods are not in this's method list, and if
-     *     this's method list is not equal to "*", then return false.</li>
-     * <li>if any of p's headers are not in this's request header list, and if
-     *     this's request header list is not equal to "*", then return false.</li>
-     * <li>if this's url is equal to p's url , then return true</li>
-     * <li>if this's url scheme is not equal to p's url scheme return false</li>
-     * <li>if the scheme specific part of this's url is '*' return true</li>
-     * <li>if this's url authority is not equal to p's url authority
-     *     return false</li>
-     * <li>if the path or paths specified by p's url are contained in the
-     *     set of paths specified by this's url, then return true
-     * <li>otherwise, return false</li>
-     * </ul>
-     * <p>Some examples of how paths are matched are shown below:
-     * <p><table border>
-     * <caption>Examples of Path Matching</caption>
-     * <tr><th>this's path</th><th>p's path</th><th>match</th></tr>
-     * <tr><td>/a/b</td><td>/a/b</td><td>yes</td></tr>
-     * <tr><td>/a/b/*</td><td>/a/b/c</td><td>yes</td></tr>
-     * <tr><td>/a/b/*</td><td>/a/b/c/d</td><td>no</td></tr>
-     * <tr><td>/a/b/-</td><td>/a/b/c/d</td><td>yes</td></tr>
-     * <tr><td>/a/b/-</td><td>/a/b/c/d/e</td><td>yes</td></tr>
-     * <tr><td>/a/b/-</td><td>/a/b/c/*</td><td>yes</td></tr>
-     * <tr><td>/a/b/*</td><td>/a/b/c/-</td><td>no</td></tr>
-     * </table>
-     */
-    public boolean implies(Permission p) {
-        if (! (p instanceof HttpURLPermission)) {
-            return false;
-        }
-
-        HttpURLPermission that = (HttpURLPermission)p;
-
-        if (!this.methods.get(0).equals("*") &&
-                Collections.indexOfSubList(this.methods, that.methods) == -1) {
-            return false;
-        }
-
-        if (this.requestHeaders.isEmpty() && !that.requestHeaders.isEmpty()) {
-            return false;
-        }
-
-        if (!this.requestHeaders.isEmpty() &&
-            !this.requestHeaders.get(0).equals("*") &&
-             Collections.indexOfSubList(this.requestHeaders,
-                                        that.requestHeaders) == -1) {
-            return false;
-        }
-
-        if (this.uri.equals(that.uri)) {
-            return true;
-        }
-
-        if (!this.uri.getScheme().equals(that.uri.getScheme())) {
-            return false;
-        }
-
-        if (this.uri.getSchemeSpecificPart().equals("*")) {
-            return true;
-        }
-
-        String thisAuthority = this.uri.getAuthority();
-
-            if (thisAuthority != null &&
-                    !thisAuthority.equals(that.uri.getAuthority())) {
-            return false;
-        }
-
-        String thispath = this.uri.getPath();
-        String thatpath = that.uri.getPath();
-
-        if (thispath.endsWith("/-")) {
-            String thisprefix = thispath.substring(0, thispath.length() - 1);
-            return thatpath.startsWith(thisprefix);
-            }
-
-        if (thispath.endsWith("/*")) {
-            String thisprefix = thispath.substring(0, thispath.length() - 1);
-            if (!thatpath.startsWith(thisprefix)) {
-                return false;
-            }
-            String thatsuffix = thatpath.substring(thisprefix.length());
-            // suffix must not contain '/' chars
-            if (thatsuffix.indexOf('/') != -1) {
-                return false;
-            }
-            if (thatsuffix.equals("-")) {
-                return false;
-            }
-            return true;
-        }
-        return false;
-    }
-
-
-    /**
-     * Returns true if, this.getActions().equals(p.getActions())
-     * and p's url equals this's url.  Returns false otherwise.
-     */
-    public boolean equals(Object p) {
-        if (!(p instanceof HttpURLPermission)) {
-            return false;
-        }
-        HttpURLPermission that = (HttpURLPermission)p;
-        return this.getActions().equals(that.getActions()) &&
-                  this.uri.equals(that.uri);
-    }
-
-    /**
-     * Returns a hashcode calculated from the hashcode of the
-     * actions String and the url
-     */
-    public int hashCode() {
-        return getActions().hashCode() + uri.hashCode();
-    }
-
-
-    private List<String> normalizeMethods(String methods) {
-        List<String> l = new ArrayList<>();
-        StringBuilder b = new StringBuilder();
-        for (int i=0; i<methods.length(); i++) {
-            char c = methods.charAt(i);
-            if (c == ',') {
-                String s = b.toString();
-                if (s.length() > 0)
-                    l.add(s);
-                b = new StringBuilder();
-            } else if (c == ' ' || c == '\t') {
-                throw new IllegalArgumentException("white space not allowed");
-            } else {
-                if (c >= 'a' && c <= 'z') {
-                    c += 'A' - 'a';
-                }
-                b.append(c);
-            }
-        }
-        String s = b.toString();
-        if (s.length() > 0)
-            l.add(s);
-        return l;
-    }
-
-    private List<String> normalizeHeaders(String headers) {
-        List<String> l = new ArrayList<>();
-        StringBuilder b = new StringBuilder();
-        boolean capitalizeNext = true;
-        for (int i=0; i<headers.length(); i++) {
-            char c = headers.charAt(i);
-            if (c >= 'a' && c <= 'z') {
-                if (capitalizeNext) {
-                    c += 'A' - 'a';
-                    capitalizeNext = false;
-                }
-                b.append(c);
-            } else if (c == ' ' || c == '\t') {
-                throw new IllegalArgumentException("white space not allowed");
-            } else if (c == '-') {
-                    capitalizeNext = true;
-                b.append(c);
-            } else if (c == ',') {
-                String s = b.toString();
-                if (s.length() > 0)
-                    l.add(s);
-                b = new StringBuilder();
-                capitalizeNext = true;
-            } else {
-                capitalizeNext = false;
-                b.append(c);
-            }
-        }
-        String s = b.toString();
-        if (s.length() > 0)
-            l.add(s);
-        return l;
-    }
-
-    private URI parseURI(String url) {
-        URI u = URI.create(url);
-        String scheme = u.getScheme();
-        if (!(scheme.equalsIgnoreCase("http") ||
-             scheme.equalsIgnoreCase("https"))) {
-            throw new IllegalArgumentException ("unexpected URL scheme");
-        }
-        if (!u.getSchemeSpecificPart().equals("*")) {
-            u = URI.create(scheme + "://" + u.getRawAuthority() + u.getRawPath());
-        }
-        return u;
-    }
-
-    private String actions() {
-        StringBuilder b = new StringBuilder();
-        for (String s : methods) {
-            b.append(s);
-        }
-        b.append(":");
-        for (String s : requestHeaders) {
-            b.append(s);
-        }
-        return b.toString();
-    }
-    /**
-     * restore the state of this object from stream
-     */
-    private void readObject(ObjectInputStream s)
-        throws IOException, ClassNotFoundException {
-        ObjectInputStream.GetField fields = s.readFields();
-        String actions = (String)fields.get("actions", null);
-
-        init(actions);
-    }
-}
--- a/jdk/src/share/classes/java/net/URI.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/java/net/URI.java	Tue Oct 15 13:54:01 2013 +0100
@@ -188,7 +188,7 @@
  * URI
  *
  * <blockquote>
- * {@code http://java.sun.com/j2se/1.3/docs/guide/collections/designfaq.html#28}
+ * {@code http://docs.oracle.com/javase/1.3/docs/guide/collections/designfaq.html#28}
  * </blockquote>
  *
  * Resolving the relative URI
@@ -227,7 +227,7 @@
  * possible.  For example, relativizing the URI
  *
  * <blockquote>
- * {@code http://java.sun.com/j2se/1.3/docs/guide/index.html}
+ * {@code http://docs.oracle.com/javase/1.3/docs/guide/index.html}
  * </blockquote>
  *
  * against the base URI
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/share/classes/java/net/URLPermission.java	Tue Oct 15 13:54:01 2013 +0100
@@ -0,0 +1,523 @@
+/*
+ * 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 java.net;
+
+import java.io.ObjectInputStream;
+import java.io.IOException;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.security.Permission;
+
+/**
+ * Represents permission to access a resource or set of resources defined by a
+ * given url, and for a given set of user-settable request methods
+ * and request headers. The <i>name</i> of the permission is the url string.
+ * The <i>actions</i> string is a concatenation of the request methods and headers.
+ * The range of method and header names is not restricted by this class.
+ * <p><b>The url</b><p>
+ * The url string has the following expected structure.
+ * <pre>
+ *     scheme : // authority [ / path ]
+ * </pre>
+ * <i>scheme</i> will typically be http or https, but is not restricted by this
+ * class.
+ * <i>authority</i> is specified as:<p>
+ * <pre>
+ *     authority = hostrange [ : portrange ]
+ *     portrange = portnumber | -portnumber | portnumber-[portnumber] | *
+ *     hostrange = ([*.] dnsname) | IPv4address | IPv6address
+ * </pre>
+ * <i>dnsname</i> is a standard DNS host or domain name, ie. one or more labels
+ * separated by ".". <i>IPv4address</i> is a standard literal IPv4 address and
+ * <i>IPv6address</i> is as defined in <a href="http://www.ietf.org/rfc/rfc2732.txt">
+ * RFC 2732</a>. Literal IPv6 addresses must however, be enclosed in '[]' characters.
+ * The <i>dnsname</i> specification can be preceded by "*." which means
+ * the name will match any hostname whose right-most domain labels are the same as
+ * this name. For example, "*.oracle.com" matches "foo.bar.oracle.com"
+ * <p>
+ * <i>portrange</i> is used to specify a port number, or a bounded or unbounded range of ports
+ * that this permission applies to. If portrange is absent or invalid, then a default
+ * port number is assumed if the scheme is {@code http} (default 80) or {@code https}
+ * (default 443). No default is assumed for other schemes. A wildcard may be specified
+ * which means all ports.
+ * <p>
+ * The <i>path</i> component comprises a sequence of path segments,
+ * separated by '/' characters. <i>path</i> may also be empty. The path is specified
+ * in a similar way to the path in {@link java.io.FilePermission}. There are
+ * three different ways as the following examples show:
+ * <table border>
+ * <caption>URL Examples</caption>
+ * <tr><th>Example url</th><th>Description</th></tr>
+ * <tr><td style="white-space:nowrap;">http://www.oracle.com/a/b/c.html</td>
+ *   <td>A url which identifies a specific (single) resource</td>
+ * </tr>
+ * <tr><td>http://www.oracle.com/a/b/*</td>
+ *   <td>The '*' character refers to all resources in the same "directory" - in
+ *       other words all resources with the same number of path components, and
+ *       which only differ in the final path component, represented by the '*'.
+ *   </td>
+ * </tr>
+ * <tr><td>http://www.oracle.com/a/b/-</td>
+ *   <td>The '-' character refers to all resources recursively below the
+ *       preceding path (eg. http://www.oracle.com/a/b/c/d/e.html matches this
+ *       example).
+ *   </td>
+ * </tr>
+ * </table>
+ * <p>
+ * The '*' and '-' may only be specified in the final segment of a path and must be
+ * the only character in that segment. Any query or fragment components of the
+ * url are ignored when constructing URLPermissions.
+ * <p>
+ * As a special case, urls of the form, "scheme:*" are accepted to
+ * mean any url of the given scheme.
+ * <p>
+ * The <i>scheme</i> and <i>authority</i> components of the url string are handled
+ * without regard to case. This means {@link #equals(Object)},
+ * {@link #hashCode()} and {@link #implies(Permission)} are case insensitive with respect
+ * to these components. If the <i>authority</i> contains a literal IP address,
+ * then the address is normalized for comparison. The path component is case sensitive.
+ * <p><b>The actions string</b><p>
+ * The actions string of a URLPermission is a concatenation of the <i>method list</i>
+ * and the <i>request headers list</i>. These are lists of the permitted request
+ * methods and permitted request headers of the permission (respectively). The two lists
+ * are separated by a colon ':' character and elements of each list are comma separated.
+ * Some examples are:
+ * <pre>
+ *         "POST,GET,DELETE"
+ *         "GET:X-Foo-Request,X-Bar-Request"
+ *         "POST,GET:Header1,Header2"
+ * </pre>
+ * The first example specifies the methods: POST, GET and DELETE, but no request headers.
+ * The second example specifies one request method and two headers. The third
+ * example specifies two request methods, and two headers.
+ * <p>
+ * The colon separator need not be present if the request headers list is empty.
+ * No white-space is permitted in the actions string. The action strings supplied to
+ * the URLPermission constructors are case-insensitive and are normalized by converting
+ * method names to upper-case and header names to the form defines in RFC2616 (lower case
+ * with initial letter of each word capitalized). Either list can contain a wild-card '*'
+ * character which signifies all request methods or headers respectively.
+ * <p>
+ * Note. Depending on the context of use, some request methods and headers may be permitted
+ * at all times, and others may not be permitted at any time. For example, the
+ * HTTP protocol handler might disallow certain headers such as Content-Length
+ * from being set by application code, regardless of whether the security policy
+ * in force, permits it.
+ *
+ * @since 1.8
+ */
+public final class URLPermission extends Permission {
+
+    private static final long serialVersionUID = -2702463814894478682L;
+
+    private transient String scheme;
+    private transient String ssp;                 // scheme specific part
+    private transient String path;
+    private transient List<String> methods;
+    private transient List<String> requestHeaders;
+    private transient Authority authority;
+
+    // serialized field
+    private String actions;
+
+    /**
+     * Creates a new URLPermission from a url string and which permits the given
+     * request methods and user-settable request headers.
+     * The name of the permission is the url string it was created with. Only the scheme,
+     * authority and path components of the url are used internally. Any fragment or query
+     * components are ignored. The permissions action string is as specified above.
+     *
+     * @param url the url string
+     *
+     * @param actions the actions string
+     *
+     * @exception IllegalArgumentException if url is invalid or if actions contains white-space.
+     */
+    public URLPermission(String url, String actions) {
+        super(url);
+        init(actions);
+    }
+
+    private void init(String actions) {
+        parseURI(getName());
+        int colon = actions.indexOf(':');
+        if (actions.lastIndexOf(':') != colon) {
+            throw new IllegalArgumentException("invalid actions string");
+        }
+
+        String methods, headers;
+        if (colon == -1) {
+            methods = actions;
+            headers = "";
+        } else {
+            methods = actions.substring(0, colon);
+            headers = actions.substring(colon+1);
+        }
+
+        List<String> l = normalizeMethods(methods);
+        Collections.sort(l);
+        this.methods = Collections.unmodifiableList(l);
+
+        l = normalizeHeaders(headers);
+        Collections.sort(l);
+        this.requestHeaders = Collections.unmodifiableList(l);
+
+        this.actions = actions();
+    }
+
+    /**
+     * Creates a URLPermission with the given url string and unrestricted
+     * methods and request headers by invoking the two argument
+     * constructor as follows: URLPermission(url, "*:*")
+     *
+     * @param url the url string
+     *
+     * @throws    IllegalArgumentException if url does not result in a valid {@link URI}
+     */
+    public URLPermission(String url) {
+        this(url, "*:*");
+    }
+
+    /**
+     * Returns the normalized method list and request
+     * header list, in the form:
+     * <pre>
+     *      "method-names : header-names"
+     * </pre>
+     * <p>
+     * where method-names is the list of methods separated by commas
+     * and header-names is the list of permitted headers separated by commas.
+     * There is no white space in the returned String. If header-names is empty
+     * then the colon separator will not be present.
+     */
+    public String getActions() {
+        return actions;
+    }
+
+    /**
+     * Checks if this URLPermission implies the given permission.
+     * Specifically, the following checks are done as if in the
+     * following sequence:
+     * <p><ul>
+     * <li>if 'p' is not an instance of URLPermission return false</li>
+     * <li>if any of p's methods are not in this's method list, and if
+     *     this's method list is not equal to "*", then return false.</li>
+     * <li>if any of p's headers are not in this's request header list, and if
+     *     this's request header list is not equal to "*", then return false.</li>
+     * <li>if this's url scheme is not equal to p's url scheme return false</li>
+     * <li>if the scheme specific part of this's url is '*' return true</li>
+     * <li>if the set of hosts defined by p's url hostrange is not a subset of
+     *     this's url hostrange then return false. For example, "*.foo.oracle.com"
+     *     is a subset of "*.oracle.com". "foo.bar.oracle.com" is not
+     *     a subset of "*.foo.oracle.com"</li>
+     * <li>if the portrange defined by p's url is not a subset of the
+     *     portrange defined by this's url then return false.
+     * <li>if the path or paths specified by p's url are contained in the
+     *     set of paths specified by this's url, then return true
+     * <li>otherwise, return false</li>
+     * </ul>
+     * <p>Some examples of how paths are matched are shown below:
+     * <p><table border>
+     * <caption>Examples of Path Matching</caption>
+     * <tr><th>this's path</th><th>p's path</th><th>match</th></tr>
+     * <tr><td>/a/b</td><td>/a/b</td><td>yes</td></tr>
+     * <tr><td>/a/b/*</td><td>/a/b/c</td><td>yes</td></tr>
+     * <tr><td>/a/b/*</td><td>/a/b/c/d</td><td>no</td></tr>
+     * <tr><td>/a/b/-</td><td>/a/b/c/d</td><td>yes</td></tr>
+     * <tr><td>/a/b/-</td><td>/a/b/c/d/e</td><td>yes</td></tr>
+     * <tr><td>/a/b/-</td><td>/a/b/c/*</td><td>yes</td></tr>
+     * <tr><td>/a/b/*</td><td>/a/b/c/-</td><td>no</td></tr>
+     * </table>
+     */
+    public boolean implies(Permission p) {
+        if (! (p instanceof URLPermission)) {
+            return false;
+        }
+
+        URLPermission that = (URLPermission)p;
+
+        if (!this.methods.get(0).equals("*") &&
+                Collections.indexOfSubList(this.methods, that.methods) == -1) {
+            return false;
+        }
+
+        if (this.requestHeaders.isEmpty() && !that.requestHeaders.isEmpty()) {
+            return false;
+        }
+
+        if (!this.requestHeaders.isEmpty() &&
+            !this.requestHeaders.get(0).equals("*") &&
+             Collections.indexOfSubList(this.requestHeaders,
+                                        that.requestHeaders) == -1) {
+            return false;
+        }
+
+        if (!this.scheme.equals(that.scheme)) {
+            return false;
+        }
+
+        if (this.ssp.equals("*")) {
+            return true;
+        }
+
+        if (!this.authority.implies(that.authority)) {
+            return false;
+        }
+
+        if (this.path == null) {
+            return that.path == null;
+        }
+        if (that.path == null) {
+            return false;
+        }
+
+        if (this.path.endsWith("/-")) {
+            String thisprefix = this.path.substring(0, this.path.length() - 1);
+            return that.path.startsWith(thisprefix);
+            }
+
+        if (this.path.endsWith("/*")) {
+            String thisprefix = this.path.substring(0, this.path.length() - 1);
+            if (!that.path.startsWith(thisprefix)) {
+                return false;
+            }
+            String thatsuffix = that.path.substring(thisprefix.length());
+            // suffix must not contain '/' chars
+            if (thatsuffix.indexOf('/') != -1) {
+                return false;
+            }
+            if (thatsuffix.equals("-")) {
+                return false;
+            }
+            return true;
+        }
+        return this.path.equals(that.path);
+    }
+
+
+    /**
+     * Returns true if, this.getActions().equals(p.getActions())
+     * and p's url equals this's url.  Returns false otherwise.
+     */
+    public boolean equals(Object p) {
+        if (!(p instanceof URLPermission)) {
+            return false;
+        }
+        URLPermission that = (URLPermission)p;
+        if (!this.scheme.equals(that.scheme)) {
+            return false;
+        }
+        if (!this.getActions().equals(that.getActions())) {
+            return false;
+        }
+        if (!this.authority.equals(that.authority)) {
+            return false;
+        }
+        if (this.path != null) {
+            return this.path.equals(that.path);
+        } else {
+            return that.path == null;
+        }
+    }
+
+    /**
+     * Returns a hashcode calculated from the hashcode of the
+     * actions String and the url string.
+     */
+    public int hashCode() {
+        return getActions().hashCode()
+            + scheme.hashCode()
+            + authority.hashCode()
+            + path == null ? 0 : path.hashCode();
+    }
+
+
+    private List<String> normalizeMethods(String methods) {
+        List<String> l = new ArrayList<>();
+        StringBuilder b = new StringBuilder();
+        for (int i=0; i<methods.length(); i++) {
+            char c = methods.charAt(i);
+            if (c == ',') {
+                String s = b.toString();
+                if (s.length() > 0)
+                    l.add(s);
+                b = new StringBuilder();
+            } else if (c == ' ' || c == '\t') {
+                throw new IllegalArgumentException("white space not allowed");
+            } else {
+                if (c >= 'a' && c <= 'z') {
+                    c += 'A' - 'a';
+                }
+                b.append(c);
+            }
+        }
+        String s = b.toString();
+        if (s.length() > 0)
+            l.add(s);
+        return l;
+    }
+
+    private List<String> normalizeHeaders(String headers) {
+        List<String> l = new ArrayList<>();
+        StringBuilder b = new StringBuilder();
+        boolean capitalizeNext = true;
+        for (int i=0; i<headers.length(); i++) {
+            char c = headers.charAt(i);
+            if (c >= 'a' && c <= 'z') {
+                if (capitalizeNext) {
+                    c += 'A' - 'a';
+                    capitalizeNext = false;
+                }
+                b.append(c);
+            } else if (c == ' ' || c == '\t') {
+                throw new IllegalArgumentException("white space not allowed");
+            } else if (c == '-') {
+                    capitalizeNext = true;
+                b.append(c);
+            } else if (c == ',') {
+                String s = b.toString();
+                if (s.length() > 0)
+                    l.add(s);
+                b = new StringBuilder();
+                capitalizeNext = true;
+            } else {
+                capitalizeNext = false;
+                b.append(c);
+            }
+        }
+        String s = b.toString();
+        if (s.length() > 0)
+            l.add(s);
+        return l;
+    }
+
+    private void parseURI(String url) {
+        int len = url.length();
+        int delim = url.indexOf(':');
+        if (delim == -1 || delim + 1 == len) {
+            throw new IllegalArgumentException("invalid URL string");
+        }
+        scheme = url.substring(0, delim).toLowerCase();
+        this.ssp = url.substring(delim + 1);
+
+        if (!ssp.startsWith("//")) {
+            this.authority = new Authority(scheme, ssp.toLowerCase());
+            return;
+        }
+        String authpath = ssp.substring(2);
+
+        delim = authpath.indexOf('/');
+        String auth;
+        if (delim == -1) {
+            this.path = "";
+            auth = authpath;
+        } else {
+            auth = authpath.substring(0, delim);
+            this.path = authpath.substring(delim);
+        }
+        this.authority = new Authority(scheme, auth.toLowerCase());
+    }
+
+    private String actions() {
+        StringBuilder b = new StringBuilder();
+        for (String s : methods) {
+            b.append(s);
+        }
+        b.append(":");
+        for (String s : requestHeaders) {
+            b.append(s);
+        }
+        return b.toString();
+    }
+
+    /**
+     * restore the state of this object from stream
+     */
+    private void readObject(ObjectInputStream s)
+        throws IOException, ClassNotFoundException {
+        ObjectInputStream.GetField fields = s.readFields();
+        String actions = (String)fields.get("actions", null);
+
+        init(actions);
+    }
+
+    static class Authority {
+        HostPortrange p;
+
+        Authority(String scheme, String authority) {
+            p = new HostPortrange(scheme, authority);
+        }
+
+        boolean implies(Authority other) {
+            return impliesHostrange(other) && impliesPortrange(other);
+        }
+
+        private boolean impliesHostrange(Authority that) {
+            String thishost = this.p.hostname();
+            String thathost = that.p.hostname();
+
+            if (p.wildcard() && thishost.equals("")) {
+                // this "*" implies all others
+                return true;
+            }
+            if (that.p.wildcard() && thathost.equals("")) {
+                // that "*" can only be implied by this "*"
+                return false;
+            }
+            if (thishost.equals(thathost)) {
+                // covers all cases of literal IP addresses and fixed
+                // domain names.
+                return true;
+            }
+            if (this.p.wildcard()) {
+                // this "*.foo.com" implies "bub.bar.foo.com"
+                return thathost.endsWith(thishost);
+            }
+            return false;
+        }
+
+        private boolean impliesPortrange(Authority that) {
+            int[] thisrange = this.p.portrange();
+            int[] thatrange = that.p.portrange();
+            if (thisrange[0] == -1) {
+                /* port not specified non http/s URL */
+                return true;
+            }
+            return thisrange[0] <= thatrange[0] &&
+                        thisrange[1] >= thatrange[1];
+        }
+
+        boolean equals(Authority that) {
+            return this.p.equals(that.p);
+        }
+
+        public int hashCode() {
+            return p.hashCode();
+        }
+    }
+}
--- a/jdk/src/share/classes/java/nio/file/Files.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/java/nio/file/Files.java	Tue Oct 15 13:54:01 2013 +0100
@@ -43,9 +43,10 @@
 import java.nio.charset.Charset;
 import java.nio.charset.CharsetDecoder;
 import java.nio.charset.CharsetEncoder;
+import java.nio.charset.StandardCharsets;
 import java.nio.file.attribute.BasicFileAttributeView;
 import java.nio.file.attribute.BasicFileAttributes;
-import java.nio.file.attribute.DosFileAttributes;
+import java.nio.file.attribute.DosFileAttributes;   // javadoc
 import java.nio.file.attribute.FileAttribute;
 import java.nio.file.attribute.FileAttributeView;
 import java.nio.file.attribute.FileOwnerAttributeView;
@@ -104,8 +105,7 @@
         return () -> {
             try {
                 c.close();
-            }
-            catch (IOException e) {
+            } catch (IOException e) {
                 throw new UncheckedIOException(e);
             }
         };
@@ -2550,7 +2550,7 @@
      *          checkExec} is invoked to check execute access to the file.
      */
     public static boolean isExecutable(Path path) {
-       return isAccessible(path, AccessMode.EXECUTE);
+        return isAccessible(path, AccessMode.EXECUTE);
     }
 
     // -- Recursive operations --
@@ -2783,6 +2783,37 @@
     }
 
     /**
+     * Opens a file for reading, returning a {@code BufferedReader} to read text
+     * from the file in an efficient manner. Bytes from the file are decoded into
+     * characters using the {@link StandardCharsets#UTF_8 UTF-8} {@link Charset
+     * charset}.
+     *
+     * <p> This method works as if invoking it were equivalent to evaluating the
+     * expression:
+     * <pre>{@code
+     * Files.newBufferedReader(path, StandardCharsets.UTF_8)
+     * }</pre>
+     *
+     * @param   path
+     *          the path to the file
+     *
+     * @return  a new buffered reader, with default buffer size, to read text
+     *          from the file
+     *
+     * @throws  IOException
+     *          if an I/O error occurs opening the file
+     * @throws  SecurityException
+     *          In the case of the default provider, and a security manager is
+     *          installed, the {@link SecurityManager#checkRead(String) checkRead}
+     *          method is invoked to check read access to the file.
+     *
+     * @since 1.8
+     */
+    public static BufferedReader newBufferedReader(Path path) throws IOException {
+        return newBufferedReader(path, StandardCharsets.UTF_8);
+    }
+
+    /**
      * Opens or creates a file for writing, returning a {@code BufferedWriter}
      * that may be used to write text to the file in an efficient manner.
      * The {@code options} parameter specifies how the the file is created or
@@ -2828,6 +2859,41 @@
     }
 
     /**
+     * Opens or creates a file for writing, returning a {@code BufferedWriter}
+     * to write text to the file in an efficient manner. The text is encoded
+     * into bytes for writing using the {@link StandardCharsets#UTF_8 UTF-8}
+     * {@link Charset charset}.
+     *
+     * <p> This method works as if invoking it were equivalent to evaluating the
+     * expression:
+     * <pre>{@code
+     * Files.newBufferedWriter(path, StandardCharsets.UTF_8, options)
+     * }</pre>
+     *
+     * @param   path
+     *          the path to the file
+     * @param   options
+     *          options specifying how the file is opened
+     *
+     * @return  a new buffered writer, with default buffer size, to write text
+     *          to the file
+     *
+     * @throws  IOException
+     *          if an I/O error occurs opening or creating the file
+     * @throws  UnsupportedOperationException
+     *          if an unsupported option is specified
+     * @throws  SecurityException
+     *          In the case of the default provider, and a security manager is
+     *          installed, the {@link SecurityManager#checkWrite(String) checkWrite}
+     *          method is invoked to check write access to the file.
+     *
+     * @since 1.8
+     */
+    public static BufferedWriter newBufferedWriter(Path path, OpenOption... options) throws IOException {
+        return newBufferedWriter(path, StandardCharsets.UTF_8, options);
+    }
+
+    /**
      * Reads all bytes from an input stream and writes them to an output stream.
      */
     private static long copy(InputStream source, OutputStream sink)
@@ -3025,9 +3091,7 @@
      * @throws  OutOfMemoryError
      *          if an array of the required size cannot be allocated
      */
-    private static byte[] read(InputStream source, int initialSize)
-            throws IOException
-    {
+    private static byte[] read(InputStream source, int initialSize) throws IOException {
         int capacity = initialSize;
         byte[] buf = new byte[capacity];
         int nread = 0;
@@ -3131,9 +3195,7 @@
      *
      * @see #newBufferedReader
      */
-    public static List<String> readAllLines(Path path, Charset cs)
-        throws IOException
-    {
+    public static List<String> readAllLines(Path path, Charset cs) throws IOException {
         try (BufferedReader reader = newBufferedReader(path, cs)) {
             List<String> result = new ArrayList<>();
             for (;;) {
@@ -3147,6 +3209,37 @@
     }
 
     /**
+     * Read all lines from a file. Bytes from the file are decoded into characters
+     * using the {@link StandardCharsets#UTF_8 UTF-8} {@link Charset charset}.
+     *
+     * <p> This method works as if invoking it were equivalent to evaluating the
+     * expression:
+     * <pre>{@code
+     * Files.readAllLines(path, StandardCharsets.UTF_8)
+     * }</pre>
+     *
+     * @param   path
+     *          the path to the file
+     *
+     * @return  the lines from the file as a {@code List}; whether the {@code
+     *          List} is modifiable or not is implementation dependent and
+     *          therefore not specified
+     *
+     * @throws  IOException
+     *          if an I/O error occurs reading from the file or a malformed or
+     *          unmappable byte sequence is read
+     * @throws  SecurityException
+     *          In the case of the default provider, and a security manager is
+     *          installed, the {@link SecurityManager#checkRead(String) checkRead}
+     *          method is invoked to check read access to the file.
+     *
+     * @since 1.8
+     */
+    public static List<String> readAllLines(Path path) throws IOException {
+        return readAllLines(path, StandardCharsets.UTF_8);
+    }
+
+    /**
      * Writes bytes to a file. The {@code options} parameter specifies how the
      * the file is created or opened. If no options are present then this method
      * works as if the {@link StandardOpenOption#CREATE CREATE}, {@link
@@ -3262,6 +3355,45 @@
         return path;
     }
 
+    /**
+     * Write lines of text to a file. Characters are encoded into bytes using
+     * the {@link StandardCharsets#UTF_8 UTF-8} {@link Charset charset}.
+     *
+     * <p> This method works as if invoking it were equivalent to evaluating the
+     * expression:
+     * <pre>{@code
+     * Files.write(path, lines, StandardCharsets.UTF_8, options);
+     * }</pre>
+     *
+     * @param   path
+     *          the path to the file
+     * @param   lines
+     *          an object to iterate over the char sequences
+     * @param   options
+     *          options specifying how the file is opened
+     *
+     * @return  the path
+     *
+     * @throws  IOException
+     *          if an I/O error occurs writing to or creating the file, or the
+     *          text cannot be encoded as {@code UTF-8}
+     * @throws  UnsupportedOperationException
+     *          if an unsupported option is specified
+     * @throws  SecurityException
+     *          In the case of the default provider, and a security manager is
+     *          installed, the {@link SecurityManager#checkWrite(String) checkWrite}
+     *          method is invoked to check write access to the file.
+     *
+     * @since 1.8
+     */
+    public static Path write(Path path,
+                             Iterable<? extends CharSequence> lines,
+                             OpenOption... options)
+        throws IOException
+    {
+        return write(path, lines, StandardCharsets.UTF_8, options);
+    }
+
     // -- Stream APIs --
 
     /**
@@ -3431,9 +3563,11 @@
      *          if an I/O error is thrown when accessing the starting file.
      * @since   1.8
      */
-    public static Stream<Path> walk(Path start, int maxDepth,
+    public static Stream<Path> walk(Path start,
+                                    int maxDepth,
                                     FileVisitOption... options)
-            throws IOException {
+        throws IOException
+    {
         FileTreeIterator iterator = new FileTreeIterator(start, maxDepth, options);
         try {
             return StreamSupport.stream(Spliterators.spliteratorUnknownSize(iterator, Spliterator.DISTINCT), false)
@@ -3484,9 +3618,7 @@
      * @see     #walk(Path, int, FileVisitOption...)
      * @since   1.8
      */
-    public static Stream<Path> walk(Path start,
-                                    FileVisitOption... options)
-            throws IOException {
+    public static Stream<Path> walk(Path start, FileVisitOption... options) throws IOException {
         return walk(start, Integer.MAX_VALUE, options);
     }
 
@@ -3547,7 +3679,8 @@
                                     int maxDepth,
                                     BiPredicate<Path, BasicFileAttributes> matcher,
                                     FileVisitOption... options)
-            throws IOException {
+        throws IOException
+    {
         FileTreeIterator iterator = new FileTreeIterator(start, maxDepth, options);
         try {
             return StreamSupport.stream(Spliterators.spliteratorUnknownSize(iterator, Spliterator.DISTINCT), false)
@@ -3561,7 +3694,7 @@
     }
 
     /**
-     * Read all lines from a file as a {@code Stream}.  Unlike {@link
+     * Read all lines from a file as a {@code Stream}. Unlike {@link
      * #readAllLines(Path, Charset) readAllLines}, this method does not read
      * all lines into a {@code List}, but instead populates lazily as the stream
      * is consumed.
@@ -3619,4 +3752,33 @@
             throw e;
         }
     }
+
+    /**
+     * Read all lines from a file as a {@code Stream}. Bytes from the file are
+     * decoded into characters using the {@link StandardCharsets#UTF_8 UTF-8}
+     * {@link Charset charset}.
+     *
+     * <p> This method works as if invoking it were equivalent to evaluating the
+     * expression:
+     * <pre>{@code
+     * Files.lines(path, StandardCharsets.UTF_8)
+     * }</pre>
+     *
+     * @param   path
+     *          the path to the file
+     *
+     * @return  the lines from the file as a {@code Stream}
+     *
+     * @throws  IOException
+     *          if an I/O error occurs opening the file
+     * @throws  SecurityException
+     *          In the case of the default provider, and a security manager is
+     *          installed, the {@link SecurityManager#checkRead(String) checkRead}
+     *          method is invoked to check read access to the file.
+     *
+     * @since 1.8
+     */
+    public static Stream<String> lines(Path path) throws IOException {
+        return lines(path, StandardCharsets.UTF_8);
+    }
 }
--- a/jdk/src/share/classes/java/text/DecimalFormat.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/java/text/DecimalFormat.java	Tue Oct 15 13:54:01 2013 +0100
@@ -371,7 +371,7 @@
  * }
  * }</pre></blockquote>
  *
- * @see          <a href="http://java.sun.com/docs/books/tutorial/i18n/format/decimalFormat.html">Java Tutorial</a>
+ * @see          <a href="http://docs.oracle.com/javase/tutorial/i18n/format/decimalFormat.html">Java Tutorial</a>
  * @see          NumberFormat
  * @see          DecimalFormatSymbols
  * @see          ParsePosition
--- a/jdk/src/share/classes/java/text/SimpleDateFormat.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/java/text/SimpleDateFormat.java	Tue Oct 15 13:54:01 2013 +0100
@@ -412,7 +412,7 @@
  * If multiple threads access a format concurrently, it must be synchronized
  * externally.
  *
- * @see          <a href="http://java.sun.com/docs/books/tutorial/i18n/format/simpleDateFormat.html">Java Tutorial</a>
+ * @see          <a href="http://docs.oracle.com/javase/tutorial/i18n/format/simpleDateFormat.html">Java Tutorial</a>
  * @see          java.util.Calendar
  * @see          java.util.TimeZone
  * @see          DateFormat
--- a/jdk/src/share/classes/java/util/ServiceLoader.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/java/util/ServiceLoader.java	Tue Oct 15 13:54:01 2013 +0100
@@ -453,6 +453,12 @@
      * Invoking its {@link java.util.Iterator#remove() remove} method will
      * cause an {@link UnsupportedOperationException} to be thrown.
      *
+     * @implNote When adding providers to the cache, the {@link #iterator
+     * Iterator} processes resources in the order that the {@link
+     * java.lang.ClassLoader#getResources(java.lang.String)
+     * ClassLoader.getResources(String)} method finds the service configuration
+     * files.
+     *
      * @return  An iterator that lazily loads providers for this loader's
      *          service
      */
--- a/jdk/src/share/classes/javax/imageio/plugins/bmp/BMPImageWriteParam.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/imageio/plugins/bmp/BMPImageWriteParam.java	Tue Oct 15 13:54:01 2013 +0100
@@ -29,6 +29,7 @@
 import javax.imageio.ImageWriteParam;
 
 import com.sun.imageio.plugins.bmp.BMPConstants;
+import com.sun.imageio.plugins.bmp.BMPCompressionTypes;
 
 /**
  * A subclass of <code>ImageWriteParam</code> for encoding images in
@@ -78,7 +79,7 @@
         super(locale);
 
         // Set compression types ("BI_RGB" denotes uncompressed).
-        compressionTypes = BMPConstants.compressionTypeNames.clone();
+        compressionTypes = BMPCompressionTypes.getCompressionTypes();
 
         // Set compression flag.
         canWriteCompressed = true;
--- a/jdk/src/share/classes/javax/management/Descriptor.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/management/Descriptor.java	Tue Oct 15 13:54:01 2013 +0100
@@ -319,7 +319,7 @@
  * <a href="modelmbean/ModelMBeanOperationInfo.html#descriptor"><!--
  * -->{@code ModelMBeanOperationInfo}</a>, as
  * well as the chapter "Model MBeans" of the <a
- * href="http://java.sun.com/products/JavaManagement/download.html">JMX
+ * href="http://www.oracle.com/technetwork/java/javase/tech/javamanagement-140525.html">JMX
  * Specification</a>.  The following table summarizes these fields.  Note
  * that when the Type in this table is Number, a String that is the decimal
  * representation of a Long can also be used.</p>
--- a/jdk/src/share/classes/javax/print/Doc.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/print/Doc.java	Tue Oct 15 13:54:01 2013 +0100
@@ -65,8 +65,8 @@
  * representation object "consumes" the print data as the caller obtains the
  * print data, such as a print data representation object which is a stream.
  * Once the Print Job has called {@link #getPrintData()
- * <CODE>getPrintData()</CODE>} and obtained the stream, any further calls to
- * {@link #getPrintData() <CODE>getPrintData()</CODE>} will return the same
+ * getPrintData()} and obtained the stream, any further calls to
+ * {@link #getPrintData() getPrintData()} will return the same
  * stream object upon which reading may already be in progress, <I>not</I> a new
  * stream object that will re-read the print data from the beginning. Specifying
  * a doc object to behave this way simplifies the implementation of doc objects,
@@ -83,7 +83,7 @@
  * object is constructed. In this case the doc object might provide a "lazy"
  * implementation that generates the print data representation object (and/or
  * the print data) only when the Print Job calls for it (when the Print Job
- * calls the {@link #getPrintData() <CODE>getPrintData()</CODE>} method).
+ * calls the {@link #getPrintData() getPrintData()} method).
  * <P>
  * There is no restriction on the number of client threads that may be
  * simultaneously accessing the same doc. Therefore, all implementations of
--- a/jdk/src/share/classes/javax/print/DocFlavor.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/print/DocFlavor.java	Tue Oct 15 13:54:01 2013 +0100
@@ -53,7 +53,7 @@
  * <LI>
  * <B>Representation class name.</B> This specifies the fully-qualified name of
  * the class of the object from which the actual print data comes, as returned
- * by the {@link java.lang.Class#getName() <CODE>Class.getName()</CODE>} method.
+ * by the {@link java.lang.Class#getName() Class.getName()} method.
  * (Thus the class name for <CODE>byte[]</CODE> is <CODE>"[B"</CODE>, for
  * <CODE>char[]</CODE> it is <CODE>"[C"</CODE>.)
  * </UL>
@@ -174,7 +174,7 @@
  * platform for data (eg files) stored in that platform's encoding.
  * A CharSet which corresponds to this and is suitable for use in a
  * mime-type for a DocFlavor can be obtained
- * from {@link DocFlavor#hostEncoding <CODE>DocFlavor.hostEncoding</CODE>}
+ * from {@link DocFlavor#hostEncoding DocFlavor.hostEncoding}
  * This may not always be the primary IANA name but is guaranteed to be
  * understood by this VM.
  * For common flavors, the pre-defined *HOST DocFlavors may be used.
@@ -669,7 +669,7 @@
         /**
          * Doc flavor with MIME type = <CODE>"text/plain"</CODE>,
          * encoded in the host platform encoding.
-         * See {@link DocFlavor#hostEncoding <CODE>hostEncoding</CODE>}
+         * See {@link DocFlavor#hostEncoding hostEncoding}
          * Print data representation class name =
          * <CODE>"[B"</CODE> (byte array).
          */
@@ -728,7 +728,7 @@
         /**
          * Doc flavor with MIME type = <CODE>"text/html"</CODE>,
          * encoded in the host platform encoding.
-         * See {@link DocFlavor#hostEncoding <CODE>hostEncoding</CODE>}
+         * See {@link DocFlavor#hostEncoding hostEncoding}
          * Print data representation class name =
          * <CODE>"[B"</CODE> (byte array).
          */
@@ -838,7 +838,7 @@
     /**
      * Class DocFlavor.INPUT_STREAM provides predefined static constant
      * DocFlavor objects for example doc flavors using a byte stream ({@link
-     * java.io.InputStream <CODE>java.io.InputStream</CODE>}) as the print
+     * java.io.InputStream java.io.InputStream}) as the print
      * data representation class.
      * <P>
      *
@@ -868,7 +868,7 @@
         /**
          * Doc flavor with MIME type = <CODE>"text/plain"</CODE>,
          * encoded in the host platform encoding.
-         * See {@link DocFlavor#hostEncoding <CODE>hostEncoding</CODE>}
+         * See {@link DocFlavor#hostEncoding hostEncoding}
          * Print data representation class name =
          * <CODE>"java.io.InputStream"</CODE> (byte stream).
          */
@@ -925,7 +925,7 @@
         /**
          * Doc flavor with MIME type = <CODE>"text/html"</CODE>,
          * encoded in the host platform encoding.
-         * See {@link DocFlavor#hostEncoding <CODE>hostEncoding</CODE>}
+         * See {@link DocFlavor#hostEncoding hostEncoding}
          * Print data representation class name =
          * <CODE>"java.io.InputStream"</CODE> (byte stream).
          */
@@ -1041,7 +1041,7 @@
      * Class DocFlavor.URL provides predefined static constant DocFlavor
      * objects.
      * For example doc flavors using a Uniform Resource Locator ({@link
-     * java.net.URL <CODE>java.net.URL</CODE>}) as the print data
+     * java.net.URL java.net.URL}) as the print data
      * representation  class.
      * <P>
      *
@@ -1068,7 +1068,7 @@
         /**
          * Doc flavor with MIME type = <CODE>"text/plain"</CODE>,
          * encoded in the host platform encoding.
-         * See {@link DocFlavor#hostEncoding <CODE>hostEncoding</CODE>}
+         * See {@link DocFlavor#hostEncoding hostEncoding}
          * Print data representation class name =
          * <CODE>"java.net.URL"</CODE> (byte stream).
          */
@@ -1125,7 +1125,7 @@
         /**
          * Doc flavor with MIME type = <CODE>"text/html"</CODE>,
          * encoded in the host platform encoding.
-         * See {@link DocFlavor#hostEncoding <CODE>hostEncoding</CODE>}
+         * See {@link DocFlavor#hostEncoding hostEncoding}
          * Print data representation class name =
          * <CODE>"java.net.URL"</CODE> (byte stream).
          */
@@ -1280,7 +1280,7 @@
     /**
      * Class DocFlavor.STRING provides predefined static constant DocFlavor
      * objects for example doc flavors using a string ({@link java.lang.String
-     * <CODE>java.lang.String</CODE>}) as the print data representation class.
+     * java.lang.String}) as the print data representation class.
      * As such, the character set is Unicode.
      * <P>
      *
@@ -1328,7 +1328,7 @@
     /**
      * Class DocFlavor.READER provides predefined static constant DocFlavor
      * objects for example doc flavors using a character stream ({@link
-     * java.io.Reader <CODE>java.io.Reader</CODE>}) as the print data
+     * java.io.Reader java.io.Reader}) as the print data
      * representation class. As such, the character set is Unicode.
      * <P>
      *
--- a/jdk/src/share/classes/javax/print/MultiDoc.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/print/MultiDoc.java	Tue Oct 15 13:54:01 2013 +0100
@@ -39,9 +39,9 @@
  * docs. A multidoc object is like a node in the linked list, containing the
  * current doc in the list and a pointer to the next node (multidoc) in the
  * list. The Print Job can call the multidoc's {@link #getDoc()
- * <CODE>getDoc()</CODE>} method to get the current doc. When it's ready to go
+ * getDoc()} method to get the current doc. When it's ready to go
  * on to the next doc, the Print Job can call the multidoc's {@link #next()
- * <CODE>next()</CODE>} method to get the next multidoc, which contains the
+ * next()} method to get the next multidoc, which contains the
  * next doc. So Print Job code for accessing a multidoc might look like this:
  * <PRE>
  *      void processMultiDoc(MultiDoc theMultiDoc) {
@@ -88,12 +88,12 @@
 * multiple docs to a Print Job, every Print Service proxy that supports
  * multidoc print jobs is required to access a MultiDoc object using the
  * interleaved pattern. That is, given a MultiDoc object, the print service
- * proxy will call {@link #getDoc() <CODE>getDoc()</CODE>} one or more times
+ * proxy will call {@link #getDoc() getDoc()} one or more times
  * until it successfully obtains the current Doc object. The print service proxy
  * will then obtain the current doc's print data, not proceeding until all the
  * print data is obtained or an unrecoverable error occurs. If it is able to
  * continue, the print service proxy will then call {@link #next()
- * <CODE>next()</CODE>} one or more times until it successfully obtains either
+ * next()} one or more times until it successfully obtains either
  * the next MultiDoc object or an indication that there are no more. An
  * implementation of interface MultiDoc can assume the print service proxy will
  * follow this interleaved pattern; for any other pattern of usage, the MultiDoc
--- a/jdk/src/share/classes/javax/print/attribute/standard/Finishings.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/print/attribute/standard/Finishings.java	Tue Oct 15 13:54:01 2013 +0100
@@ -42,16 +42,16 @@
  * Standard Finishings values are:
  * <TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=100% SUMMARY="layout">
  * <TR>
- * <TD WIDTH=10%>
+ * <TD STYLE="WIDTH:10%">
  * &nbsp;
  * </TD>
- * <TD WIDTH=27%>
+ * <TD STYLE="WIDTH:27%">
  * {@link #NONE NONE}
  * </TD>
- * <TD WIDTH=27%>
+ * <TD STYLE="WIDTH:27%">
  * {@link #STAPLE STAPLE}
  * </TD>
- * <TD WIDTH=36%>
+ * <TD STYLE="WIDTH:36%">
  * {@link #EDGE_STITCH EDGE_STITCH}
  * </TD>
  * </TR>
@@ -78,70 +78,70 @@
  * corner or an edge as if the document were a portrait document:
  * <TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=100% SUMMARY="layout">
  * <TR>
- * <TD WIDTH=10%>
+ * <TD STYLE="WIDTH:10%">
  * &nbsp;
  * </TD>
- * <TD WIDTH=27%>
+ * <TD STYLE="WIDTH:27%">
  * {@link #STAPLE_TOP_LEFT STAPLE_TOP_LEFT}
  * </TD>
- * <TD WIDTH=27%>
+ * <TD STYLE="WIDTH:27%">
  * {@link #EDGE_STITCH_LEFT EDGE_STITCH_LEFT}
  * </TD>
- * <TD WIDTH=27%>
+ * <TD STYLE="WIDTH:27%">
  * {@link #STAPLE_DUAL_LEFT STAPLE_DUAL_LEFT}
  * </TD>
- * <TD WIDTH=9%>
+ * <TD STYLE="WIDTH:9%">
  * &nbsp;
  * </TD>
  * </TR>
  * <TR>
- * <TD WIDTH=10%>
+ * <TD STYLE="WIDTH:10%">
  * &nbsp;
  * </TD>
- * <TD WIDTH=27%>
+ * <TD STYLE="WIDTH:27%">
  * {@link #STAPLE_BOTTOM_LEFT STAPLE_BOTTOM_LEFT}
  * </TD>
- * <TD WIDTH=27%>
+ * <TD STYLE="WIDTH:27%">
  * {@link #EDGE_STITCH_TOP EDGE_STITCH_TOP}
  * </TD>
- * <TD WIDTH=27%>
+ * <TD STYLE="WIDTH:27%">
  * {@link #STAPLE_DUAL_TOP STAPLE_DUAL_TOP}
  * </TD>
- * <TD WIDTH=9%>
+ * <TD STYLE="WIDTH:9%">
  * &nbsp;
  * </TD>
  * </TR>
  * <TR>
- * <TD WIDTH=10%>
+ * <TD STYLE="WIDTH:10%">
  * &nbsp;
  * </TD>
- * <TD WIDTH=27%>
+ * <TD STYLE="WIDTH:27%">
  * {@link #STAPLE_TOP_RIGHT STAPLE_TOP_RIGHT}
  * </TD>
- * <TD WIDTH=27%>
+ * <TD STYLE="WIDTH:27%">
  * {@link #EDGE_STITCH_RIGHT EDGE_STITCH_RIGHT}
  * </TD>
- * <TD WIDTH=27%>
+ * <TD STYLE="WIDTH:27%">
  * {@link #STAPLE_DUAL_RIGHT STAPLE_DUAL_RIGHT}
  * </TD>
- * <TD WIDTH=9%>
+ * <TD STYLE="WIDTH:9%">
  * &nbsp;
  * </TD>
  * </TR>
  * <TR>
- * <TD WIDTH=10%>
+ * <TD STYLE="WIDTH:10%">
  * &nbsp;
  * </TD>
- * <TD WIDTH=27%>
+ * <TD STYLE="WIDTH:27%">
  * {@link #STAPLE_BOTTOM_RIGHT STAPLE_BOTTOM_RIGHT}
  * </TD>
- * <TD WIDTH=27%>
+ * <TD STYLE="WIDTH:27%">
  * {@link #EDGE_STITCH_BOTTOM EDGE_STITCH_BOTTOM}
  * </TD>
- * <TD WIDTH=27%>
+ * <TD STYLE="WIDTH:27%">
  * {@link #STAPLE_DUAL_BOTTOM STAPLE_DUAL_BOTTOM}
  * </TD>
- * <TD WIDTH=9%>
+ * <TD STYLE="WIDTH:9%">
  * &nbsp;
  * </TD>
  * </TR>
--- a/jdk/src/share/classes/javax/print/attribute/standard/JobStateReasons.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/print/attribute/standard/JobStateReasons.java	Tue Oct 15 13:54:01 2013 +0100
@@ -110,7 +110,7 @@
      * The underlying hash set's initial capacity and load factor are as
      * specified in the superclass constructor {@link
      * java.util.HashSet#HashSet(java.util.Collection)
-     * <CODE>HashSet(Collection)</CODE>}.
+     * HashSet(Collection)}.
      *
      * @param  collection  Collection to copy.
      *
--- a/jdk/src/share/classes/javax/print/attribute/standard/MediaPrintableArea.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/print/attribute/standard/MediaPrintableArea.java	Tue Oct 15 13:54:01 2013 +0100
@@ -56,7 +56,7 @@
  * any specified finishings.
  * <code>PrintService</code> provides the method to query the supported
  * values of an attribute in a suitable context :
- * See  {@link javax.print.PrintService#getSupportedAttributeValues(Class,DocFlavor, AttributeSet) <code>PrintService.getSupportedAttributeValues()</code>}
+ * See  {@link javax.print.PrintService#getSupportedAttributeValues(Class,DocFlavor, AttributeSet) PrintService.getSupportedAttributeValues()}
  * <p>
  * The rectangular printable area is defined thus:
  * The (x,y) origin is positioned at the top-left of the paper in portrait
@@ -153,8 +153,8 @@
      * Get the printable area as an array of 4 values in the order
      * x, y, w, h. The values returned are in the given units.
      * @param  units
-     *     Unit conversion factor, e.g. {@link #INCH <CODE>INCH</CODE>} or
-     *     {@link #MM <CODE>MM</CODE>}.
+     *     Unit conversion factor, e.g. {@link #INCH INCH} or
+     *     {@link #MM MM}.
      *
      * @return printable area as array of x, y, w, h in the specified units.
      *
@@ -170,8 +170,8 @@
      * Get the x location of the origin of the printable area in the
      * specified units.
      * @param  units
-     *     Unit conversion factor, e.g. {@link #INCH <CODE>INCH</CODE>} or
-     *     {@link #MM <CODE>MM</CODE>}.
+     *     Unit conversion factor, e.g. {@link #INCH INCH} or
+     *     {@link #MM MM}.
      *
      * @return  x location of the origin of the printable area in the
      * specified units.
@@ -187,8 +187,8 @@
      * Get the y location of the origin of the printable area in the
      * specified units.
      * @param  units
-     *     Unit conversion factor, e.g. {@link #INCH <CODE>INCH</CODE>} or
-     *     {@link #MM <CODE>MM</CODE>}.
+     *     Unit conversion factor, e.g. {@link #INCH INCH} or
+     *     {@link #MM MM}.
      *
      * @return  y location of the origin of the printable area in the
      * specified units.
@@ -203,8 +203,8 @@
     /**
      * Get the width of the printable area in the specified units.
      * @param  units
-     *     Unit conversion factor, e.g. {@link #INCH <CODE>INCH</CODE>} or
-     *     {@link #MM <CODE>MM</CODE>}.
+     *     Unit conversion factor, e.g. {@link #INCH INCH} or
+     *     {@link #MM MM}.
      *
      * @return  width of the printable area in the specified units.
      *
@@ -218,8 +218,8 @@
     /**
      * Get the height of the printable area in the specified units.
      * @param  units
-     *     Unit conversion factor, e.g. {@link #INCH <CODE>INCH</CODE>} or
-     *     {@link #MM <CODE>MM</CODE>}.
+     *     Unit conversion factor, e.g. {@link #INCH INCH} or
+     *     {@link #MM MM}.
      *
      * @return  height of the printable area in the specified units.
      *
@@ -292,8 +292,8 @@
      * given units.
      *
      * @param  units
-     *     Unit conversion factor, e.g. {@link #INCH <CODE>INCH</CODE>} or
-     *     {@link #MM <CODE>MM</CODE>}.
+     *     Unit conversion factor, e.g. {@link #INCH INCH} or
+     *     {@link #MM MM}.
      * @param  unitsName
      *     Units name string, e.g. <CODE>"in"</CODE> or <CODE>"mm"</CODE>. If
      *     null, no units name is appended to the result.
--- a/jdk/src/share/classes/javax/print/attribute/standard/MultipleDocumentHandling.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/print/attribute/standard/MultipleDocumentHandling.java	Tue Oct 15 13:54:01 2013 +0100
@@ -71,7 +71,7 @@
  * <UL>
  * <LI>
  * <A NAME="sdfi">{@link #SINGLE_DOCUMENT
- * <B><CODE>SINGLE_DOCUMENT</CODE></B>}</A>. If a print job has multiple
+ * <B>SINGLE_DOCUMENT</B>}</A>. If a print job has multiple
  * documents -- say, the document data is called <CODE>a</CODE> and
  * <CODE>b</CODE> -- then the result of processing all the document data
  * (<CODE>a</CODE> and then <CODE>b</CODE>) must be treated as a single sequence
@@ -86,7 +86,7 @@
  * <P>
  * <LI>
  * <A NAME="sducfi">{@link #SEPARATE_DOCUMENTS_UNCOLLATED_COPIES
- * <B><CODE>SEPARATE_DOCUMENTS_UNCOLLATED_COPIES</CODE></B>}</A>. If a print job
+ * <B>SEPARATE_DOCUMENTS_UNCOLLATED_COPIES</B>}</A>. If a print job
  * has multiple documents -- say, the document data is called <CODE>a</CODE> and
  * <CODE>b</CODE> -- then the result of processing the data in each document
  * instance must be treated as a single sequence of media sheets for finishing
@@ -99,7 +99,7 @@
  * <P>
  * <LI>
  * <A NAME="sdccfi">{@link #SEPARATE_DOCUMENTS_COLLATED_COPIES
- * <B><CODE>SEPARATE_DOCUMENTS_COLLATED_COPIES</CODE></B>}</A>. If a print job
+ * <B>SEPARATE_DOCUMENTS_COLLATED_COPIES</B>}</A>. If a print job
  * has multiple documents -- say, the document data is called <CODE>a</CODE> and
  * <CODE>b</CODE> -- then the result of processing the data in each document
  * instance must be treated as a single sequence of media sheets for finishing
@@ -112,7 +112,7 @@
  * <P>
  * <LI>
  * <A NAME="sdnsfi">{@link #SINGLE_DOCUMENT_NEW_SHEET
- * <B><CODE>SINGLE_DOCUMENT_NEW_SHEET</CODE></B>}</A>. Same as SINGLE_DOCUMENT,
+ * <B>SINGLE_DOCUMENT_NEW_SHEET</B>}</A>. Same as SINGLE_DOCUMENT,
  * except that the printer must ensure that the first impression of each
  * document instance in the job is placed on a new media sheet. This value
  * allows multiple documents to be stapled together with a single staple where
@@ -127,7 +127,7 @@
  * next document or document copy on to a new sheet.
  * <P>
  * In addition, if a {@link Finishings Finishings} attribute of
- * {@link Finishings#STAPLE <CODE>STAPLE</CODE>} is specified, then:
+ * {@link Finishings#STAPLE STAPLE} is specified, then:
  * <UL>
  * <LI>
  * With SINGLE_DOCUMENT, documents <CODE>a</CODE> and <CODE>b</CODE> are
--- a/jdk/src/share/classes/javax/print/attribute/standard/PrinterStateReasons.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/print/attribute/standard/PrinterStateReasons.java	Tue Oct 15 13:54:01 2013 +0100
@@ -129,7 +129,7 @@
      * Severity} mappings as the given map. The underlying hash map's initial
      * capacity and load factor are as specified in the superclass constructor
      * {@link java.util.HashMap#HashMap(java.util.Map)
-     * <CODE>HashMap(Map)</CODE>}.
+     * HashMap(Map)}.
      *
      * @param  map  Map to copy.
      *
--- a/jdk/src/share/classes/javax/print/attribute/standard/Sides.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/print/attribute/standard/Sides.java	Tue Oct 15 13:54:01 2013 +0100
@@ -134,7 +134,7 @@
      * sides of consecutive media sheets, such that the orientation of each
      * pair of print-stream pages on the medium would be correct for the
      * reader as if for binding on the long edge. This imposition is also
-     * known as "duplex" (see {@link #DUPLEX <CODE>DUPLEX</CODE>}).
+     * known as "duplex" (see {@link #DUPLEX DUPLEX}).
      */
     public static final Sides TWO_SIDED_LONG_EDGE = new Sides(1);
 
@@ -143,19 +143,19 @@
      * sides of consecutive media sheets, such that the orientation of each
      * pair of print-stream pages on the medium would be correct for the
      * reader as if for binding on the short edge. This imposition is also
-     * known as "tumble" (see {@link #TUMBLE <CODE>TUMBLE</CODE>}).
+     * known as "tumble" (see {@link #TUMBLE TUMBLE}).
      */
     public static final Sides TWO_SIDED_SHORT_EDGE = new Sides(2);
 
     /**
      * An alias for "two sided long edge" (see {@link #TWO_SIDED_LONG_EDGE
-     * <CODE>TWO_SIDED_LONG_EDGE</CODE>}).
+     * TWO_SIDED_LONG_EDGE}).
      */
     public static final Sides DUPLEX = TWO_SIDED_LONG_EDGE;
 
     /**
      * An alias for "two sided short edge" (see {@link #TWO_SIDED_SHORT_EDGE
-     * <CODE>TWO_SIDED_SHORT_EDGE</CODE>}).
+     * TWO_SIDED_SHORT_EDGE}).
      */
     public static final Sides TUMBLE = TWO_SIDED_SHORT_EDGE;
 
--- a/jdk/src/share/classes/javax/swing/AbstractAction.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/AbstractAction.java	Tue Oct 15 13:54:01 2013 +0100
@@ -49,7 +49,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
--- a/jdk/src/share/classes/javax/swing/AbstractButton.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/AbstractButton.java	Tue Oct 15 13:54:01 2013 +0100
@@ -53,12 +53,12 @@
  * configuring a button.  Refer to <a href="Action.html#buttonActions">
  * Swing Components Supporting <code>Action</code></a> for more
  * details, and you can find more information in <a
- * href="http://java.sun.com/docs/books/tutorial/uiswing/misc/action.html">How
+ * href="http://docs.oracle.com/javase/tutorial/uiswing/misc/action.html">How
  * to Use Actions</a>, a section in <em>The Java Tutorial</em>.
  * <p>
  * For further information see
  * <a
- href="http://java.sun.com/docs/books/tutorial/uiswing/components/button.html">How to Use Buttons, Check Boxes, and Radio Buttons</a>,
+ href="http://docs.oracle.com/javase/tutorial/uiswing/components/button.html">How to Use Buttons, Check Boxes, and Radio Buttons</a>,
  * a section in <em>The Java Tutorial</em>.
  * <p>
  * <strong>Warning:</strong>
@@ -66,7 +66,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
@@ -1973,7 +1973,7 @@
      * 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>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      */
@@ -2379,7 +2379,7 @@
      * 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>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      * @since 1.4
--- a/jdk/src/share/classes/javax/swing/AbstractCellEditor.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/AbstractCellEditor.java	Tue Oct 15 13:54:01 2013 +0100
@@ -43,7 +43,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
--- a/jdk/src/share/classes/javax/swing/AbstractListModel.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/AbstractListModel.java	Tue Oct 15 13:54:01 2013 +0100
@@ -38,7 +38,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
--- a/jdk/src/share/classes/javax/swing/BorderFactory.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/BorderFactory.java	Tue Oct 15 13:54:01 2013 +0100
@@ -35,7 +35,7 @@
  * possible, this factory will hand out references to shared
  * <code>Border</code> instances.
  * For further information and examples see
- * <a href="http://java.sun.com/docs/books/tutorial/uiswing/misc/border.html">How
+ * <a href="http://docs.oracle.com/javase/tutorial/uiswing/components/border.htmll">How
  to Use Borders</a>,
  * a section in <em>The Java Tutorial</em>.
  *
--- a/jdk/src/share/classes/javax/swing/BoundedRangeModel.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/BoundedRangeModel.java	Tue Oct 15 13:54:01 2013 +0100
@@ -71,8 +71,8 @@
  *
  * For an example of specifying custom bounded range models used by sliders,
  * see <a
- href="http://java.sun.com/docs/books/tutorial/uiswing/overview/anatomy.html">The Anatomy of a Swing-Based Program</a>
- * in <em>The Java Tutorial.</em>
+ href="http://www.oracle.com/technetwork/java/architecture-142923.html#separable">Separable model architecture</a>
+ * in <em>A Swing Architecture Overview.</em>
  *
  * @author Hans Muller
  * @see DefaultBoundedRangeModel
--- a/jdk/src/share/classes/javax/swing/Box.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/Box.java	Tue Oct 15 13:54:01 2013 +0100
@@ -60,7 +60,7 @@
  * If you are implementing a <code>BoxLayout</code> you
  * can find further information and examples in
  * <a
- href="http://java.sun.com/docs/books/tutorial/uiswing/layout/box.html">How to Use BoxLayout</a>,
+ href="http://docs.oracle.com/javase/tutorial/uiswing/layout/box.html">How to Use BoxLayout</a>,
  * a section in <em>The Java Tutorial.</em>
  * <p>
  * <strong>Warning:</strong>
@@ -68,7 +68,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
@@ -298,7 +298,7 @@
      * 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>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      */
--- a/jdk/src/share/classes/javax/swing/BoxLayout.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/BoxLayout.java	Tue Oct 15 13:54:01 2013 +0100
@@ -36,12 +36,12 @@
  * vertically or horizontally. The components will not wrap so, for
  * example, a vertical arrangement of components will stay vertically
  * arranged when the frame is resized.
- * <TABLE ALIGN="RIGHT" BORDER="0" SUMMARY="layout">
+ * <TABLE STYLE="FLOAT:RIGHT" BORDER="0" SUMMARY="layout">
  *    <TR>
  *      <TD ALIGN="CENTER">
- *         <P ALIGN="CENTER"><IMG SRC="doc-files/BoxLayout-1.gif"
+ *         <P STYLE="TEXT-ALIGN:CENTER"><IMG SRC="doc-files/BoxLayout-1.gif"
  *          alt="The following text describes this graphic."
- *          WIDTH="191" HEIGHT="201" ALIGN="BOTTOM" BORDER="0">
+ *          WIDTH="191" HEIGHT="201" STYLE="FLOAT:BOTTOM; BORDER:0">
  *      </TD>
  *    </TR>
  * </TABLE>
@@ -116,7 +116,7 @@
  * <p>
  * For further information and examples see
  * <a
- href="http://java.sun.com/docs/books/tutorial/uiswing/layout/box.html">How to Use BoxLayout</a>,
+ href="http://docs.oracle.com/javase/tutorial/uiswing/layout/box.html">How to Use BoxLayout</a>,
  * a section in <em>The Java Tutorial.</em>
  * <p>
  * <strong>Warning:</strong>
@@ -124,7 +124,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
--- a/jdk/src/share/classes/javax/swing/ButtonGroup.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/ButtonGroup.java	Tue Oct 15 13:54:01 2013 +0100
@@ -51,7 +51,7 @@
  * Initially, all buttons in the group are unselected.
  * <p>
  * For examples and further information on using button groups see
- * <a href="http://java.sun.com/docs/books/tutorial/uiswing/components/button.html#radiobutton">How to Use Radio Buttons</a>,
+ * <a href="http://docs.oracle.com/javase/tutorial/uiswing/components/button.html#radiobutton">How to Use Radio Buttons</a>,
  * a section in <em>The Java Tutorial</em>.
  * <p>
  * <strong>Warning:</strong>
@@ -59,7 +59,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
--- a/jdk/src/share/classes/javax/swing/CellRendererPane.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/CellRendererPane.java	Tue Oct 15 13:54:01 2013 +0100
@@ -57,7 +57,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
--- a/jdk/src/share/classes/javax/swing/DefaultBoundedRangeModel.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/DefaultBoundedRangeModel.java	Tue Oct 15 13:54:01 2013 +0100
@@ -37,7 +37,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
--- a/jdk/src/share/classes/javax/swing/DefaultButtonModel.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/DefaultButtonModel.java	Tue Oct 15 13:54:01 2013 +0100
@@ -39,7 +39,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
--- a/jdk/src/share/classes/javax/swing/DefaultCellEditor.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/DefaultCellEditor.java	Tue Oct 15 13:54:01 2013 +0100
@@ -43,7 +43,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
--- a/jdk/src/share/classes/javax/swing/DefaultFocusManager.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/DefaultFocusManager.java	Tue Oct 15 13:54:01 2013 +0100
@@ -37,7 +37,7 @@
  * <code>java.awt.DefaultKeyboardFocusManager</code> instead.
  * <p>
  * Please see
- * <a href="http://java.sun.com/docs/books/tutorial/uiswing/misc/focus.html">
+ * <a href="http://docs.oracle.com/javase/tutorial/uiswing/misc/focus.html">
  * How to Use the Focus Subsystem</a>,
  * a section in <em>The Java Tutorial</em>, and the
  * <a href="../../java/awt/doc-files/FocusSpec.html">Focus Specification</a>
--- a/jdk/src/share/classes/javax/swing/DefaultListCellRenderer.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/DefaultListCellRenderer.java	Tue Oct 15 13:54:01 2013 +0100
@@ -63,7 +63,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
@@ -337,7 +337,7 @@
      * 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>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      */
--- a/jdk/src/share/classes/javax/swing/DefaultListModel.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/DefaultListModel.java	Tue Oct 15 13:54:01 2013 +0100
@@ -44,7 +44,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
--- a/jdk/src/share/classes/javax/swing/DefaultListSelectionModel.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/DefaultListSelectionModel.java	Tue Oct 15 13:54:01 2013 +0100
@@ -41,7 +41,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
--- a/jdk/src/share/classes/javax/swing/DefaultSingleSelectionModel.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/DefaultSingleSelectionModel.java	Tue Oct 15 13:54:01 2013 +0100
@@ -37,7 +37,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
--- a/jdk/src/share/classes/javax/swing/FocusManager.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/FocusManager.java	Tue Oct 15 13:54:01 2013 +0100
@@ -34,7 +34,7 @@
  * <code>java.awt.DefaultKeyboardFocusManager</code> instead.
  * <p>
  * Please see
- * <a href="http://java.sun.com/docs/books/tutorial/uiswing/misc/focus.html">
+ * <a href="http://docs.oracle.com/javase/tutorial/uiswing/misc/focus.html">
  * How to Use the Focus Subsystem</a>,
  * a section in <em>The Java Tutorial</em>, and the
  * <a href="../../java/awt/doc-files/FocusSpec.html">Focus Specification</a>
--- a/jdk/src/share/classes/javax/swing/ImageIcon.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/ImageIcon.java	Tue Oct 15 13:54:01 2013 +0100
@@ -50,7 +50,7 @@
  *
  * <p>
  * For further information and examples of using image icons, see
- * <a href="http://java.sun.com/docs/books/tutorial/uiswing/misc/icon.html">How to Use Icons</a>
+ * <a href="http://docs.oracle.com/javase/tutorial/uiswing/components/icon.html">How to Use Icons</a>
  * in <em>The Java Tutorial.</em>
  *
  * <p>
@@ -59,7 +59,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
@@ -555,7 +555,7 @@
      * 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>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      * @since 1.3
--- a/jdk/src/share/classes/javax/swing/JApplet.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/JApplet.java	Tue Oct 15 13:54:01 2013 +0100
@@ -40,7 +40,7 @@
  * in <em>The Java Tutorial</em>,
  * in the section
  * <a
- href="http://java.sun.com/docs/books/tutorial/uiswing/components/applet.html">How to Make Applets</a>.
+ href="http://docs.oracle.com/javase/tutorial/uiswing/components/applet.html">How to Make Applets</a>.
  * <p>
  * The <code>JApplet</code> class is slightly incompatible with
  * <code>java.applet.Applet</code>.  <code>JApplet</code> contains a
@@ -77,7 +77,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
@@ -183,7 +183,7 @@
      * are currently typed to {@code JComponent}.
      * <p>
      * Please see
-     * <a href="http://java.sun.com/docs/books/tutorial/uiswing/misc/dnd.html">
+     * <a href="http://docs.oracle.com/javase/tutorial/uiswing/dnd/index.html">
      * How to Use Drag and Drop and Data Transfer</a>, a section in
      * <em>The Java Tutorial</em>, for more information.
      *
--- a/jdk/src/share/classes/javax/swing/JButton.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/JButton.java	Tue Oct 15 13:54:01 2013 +0100
@@ -48,10 +48,10 @@
  * configuring a button.  Refer to <a href="Action.html#buttonActions">
  * Swing Components Supporting <code>Action</code></a> for more
  * details, and you can find more information in <a
- * href="http://java.sun.com/docs/books/tutorial/uiswing/misc/action.html">How
+ * href="http://docs.oracle.com/javase/tutorial/uiswing/misc/action.html">How
  * to Use Actions</a>, a section in <em>The Java Tutorial</em>.
  * <p>
- * See <a href="http://java.sun.com/docs/books/tutorial/uiswing/components/button.html">How to Use Buttons, Check Boxes, and Radio Buttons</a>
+ * See <a href="http://docs.oracle.com/javase/tutorial/uiswing/components/button.html">How to Use Buttons, Check Boxes, and Radio Buttons</a>
  * in <em>The Java Tutorial</em>
  * for information and examples of using buttons.
  * <p>
@@ -65,7 +65,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
@@ -304,7 +304,7 @@
      * 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>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      */
--- a/jdk/src/share/classes/javax/swing/JCheckBox.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/JCheckBox.java	Tue Oct 15 13:54:01 2013 +0100
@@ -40,7 +40,7 @@
  * An implementation of a check box -- an item that can be selected or
  * deselected, and which displays its state to the user.
  * By convention, any number of check boxes in a group can be selected.
- * See <a href="http://java.sun.com/docs/books/tutorial/uiswing/components/button.html">How to Use Buttons, Check Boxes, and Radio Buttons</a>
+ * See <a href="http://docs.oracle.com/javase/tutorial/uiswing/components/button.html">How to Use Buttons, Check Boxes, and Radio Buttons</a>
  * in <em>The Java Tutorial</em>
  * for examples and information on using check boxes.
  * <p>
@@ -50,7 +50,7 @@
  * configuring a button.  Refer to <a href="Action.html#buttonActions">
  * Swing Components Supporting <code>Action</code></a> for more
  * details, and you can find more information in <a
- * href="http://java.sun.com/docs/books/tutorial/uiswing/misc/action.html">How
+ * href="http://docs.oracle.com/javase/tutorial/uiswing/misc/action.html">How
  * to Use Actions</a>, a section in <em>The Java Tutorial</em>.
  * <p>
  * <strong>Warning:</strong> Swing is not thread safe. For more
@@ -63,7 +63,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
@@ -330,7 +330,7 @@
      * 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>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      */
--- a/jdk/src/share/classes/javax/swing/JCheckBoxMenuItem.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/JCheckBoxMenuItem.java	Tue Oct 15 13:54:01 2013 +0100
@@ -59,12 +59,12 @@
  * configuring a menu item.  Refer to <a href="Action.html#buttonActions">
  * Swing Components Supporting <code>Action</code></a> for more
  * details, and you can find more information in <a
- * href="http://java.sun.com/docs/books/tutorial/uiswing/misc/action.html">How
+ * href="http://docs.oracle.com/javase/tutorial/uiswing/misc/action.html">How
  * to Use Actions</a>, a section in <em>The Java Tutorial</em>.
  * <p>
  * For further information and examples of using check box menu items,
  * see <a
- href="http://java.sun.com/docs/books/tutorial/uiswing/components/menu.html">How to Use Menus</a>,
+ href="http://docs.oracle.com/javase/tutorial/uiswing/components/menu.html">How to Use Menus</a>,
  * a section in <em>The Java Tutorial.</em>
  * <p>
  * <strong>Warning:</strong> Swing is not thread safe. For more
@@ -77,7 +77,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
@@ -289,7 +289,7 @@
      * 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>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      */
--- a/jdk/src/share/classes/javax/swing/JColorChooser.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/JColorChooser.java	Tue Oct 15 13:54:01 2013 +0100
@@ -42,7 +42,7 @@
  * a user to manipulate and select a color.
  * For information about using color choosers, see
  * <a
- href="http://java.sun.com/docs/books/tutorial/uiswing/components/colorchooser.html">How to Use Color Choosers</a>,
+ href="http://docs.oracle.com/javase/tutorial/uiswing/components/colorchooser.html">How to Use Color Choosers</a>,
  * a section in <em>The Java Tutorial</em>.
  *
  * <p>
@@ -69,7 +69,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
--- a/jdk/src/share/classes/javax/swing/JComboBox.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/JComboBox.java	Tue Oct 15 13:54:01 2013 +0100
@@ -57,13 +57,13 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
  * <p>
- * See <a href="http://java.sun.com/docs/books/tutorial/uiswing/components/combobox.html">How to Use Combo Boxes</a>
- * in <a href="http://java.sun.com/Series/Tutorial/index.html"><em>The Java Tutorial</em></a>
+ * See <a href="http://docs.oracle.com/javase/tutorial/uiswing/components/combobox.html">How to Use Combo Boxes</a>
+ * in <a href="http://docs.oracle.com/javase/tutorial/"><em>The Java Tutorial</em></a>
  * for further information.
  * <p>
  * @see ComboBoxModel
@@ -350,9 +350,7 @@
      * by the look and feel.  Some look and feels always use
      * heavyweight popups, no matter what the value of this property.
      * <p>
-     * See the article <a href="http://java.sun.com/products/jfc/tsc/articles/mixing/index.html">Mixing Heavy and Light Components</a>
-     * on <a href="http://java.sun.com/products/jfc/tsc">
-     * <em>The Swing Connection</em></a>
+     * See the article <a href="http://www.oracle.com/technetwork/articles/java/mixing-components-433992.html">Mixing Heavy and Light Components</a>
      * This method fires a property changed event.
      *
      * @param aFlag if <code>true</code>, lightweight popups are desired
@@ -1610,7 +1608,7 @@
      * 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>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      */
--- a/jdk/src/share/classes/javax/swing/JComponent.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/JComponent.java	Tue Oct 15 13:54:01 2013 +0100
@@ -78,7 +78,7 @@
  * that provide a place for other Swing components to paint themselves.
  * For an explanation of containment hierarchies, see
  * <a
- href="http://java.sun.com/docs/books/tutorial/uiswing/overview/hierarchy.html">Swing Components and the Containment Hierarchy</a>,
+ href="http://docs.oracle.com/javase/tutorial/uiswing/components/toplevel.html">Swing Components and the Containment Hierarchy</a>,
  * a section in <em>The Java Tutorial</em>.
  *
  * <p>
@@ -92,21 +92,20 @@
  *     <em>UI delegate</em> -- an object that descends from
  *     {@link javax.swing.plaf.ComponentUI}.
  *     See <a
- * href="http://java.sun.com/docs/books/tutorial/uiswing/misc/plaf.html">How
+ * href="http://docs.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html">How
  *     to Set the Look and Feel</a>
  *     in <em>The Java Tutorial</em>
  *     for more information.
  * <li>Comprehensive keystroke handling.
  *     See the document <a
- * href="http://java.sun.com/products/jfc/tsc/special_report/kestrel/keybindings.html">Keyboard
- *     Bindings in Swing</a>,
- *     an article in <em>The Swing Connection</em>,
+ * href="http://docs.oracle.com/javase/tutorial/uiswing/misc/keybinding.html">How to Use Key Bindings</a>,
+ *     an article in <em>The Java Tutorial</em>,
  *     for more information.
  * <li>Support for tool tips --
  *     short descriptions that pop up when the cursor lingers
  *     over a component.
  *     See <a
- * href="http://java.sun.com/docs/books/tutorial/uiswing/components/tooltip.html">How
+ * href="http://docs.oracle.com/javase/tutorial/uiswing/components/tooltip.html">How
  *     to Use Tool Tips</a>
  *     in <em>The Java Tutorial</em>
  *     for more information.
@@ -124,15 +123,15 @@
  * <li>An infrastructure for painting
  *     that includes double buffering and support for borders.
  *     For more information see <a
- * href="http://java.sun.com/docs/books/tutorial/uiswing/overview/draw.html">Painting</a> and
- * <a href="http://java.sun.com/docs/books/tutorial/uiswing/misc/border.html">How
+ * href="http://www.oracle.com/technetwork/java/painting-140037.html#swing">Painting</a> and
+ * <a href="http://docs.oracle.com/javase/tutorial/uiswing/components/border.htmll">How
  *     to Use Borders</a>,
  *     both of which are sections in <em>The Java Tutorial</em>.
  * </ul>
  * For more information on these subjects, see the
  * <a href="package-summary.html#package_description">Swing package description</a>
  * and <em>The Java Tutorial</em> section
- * <a href="http://java.sun.com/docs/books/tutorial/uiswing/components/jcomponent.html">The JComponent Class</a>.
+ * <a href="http://docs.oracle.com/javase/tutorial/uiswing/components/jcomponent.html">The JComponent Class</a>.
  * <p>
  * <code>JComponent</code> and its subclasses document default values
  * for certain properties.  For example, <code>JTable</code> documents the
@@ -150,7 +149,7 @@
  * <p>
  * In release 1.4, the focus subsystem was rearchitected.
  * For more information, see
- * <a href="http://java.sun.com/docs/books/tutorial/uiswing/misc/focus.html">
+ * <a href="http://docs.oracle.com/javase/tutorial/uiswing/misc/focus.html">
  * How to Use the Focus Subsystem</a>,
  * a section in <em>The Java Tutorial</em>.
  * <p>
@@ -164,7 +163,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
@@ -1291,7 +1290,7 @@
     /**
      * In release 1.4, the focus subsystem was rearchitected.
      * For more information, see
-     * <a href="http://java.sun.com/docs/books/tutorial/uiswing/misc/focus.html">
+     * <a href="http://docs.oracle.com/javase/tutorial/uiswing/misc/focus.html">
      * How to Use the Focus Subsystem</a>,
      * a section in <em>The Java Tutorial</em>.
      * <p>
@@ -1353,7 +1352,7 @@
     /**
      * In release 1.4, the focus subsystem was rearchitected.
      * For more information, see
-     * <a href="http://java.sun.com/docs/books/tutorial/uiswing/misc/focus.html">
+     * <a href="http://docs.oracle.com/javase/tutorial/uiswing/misc/focus.html">
      * How to Use the Focus Subsystem</a>,
      * a section in <em>The Java Tutorial</em>.
      * <p>
@@ -1386,7 +1385,7 @@
     /**
      * In release 1.4, the focus subsystem was rearchitected.
      * For more information, see
-     * <a href="http://java.sun.com/docs/books/tutorial/uiswing/misc/focus.html">
+     * <a href="http://docs.oracle.com/javase/tutorial/uiswing/misc/focus.html">
      * How to Use the Focus Subsystem</a>,
      * a section in <em>The Java Tutorial</em>.
      * <p>
@@ -1419,7 +1418,7 @@
      * all, use the <code>setFocusable</code> method instead.
      * <p>
      * Please see
-     * <a href="http://java.sun.com/docs/books/tutorial/uiswing/misc/focus.html">
+     * <a href="http://docs.oracle.com/javase/tutorial/uiswing/misc/focus.html">
      * How to Use the Focus Subsystem</a>,
      * a section in <em>The Java Tutorial</em>,
      * for more information.
@@ -1438,7 +1437,7 @@
      * get focus; otherwise returns <code>false</code>.
      * <p>
      * Please see
-     * <a href="http://java.sun.com/docs/books/tutorial/uiswing/misc/focus.html">
+     * <a href="http://docs.oracle.com/javase/tutorial/uiswing/misc/focus.html">
      * How to Use the Focus Subsystem</a>,
      * a section in <em>The Java Tutorial</em>,
      * for more information.
@@ -1464,7 +1463,7 @@
      * its behavior is platform dependent. Instead we recommend the
      * use of {@link #requestFocusInWindow() requestFocusInWindow()}.
      * If you would like more information on focus, see
-     * <a href="http://java.sun.com/docs/books/tutorial/uiswing/misc/focus.html">
+     * <a href="http://docs.oracle.com/javase/tutorial/uiswing/misc/focus.html">
      * How to Use the Focus Subsystem</a>,
      * a section in <em>The Java Tutorial</em>.
      *
@@ -1487,7 +1486,7 @@
      * use of {@link #requestFocusInWindow(boolean)
      * requestFocusInWindow(boolean)}.
      * If you would like more information on focus, see
-     * <a href="http://java.sun.com/docs/books/tutorial/uiswing/misc/focus.html">
+     * <a href="http://docs.oracle.com/javase/tutorial/uiswing/misc/focus.html">
      * How to Use the Focus Subsystem</a>,
      * a section in <em>The Java Tutorial</em>.
      *
@@ -1509,7 +1508,7 @@
      * this method.
      * <p>
      * If you would like more information on focus, see
-     * <a href="http://java.sun.com/docs/books/tutorial/uiswing/misc/focus.html">
+     * <a href="http://docs.oracle.com/javase/tutorial/uiswing/misc/focus.html">
      * How to Use the Focus Subsystem</a>,
      * a section in <em>The Java Tutorial</em>.
      *
@@ -1530,7 +1529,7 @@
      * this method.
      * <p>
      * If you would like more information on focus, see
-     * <a href="http://java.sun.com/docs/books/tutorial/uiswing/misc/focus.html">
+     * <a href="http://docs.oracle.com/javase/tutorial/uiswing/misc/focus.html">
      * How to Use the Focus Subsystem</a>,
      * a section in <em>The Java Tutorial</em>.
      *
@@ -2595,7 +2594,7 @@
     /**
      * In release 1.4, the focus subsystem was rearchitected.
      * For more information, see
-     * <a href="http://java.sun.com/docs/books/tutorial/uiswing/misc/focus.html">
+     * <a href="http://docs.oracle.com/javase/tutorial/uiswing/misc/focus.html">
      * How to Use the Focus Subsystem</a>,
      * a section in <em>The Java Tutorial</em>.
      * <p>
@@ -2986,7 +2985,7 @@
      * Registers the text to display in a tool tip.
      * The text displays when the cursor lingers over the component.
      * <p>
-     * See <a href="http://java.sun.com/docs/books/tutorial/uiswing/components/tooltip.html">How to Use Tool Tips</a>
+     * See <a href="http://docs.oracle.com/javase/tutorial/uiswing/components/tooltip.html">How to Use Tool Tips</a>
      * in <em>The Java Tutorial</em>
      * for further documentation.
      *
@@ -3206,7 +3205,7 @@
      * default value for the system property is {@code false}.
      * <p>
      * Please see
-     * <a href="http://java.sun.com/docs/books/tutorial/uiswing/misc/dnd.html">
+     * <a href="http://docs.oracle.com/javase/tutorial/uiswing/dnd/index.html">
      * How to Use Drag and Drop and Data Transfer</a>,
      * a section in <em>The Java Tutorial</em>, for more information.
      *
@@ -3654,7 +3653,7 @@
      * 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>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      */
--- a/jdk/src/share/classes/javax/swing/JDesktopPane.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/JDesktopPane.java	Tue Oct 15 13:54:01 2013 +0100
@@ -63,7 +63,7 @@
  * (closing, resizing, etc).
  * <p>
  * For further documentation and examples see
- * <a href="http://java.sun.com/docs/books/tutorial/uiswing/components/internalframe.html">How to Use Internal Frames</a>,
+ * <a href="http://docs.oracle.com/javase/tutorial/uiswing/components/internalframe.html">How to Use Internal Frames</a>,
  * a section in <em>The Java Tutorial</em>.
  * <p>
  * <strong>Warning:</strong> Swing is not thread safe. For more
@@ -76,7 +76,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
@@ -612,7 +612,7 @@
      * 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>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      */
--- a/jdk/src/share/classes/javax/swing/JDialog.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/JDialog.java	Tue Oct 15 13:54:01 2013 +0100
@@ -35,7 +35,7 @@
  * For information about creating dialogs, see
  * <em>The Java Tutorial</em> section
  * <a
- href="http://java.sun.com/docs/books/tutorial/uiswing/components/dialog.html">How
+ href="http://docs.oracle.com/javase/tutorial/uiswing/components/dialog.html">How
  * to Make Dialogs</a>.
  *
  * <p>
@@ -77,7 +77,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the {@code java.beans} package.
  * Please see {@link java.beans.XMLEncoder}.
  *
@@ -786,7 +786,7 @@
      * are currently typed to {@code JComponent}.
      * <p>
      * Please see
-     * <a href="http://java.sun.com/docs/books/tutorial/uiswing/misc/dnd.html">
+     * <a href="http://docs.oracle.com/javase/tutorial/uiswing/dnd/index.html">
      * How to Use Drag and Drop and Data Transfer</a>, a section in
      * <em>The Java Tutorial</em>, for more information.
      *
--- a/jdk/src/share/classes/javax/swing/JEditorPane.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/JEditorPane.java	Tue Oct 15 13:54:01 2013 +0100
@@ -43,7 +43,7 @@
 /**
  * A text component to edit various kinds of content.
  * You can find how-to information and examples of using editor panes in
- * <a href="http://java.sun.com/docs/books/tutorial/uiswing/components/text.html">Using Text Components</a>,
+ * <a href="http://docs.oracle.com/javase/tutorial/uiswing/components/text.html">Using Text Components</a>,
  * a section in <em>The Java Tutorial.</em>
  *
  * <p>
@@ -179,7 +179,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
@@ -1636,7 +1636,7 @@
      * 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>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      */
@@ -1690,7 +1690,7 @@
      * 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>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      */
--- a/jdk/src/share/classes/javax/swing/JFileChooser.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/JFileChooser.java	Tue Oct 15 13:54:01 2013 +0100
@@ -57,7 +57,7 @@
  * choose a file.
  * For information about using <code>JFileChooser</code>, see
  * <a
- href="http://java.sun.com/docs/books/tutorial/uiswing/components/filechooser.html">How to Use File Choosers</a>,
+ href="http://docs.oracle.com/javase/tutorial/uiswing/components/filechooser.html">How to Use File Choosers</a>,
  * a section in <em>The Java Tutorial</em>.
  *
  * <p>
--- a/jdk/src/share/classes/javax/swing/JFormattedTextField.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/JFormattedTextField.java	Tue Oct 15 13:54:01 2013 +0100
@@ -54,7 +54,7 @@
  * configuring what action should be taken when focus is lost. The possible
  * configurations are:
  * <table summary="Possible JFormattedTextField configurations and their descriptions">
- * <tr><th><p align="left">Value</p></th><th><p align="left">Description</p></th></tr>
+ * <tr><th><p style="text-align:left">Value</p></th><th><p style="text-align:left">Description</p></th></tr>
  * <tr><td>JFormattedTextField.REVERT
  *            <td>Revert the display to match that of <code>getValue</code>,
  *                possibly losing the current edit.
@@ -171,7 +171,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
--- a/jdk/src/share/classes/javax/swing/JFrame.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/JFrame.java	Tue Oct 15 13:54:01 2013 +0100
@@ -40,7 +40,7 @@
  * You can find task-oriented documentation about using <code>JFrame</code>
  * in <em>The Java Tutorial</em>, in the section
  * <a
- href="http://java.sun.com/docs/books/tutorial/uiswing/components/frame.html">How to Make Frames</a>.
+ href="http://docs.oracle.com/javase/tutorial/uiswing/components/frame.html">How to Make Frames</a>.
  *
  * <p>
  * The <code>JFrame</code> class is slightly incompatible with <code>Frame</code>.
@@ -77,7 +77,7 @@
  * For more information on content panes
  * and other features that root panes provide,
  * see <a
- href="http://java.sun.com/docs/books/tutorial/uiswing/components/toplevel.html">Using Top-Level Containers</a> in <em>The Java Tutorial</em>.
+ href="http://docs.oracle.com/javase/tutorial/uiswing/components/toplevel.html">Using Top-Level Containers</a> in <em>The Java Tutorial</em>.
  * <p>
  * In a multi-screen environment, you can create a <code>JFrame</code>
  * on a different screen device.  See {@link java.awt.Frame} for more
@@ -93,7 +93,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
@@ -430,7 +430,7 @@
      * are currently typed to {@code JComponent}.
      * <p>
      * Please see
-     * <a href="http://java.sun.com/docs/books/tutorial/uiswing/misc/dnd.html">
+     * <a href="http://docs.oracle.com/javase/tutorial/uiswing/dnd/index.html">
      * How to Use Drag and Drop and Data Transfer</a>, a section in
      * <em>The Java Tutorial</em>, for more information.
      *
--- a/jdk/src/share/classes/javax/swing/JInternalFrame.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/JInternalFrame.java	Tue Oct 15 13:54:01 2013 +0100
@@ -50,7 +50,7 @@
  * resizing, title display, and support for a menu bar.
  * For task-oriented documentation and examples of using internal frames,
  * see <a
- href="http://java.sun.com/docs/books/tutorial/uiswing/components/internalframe.html" target="_top">How to Use Internal Frames</a>,
+ href="http://docs.oracle.com/javase/tutorial/uiswing/components/internalframe.html" target="_top">How to Use Internal Frames</a>,
  * a section in <em>The Java Tutorial</em>.
  *
  * <p>
@@ -90,7 +90,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
@@ -2029,7 +2029,7 @@
      * 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>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      */
@@ -2144,7 +2144,7 @@
      * 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>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      *
@@ -2318,7 +2318,7 @@
          * 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>
+         * of all JavaBeans&trade;
          * has been added to the <code>java.beans</code> package.
          * Please see {@link java.beans.XMLEncoder}.
          */
--- a/jdk/src/share/classes/javax/swing/JLabel.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/JLabel.java	Tue Oct 15 13:54:01 2013 +0100
@@ -80,7 +80,7 @@
  * should appear between the text and the image.
  * The default is 4 pixels.
  * <p>
- * See <a href="http://java.sun.com/docs/books/tutorial/uiswing/components/label.html">How to Use Labels</a>
+ * See <a href="http://docs.oracle.com/javase/tutorial/uiswing/components/label.html">How to Use Labels</a>
  * in <em>The Java Tutorial</em>
  * for further documentation.
  * <p>
@@ -94,7 +94,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
@@ -1064,7 +1064,7 @@
      * 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>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      */
--- a/jdk/src/share/classes/javax/swing/JLayeredPane.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/JLayeredPane.java	Tue Oct 15 13:54:01 2013 +0100
@@ -41,15 +41,15 @@
  * container, where higher-numbered components sit &quot;on top&quot; of other
  * components.
  * For task-oriented documentation and examples of using layered panes see
- * <a href="http://java.sun.com/docs/books/tutorial/uiswing/components/layeredpane.html">How to Use a Layered Pane</a>,
+ * <a href="http://docs.oracle.com/javase/tutorial/uiswing/components/layeredpane.html">How to Use a Layered Pane</a>,
  * a section in <em>The Java Tutorial</em>.
  * <P>
- * <TABLE ALIGN="RIGHT" BORDER="0" SUMMARY="layout">
+ * <TABLE STYLE="FLOAT:RIGHT" BORDER="0" SUMMARY="layout">
  * <TR>
  *   <TD ALIGN="CENTER">
- *     <P ALIGN="CENTER"><IMG SRC="doc-files/JLayeredPane-1.gif"
+ *     <P STYLE="TEXT-ALIGN:CENTER"><IMG SRC="doc-files/JLayeredPane-1.gif"
  *     alt="The following text describes this image."
- *     WIDTH="269" HEIGHT="264" ALIGN="BOTTOM" BORDER="0">
+ *     WIDTH="269" HEIGHT="264" STYLE="FLOAT:BOTTOM; BORDER=0">
  *   </TD>
  * </TR>
  * </TABLE>
@@ -148,7 +148,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
@@ -765,7 +765,7 @@
      * 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>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      */
--- a/jdk/src/share/classes/javax/swing/JList.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/JList.java	Tue Oct 15 13:54:01 2013 +0100
@@ -253,15 +253,13 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  * <p>
- * See <a href="http://java.sun.com/docs/books/tutorial/uiswing/components/list.html">How to Use Lists</a>
- * in <a href="http://java.sun.com/Series/Tutorial/index.html"><em>The Java Tutorial</em></a>
+ * See <a href="http://docs.oracle.com/javase/tutorial/uiswing/components/list.html">How to Use Lists</a>
+ * in <a href="http://docs.oracle.com/javase/tutorial/"><em>The Java Tutorial</em></a>
  * for further documentation.
- * Also see the article <a href="http://java.sun.com/products/jfc/tsc/tech_topics/jlist_1/jlist.html">Advanced JList Programming</a>
- * in <a href="http://java.sun.com/products/jfc/tsc"><em>The Swing Connection</em></a>.
  * <p>
  * @see ListModel
  * @see AbstractListModel
@@ -972,7 +970,7 @@
      *
      * <table border="1"
      *  summary="Describes layouts VERTICAL, HORIZONTAL_WRAP, and VERTICAL_WRAP">
-     *   <tr><th><p align="left">Value</p></th><th><p align="left">Description</p></th></tr>
+     *   <tr><th><p style="text-align:left">Value</p></th><th><p style="text-align:left">Description</p></th></tr>
      *   <tr><td><code>VERTICAL</code>
      *       <td>Cells are layed out vertically in a single column.
      *   <tr><td><code>HORIZONTAL_WRAP</code>
@@ -2879,7 +2877,7 @@
      * 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>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      */
--- a/jdk/src/share/classes/javax/swing/JMenu.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/JMenu.java	Tue Oct 15 13:54:01 2013 +0100
@@ -76,11 +76,11 @@
  * configuring a menu.  Refer to <a href="Action.html#buttonActions">
  * Swing Components Supporting <code>Action</code></a> for more
  * details, and you can find more information in <a
- * href="http://java.sun.com/docs/books/tutorial/uiswing/misc/action.html">How
+ * href="http://docs.oracle.com/javase/tutorial/uiswing/misc/action.html">How
  * to Use Actions</a>, a section in <em>The Java Tutorial</em>.
  * <p>
  * For information and examples of using menus see
- * <a href="http://java.sun.com/doc/books/tutorial/uiswing/components/menu.html">How to Use Menus</a>,
+ * <a href="http://docs.oracle.com/javase/tutorial/uiswing/components/menu.html">How to Use Menus</a>,
  * a section in <em>The Java Tutorial.</em>
  * <p>
  * <strong>Warning:</strong> Swing is not thread safe. For more
@@ -93,7 +93,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
@@ -1149,7 +1149,7 @@
      * 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>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      */
@@ -1386,7 +1386,7 @@
      * 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>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      */
--- a/jdk/src/share/classes/javax/swing/JMenuBar.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/JMenuBar.java	Tue Oct 15 13:54:01 2013 +0100
@@ -54,7 +54,7 @@
  * <p>
  * For information and examples of using menu bars see
  * <a
- href="http://java.sun.com/docs/books/tutorial/uiswing/components/menu.html">How to Use Menus</a>,
+ href="http://docs.oracle.com/javase/tutorial/uiswing/components/menu.html">How to Use Menus</a>,
  * a section in <em>The Java Tutorial.</em>
  * <p>
  * <strong>Warning:</strong> Swing is not thread safe. For more
@@ -67,7 +67,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  * <p>
@@ -502,7 +502,7 @@
      * 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>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      */
--- a/jdk/src/share/classes/javax/swing/JMenuItem.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/JMenuItem.java	Tue Oct 15 13:54:01 2013 +0100
@@ -54,12 +54,12 @@
  * configuring a menu item.  Refer to <a href="Action.html#buttonActions">
  * Swing Components Supporting <code>Action</code></a> for more
  * details, and you can find more information in <a
- * href="http://java.sun.com/docs/books/tutorial/uiswing/misc/action.html">How
+ * href="http://docs.oracle.com/javase/tutorial/uiswing/misc/action.html">How
  * to Use Actions</a>, a section in <em>The Java Tutorial</em>.
  * <p>
  * For further documentation and for examples, see
  * <a
- href="http://java.sun.com/docs/books/tutorial/uiswing/components/menu.html">How to Use Menus</a>
+ href="http://docs.oracle.com/javase/tutorial/uiswing/components/menu.html">How to Use Menus</a>
  * in <em>The Java Tutorial.</em>
  * <p>
  * <strong>Warning:</strong> Swing is not thread safe. For more
@@ -72,7 +72,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
@@ -826,7 +826,7 @@
      * 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>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      */
--- a/jdk/src/share/classes/javax/swing/JOptionPane.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/JOptionPane.java	Tue Oct 15 13:54:01 2013 +0100
@@ -62,7 +62,7 @@
  * prompts users for a value or informs them of something.
  * For information about using <code>JOptionPane</code>, see
  * <a
- href="http://java.sun.com/docs/books/tutorial/uiswing/components/dialog.html">How to Make Dialogs</a>,
+ href="http://docs.oracle.com/javase/tutorial/uiswing/components/dialog.html">How to Make Dialogs</a>,
  * a section in <em>The Java Tutorial</em>.
  *
  * <p>
@@ -108,16 +108,16 @@
  * the caller until the user's interaction is complete.
  * <p>
  *
- * <table cellspacing=6 cellpadding=4 border=0 align=right summary="layout">
+ * <table cellspacing=6 cellpadding=4 border=0 style="float:right" summary="layout">
  * <tr>
- *  <td bgcolor=#FFe0d0 rowspan=2>icon</td>
- *  <td bgcolor=#FFe0d0>message</td>
+ *  <td style="background-color:#FFe0d0" rowspan=2>icon</td>
+ *  <td style="background-color:#FFe0d0">message</td>
  * </tr>
  * <tr>
- *  <td bgcolor=#FFe0d0>input value</td>
+ *  <td style="background-color:#FFe0d0">input value</td>
  * </tr>
  * <tr>
- *   <td bgcolor=#FFe0d0 colspan=2>option buttons</td>
+ *   <td style="background-color:#FFe0d0" colspan=2>option buttons</td>
  * </tr>
  * </table>
  *
@@ -127,7 +127,7 @@
  * ultimately responsible for the final result.  In particular, the
  * look-and-feels will adjust the layout to accommodate the option pane's
  * <code>ComponentOrientation</code> property.
- * <br clear=all>
+ * <br style="clear:all">
  * <p>
  * <b>Parameters:</b><br>
  * The parameters to these methods follow consistent patterns:
@@ -298,7 +298,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
@@ -2573,7 +2573,7 @@
      * 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>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      */
--- a/jdk/src/share/classes/javax/swing/JPanel.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/JPanel.java	Tue Oct 15 13:54:01 2013 +0100
@@ -39,7 +39,7 @@
  * <code>JPanel</code> is a generic lightweight container.
  * For examples and task-oriented documentation for JPanel, see
  * <a
- href="http://java.sun.com/docs/books/tutorial/uiswing/components/panel.html">How to Use Panels</a>,
+ href="http://docs.oracle.com/javase/tutorial/uiswing/components/panel.html">How to Use Panels</a>,
  * a section in <em>The Java Tutorial</em>.
  * <p>
  * <strong>Warning:</strong> Swing is not thread safe. For more
@@ -52,7 +52,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
@@ -229,7 +229,7 @@
      * 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>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      */
--- a/jdk/src/share/classes/javax/swing/JPasswordField.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/JPasswordField.java	Tue Oct 15 13:54:01 2013 +0100
@@ -39,7 +39,7 @@
  * the editing of a single line of text where the view indicates
  * something was typed, but does not show the original characters.
  * You can find further information and examples in
- * <a href="http://java.sun.com/docs/books/tutorial/uiswing/components/textfield.html">How to Use Text Fields</a>,
+ * <a href="http://docs.oracle.com/javase/tutorial/uiswing/components/textfield.html">How to Use Text Fields</a>,
  * a section in <em>The Java Tutorial.</em>
  * <p>
  * <code>JPasswordField</code> is intended
@@ -64,7 +64,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
@@ -399,7 +399,7 @@
      * 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>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      */
--- a/jdk/src/share/classes/javax/swing/JPopupMenu.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/JPopupMenu.java	Tue Oct 15 13:54:01 2013 +0100
@@ -58,7 +58,7 @@
  * <p>
  * For information and examples of using popup menus, see
  * <a
- href="http://java.sun.com/docs/books/tutorial/uiswing/components/menu.html">How to Use Menus</a>
+ href="http://docs.oracle.com/javase/tutorial/uiswing/components/menu.html">How to Use Menus</a>
  * in <em>The Java Tutorial.</em>
  * <p>
  * <strong>Warning:</strong> Swing is not thread safe. For more
@@ -71,7 +71,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
--- a/jdk/src/share/classes/javax/swing/JProgressBar.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/JProgressBar.java	Tue Oct 15 13:54:01 2013 +0100
@@ -100,7 +100,7 @@
  * <p>
  *
  * For complete examples and further documentation see
- * <a href="http://java.sun.com/docs/books/tutorial/uiswing/components/progress.html" target="_top">How to Monitor Progress</a>,
+ * <a href="http://docs.oracle.com/javase/tutorial/uiswing/components/progress.html" target="_top">How to Monitor Progress</a>,
  * a section in <em>The Java Tutorial.</em>
  *
  * <p>
@@ -114,7 +114,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
@@ -643,7 +643,7 @@
      * 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>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      */
@@ -910,7 +910,7 @@
      * <p>
      *
      * See
-     * <a href="http://java.sun.com/docs/books/tutorial/uiswing/components/progress.html" target="_top">How to Monitor Progress</a>
+     * <a href="http://docs.oracle.com/javase/tutorial/uiswing/components/progress.html" target="_top">How to Monitor Progress</a>
      * for examples of using indeterminate progress bars.
      *
      * @param newValue  <code>true</code> if the progress bar
@@ -1031,7 +1031,7 @@
      * 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>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      */
--- a/jdk/src/share/classes/javax/swing/JRadioButton.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/JRadioButton.java	Tue Oct 15 13:54:01 2013 +0100
@@ -57,10 +57,10 @@
  * configuring a button.  Refer to <a href="Action.html#buttonActions">
  * Swing Components Supporting <code>Action</code></a> for more
  * details, and you can find more information in <a
- * href="http://java.sun.com/docs/books/tutorial/uiswing/misc/action.html">How
+ * href="http://docs.oracle.com/javase/tutorial/uiswing/misc/action.html">How
  * to Use Actions</a>, a section in <em>The Java Tutorial</em>.
  * <p>
- * See <a href="http://java.sun.com/docs/books/tutorial/uiswing/components/button.html">How to Use Buttons, Check Boxes, and Radio Buttons</a>
+ * See <a href="http://docs.oracle.com/javase/tutorial/uiswing/components/button.html">How to Use Buttons, Check Boxes, and Radio Buttons</a>
  * in <em>The Java Tutorial</em>
  * for further documentation.
  * <p>
@@ -74,7 +74,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
@@ -280,7 +280,7 @@
      * 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>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      */
--- a/jdk/src/share/classes/javax/swing/JRadioButtonMenuItem.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/JRadioButtonMenuItem.java	Tue Oct 15 13:54:01 2013 +0100
@@ -53,12 +53,12 @@
  * configuring a menu item.  Refer to <a href="Action.html#buttonActions">
  * Swing Components Supporting <code>Action</code></a> for more
  * details, and you can find more information in <a
- * href="http://java.sun.com/docs/books/tutorial/uiswing/misc/action.html">How
+ * href="http://docs.oracle.com/javase/tutorial/uiswing/misc/action.html">How
  * to Use Actions</a>, a section in <em>The Java Tutorial</em>.
  * <p>
  * For further documentation and examples see
  * <a
- href="http://java.sun.com/docs/books/tutorial/uiswing/components/menu.html">How to Use Menus</a>,
+ href="http://docs.oracle.com/javase/tutorial/uiswing/components/menu.html">How to Use Menus</a>,
  * a section in <em>The Java Tutorial.</em>
  * <p>
  * <strong>Warning:</strong> Swing is not thread safe. For more
@@ -71,7 +71,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
@@ -262,7 +262,7 @@
      * 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>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      */
--- a/jdk/src/share/classes/javax/swing/JRootPane.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/JRootPane.java	Tue Oct 15 13:54:01 2013 +0100
@@ -43,13 +43,13 @@
  * <code>JFrame</code>, <code>JDialog</code>, <code>JWindow</code>,
  * <code>JApplet</code>, and <code>JInternalFrame</code>.
  * For task-oriented information on functionality provided by root panes
- * see <a href="http://java.sun.com/docs/books/tutorial/uiswing/components/rootpane.html">How to Use Root Panes</a>,
+ * see <a href="http://docs.oracle.com/javase/tutorial/uiswing/components/rootpane.html">How to Use Root Panes</a>,
  * a section in <em>The Java Tutorial</em>.
  *
  * <p>
  * The following image shows the relationships between
  * the classes that use root panes.
- * <p align=center><img src="doc-files/JRootPane-1.gif"
+ * <p style="text-align:center"><img src="doc-files/JRootPane-1.gif"
  * alt="The following text describes this graphic."
  * HEIGHT=484 WIDTH=629></p>
  * The &quot;heavyweight&quot; components (those that delegate to a peer, or native
@@ -69,7 +69,7 @@
  * can be used to obtain the <code>JRootPane</code> that contains
  * a given component.
  * </blockquote>
- * <table align="right" border="0" summary="layout">
+ * <table style="float:right" border="0" summary="layout">
  * <tr>
  * <td align="center">
  * <img src="doc-files/JRootPane-2.gif"
@@ -179,7 +179,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
@@ -898,7 +898,7 @@
      * 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>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      */
@@ -1064,7 +1064,7 @@
      * 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>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      */
--- a/jdk/src/share/classes/javax/swing/JScrollBar.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/JScrollBar.java	Tue Oct 15 13:54:01 2013 +0100
@@ -67,7 +67,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
@@ -838,7 +838,7 @@
      * 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>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      */
--- a/jdk/src/share/classes/javax/swing/JScrollPane.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/JScrollPane.java	Tue Oct 15 13:54:01 2013 +0100
@@ -50,16 +50,16 @@
  * vertical and horizontal scroll bars, and optional row and
  * column heading viewports.
  * You can find task-oriented documentation of <code>JScrollPane</code> in
- *  <a href="http://java.sun.com/docs/books/tutorial/uiswing/components/scrollpane.html">How to Use Scroll Panes</a>,
+ *  <a href="http://docs.oracle.com/javase/tutorial/uiswing/components/scrollpane.html">How to Use Scroll Panes</a>,
  * a section in <em>The Java Tutorial</em>.  Note that
  * <code>JScrollPane</code> does not support heavyweight components.
  * <p>
- * <TABLE ALIGN="RIGHT" BORDER="0" SUMMARY="layout">
+ * <TABLE STYLE="FLOAT:RIGHT" BORDER="0" SUMMARY="layout">
  *    <TR>
  *    <TD ALIGN="CENTER">
- *      <P ALIGN="CENTER"><IMG SRC="doc-files/JScrollPane-1.gif"
+ *      <P STYLE="TEXT-ALIGN:CENTER"><IMG SRC="doc-files/JScrollPane-1.gif"
  *      alt="The following text describes this image."
- *      WIDTH="256" HEIGHT="248" ALIGN="BOTTOM" BORDER="0">
+ *      WIDTH="256" HEIGHT="248" STYLE="FLOAT:BOTTOM; BORDER:0px">
  *    </TD>
  *    </TR>
  * </TABLE>
@@ -146,7 +146,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
@@ -677,7 +677,7 @@
      * 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>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      *
@@ -1437,7 +1437,7 @@
      * 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>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      */
--- a/jdk/src/share/classes/javax/swing/JSeparator.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/JSeparator.java	Tue Oct 15 13:54:01 2013 +0100
@@ -47,7 +47,7 @@
  *
  * For more information and examples see
  * <a
- href="http://java.sun.com/docs/books/tutorial/uiswing/components/menu.html">How to Use Menus</a>,
+ href="http://docs.oracle.com/javase/tutorial/uiswing/components/menu.html">How to Use Menus</a>,
  * a section in <em>The Java Tutorial.</em>
  * <p>
  * <strong>Warning:</strong> Swing is not thread safe. For more
@@ -60,7 +60,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
@@ -276,7 +276,7 @@
      * 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>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      */
--- a/jdk/src/share/classes/javax/swing/JSlider.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/JSlider.java	Tue Oct 15 13:54:01 2013 +0100
@@ -55,7 +55,7 @@
  * <p>
  * For further information and examples see
  * <a
- href="http://java.sun.com/docs/books/tutorial/uiswing/components/slider.html">How to Use Sliders</a>,
+ href="http://docs.oracle.com/javase/tutorial/uiswing/components/slider.html">How to Use Sliders</a>,
  * a section in <em>The Java Tutorial.</em>
  * <p>
  * <strong>Warning:</strong> Swing is not thread safe. For more
@@ -68,7 +68,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
@@ -1425,7 +1425,7 @@
      * 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>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      */
--- a/jdk/src/share/classes/javax/swing/JSpinner.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/JSpinner.java	Tue Oct 15 13:54:01 2013 +0100
@@ -93,7 +93,7 @@
  * </pre>
  * <p>
  * For information and examples of using spinner see
- * <a href="http://java.sun.com/doc/books/tutorial/uiswing/components/spinner.html">How to Use Spinners</a>,
+ * <a href="http://docs.oracle.com/javase/tutorial/uiswing/components/spinner.html">How to Use Spinners</a>,
  * a section in <em>The Java Tutorial.</em>
  * <p>
  * <strong>Warning:</strong> Swing is not thread safe. For more
@@ -106,7 +106,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
--- a/jdk/src/share/classes/javax/swing/JSplitPane.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/JSplitPane.java	Tue Oct 15 13:54:01 2013 +0100
@@ -49,7 +49,7 @@
  * interactively resized by the user.
  * Information on using <code>JSplitPane</code> is in
  * <a
- href="http://java.sun.com/docs/books/tutorial/uiswing/components/splitpane.html">How to Use Split Panes</a> in
+ href="http://docs.oracle.com/javase/tutorial/uiswing/components/splitpane.html">How to Use Split Panes</a> in
  * <em>The Java Tutorial</em>.
  * <p>
  * The two <code>Component</code>s in a split pane can be aligned
@@ -89,7 +89,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
@@ -1152,7 +1152,7 @@
      * 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>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      */
--- a/jdk/src/share/classes/javax/swing/JTabbedPane.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/JTabbedPane.java	Tue Oct 15 13:54:01 2013 +0100
@@ -43,7 +43,7 @@
  * A component that lets the user switch between a group of components by
  * clicking on a tab with a given title and/or icon.
  * For examples and information on using tabbed panes see
- * <a href="http://java.sun.com/docs/books/tutorial/uiswing/components/tabbedpane.html">How to Use Tabbed Panes</a>,
+ * <a href="http://docs.oracle.com/javase/tutorial/uiswing/components/tabbedpane.html">How to Use Tabbed Panes</a>,
  * a section in <em>The Java Tutorial</em>.
  * <p>
  * Tabs/components are added to a <code>TabbedPane</code> object by using the
@@ -91,7 +91,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
@@ -207,7 +207,7 @@
     }
 
     /**
-     * Returns the UI object which implements the L&F for this component.
+     * Returns the UI object which implements the L&amp;F for this component.
      *
      * @return a <code>TabbedPaneUI</code> object
      * @see #setUI
@@ -217,7 +217,7 @@
     }
 
     /**
-     * Sets the UI object which implements the L&F for this component.
+     * Sets the UI object which implements the L&amp;F for this component.
      *
      * @param ui the new UI object
      * @see UIDefaults#getUI
@@ -250,7 +250,7 @@
 
     /**
      * Returns the name of the UI class that implements the
-     * L&F for this component.
+     * L&amp;F for this component.
      *
      * @return the string "TabbedPaneUI"
      * @see JComponent#getUIClassID
@@ -576,7 +576,7 @@
      *
      * @param index  the index to be selected
      * @exception IndexOutOfBoundsException if index is out of range
-     *            (index < -1 || index >= tab count)
+     *            {@code (index < -1 || index >= tab count)}
      *
      * @see #getSelectedIndex
      * @see SingleSelectionModel#setSelectedIndex
@@ -924,7 +924,7 @@
      * if added to other containers.
      * @param index the index of the tab to be removed
      * @exception IndexOutOfBoundsException if index is out of range
-     *            (index < 0 || index >= tab count)
+     *            {@code (index < 0 || index >= tab count)}
      *
      * @see #addTab
      * @see #insertTab
@@ -1043,7 +1043,7 @@
      * @param index the index of the component to remove from the
      *          <code>tabbedpane</code>
      * @exception IndexOutOfBoundsException if index is out of range
-     *            (index < 0 || index >= tab count)
+     *            {@code (index < 0 || index >= tab count)}
      * @see #addTab
      * @see #removeTabAt
      */
@@ -1105,7 +1105,7 @@
      * @param index  the index of the item being queried
      * @return the title at <code>index</code>
      * @exception IndexOutOfBoundsException if index is out of range
-     *            (index < 0 || index >= tab count)
+     *            {@code (index < 0 || index >= tab count)}
      * @see #setTitleAt
      */
     public String getTitleAt(int index) {
@@ -1118,7 +1118,7 @@
      * @param index  the index of the item being queried
      * @return the icon at <code>index</code>
      * @exception IndexOutOfBoundsException if index is out of range
-     *            (index < 0 || index >= tab count)
+     *            {@code (index < 0 || index >= tab count)}
      *
      * @see #setIconAt
      */
@@ -1137,7 +1137,7 @@
      * @param index  the index of the item being queried
      * @return the icon at <code>index</code>
      * @exception IndexOutOfBoundsException if index is out of range
-     *            (index < 0 || index >= tab count)
+     *            {@code (index < 0 || index >= tab count)}
      *
      * @see #setDisabledIconAt
      */
@@ -1155,7 +1155,7 @@
      * @param index  the index of the item being queried
      * @return a string containing the tool tip text at <code>index</code>
      * @exception IndexOutOfBoundsException if index is out of range
-     *            (index < 0 || index >= tab count)
+     *            {@code (index < 0 || index >= tab count)}
      *
      * @see #setToolTipTextAt
      * @since 1.3
@@ -1171,7 +1171,7 @@
      * @return the <code>Color</code> of the tab background at
      *          <code>index</code>
      * @exception IndexOutOfBoundsException if index is out of range
-     *            (index < 0 || index >= tab count)
+     *            {@code (index < 0 || index >= tab count)}
      *
      * @see #setBackgroundAt
      */
@@ -1186,7 +1186,7 @@
      * @return the <code>Color</code> of the tab foreground at
      *          <code>index</code>
      * @exception IndexOutOfBoundsException if index is out of range
-     *            (index < 0 || index >= tab count)
+     *            {@code (index < 0 || index >= tab count)}
      *
      * @see #setForegroundAt
      */
@@ -1202,7 +1202,7 @@
      * @return true if the tab at <code>index</code> is enabled;
      *          false otherwise
      * @exception IndexOutOfBoundsException if index is out of range
-     *            (index < 0 || index >= tab count)
+     *            {@code (index < 0 || index >= tab count)}
      *
      * @see #setEnabledAt
      */
@@ -1216,7 +1216,7 @@
      * @param index  the index of the item being queried
      * @return the <code>Component</code> at <code>index</code>
      * @exception IndexOutOfBoundsException if index is out of range
-     *            (index < 0 || index >= tab count)
+     *            {@code (index < 0 || index >= tab count)}
      *
      * @see #setComponentAt
      */
@@ -1281,7 +1281,7 @@
      *          <code>index</code> is not currently visible in the UI,
      *          or if there is no UI set on this <code>tabbedpane</code>
      * @exception IndexOutOfBoundsException if index is out of range
-     *            (index &lt; 0 || index &gt;= tab count)
+     *            {@code (index < 0 || index >= tab count)}
      */
     public Rectangle getBoundsAt(int index) {
         checkIndex(index);
@@ -1303,7 +1303,7 @@
      * @param index the tab index where the title should be set
      * @param title the title to be displayed in the tab
      * @exception IndexOutOfBoundsException if index is out of range
-     *            (index &lt; 0 || index &gt;= tab count)
+     *            {@code (index < 0 || index >= tab count)}
      *
      * @see #getTitleAt
      * @see #setTabComponentAt
@@ -1345,7 +1345,7 @@
      * @param index the tab index where the icon should be set
      * @param icon the icon to be displayed in the tab
      * @exception IndexOutOfBoundsException if index is out of range
-     *            (index < 0 || index >= tab count)
+     *            {@code (index < 0 || index >= tab count)}
      *
      * @see #setDisabledIconAt
      * @see #getIconAt
@@ -1389,7 +1389,7 @@
      * @param index the tab index where the disabled icon should be set
      * @param disabledIcon the icon to be displayed in the tab when disabled
      * @exception IndexOutOfBoundsException if index is out of range
-     *            (index &lt; 0 || index &gt;= tab count)
+     *            {@code (index < 0 || index >= tab count)}
      *
      * @see #getDisabledIconAt
      * @beaninfo
@@ -1414,7 +1414,7 @@
      * @param index the tab index where the tooltip text should be set
      * @param toolTipText the tooltip text to be displayed for the tab
      * @exception IndexOutOfBoundsException if index is out of range
-     *            (index &lt; 0 || index &gt;= tab count)
+     *            {@code (index < 0 || index >= tab count)}
      *
      * @see #getToolTipTextAt
      * @beaninfo
@@ -1443,14 +1443,14 @@
      * which can be <code>null</code>, in which case the tab's background color
      * will default to the background color of the <code>tabbedpane</code>.
      * An internal exception is raised if there is no tab at that index.
-     * <p/>
+     * <p>
      * It is up to the look and feel to honor this property, some may
      * choose to ignore it.
      *
      * @param index the tab index where the background should be set
      * @param background the color to be displayed in the tab's background
      * @exception IndexOutOfBoundsException if index is out of range
-     *            (index &lt; 0 || index &gt;= tab count)
+     *            {@code (index < 0 || index >= tab count)}
      *
      * @see #getBackgroundAt
      * @beaninfo
@@ -1476,14 +1476,14 @@
      * <code>null</code>, in which case the tab's foreground color
      * will default to the foreground color of this <code>tabbedpane</code>.
      * An internal exception is raised if there is no tab at that index.
-     * <p/>
+     * <p>
      * It is up to the look and feel to honor this property, some may
      * choose to ignore it.
      *
      * @param index the tab index where the foreground should be set
      * @param foreground the color to be displayed as the tab's foreground
      * @exception IndexOutOfBoundsException if index is out of range
-     *            (index &lt; 0 || index &gt;= tab count)
+     *            {@code (index < 0 || index >= tab count)}
      *
      * @see #getForegroundAt
      * @beaninfo
@@ -1510,7 +1510,7 @@
      * @param index the tab index which should be enabled/disabled
      * @param enabled whether or not the tab should be enabled
      * @exception IndexOutOfBoundsException if index is out of range
-     *            (index &lt; 0 || index &gt;= tab count)
+     *            {@code (index < 0 || index >= tab count)}
      *
      * @see #isEnabledAt
      */
@@ -1530,7 +1530,7 @@
      * @param index the tab index where this component is being placed
      * @param component the component for the tab
      * @exception IndexOutOfBoundsException if index is out of range
-     *            (index &lt; 0 || index &gt;= tab count)
+     *            {@code (index < 0 || index >= tab count)}
      *
      * @see #getComponentAt
      * @beaninfo
@@ -1605,8 +1605,8 @@
      * @param tabIndex the index of the tab that the mnemonic refers to
      * @param mnemonicIndex index into the <code>String</code> to underline
      * @exception IndexOutOfBoundsException if <code>tabIndex</code> is
-     *            out of range (<code>tabIndex < 0 || tabIndex >= tab
-     *            count</code>)
+     *            out of range ({@code tabIndex < 0 || tabIndex >= tab
+     *            count})
      * @exception IllegalArgumentException will be thrown if
      *            <code>mnemonicIndex</code> is &gt;= length of the tab
      *            title , or &lt; -1
@@ -1649,7 +1649,7 @@
      * @param tabIndex the index of the tab that the mnemonic refers to
      * @param mnemonic the key code which represents the mnemonic
      * @exception IndexOutOfBoundsException if <code>tabIndex</code> is out
-     *            of range (<code>tabIndex < 0 || tabIndex >= tab count</code>)
+     *            of range ({@code tabIndex < 0 || tabIndex >= tab count})
      * @see #getMnemonicAt(int)
      * @see #setDisplayedMnemonicIndexAt(int,int)
      *
@@ -1885,7 +1885,7 @@
      * 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>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      */
@@ -2354,7 +2354,7 @@
     * @param component the component to render the title for the
     *                  specified tab
     * @exception IndexOutOfBoundsException if index is out of range
-    *            (index < 0 || index >= tab count)
+    *            {@code (index < 0 || index >= tab count)}
     * @exception IllegalArgumentException if component has already been
     *            added to this <code>JTabbedPane</code>
     *
@@ -2386,7 +2386,7 @@
      * @param index  the index of the item being queried
      * @return the tab component at <code>index</code>
      * @exception IndexOutOfBoundsException if index is out of range
-     *            (index < 0 || index >= tab count)
+     *            {@code (index < 0 || index >= tab count)}
      *
      * @see #setTabComponentAt
      * @since 1.6
--- a/jdk/src/share/classes/javax/swing/JTable.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/JTable.java	Tue Oct 15 13:54:01 2013 +0100
@@ -63,7 +63,7 @@
 /**
  * The <code>JTable</code> is used to display and edit regular two-dimensional tables
  * of cells.
- * See <a href="http://java.sun.com/docs/books/tutorial/uiswing/components/table.html">How to Use Tables</a>
+ * See <a href="http://docs.oracle.com/javase/tutorial/uiswing/components/table.html">How to Use Tables</a>
  * in <em>The Java Tutorial</em>
  * for task-oriented documentation and examples of using <code>JTable</code>.
  *
@@ -201,7 +201,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
@@ -2490,7 +2490,7 @@
      * The default value of this property is defined by the look
      * and feel implementation.
      * <p>
-     * This is a <a href="http://java.sun.com/docs/books/tutorial/javabeans/properties/bound.html">JavaBeans</a> bound property.
+     * This is a <a href="http://docs.oracle.com/javase/tutorial/javabeans/writing/properties.html">JavaBeans</a> bound property.
      *
      * @param selectionForeground  the <code>Color</code> to use in the foreground
      *                             for selected list items
@@ -2528,7 +2528,7 @@
      * The default value of this property is defined by the look
      * and feel implementation.
      * <p>
-     * This is a <a href="http://java.sun.com/docs/books/tutorial/javabeans/properties/bound.html">JavaBeans</a> bound property.
+     * This is a <a href="http://docs.oracle.com/javase/tutorial/javabeans/writing/properties.html">JavaBeans</a> bound property.
      *
      * @param selectionBackground  the <code>Color</code> to use for the background
      *                             of selected cells
@@ -6579,7 +6579,7 @@
      * 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>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      */
--- a/jdk/src/share/classes/javax/swing/JTextArea.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/JTextArea.java	Tue Oct 15 13:54:01 2013 +0100
@@ -44,7 +44,7 @@
  * compatibility with the <code>java.awt.TextArea</code> class where it can
  * reasonably do so.
  * You can find information and examples of using all the text components in
- * <a href="http://java.sun.com/docs/books/tutorial/uiswing/components/text.html">Using Text Components</a>,
+ * <a href="http://docs.oracle.com/javase/tutorial/uiswing/components/text.html">Using Text Components</a>,
  * a section in <em>The Java Tutorial.</em>
  *
  * <p>
@@ -112,7 +112,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
@@ -783,7 +783,7 @@
      * 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>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      */
--- a/jdk/src/share/classes/javax/swing/JTextField.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/JTextField.java	Tue Oct 15 13:54:01 2013 +0100
@@ -44,7 +44,7 @@
  * of a single line of text.
  * For information on and examples of using text fields,
  * see
- * <a href="http://java.sun.com/docs/books/tutorial/uiswing/components/textfield.html">How to Use Text Fields</a>
+ * <a href="http://docs.oracle.com/javase/tutorial/uiswing/components/textfield.html">How to Use Text Fields</a>
  * in <em>The Java Tutorial.</em>
  *
  * <p>
@@ -148,7 +148,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
@@ -939,7 +939,7 @@
      * 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>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      */
--- a/jdk/src/share/classes/javax/swing/JTextPane.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/JTextPane.java	Tue Oct 15 13:54:01 2013 +0100
@@ -39,7 +39,7 @@
  * A text component that can be marked up with attributes that are
  * represented graphically.
  * You can find how-to information and examples of using text panes in
- * <a href="http://java.sun.com/docs/books/tutorial/uiswing/components/text.html">Using Text Components</a>,
+ * <a href="http://docs.oracle.com/javase/tutorial/uiswing/components/text.html">Using Text Components</a>,
  * a section in <em>The Java Tutorial.</em>
  *
  * <p>
@@ -68,7 +68,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
--- a/jdk/src/share/classes/javax/swing/JToggleButton.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/JToggleButton.java	Tue Oct 15 13:54:01 2013 +0100
@@ -42,7 +42,7 @@
  * are subclasses of this class.
  * For information on using them see
  * <a
- href="http://java.sun.com/docs/books/tutorial/uiswing/components/button.html">How to Use Buttons, Check Boxes, and Radio Buttons</a>,
+ href="http://docs.oracle.com/javase/tutorial/uiswing/components/button.html">How to Use Buttons, Check Boxes, and Radio Buttons</a>,
  * a section in <em>The Java Tutorial</em>.
  * <p>
  * Buttons can be configured, and to some degree controlled, by
@@ -51,7 +51,7 @@
  * configuring a button.  Refer to <a href="Action.html#buttonActions">
  * Swing Components Supporting <code>Action</code></a> for more
  * details, and you can find more information in <a
- * href="http://java.sun.com/docs/books/tutorial/uiswing/misc/action.html">How
+ * href="http://docs.oracle.com/javase/tutorial/uiswing/misc/action.html">How
  * to Use Actions</a>, a section in <em>The Java Tutorial</em>.
  * <p>
  * <strong>Warning:</strong> Swing is not thread safe. For more
@@ -64,7 +64,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
@@ -218,7 +218,7 @@
      * 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>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      */
@@ -380,7 +380,7 @@
      * 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>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      */
--- a/jdk/src/share/classes/javax/swing/JToolBar.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/JToolBar.java	Tue Oct 15 13:54:01 2013 +0100
@@ -52,7 +52,7 @@
  * <code>JToolBar</code> provides a component that is useful for
  * displaying commonly used <code>Action</code>s or controls.
  * For examples and information on using tool bars see
- * <a href="http://java.sun.com/docs/books/tutorial/uiswing/components/toolbar.html">How to Use Tool Bars</a>,
+ * <a href="http://docs.oracle.com/javase/tutorial/uiswing/components/toolbar.html">How to Use Tool Bars</a>,
  * a section in <em>The Java Tutorial</em>.
  *
  * <p>
@@ -74,7 +74,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
--- a/jdk/src/share/classes/javax/swing/JToolTip.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/JToolTip.java	Tue Oct 15 13:54:01 2013 +0100
@@ -44,7 +44,7 @@
  * display can override <code>JComponent</code>'s <code>createToolTip</code>
  * method and use a subclass of this class.
  * <p>
- * See <a href="http://java.sun.com/docs/books/tutorial/uiswing/components/tooltip.html">How to Use Tool Tips</a>
+ * See <a href="http://docs.oracle.com/javase/tutorial/uiswing/components/tooltip.html">How to Use Tool Tips</a>
  * in <em>The Java Tutorial</em>
  * for further documentation.
  * <p>
@@ -58,7 +58,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
@@ -254,7 +254,7 @@
      * 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>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      */
--- a/jdk/src/share/classes/javax/swing/JTree.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/JTree.java	Tue Oct 15 13:54:01 2013 +0100
@@ -44,7 +44,7 @@
  * <a name="jtree_description"></a>
  * A control that displays a set of hierarchical data as an outline.
  * You can find task-oriented documentation and examples of using trees in
- * <a href="http://java.sun.com/docs/books/tutorial/uiswing/components/tree.html">How to Use Trees</a>,
+ * <a href="http://docs.oracle.com/javase/tutorial/uiswing/components/tree.html">How to Use Trees</a>,
  * a section in <em>The Java Tutorial.</em>
  * <p>
  * A specific node in a tree can be identified either by a
@@ -130,7 +130,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *</p>
@@ -3238,7 +3238,7 @@
      * 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>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      */
@@ -3360,7 +3360,7 @@
      * 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>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      */
@@ -3861,7 +3861,7 @@
      * 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>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      */
@@ -4093,7 +4093,7 @@
      * 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>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      */
--- a/jdk/src/share/classes/javax/swing/JViewport.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/JViewport.java	Tue Oct 15 13:54:01 2013 +0100
@@ -94,7 +94,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
@@ -1292,7 +1292,7 @@
      * 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>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      */
@@ -1761,7 +1761,7 @@
      * 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>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      */
--- a/jdk/src/share/classes/javax/swing/JWindow.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/JWindow.java	Tue Oct 15 13:54:01 2013 +0100
@@ -76,7 +76,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
@@ -314,7 +314,7 @@
      * are currently typed to {@code JComponent}.
      * <p>
      * Please see
-     * <a href="http://java.sun.com/docs/books/tutorial/uiswing/misc/dnd.html">
+     * <a href="http://docs.oracle.com/javase/tutorial/uiswing/dnd/index.html">
      * How to Use Drag and Drop and Data Transfer</a>, a section in
      * <em>The Java Tutorial</em>, for more information.
      *
--- a/jdk/src/share/classes/javax/swing/KeyStroke.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/KeyStroke.java	Tue Oct 15 13:54:01 2013 +0100
@@ -51,7 +51,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
--- a/jdk/src/share/classes/javax/swing/LookAndFeel.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/LookAndFeel.java	Tue Oct 15 13:54:01 2013 +0100
@@ -91,7 +91,7 @@
  * to provide a specific set of defaults. These are documented in the
  * classes that require the specific default.
  *
- * <h3><a name="#defaultRecommendation">ComponentUIs and defaults</a></h2>
+ * <h3><a name="#defaultRecommendation">ComponentUIs and defaults</a></h3>
  *
  * All {@code ComponentUIs} typically need to set various properties
  * on the {@code JComponent} the {@code ComponentUI} is providing the
@@ -590,7 +590,7 @@
      * Distinct look and feels should have different names, e.g.
      * a subclass of MotifLookAndFeel that changes the way a few components
      * are rendered should be called "CDE/Motif My Way"; something
-     * that would be useful to a user trying to select a L&F from a list
+     * that would be useful to a user trying to select a L&amp;F from a list
      * of names.
      *
      * @return short identifier for the look and feel
--- a/jdk/src/share/classes/javax/swing/OverlayLayout.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/OverlayLayout.java	Tue Oct 15 13:54:01 2013 +0100
@@ -45,7 +45,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
--- a/jdk/src/share/classes/javax/swing/ProgressMonitor.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/ProgressMonitor.java	Tue Oct 15 13:54:01 2013 +0100
@@ -71,7 +71,7 @@
  *
  * For further documentation and examples see
  * <a
- href="http://java.sun.com/docs/books/tutorial/uiswing/components/progress.html">How to Monitor Progress</a>,
+ href="http://docs.oracle.com/javase/tutorial/uiswing/components/progress.html">How to Monitor Progress</a>,
  * a section in <em>The Java Tutorial.</em>
  *
  * @see ProgressMonitorInputStream
--- a/jdk/src/share/classes/javax/swing/ProgressMonitorInputStream.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/ProgressMonitorInputStream.java	Tue Oct 15 13:54:01 2013 +0100
@@ -54,7 +54,7 @@
  * <p>
  *
  * For further documentation and examples see
- * <a href="http://java.sun.com/docs/books/tutorial/uiswing/components/progress.html">How to Monitor Progress</a>,
+ * <a href="http://docs.oracle.com/javase/tutorial/uiswing/components/progress.html">How to Monitor Progress</a>,
  * a section in <em>The Java Tutorial.</em>
  *
  * @see ProgressMonitor
--- a/jdk/src/share/classes/javax/swing/ScrollPaneLayout.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/ScrollPaneLayout.java	Tue Oct 15 13:54:01 2013 +0100
@@ -48,7 +48,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
--- a/jdk/src/share/classes/javax/swing/SizeRequirements.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/SizeRequirements.java	Tue Oct 15 13:54:01 2013 +0100
@@ -81,7 +81,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
--- a/jdk/src/share/classes/javax/swing/Spring.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/Spring.java	Tue Oct 15 13:54:01 2013 +0100
@@ -109,7 +109,7 @@
  * If you are implementing a <code>SpringLayout</code> you
  * can find further information and examples in
  * <a
- href="http://java.sun.com/docs/books/tutorial/uiswing/layout/spring.html">How to Use SpringLayout</a>,
+ href="http://docs.oracle.com/javase/tutorial/uiswing/layout/spring.html">How to Use SpringLayout</a>,
  * a section in <em>The Java Tutorial.</em>
  * <p>
  * <strong>Warning:</strong>
@@ -117,7 +117,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
--- a/jdk/src/share/classes/javax/swing/SpringLayout.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/SpringLayout.java	Tue Oct 15 13:54:01 2013 +0100
@@ -36,7 +36,7 @@
 /**
  * A <code>SpringLayout</code> lays out the children of its associated container
  * according to a set of constraints.
- * See <a href="http://java.sun.com/docs/books/tutorial/uiswing/layout/spring.html">How to Use SpringLayout</a>
+ * See <a href="http://docs.oracle.com/javase/tutorial/uiswing/layout/spring.html">How to Use SpringLayout</a>
  * in <em>The Java Tutorial</em> for examples of using
  * <code>SpringLayout</code>.
  *
@@ -172,7 +172,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
--- a/jdk/src/share/classes/javax/swing/SwingUtilities.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/SwingUtilities.java	Tue Oct 15 13:54:01 2013 +0100
@@ -1280,7 +1280,7 @@
      * <p>
      * Additional documentation and examples for this method can be
      * found in
-     * <A HREF="http://download.oracle.com/javase/tutorial/uiswing/concurrency/index.html">Concurrency in Swing</a>.
+     * <A HREF="http://docs.oracle.com/javase/tutorial/uiswing/concurrency/index.html">Concurrency in Swing</a>.
      * <p>
      * As of 1.3 this method is just a cover for <code>java.awt.EventQueue.invokeLater()</code>.
      * <p>
@@ -1331,7 +1331,7 @@
      * <p>
      * Additional documentation and examples for this method can be
      * found in
-     * <A HREF="http://download.oracle.com/javase/tutorial/uiswing/concurrency/index.html">Concurrency in Swing</a>.
+     * <A HREF="http://docs.oracle.com/javase/tutorial/uiswing/concurrency/index.html">Concurrency in Swing</a>.
      * <p>
      * As of 1.3 this method is just a cover for
      * <code>java.awt.EventQueue.invokeAndWait()</code>.
--- a/jdk/src/share/classes/javax/swing/SwingWorker.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/SwingWorker.java	Tue Oct 15 13:54:01 2013 +0100
@@ -50,7 +50,7 @@
  * When writing a multi-threaded application using Swing, there are
  * two constraints to keep in mind:
  * (refer to
- * <a href="http://download.oracle.com/javase/tutorial/uiswing/concurrency/index.html">
+ * <a href="http://docs.oracle.com/javase/tutorial/uiswing/concurrency/index.html">
  *   Concurrency in Swing
  * </a> for more details):
  * <ul>
--- a/jdk/src/share/classes/javax/swing/Timer.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/Timer.java	Tue Oct 15 13:54:01 2013 +0100
@@ -121,7 +121,7 @@
  * <p>
  * You can find further documentation
  * and several examples of using timers by visiting
- * <a href="http://java.sun.com/docs/books/tutorial/uiswing/misc/timer.html"
+ * <a href="http://docs.oracle.com/javase/tutorial/uiswing/misc/timer.html"
  * target = "_top">How to Use Timers</a>,
  * a section in <em>The Java Tutorial.</em>
  * For more examples and help in choosing between
@@ -137,7 +137,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
--- a/jdk/src/share/classes/javax/swing/TransferHandler.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/TransferHandler.java	Tue Oct 15 13:54:01 2013 +0100
@@ -75,7 +75,7 @@
  * of the transfer, and <code>setForeground</code> for the target of a transfer.
  * <p>
  * Please see
- * <a href="http://java.sun.com/docs/books/tutorial/uiswing/misc/dnd.html">
+ * <a href="http://docs.oracle.com/javase/tutorial/uiswing/dnd/index.html">
  * How to Use Drag and Drop and Data Transfer</a>,
  * a section in <em>The Java Tutorial</em>, for more information.
  *
--- a/jdk/src/share/classes/javax/swing/UIDefaults.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/UIDefaults.java	Tue Oct 15 13:54:01 2013 +0100
@@ -65,7 +65,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
--- a/jdk/src/share/classes/javax/swing/UIManager.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/UIManager.java	Tue Oct 15 13:54:01 2013 +0100
@@ -167,7 +167,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
--- a/jdk/src/share/classes/javax/swing/UnsupportedLookAndFeelException.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/UnsupportedLookAndFeelException.java	Tue Oct 15 13:54:01 2013 +0100
@@ -33,7 +33,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
--- a/jdk/src/share/classes/javax/swing/ViewportLayout.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/ViewportLayout.java	Tue Oct 15 13:54:01 2013 +0100
@@ -50,7 +50,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
--- a/jdk/src/share/classes/javax/swing/WindowConstants.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/WindowConstants.java	Tue Oct 15 13:54:01 2013 +0100
@@ -36,7 +36,7 @@
  * use these constants.
  * For examples of setting the default window-closing operation, see
  * <a
- href="http://java.sun.com/docs/books/tutorial/uiswing/components/frame.html#windowevents">Responding to Window-Closing Events</a>,
+ href="http://docs.oracle.com/javase/tutorial/uiswing/components/frame.html#windowevents">Responding to Window-Closing Events</a>,
  * a section in <em>The Java Tutorial</em>.
  * @see JFrame#setDefaultCloseOperation(int)
  * @see JDialog#setDefaultCloseOperation(int)
--- a/jdk/src/share/classes/javax/swing/border/AbstractBorder.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/border/AbstractBorder.java	Tue Oct 15 13:54:01 2013 +0100
@@ -40,7 +40,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
--- a/jdk/src/share/classes/javax/swing/border/BevelBorder.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/border/BevelBorder.java	Tue Oct 15 13:54:01 2013 +0100
@@ -38,7 +38,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
--- a/jdk/src/share/classes/javax/swing/border/Border.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/border/Border.java	Tue Oct 15 13:54:01 2013 +0100
@@ -33,7 +33,7 @@
  * Interface describing an object capable of rendering a border
  * around the edges of a swing component.
  * For examples of using borders see
- * <a href="http://java.sun.com/docs/books/tutorial/uiswing/misc/border.html">How to Use Borders</a>,
+ * <a href="http://docs.oracle.com/javase/tutorial/uiswing/components/border.htmll">How to Use Borders</a>,
  * a section in <em>The Java Tutorial.</em>
  * <p>
  * In the Swing component set, borders supercede Insets as the
--- a/jdk/src/share/classes/javax/swing/border/CompoundBorder.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/border/CompoundBorder.java	Tue Oct 15 13:54:01 2013 +0100
@@ -37,18 +37,18 @@
  * For example, this class may be used to add blank margin space
  * to a component with an existing decorative border:
  * <p>
- * <code><pre>
+ * <pre>
  *    Border border = comp.getBorder();
  *    Border margin = new EmptyBorder(10,10,10,10);
  *    comp.setBorder(new CompoundBorder(border, margin));
- * </pre></code>
+ * </pre>
  * <p>
  * <strong>Warning:</strong>
  * Serialized objects of this class will 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
--- a/jdk/src/share/classes/javax/swing/border/EmptyBorder.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/border/EmptyBorder.java	Tue Oct 15 13:54:01 2013 +0100
@@ -40,7 +40,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
--- a/jdk/src/share/classes/javax/swing/border/EtchedBorder.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/border/EtchedBorder.java	Tue Oct 15 13:54:01 2013 +0100
@@ -44,7 +44,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
--- a/jdk/src/share/classes/javax/swing/border/LineBorder.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/border/LineBorder.java	Tue Oct 15 13:54:01 2013 +0100
@@ -44,7 +44,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
--- a/jdk/src/share/classes/javax/swing/border/MatteBorder.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/border/MatteBorder.java	Tue Oct 15 13:54:01 2013 +0100
@@ -40,7 +40,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
--- a/jdk/src/share/classes/javax/swing/border/SoftBevelBorder.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/border/SoftBevelBorder.java	Tue Oct 15 13:54:01 2013 +0100
@@ -40,7 +40,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
--- a/jdk/src/share/classes/javax/swing/border/TitledBorder.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/border/TitledBorder.java	Tue Oct 15 13:54:01 2013 +0100
@@ -60,7 +60,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
--- a/jdk/src/share/classes/javax/swing/colorchooser/AbstractColorChooserPanel.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/colorchooser/AbstractColorChooserPanel.java	Tue Oct 15 13:54:01 2013 +0100
@@ -40,7 +40,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
@@ -85,7 +85,7 @@
     /**
      * Provides a hint to the look and feel as to the
      * <code>KeyEvent.VK</code> constant that can be used as a mnemonic to
-     * access the panel. A return value <= 0 indicates there is no mnemonic.
+     * access the panel. A return value &lt;= 0 indicates there is no mnemonic.
      * <p>
      * The return value here is a hint, it is ultimately up to the look
      * and feel to honor the return value in some meaningful way.
@@ -94,7 +94,7 @@
      * <code>AbstractColorChooserPanel</code> does not support a mnemonic,
      * subclasses wishing a mnemonic will need to override this.
      *
-     * @return KeyEvent.VK constant identifying the mnemonic; <= 0 for no
+     * @return KeyEvent.VK constant identifying the mnemonic; &lt;= 0 for no
      *         mnemonic
      * @see #getDisplayedMnemonicIndex
      * @since 1.4
@@ -107,7 +107,7 @@
      * Provides a hint to the look and feel as to the index of the character in
      * <code>getDisplayName</code> that should be visually identified as the
      * mnemonic. The look and feel should only use this if
-     * <code>getMnemonic</code> returns a value > 0.
+     * <code>getMnemonic</code> returns a value &gt; 0.
      * <p>
      * The return value here is a hint, it is ultimately up to the look
      * and feel to honor the return value in some meaningful way. For example,
--- a/jdk/src/share/classes/javax/swing/colorchooser/ColorChooserComponentFactory.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/colorchooser/ColorChooserComponentFactory.java	Tue Oct 15 13:54:01 2013 +0100
@@ -37,7 +37,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
--- a/jdk/src/share/classes/javax/swing/colorchooser/DefaultPreviewPanel.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/colorchooser/DefaultPreviewPanel.java	Tue Oct 15 13:54:01 2013 +0100
@@ -46,7 +46,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
--- a/jdk/src/share/classes/javax/swing/colorchooser/DefaultSwatchChooserPanel.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/colorchooser/DefaultSwatchChooserPanel.java	Tue Oct 15 13:54:01 2013 +0100
@@ -45,7 +45,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
--- a/jdk/src/share/classes/javax/swing/event/AncestorEvent.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/event/AncestorEvent.java	Tue Oct 15 13:54:01 2013 +0100
@@ -37,7 +37,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
--- a/jdk/src/share/classes/javax/swing/event/CaretEvent.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/event/CaretEvent.java	Tue Oct 15 13:54:01 2013 +0100
@@ -36,7 +36,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
@@ -56,7 +56,7 @@
     /**
      * Fetches the location of the caret.
      *
-     * @return the dot >= 0
+     * @return the dot &gt;= 0
      */
     public abstract int getDot();
 
@@ -65,7 +65,7 @@
      * selection.  If there is no selection, this
      * will be the same as dot.
      *
-     * @return the mark >= 0
+     * @return the mark &gt;= 0
      */
     public abstract int getMark();
 }
--- a/jdk/src/share/classes/javax/swing/event/ChangeEvent.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/event/ChangeEvent.java	Tue Oct 15 13:54:01 2013 +0100
@@ -36,7 +36,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
--- a/jdk/src/share/classes/javax/swing/event/DocumentEvent.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/event/DocumentEvent.java	Tue Oct 15 13:54:01 2013 +0100
@@ -45,14 +45,14 @@
      * Returns the offset within the document of the start
      * of the change.
      *
-     * @return the offset >= 0
+     * @return the offset &gt;= 0
      */
     public int getOffset();
 
     /**
      * Returns the length of the change.
      *
-     * @return the length >= 0
+     * @return the length &gt;= 0
      */
     public int getLength();
 
@@ -155,7 +155,7 @@
          * This is the location that children were added
          * and/or removed.
          *
-         * @return the index >= 0
+         * @return the index &gt;= 0
          */
         public int getIndex();
 
--- a/jdk/src/share/classes/javax/swing/event/EventListenerList.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/event/EventListenerList.java	Tue Oct 15 13:54:01 2013 +0100
@@ -69,7 +69,7 @@
  *     Object[] listeners = listenerList.getListenerList();
  *     // Process the listeners last to first, notifying
  *     // those that are interested in this event
- *     for (int i = listeners.length-2; i>=0; i-=2) {
+ *     for (int i = listeners.length-2; i&gt;=0; i-=2) {
  *         if (listeners[i]==FooListener.class) {
  *             // Lazily create the event:
  *             if (fooEvent == null)
@@ -88,7 +88,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
--- a/jdk/src/share/classes/javax/swing/event/HyperlinkEvent.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/event/HyperlinkEvent.java	Tue Oct 15 13:54:01 2013 +0100
@@ -39,7 +39,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
--- a/jdk/src/share/classes/javax/swing/event/InternalFrameAdapter.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/event/InternalFrameAdapter.java	Tue Oct 15 13:54:01 2013 +0100
@@ -31,7 +31,7 @@
  * convenience for creating listener objects, and is functionally
  * equivalent to the WindowAdapter class in the AWT.
  * <p>
- * See <a href="http://java.sun.com/docs/books/tutorial/uiswing/events/internalframelistener.html">How to Write an Internal Frame Listener</a>
+ * See <a href="http://docs.oracle.com/javase/tutorial/uiswing/events/internalframelistener.html">How to Write an Internal Frame Listener</a>
  * in <em>The Java Tutorial</em>
  *
  * @see InternalFrameEvent
--- a/jdk/src/share/classes/javax/swing/event/InternalFrameEvent.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/event/InternalFrameEvent.java	Tue Oct 15 13:54:01 2013 +0100
@@ -34,7 +34,7 @@
  * although different IDs are used.
  * Help on handling internal frame events
  * is in
- * <a href="http://java.sun.com/docs/books/tutorial/uiswing/events/internalframelistener.html" target="_top">How to Write an Internal Frame Listener</a>,
+ * <a href="http://docs.oracle.com/javase/tutorial/uiswing/events/internalframelistener.html" target="_top">How to Write an Internal Frame Listener</a>,
  * a section in <em>The Java Tutorial</em>.
  * <p>
  * <strong>Warning:</strong>
@@ -42,7 +42,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
--- a/jdk/src/share/classes/javax/swing/event/InternalFrameListener.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/event/InternalFrameListener.java	Tue Oct 15 13:54:01 2013 +0100
@@ -32,7 +32,7 @@
  * This class is functionally equivalent to the WindowListener class
  * in the AWT.
  * <p>
- * See <a href="http://java.sun.com/docs/books/tutorial/uiswing/events/internalframelistener.html">How to Write an Internal Frame Listener</a>
+ * See <a href="http://docs.oracle.com/javase/tutorial/uiswing/events/internalframelistener.html">How to Write an Internal Frame Listener</a>
  * in <em>The Java Tutorial</em> for further documentation.
  *
  * @see java.awt.event.WindowListener
--- a/jdk/src/share/classes/javax/swing/event/ListDataEvent.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/event/ListDataEvent.java	Tue Oct 15 13:54:01 2013 +0100
@@ -36,7 +36,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
@@ -85,9 +85,9 @@
     public int getIndex1() { return index1; }
 
     /**
-     * Constructs a ListDataEvent object. If index0 is >
+     * Constructs a ListDataEvent object. If index0 is &gt;
      * index1, index0 and index1 will be swapped such that
-     * index0 will always be <= index1.
+     * index0 will always be &lt;= index1.
      *
      * @param source  the source Object (typically <code>this</code>)
      * @param type    an int specifying {@link #CONTENTS_CHANGED},
--- a/jdk/src/share/classes/javax/swing/event/ListSelectionEvent.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/event/ListSelectionEvent.java	Tue Oct 15 13:54:01 2013 +0100
@@ -42,7 +42,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
--- a/jdk/src/share/classes/javax/swing/event/MenuDragMouseEvent.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/event/MenuDragMouseEvent.java	Tue Oct 15 13:54:01 2013 +0100
@@ -41,7 +41,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
--- a/jdk/src/share/classes/javax/swing/event/MenuEvent.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/event/MenuEvent.java	Tue Oct 15 13:54:01 2013 +0100
@@ -37,7 +37,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
--- a/jdk/src/share/classes/javax/swing/event/MenuKeyEvent.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/event/MenuKeyEvent.java	Tue Oct 15 13:54:01 2013 +0100
@@ -41,7 +41,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
--- a/jdk/src/share/classes/javax/swing/event/PopupMenuEvent.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/event/PopupMenuEvent.java	Tue Oct 15 13:54:01 2013 +0100
@@ -35,7 +35,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
--- a/jdk/src/share/classes/javax/swing/event/TableColumnModelEvent.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/event/TableColumnModelEvent.java	Tue Oct 15 13:54:01 2013 +0100
@@ -38,7 +38,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
--- a/jdk/src/share/classes/javax/swing/event/TableModelEvent.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/event/TableModelEvent.java	Tue Oct 15 13:54:01 2013 +0100
@@ -57,7 +57,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
--- a/jdk/src/share/classes/javax/swing/event/TreeExpansionEvent.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/event/TreeExpansionEvent.java	Tue Oct 15 13:54:01 2013 +0100
@@ -34,15 +34,15 @@
  * <p>
  * For further documentation and examples see
  * the following sections in <em>The Java Tutorial</em>:
- * <a href="http://java.sun.com/docs/books/tutorial/uiswing/events/treeexpansionlistener.html">How to Write a Tree Expansion Listener</a> and
- * <a href="http://java.sun.com/docs/books/tutorial/uiswing/events/treewillexpandlistener.html">How to Write a Tree-Will-Expand Listener</a>.
+ * <a href="http://docs.oracle.com/javase/tutorial/uiswing/events/treeexpansionlistener.html">How to Write a Tree Expansion Listener</a> and
+ * <a href="http://docs.oracle.com/javase/tutorial/uiswing/events/treewillexpandlistener.html">How to Write a Tree-Will-Expand Listener</a>.
  * <p>
  * <strong>Warning:</strong>
  * Serialized objects of this class will 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
--- a/jdk/src/share/classes/javax/swing/event/TreeExpansionListener.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/event/TreeExpansionListener.java	Tue Oct 15 13:54:01 2013 +0100
@@ -32,7 +32,7 @@
   * a node.
   * For further documentation and examples see
   * <a
-  href="http://java.sun.com/docs/books/tutorial/uiswing/events/treeexpansionlistener.html">How to Write a Tree Expansion Listener</a>,
+  href="http://docs.oracle.com/javase/tutorial/uiswing/events/treeexpansionlistener.html">How to Write a Tree Expansion Listener</a>,
   * a section in <em>The Java Tutorial.</em>
   *
   * @author Scott Violet
--- a/jdk/src/share/classes/javax/swing/event/TreeModelEvent.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/event/TreeModelEvent.java	Tue Oct 15 13:54:01 2013 +0100
@@ -34,7 +34,7 @@
  * used to notify tree model listeners of the change.
  * For more information and examples see
  * <a
- href="http://java.sun.com/docs/books/tutorial/uiswing/events/treemodellistener.html">How to Write a Tree Model Listener</a>,
+ href="http://docs.oracle.com/javase/tutorial/uiswing/events/treemodellistener.html">How to Write a Tree Model Listener</a>,
  * a section in <em>The Java Tutorial.</em>
  * <p>
  * <strong>Warning:</strong>
@@ -42,7 +42,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
@@ -101,14 +101,14 @@
      * of initial-positions, you then need to convert the Vector of <code>Integer</code>
      * objects to an array of <code>int</code> to create the event.
      * <p>
-     * <b>Notes:</b><ul>
+     * <b>Notes:</b><ul style="list-style-type:none">
      * <li>Like the <code>insertNodeInto</code> method in the
      *    <code>DefaultTreeModel</code> class, <code>insertElementAt</code>
      *    appends to the <code>Vector</code> when the index matches the size
      *    of the vector. So you can use <code>insertElementAt(Integer, 0)</code>
-     *    even when the vector is empty.
-     * <ul>To create a node changed event for the root node, specify the parent
-     *     and the child indices as <code>null</code>.
+     *    even when the vector is empty.</li>
+     * <li>To create a node changed event for the root node, specify the parent
+     *     and the child indices as <code>null</code>.</li>
      * </ul>
      *
      * @param source the Object responsible for generating the event (typically
--- a/jdk/src/share/classes/javax/swing/event/TreeModelListener.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/event/TreeModelListener.java	Tue Oct 15 13:54:01 2013 +0100
@@ -32,7 +32,7 @@
  * to changes in a TreeModel.
  * For further information and examples see
  * <a
- href="http://java.sun.com/docs/books/tutorial/uiswing/events/treemodellistener.html">How to Write a Tree Model Listener</a>,
+ href="http://docs.oracle.com/javase/tutorial/uiswing/events/treemodellistener.html">How to Write a Tree Model Listener</a>,
  * a section in <em>The Java Tutorial.</em>
  *
  * @author Rob Davis
--- a/jdk/src/share/classes/javax/swing/event/TreeSelectionEvent.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/event/TreeSelectionEvent.java	Tue Oct 15 13:54:01 2013 +0100
@@ -40,7 +40,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
--- a/jdk/src/share/classes/javax/swing/event/TreeSelectionListener.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/event/TreeSelectionListener.java	Tue Oct 15 13:54:01 2013 +0100
@@ -32,7 +32,7 @@
  * changes.
  * For more information and examples see
  * <a
- href="http://java.sun.com/docs/books/tutorial/uiswing/events/treeselectionlistener.html">How to Write a Tree Selection Listener</a>,
+ href="http://docs.oracle.com/javase/tutorial/uiswing/events/treeselectionlistener.html">How to Write a Tree Selection Listener</a>,
  * a section in <em>The Java Tutorial.</em>
  *
  * @see javax.swing.tree.TreeSelectionModel
--- a/jdk/src/share/classes/javax/swing/event/TreeWillExpandListener.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/event/TreeWillExpandListener.java	Tue Oct 15 13:54:01 2013 +0100
@@ -32,7 +32,7 @@
   * The listener that's notified when a tree expands or collapses
   * a node.
   * For further information and examples see
-  * <a href="http://java.sun.com/docs/books/tutorial/uiswing/events/treewillexpandlistener.html">How to Write a Tree-Will-Expand Listener</a>,
+  * <a href="http://docs.oracle.com/javase/tutorial/uiswing/events/treewillexpandlistener.html">How to Write a Tree-Will-Expand Listener</a>,
   * a section in <em>The Java Tutorial.</em>
   *
   * @author Scott Violet
--- a/jdk/src/share/classes/javax/swing/event/UndoableEditEvent.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/event/UndoableEditEvent.java	Tue Oct 15 13:54:01 2013 +0100
@@ -35,7 +35,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
--- a/jdk/src/share/classes/javax/swing/filechooser/FileFilter.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/filechooser/FileFilter.java	Tue Oct 15 13:54:01 2013 +0100
@@ -39,7 +39,7 @@
  * For an example implementation of a simple file filter, see
  * <code><i>yourJDK</i>/demo/jfc/FileChooserDemo/ExampleFileFilter.java</code>.
  * For more information and examples see
- * <a href="http://java.sun.com/docs/books/tutorial/uiswing/components/filechooser.html">How to Use File Choosers</a>,
+ * <a href="http://docs.oracle.com/javase/tutorial/uiswing/components/filechooser.html">How to Use File Choosers</a>,
  * a section in <em>The Java Tutorial</em>.
  *
  * @see FileNameExtensionFilter
--- a/jdk/src/share/classes/javax/swing/filechooser/FileView.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/filechooser/FileView.java	Tue Oct 15 13:54:01 2013 +0100
@@ -31,9 +31,9 @@
 /**
  * <code>FileView</code> defines an abstract class that can be implemented
  * to provide the filechooser with UI information for a <code>File</code>.
- * Each L&F <code>JFileChooserUI</code> object implements this
+ * Each L&amp;F <code>JFileChooserUI</code> object implements this
  * class to pass back the correct icons and type descriptions specific to
- * that L&F. For example, the Microsoft Windows L&F returns the
+ * that L&amp;F. For example, the Microsoft Windows L&amp;F returns the
  * generic Windows icons for directories and generic files.
  * Additionally, you may want to provide your own <code>FileView</code> to
  * <code>JFileChooser</code> to return different icons or additional
@@ -44,7 +44,7 @@
  * <code>JFileChooser</code> first looks to see if there is a user defined
  * <code>FileView</code>, if there is, it gets type information from
  * there first. If <code>FileView</code> returns <code>null</code> for
- * any method, <code>JFileChooser</code> then uses the L&F specific
+ * any method, <code>JFileChooser</code> then uses the L&amp;F specific
  * view to get the information.
  * So, for example, if you provide a <code>FileView</code> class that
  * returns an <code>Icon</code> for JPG files, and returns <code>null</code>
@@ -57,7 +57,7 @@
  * <code><i>yourJDK</i>/demo/jfc/FileChooserDemo/ExampleFileView.java</code>.
  * For more information and examples see
  * <a
- href="http://java.sun.com/docs/books/tutorial/uiswing/components/filechooser.html">How to Use File Choosers</a>,
+ href="http://docs.oracle.com/javase/tutorial/uiswing/components/filechooser.html">How to Use File Choosers</a>,
  * a section in <em>The Java Tutorial</em>.
  *
  * @see javax.swing.JFileChooser
--- a/jdk/src/share/classes/javax/swing/plaf/BorderUIResource.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/plaf/BorderUIResource.java	Tue Oct 15 13:54:01 2013 +0100
@@ -51,7 +51,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
--- a/jdk/src/share/classes/javax/swing/plaf/ColorUIResource.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/plaf/ColorUIResource.java	Tue Oct 15 13:54:01 2013 +0100
@@ -37,7 +37,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
--- a/jdk/src/share/classes/javax/swing/plaf/DimensionUIResource.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/plaf/DimensionUIResource.java	Tue Oct 15 13:54:01 2013 +0100
@@ -40,7 +40,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
--- a/jdk/src/share/classes/javax/swing/plaf/FontUIResource.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/plaf/FontUIResource.java	Tue Oct 15 13:54:01 2013 +0100
@@ -39,7 +39,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
--- a/jdk/src/share/classes/javax/swing/plaf/IconUIResource.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/plaf/IconUIResource.java	Tue Oct 15 13:54:01 2013 +0100
@@ -44,7 +44,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
--- a/jdk/src/share/classes/javax/swing/plaf/InsetsUIResource.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/plaf/InsetsUIResource.java	Tue Oct 15 13:54:01 2013 +0100
@@ -39,7 +39,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicArrowButton.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicArrowButton.java	Tue Oct 15 13:54:01 2013 +0100
@@ -39,7 +39,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicCheckBoxUI.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicCheckBoxUI.java	Tue Oct 15 13:54:01 2013 +0100
@@ -43,7 +43,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicComboBoxEditor.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicComboBoxEditor.java	Tue Oct 15 13:54:01 2013 +0100
@@ -160,7 +160,7 @@
      * 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>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      */
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicComboBoxRenderer.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicComboBoxRenderer.java	Tue Oct 15 13:54:01 2013 +0100
@@ -41,7 +41,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
@@ -135,7 +135,7 @@
      * 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>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      */
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicComboBoxUI.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicComboBoxUI.java	Tue Oct 15 13:54:01 2013 +0100
@@ -54,8 +54,7 @@
  * <p>
  * For adding specific actions,
  * overide <code>installKeyboardActions</code> to add actions in response to
- * KeyStroke bindings. See the article <a href="http://java.sun.com/products/jfc/tsc/special_report/kestrel/keybindings.html">Keyboard Bindings in Swing</a>
- * at <a href="http://java.sun.com/products/jfc/tsc"><em>The Swing Connection</em></a>.
+ * KeyStroke bindings. See the article <a href="http://docs.oracle.com/javase/tutorial/uiswing/misc/keybinding.html">How to Use Key Bindings</a>
  *
  * @author Arnaud Weber
  * @author Tom Santos
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicComboPopup.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicComboPopup.java	Tue Oct 15 13:54:01 2013 +0100
@@ -53,7 +53,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicEditorPaneUI.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicEditorPaneUI.java	Tue Oct 15 13:54:01 2013 +0100
@@ -44,7 +44,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicIconFactory.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicIconFactory.java	Tue Oct 15 13:54:01 2013 +0100
@@ -42,7 +42,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicInternalFrameTitlePane.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicInternalFrameTitlePane.java	Tue Oct 15 13:54:01 2013 +0100
@@ -50,7 +50,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicListUI.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicListUI.java	Tue Oct 15 13:54:01 2013 +0100
@@ -1488,7 +1488,7 @@
      * 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>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      *
@@ -1592,7 +1592,7 @@
      * 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>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      *
@@ -1650,7 +1650,7 @@
      * 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>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      *
@@ -1717,7 +1717,7 @@
      * 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>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      *
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicLookAndFeel.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicLookAndFeel.java	Tue Oct 15 13:54:01 2013 +0100
@@ -96,7 +96,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicSplitPaneDivider.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicSplitPaneDivider.java	Tue Oct 15 13:54:01 2013 +0100
@@ -53,7 +53,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
@@ -671,7 +671,7 @@
      * 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>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      */
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicTextAreaUI.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicTextAreaUI.java	Tue Oct 15 13:54:01 2013 +0100
@@ -43,7 +43,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicTextFieldUI.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicTextFieldUI.java	Tue Oct 15 13:54:01 2013 +0100
@@ -45,7 +45,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicTextPaneUI.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicTextPaneUI.java	Tue Oct 15 13:54:01 2013 +0100
@@ -41,7 +41,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicTextUI.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicTextUI.java	Tue Oct 15 13:54:01 2013 +0100
@@ -93,7 +93,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
--- a/jdk/src/share/classes/javax/swing/plaf/basic/ComboPopup.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/ComboPopup.java	Tue Oct 15 13:54:01 2013 +0100
@@ -40,7 +40,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
--- a/jdk/src/share/classes/javax/swing/plaf/metal/DefaultMetalTheme.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/plaf/metal/DefaultMetalTheme.java	Tue Oct 15 13:54:01 2013 +0100
@@ -79,7 +79,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
--- a/jdk/src/share/classes/javax/swing/plaf/metal/MetalButtonUI.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/plaf/metal/MetalButtonUI.java	Tue Oct 15 13:54:01 2013 +0100
@@ -44,7 +44,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
--- a/jdk/src/share/classes/javax/swing/plaf/metal/MetalCheckBoxIcon.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/plaf/metal/MetalCheckBoxIcon.java	Tue Oct 15 13:54:01 2013 +0100
@@ -40,7 +40,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
--- a/jdk/src/share/classes/javax/swing/plaf/metal/MetalCheckBoxUI.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/plaf/metal/MetalCheckBoxUI.java	Tue Oct 15 13:54:01 2013 +0100
@@ -44,7 +44,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
--- a/jdk/src/share/classes/javax/swing/plaf/metal/MetalComboBoxButton.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/plaf/metal/MetalComboBoxButton.java	Tue Oct 15 13:54:01 2013 +0100
@@ -41,7 +41,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
--- a/jdk/src/share/classes/javax/swing/plaf/metal/MetalComboBoxEditor.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/plaf/metal/MetalComboBoxEditor.java	Tue Oct 15 13:54:01 2013 +0100
@@ -41,7 +41,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
@@ -129,7 +129,7 @@
      * 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>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      */
--- a/jdk/src/share/classes/javax/swing/plaf/metal/MetalComboBoxUI.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/plaf/metal/MetalComboBoxUI.java	Tue Oct 15 13:54:01 2013 +0100
@@ -43,7 +43,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
--- a/jdk/src/share/classes/javax/swing/plaf/metal/MetalIconFactory.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/plaf/metal/MetalIconFactory.java	Tue Oct 15 13:54:01 2013 +0100
@@ -36,7 +36,7 @@
 
 /**
  * Factory object that vends <code>Icon</code>s for
- * the Java<sup><font size="-2">TM</font></sup> look and feel (Metal).
+ * the Java&trade; look and feel (Metal).
  * These icons are used extensively in Metal via the defaults mechanism.
  * While other look and feels often use GIFs for icons, creating icons
  * in code facilitates switching to other themes.
@@ -52,7 +52,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
@@ -1550,7 +1550,7 @@
      * 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>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      */
@@ -1632,7 +1632,7 @@
      * 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>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      */
@@ -1651,7 +1651,7 @@
      * 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>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      */
@@ -1736,7 +1736,7 @@
      * 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>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      */
--- a/jdk/src/share/classes/javax/swing/plaf/metal/MetalLookAndFeel.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/plaf/metal/MetalLookAndFeel.java	Tue Oct 15 13:54:01 2013 +0100
@@ -72,7 +72,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
@@ -293,8 +293,8 @@
      * <table border="1" cellpadding="1" cellspacing="0"
      *         summary="Metal's system color mapping">
      *  <tr valign="top"  align="left">
-     *    <th bgcolor="#CCCCFF" align="left">Key
-     *    <th bgcolor="#CCCCFF" align="left">Value
+     *    <th style="background-color:#CCCCFF" align="left">Key
+     *    <th style="background-color:#CCCCFF" align="left">Value
      *  <tr valign="top"  align="left">
      *    <td>"desktop"
      *    <td>{@code theme.getDesktopColor()}
@@ -2361,7 +2361,7 @@
     }
 
     // From the JLF Design Guidelines:
-    // http://java.sun.com/products/jlf/ed2/book/HIG.Visual2.html
+    // http://www.oracle.com/technetwork/java/jlf-135985.html
     private static class MetalLayoutStyle extends DefaultLayoutStyle {
         private static MetalLayoutStyle INSTANCE = new MetalLayoutStyle();
 
--- a/jdk/src/share/classes/javax/swing/plaf/metal/MetalProgressBarUI.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/plaf/metal/MetalProgressBarUI.java	Tue Oct 15 13:54:01 2013 +0100
@@ -38,7 +38,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
--- a/jdk/src/share/classes/javax/swing/plaf/metal/MetalRadioButtonUI.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/plaf/metal/MetalRadioButtonUI.java	Tue Oct 15 13:54:01 2013 +0100
@@ -46,7 +46,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
--- a/jdk/src/share/classes/javax/swing/plaf/metal/MetalRootPaneUI.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/plaf/metal/MetalRootPaneUI.java	Tue Oct 15 13:54:01 2013 +0100
@@ -56,7 +56,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
--- a/jdk/src/share/classes/javax/swing/plaf/metal/MetalScrollButton.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/plaf/metal/MetalScrollButton.java	Tue Oct 15 13:54:01 2013 +0100
@@ -43,7 +43,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
--- a/jdk/src/share/classes/javax/swing/plaf/metal/MetalScrollPaneUI.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/plaf/metal/MetalScrollPaneUI.java	Tue Oct 15 13:54:01 2013 +0100
@@ -44,7 +44,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
--- a/jdk/src/share/classes/javax/swing/plaf/metal/MetalSeparatorUI.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/plaf/metal/MetalSeparatorUI.java	Tue Oct 15 13:54:01 2013 +0100
@@ -44,7 +44,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
--- a/jdk/src/share/classes/javax/swing/plaf/metal/MetalSliderUI.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/plaf/metal/MetalSliderUI.java	Tue Oct 15 13:54:01 2013 +0100
@@ -44,7 +44,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
--- a/jdk/src/share/classes/javax/swing/plaf/metal/MetalSplitPaneDivider.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/plaf/metal/MetalSplitPaneDivider.java	Tue Oct 15 13:54:01 2013 +0100
@@ -39,7 +39,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
--- a/jdk/src/share/classes/javax/swing/plaf/metal/MetalSplitPaneUI.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/plaf/metal/MetalSplitPaneUI.java	Tue Oct 15 13:54:01 2013 +0100
@@ -37,7 +37,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
--- a/jdk/src/share/classes/javax/swing/plaf/metal/MetalTabbedPaneUI.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/plaf/metal/MetalTabbedPaneUI.java	Tue Oct 15 13:54:01 2013 +0100
@@ -41,7 +41,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
--- a/jdk/src/share/classes/javax/swing/plaf/metal/MetalTextFieldUI.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/plaf/metal/MetalTextFieldUI.java	Tue Oct 15 13:54:01 2013 +0100
@@ -41,7 +41,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
--- a/jdk/src/share/classes/javax/swing/plaf/metal/MetalToggleButtonUI.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/plaf/metal/MetalToggleButtonUI.java	Tue Oct 15 13:54:01 2013 +0100
@@ -49,7 +49,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
--- a/jdk/src/share/classes/javax/swing/plaf/metal/MetalToolTipUI.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/plaf/metal/MetalToolTipUI.java	Tue Oct 15 13:54:01 2013 +0100
@@ -45,7 +45,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
--- a/jdk/src/share/classes/javax/swing/plaf/metal/MetalTreeUI.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/plaf/metal/MetalTreeUI.java	Tue Oct 15 13:54:01 2013 +0100
@@ -46,7 +46,7 @@
  *
  * <table summary="Descriptions of supported hints: Angled, Horizontal, and None">
  *  <tr>
- *    <th><p align="left">Angled</p></th>
+ *    <th><p style="text-align:left">Angled</p></th>
  *    <td>A line is drawn connecting the child to the parent. For handling
  *          of the root node refer to
  *          {@link javax.swing.JTree#setRootVisible} and
@@ -54,11 +54,11 @@
  *    </td>
  *  </tr>
  *  <tr>
- *     <th><p align="left">Horizontal</p></th>
+ *     <th><p style="text-align:left">Horizontal</p></th>
  *     <td>A horizontal line is drawn dividing the children of the root node.</td>
  *  </tr>
  *  <tr>
- *      <th><p align="left">None</p></th>
+ *      <th><p style="text-align:left">None</p></th>
  *      <td>Do not draw any visual indication between nodes.</td>
  *  </tr>
  * </table>
--- a/jdk/src/share/classes/javax/swing/plaf/multi/MultiLookAndFeel.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/plaf/multi/MultiLookAndFeel.java	Tue Oct 15 13:54:01 2013 +0100
@@ -47,7 +47,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
--- a/jdk/src/share/classes/javax/swing/plaf/synth/SynthTextAreaUI.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/plaf/synth/SynthTextAreaUI.java	Tue Oct 15 13:54:01 2013 +0100
@@ -44,7 +44,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
--- a/jdk/src/share/classes/javax/swing/plaf/synth/SynthTextFieldUI.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/plaf/synth/SynthTextFieldUI.java	Tue Oct 15 13:54:01 2013 +0100
@@ -43,7 +43,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
--- a/jdk/src/share/classes/javax/swing/plaf/synth/SynthTextPaneUI.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/plaf/synth/SynthTextPaneUI.java	Tue Oct 15 13:54:01 2013 +0100
@@ -40,7 +40,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
--- a/jdk/src/share/classes/javax/swing/table/AbstractTableModel.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/table/AbstractTableModel.java	Tue Oct 15 13:54:01 2013 +0100
@@ -50,7 +50,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
--- a/jdk/src/share/classes/javax/swing/table/DefaultTableCellRenderer.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/table/DefaultTableCellRenderer.java	Tue Oct 15 13:54:01 2013 +0100
@@ -75,7 +75,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
@@ -150,7 +150,7 @@
 
     /**
      * Notification from the <code>UIManager</code> that the look and feel
-     * [L&F] has changed.
+     * [L&amp;F] has changed.
      * Replaces the current UI object with the latest version from the
      * <code>UIManager</code>.
      *
@@ -387,7 +387,7 @@
      * 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>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      */
--- a/jdk/src/share/classes/javax/swing/table/DefaultTableColumnModel.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/table/DefaultTableColumnModel.java	Tue Oct 15 13:54:01 2013 +0100
@@ -44,7 +44,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
--- a/jdk/src/share/classes/javax/swing/table/DefaultTableModel.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/table/DefaultTableModel.java	Tue Oct 15 13:54:01 2013 +0100
@@ -50,7 +50,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
@@ -418,15 +418,14 @@
      *
      *  <pre>
      *  Examples of moves:
-     *  <p>
+     *
      *  1. moveRow(1,3,5);
      *          a|B|C|D|e|f|g|h|i|j|k   - before
      *          a|e|f|g|h|B|C|D|i|j|k   - after
-     *  <p>
+     *
      *  2. moveRow(6,7,1);
      *          a|b|c|d|e|f|G|H|i|j|k   - before
      *          a|G|H|b|c|d|e|f|i|j|k   - after
-     *  <p>
      *  </pre>
      *
      * @param   start       the starting row index to be moved
--- a/jdk/src/share/classes/javax/swing/table/JTableHeader.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/table/JTableHeader.java	Tue Oct 15 13:54:01 2013 +0100
@@ -52,7 +52,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
@@ -437,7 +437,7 @@
 //
 
     /**
-     * Returns the look and feel (L&F) object that renders this component.
+     * Returns the look and feel (L&amp;F) object that renders this component.
      *
      * @return the <code>TableHeaderUI</code> object that renders this component
      */
@@ -446,9 +446,9 @@
     }
 
     /**
-     * Sets the look and feel (L&F) object that renders this component.
+     * Sets the look and feel (L&amp;F) object that renders this component.
      *
-     * @param ui  the <code>TableHeaderUI</code> L&F object
+     * @param ui  the <code>TableHeaderUI</code> L&amp;F object
      * @see UIDefaults#getUI
      */
     public void setUI(TableHeaderUI ui){
@@ -460,7 +460,7 @@
 
     /**
      * Notification from the <code>UIManager</code> that the look and feel
-     * (L&F) has changed.
+     * (L&amp;F) has changed.
      * Replaces the current UI object with the latest version from the
      * <code>UIManager</code>.
      *
@@ -478,7 +478,7 @@
 
     /**
      * Returns the suffix used to construct the name of the look and feel
-     * (L&F) class used to render this component.
+     * (L&amp;F) class used to render this component.
      * @return the string "TableHeaderUI"
      *
      * @return "TableHeaderUI"
@@ -776,7 +776,7 @@
      * 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>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      */
--- a/jdk/src/share/classes/javax/swing/table/TableCellRenderer.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/table/TableCellRenderer.java	Tue Oct 15 13:54:01 2013 +0100
@@ -49,10 +49,10 @@
      * <pre>
      *     JTable.DropLocation dropLocation = table.getDropLocation();
      *     if (dropLocation != null
-     *             && !dropLocation.isInsertRow()
-     *             && !dropLocation.isInsertColumn()
-     *             && dropLocation.getRow() == row
-     *             && dropLocation.getColumn() == column) {
+     *             &amp;&amp; !dropLocation.isInsertRow()
+     *             &amp;&amp; !dropLocation.isInsertColumn()
+     *             &amp;&amp; dropLocation.getRow() == row
+     *             &amp;&amp; dropLocation.getColumn() == column) {
      *
      *         // this cell represents the current drop location
      *         // so render it specially, perhaps with a different color
--- a/jdk/src/share/classes/javax/swing/table/TableColumn.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/table/TableColumn.java	Tue Oct 15 13:54:01 2013 +0100
@@ -67,7 +67,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
--- a/jdk/src/share/classes/javax/swing/table/TableModel.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/table/TableModel.java	Tue Oct 15 13:54:01 2013 +0100
@@ -40,7 +40,7 @@
  *      JTable table = new JTable(myData);
  *  </pre><p>
  *
- * For further documentation, see <a href="http://java.sun.com/docs/books/tutorial/uiswing/components/table.html#data">Creating a Table Model</a>
+ * For further documentation, see <a href="http://docs.oracle.com/javase/tutorial/uiswing/components/table.html#data">Creating a Table Model</a>
  * in <em>The Java Tutorial</em>.
  * <p>
  * @author Philip Milne
--- a/jdk/src/share/classes/javax/swing/text/AbstractDocument.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/text/AbstractDocument.java	Tue Oct 15 13:54:01 2013 +0100
@@ -90,7 +90,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
@@ -408,7 +408,7 @@
      * <p>
      * This method is thread safe, although most Swing methods
      * are not. Please see
-     * <A HREF="http://download.oracle.com/javase/tutorial/uiswing/concurrency/index.html">Concurrency
+     * <A HREF="http://docs.oracle.com/javase/tutorial/uiswing/concurrency/index.html">Concurrency
      * in Swing</A> for more information.
      *
      * @param r the renderer to execute
@@ -426,7 +426,7 @@
      * Returns the length of the data.  This is the number of
      * characters of content that represents the users data.
      *
-     * @return the length >= 0
+     * @return the length &gt;= 0
      * @see Document#getLength
      */
     public int getLength() {
@@ -569,11 +569,11 @@
      * <p>
      * This method is thread safe, although most Swing methods
      * are not. Please see
-     * <A HREF="http://download.oracle.com/javase/tutorial/uiswing/concurrency/index.html">Concurrency
+     * <A HREF="http://docs.oracle.com/javase/tutorial/uiswing/concurrency/index.html">Concurrency
      * in Swing</A> for more information.
      *
-     * @param offs the starting offset >= 0
-     * @param len the number of characters to remove >= 0
+     * @param offs the starting offset &gt;= 0
+     * @param len the number of characters to remove &gt;= 0
      * @exception BadLocationException  the given remove position is not a valid
      *   position within the document
      * @see Document#remove
@@ -682,10 +682,10 @@
      * <p>
      * This method is thread safe, although most Swing methods
      * are not. Please see
-     * <A HREF="http://download.oracle.com/javase/tutorial/uiswing/concurrency/index.html">Concurrency
+     * <A HREF="http://docs.oracle.com/javase/tutorial/uiswing/concurrency/index.html">Concurrency
      * in Swing</A> for more information.
      *
-     * @param offs the starting offset >= 0
+     * @param offs the starting offset &gt;= 0
      * @param str the string to insert; does nothing with null/empty strings
      * @param a the attributes for the inserted content
      * @exception BadLocationException  the given insert position is not a valid
@@ -777,8 +777,8 @@
     /**
      * Gets a sequence of text from the document.
      *
-     * @param offset the starting offset >= 0
-     * @param length the number of characters to retrieve >= 0
+     * @param offset the starting offset &gt;= 0
+     * @param length the number of characters to retrieve &gt;= 0
      * @return the text
      * @exception BadLocationException  the range given includes a position
      *   that is not a valid position within the document
@@ -810,7 +810,7 @@
      * &nbsp; Segment text = new Segment();
      * &nbsp; int offs = 0;
      * &nbsp; text.setPartialReturn(true);
-     * &nbsp; while (nleft > 0) {
+     * &nbsp; while (nleft &gt; 0) {
      * &nbsp;     doc.getText(offs, nleft, text);
      * &nbsp;     // do something with text
      * &nbsp;     nleft -= text.count;
@@ -818,8 +818,8 @@
      * &nbsp; }
      * </pre>
      *
-     * @param offset the starting offset >= 0
-     * @param length the number of characters to retrieve >= 0
+     * @param offset the starting offset &gt;= 0
+     * @param length the number of characters to retrieve &gt;= 0
      * @param txt the Segment object to retrieve the text into
      * @exception BadLocationException  the range given includes a position
      *   that is not a valid position within the document
@@ -837,10 +837,10 @@
      * <p>
      * This method is thread safe, although most Swing methods
      * are not. Please see
-     * <A HREF="http://download.oracle.com/javase/tutorial/uiswing/concurrency/index.html">Concurrency
+     * <A HREF="http://docs.oracle.com/javase/tutorial/uiswing/concurrency/index.html">Concurrency
      * in Swing</A> for more information.
      *
-     * @param offs the position in the model >= 0
+     * @param offs the position in the model &gt;= 0
      * @return the position
      * @exception BadLocationException  if the given position does not
      *   represent a valid location in the associated document
@@ -956,7 +956,7 @@
      * should keep in mind however that a paragraph should at least be the
      * unit of text over which to run the Unicode bidirectional algorithm.
      *
-     * @param pos the starting offset >= 0
+     * @param pos the starting offset &gt;= 0
      * @return the element */
     public abstract Element getParagraphElement(int pos);
 
@@ -1288,8 +1288,8 @@
      *
      * @param parent the parent element
      * @param a the attributes for the element
-     * @param p0 the beginning of the range >= 0
-     * @param p1 the end of the range >= p0
+     * @param p0 the beginning of the range &gt;= 0
+     * @param p1 the end of the range &gt;= p0
      * @return the new element
      */
     protected Element createLeafElement(Element parent, AttributeSet a, int p0, int p1) {
@@ -1610,7 +1610,7 @@
          * Creates a position within the content that will
          * track change as the content is mutated.
          *
-         * @param offset the offset in the content >= 0
+         * @param offset the offset in the content &gt;= 0
          * @return a Position
          * @exception BadLocationException for an invalid offset
          */
@@ -1619,14 +1619,14 @@
         /**
          * Current length of the sequence of character content.
          *
-         * @return the length >= 0
+         * @return the length &gt;= 0
          */
         public int length();
 
         /**
          * Inserts a string of characters into the sequence.
          *
-         * @param where   offset into the sequence to make the insertion >= 0
+         * @param where   offset into the sequence to make the insertion &gt;= 0
          * @param str     string to insert
          * @return  if the implementation supports a history mechanism,
          *    a reference to an <code>Edit</code> implementation will be returned,
@@ -1640,8 +1640,8 @@
          * Removes some portion of the sequence.
          *
          * @param where   The offset into the sequence to make the
-         *   insertion >= 0.
-         * @param nitems  The number of items in the sequence to remove >= 0.
+         *   insertion &gt;= 0.
+         * @param nitems  The number of items in the sequence to remove &gt;= 0.
          * @return  If the implementation supports a history mechansim,
          *    a reference to an Edit implementation will be returned,
          *    otherwise null.
@@ -1653,8 +1653,8 @@
         /**
          * Fetches a string of characters contained in the sequence.
          *
-         * @param where   Offset into the sequence to fetch >= 0.
-         * @param len     number of characters to copy >= 0.
+         * @param where   Offset into the sequence to fetch &gt;= 0.
+         * @param len     number of characters to copy &gt;= 0.
          * @return the string
          * @exception BadLocationException  Thrown if the area covered by
          *   the arguments is not contained in the character sequence.
@@ -1664,8 +1664,8 @@
         /**
          * Gets a sequence of characters and copies them into a Segment.
          *
-         * @param where the starting offset >= 0
-         * @param len the number of characters >= 0
+         * @param where the starting offset &gt;= 0
+         * @param len the number of characters &gt;= 0
          * @param txt the target location to copy into
          * @exception BadLocationException  Thrown if the area covered by
          *   the arguments is not contained in the character sequence.
@@ -1778,7 +1778,7 @@
      * 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>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      */
@@ -1809,7 +1809,7 @@
          * Dumps a debugging representation of the element hierarchy.
          *
          * @param psOut the output stream
-         * @param indentAmount the indentation level >= 0
+         * @param indentAmount the indentation level &gt;= 0
          */
         public void dump(PrintStream psOut, int indentAmount) {
             PrintWriter out;
@@ -1867,7 +1867,7 @@
         /**
          * Gets the number of attributes that are defined.
          *
-         * @return the number of attributes >= 0
+         * @return the number of attributes &gt;= 0
          * @see AttributeSet#getAttributeCount
          */
         public int getAttributeCount() {
@@ -2116,21 +2116,21 @@
         /**
          * Gets the starting offset in the model for the element.
          *
-         * @return the offset >= 0
+         * @return the offset &gt;= 0
          */
         public abstract int getStartOffset();
 
         /**
          * Gets the ending offset in the model for the element.
          *
-         * @return the offset >= 0
+         * @return the offset &gt;= 0
          */
         public abstract int getEndOffset();
 
         /**
          * Gets a child element.
          *
-         * @param index the child index, >= 0 && < getElementCount()
+         * @param index the child index, &gt;= 0 &amp;&amp; &lt; getElementCount()
          * @return the child element
          */
         public abstract Element getElement(int index);
@@ -2138,15 +2138,15 @@
         /**
          * Gets the number of children for the element.
          *
-         * @return the number of children >= 0
+         * @return the number of children &gt;= 0
          */
         public abstract int getElementCount();
 
         /**
          * Gets the child element index closest to the given model offset.
          *
-         * @param offset the offset >= 0
-         * @return the element index >= 0
+         * @param offset the offset &gt;= 0
+         * @return the element index &gt;= 0
          */
         public abstract int getElementIndex(int offset);
 
@@ -2247,7 +2247,7 @@
      * 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>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      */
@@ -2272,7 +2272,7 @@
          * Gets the child element that contains
          * the given model position.
          *
-         * @param pos the position >= 0
+         * @param pos the position &gt;= 0
          * @return the element, null if none
          */
         public Element positionToElement(int pos) {
@@ -2289,8 +2289,8 @@
         /**
          * Replaces content with a new set of elements.
          *
-         * @param offset the starting offset >= 0
-         * @param length the length to replace >= 0
+         * @param offset the starting offset &gt;= 0
+         * @param length the length to replace &gt;= 0
          * @param elems the new elements
          */
         public void replace(int offset, int length, Element[] elems) {
@@ -2342,7 +2342,7 @@
         /**
          * Gets the starting offset in the model for the element.
          *
-         * @return the offset >= 0
+         * @return the offset &gt;= 0
          */
         public int getStartOffset() {
             return children[0].getStartOffset();
@@ -2352,7 +2352,7 @@
          * Gets the ending offset in the model for the element.
          * @throws NullPointerException if this element has no children
          *
-         * @return the offset >= 0
+         * @return the offset &gt;= 0
          */
         public int getEndOffset() {
             Element child =
@@ -2363,7 +2363,7 @@
         /**
          * Gets a child element.
          *
-         * @param index the child index, >= 0 && < getElementCount()
+         * @param index the child index, &gt;= 0 &amp;&amp; &lt; getElementCount()
          * @return the child element, null if none
          */
         public Element getElement(int index) {
@@ -2376,7 +2376,7 @@
         /**
          * Gets the number of children for the element.
          *
-         * @return the number of children >= 0
+         * @return the number of children &gt;= 0
          */
         public int getElementCount()  {
             return nchildren;
@@ -2385,8 +2385,8 @@
         /**
          * Gets the child element index closest to the given model offset.
          *
-         * @param offset the offset >= 0
-         * @return the element index >= 0
+         * @param offset the offset &gt;= 0
+         * @return the element index &gt;= 0
          */
         public int getElementIndex(int offset) {
             int index;
@@ -2501,7 +2501,7 @@
      * 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>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      *
@@ -2515,8 +2515,8 @@
          *
          * @param parent  The parent element
          * @param a       The element attributes
-         * @param offs0   The start offset >= 0
-         * @param offs1   The end offset >= offs0
+         * @param offs0   The start offset &gt;= 0
+         * @param offs1   The end offset &gt;= offs0
          * @since 1.4
          */
         public LeafElement(Element parent, AttributeSet a, int offs0, int offs1) {
@@ -2545,7 +2545,7 @@
         /**
          * Gets the starting offset in the model for the element.
          *
-         * @return the offset >= 0
+         * @return the offset &gt;= 0
          */
         public int getStartOffset() {
             return p0.getOffset();
@@ -2554,7 +2554,7 @@
         /**
          * Gets the ending offset in the model for the element.
          *
-         * @return the offset >= 0
+         * @return the offset &gt;= 0
          */
         public int getEndOffset() {
             return p1.getOffset();
@@ -2576,8 +2576,8 @@
         /**
          * Gets the child element index closest to the given model offset.
          *
-         * @param pos the offset >= 0
-         * @return the element index >= 0
+         * @param pos the offset &gt;= 0
+         * @return the element index &gt;= 0
          */
         public int getElementIndex(int pos) {
             return -1;
@@ -2586,7 +2586,7 @@
         /**
          * Gets a child element.
          *
-         * @param index the child index, >= 0 && < getElementCount()
+         * @param index the child index, &gt;= 0 &amp;&amp; &lt; getElementCount()
          * @return the child element
          */
         public Element getElement(int index) {
@@ -2596,7 +2596,7 @@
         /**
          * Returns the number of child elements.
          *
-         * @return the number of children >= 0
+         * @return the number of children &gt;= 0
          */
         public int getElementCount()  {
             return 0;
@@ -2731,8 +2731,8 @@
         /**
          * Constructs a change record.
          *
-         * @param offs the offset into the document of the change >= 0
-         * @param len  the length of the change >= 0
+         * @param offs the offset into the document of the change &gt;= 0
+         * @param len  the length of the change &gt;= 0
          * @param type the type of event (DocumentEvent.EventType)
          * @since 1.4
          */
@@ -2901,7 +2901,7 @@
         /**
          * Returns the offset within the document of the start of the change.
          *
-         * @return the offset >= 0
+         * @return the offset &gt;= 0
          * @see DocumentEvent#getOffset
          */
         public int getOffset() {
@@ -2911,7 +2911,7 @@
         /**
          * Returns the length of the change.
          *
-         * @return the length >= 0
+         * @return the length &gt;= 0
          * @see DocumentEvent#getLength
          */
         public int getLength() {
@@ -3024,7 +3024,7 @@
          * current model state for views that just attached to a model.
          *
          * @param e the element
-         * @param index the index into the model >= 0
+         * @param index the index into the model &gt;= 0
          * @param removed a set of elements that were removed
          * @param added a set of elements that were added
          */
@@ -3048,7 +3048,7 @@
         /**
          * Returns the index into the list of elements.
          *
-         * @return the index >= 0
+         * @return the index &gt;= 0
          */
         public int getIndex() {
             return index;
--- a/jdk/src/share/classes/javax/swing/text/AbstractWriter.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/text/AbstractWriter.java	Tue Oct 15 13:54:01 2013 +0100
@@ -417,7 +417,7 @@
 
     /**
      * Increments the indent level. If indenting would cause
-     * <code>getIndentSpace()</code> *<code>getIndentLevel()</code> to be >
+     * <code>getIndentSpace()</code> *<code>getIndentLevel()</code> to be &gt;
      * than <code>getLineLength()</code> this will not cause an indent.
      */
     protected void incrIndent() {
@@ -663,7 +663,7 @@
     }
 
     /**
-     * Writes out the set of attributes as " <name>=<value>"
+     * Writes out the set of attributes as " &lt;name&gt;=&lt;value&gt;"
      * pairs. It throws an IOException when encountered.
      *
      * @param     attr an AttributeSet.
--- a/jdk/src/share/classes/javax/swing/text/AsyncBoxView.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/text/AsyncBoxView.java	Tue Oct 15 13:54:01 2013 +0100
@@ -193,7 +193,7 @@
      * of the child at the given index.
      *
      * @param index the child index.  This should be a
-     *   value >= 0 and < getViewCount().
+     *   value &gt;= 0 and &lt; getViewCount().
      */
     protected ChildState getChildState(int index) {
         synchronized(stats) {
@@ -350,8 +350,8 @@
      * thread will not happen (i.e. the layout thread
      * acquires a read lock before doing anything).
      *
-     * @param offset the starting offset into the child views >= 0
-     * @param length the number of existing views to replace >= 0
+     * @param offset the starting offset into the child views &gt;= 0
+     * @param length the number of existing views to replace &gt;= 0
      * @param views the child views to insert
      */
     public void replace(int offset, int length, View[] views) {
@@ -417,7 +417,7 @@
      * the model.  This is implemented to fetch the view in the case
      * where there is a child view for each child element.
      *
-     * @param pos the position >= 0
+     * @param pos the position &gt;= 0
      * @return  index of the view representing the given position, or
      *   -1 if no view represents that position
      */
@@ -525,8 +525,8 @@
      * axis.  Since the minor axis is flexible, work is queued to resize
      * the children if the minor span changes.
      *
-     * @param width the width >= 0
-     * @param height the height >= 0
+     * @param width the width &gt;= 0
+     * @param height the height &gt;= 0
      */
     public void setSize(float width, float height) {
         setSpanOnAxis(X_AXIS, width);
@@ -618,7 +618,7 @@
      * axis.
      *
      * @param axis may be either View.X_AXIS or View.Y_AXIS
-     * @return   the span the view would like to be rendered into >= 0.
+     * @return   the span the view would like to be rendered into &gt;= 0.
      *           Typically the view is told to render into the span
      *           that is returned, although there is no guarantee.
      *           The parent may choose to resize or break the view.
@@ -643,7 +643,7 @@
      * axis.
      *
      * @param axis may be either View.X_AXIS or View.Y_AXIS
-     * @return  the span the view would like to be rendered into >= 0.
+     * @return  the span the view would like to be rendered into &gt;= 0.
      *           Typically the view is told to render into the span
      *           that is returned, although there is no guarantee.
      *           The parent may choose to resize or break the view.
@@ -671,7 +671,7 @@
      * axis.
      *
      * @param axis may be either View.X_AXIS or View.Y_AXIS
-     * @return   the span the view would like to be rendered into >= 0.
+     * @return   the span the view would like to be rendered into &gt;= 0.
      *           Typically the view is told to render into the span
      *           that is returned, although there is no guarantee.
      *           The parent may choose to resize or break the view.
@@ -690,7 +690,7 @@
      * the default is to not be a composite view this
      * returns 0.
      *
-     * @return the number of views >= 0
+     * @return the number of views &gt;= 0
      * @see View#getViewCount
      */
     public int getViewCount() {
@@ -703,7 +703,7 @@
      * Gets the nth child view.  Since there are no
      * children by default, this returns null.
      *
-     * @param n the number of the view to get, >= 0 && < getViewCount()
+     * @param n the number of the view to get, &gt;= 0 &amp;&amp; &lt; getViewCount()
      * @return the view
      */
     public View getView(int n) {
@@ -721,7 +721,7 @@
      * their location.  This returns null since the
      * default is to not have any child views.
      *
-     * @param index the index of the child, >= 0 && < getViewCount()
+     * @param index the index of the child, &gt;= 0 &amp;&amp; &lt; getViewCount()
      * @param a  the allocation to this view.
      * @return the allocation to the child
      */
@@ -736,7 +736,7 @@
      * to return -1 to indicate there is no valid child index for any
      * position.
      *
-     * @param pos the position >= 0
+     * @param pos the position &gt;= 0
      * @return  index of the view representing the given position, or
      *   -1 if no view represents that position
      * @since 1.3
@@ -749,7 +749,7 @@
      * Provides a mapping from the document model coordinate space
      * to the coordinate space of the view mapped to it.
      *
-     * @param pos the position to convert >= 0
+     * @param pos the position to convert &gt;= 0
      * @param a the allocated region to render into
      * @param b the bias toward the previous character or the
      *  next character represented by the offset, in case the
@@ -788,11 +788,11 @@
      * on the child view with a lock on the ChildState object
      * to avoid interaction with the layout thread.
      *
-     * @param x the X coordinate >= 0
-     * @param y the Y coordinate >= 0
+     * @param x the X coordinate &gt;= 0
+     * @param y the Y coordinate &gt;= 0
      * @param a the allocated region to render into
      * @return the location within the model that best represents the
-     *  given point in the view >= 0.  The biasReturn argument will be
+     *  given point in the view &gt;= 0.  The biasReturn argument will be
      * filled in to indicate that the point given is closer to the next
      * character in the model or the previous character in the model.
      */
@@ -828,16 +828,16 @@
      * 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.
      *
-     * @param pos the position to convert >= 0
+     * @param pos the position to convert &gt;= 0
      * @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;
      *  this may be one of the following:
-     *  <ul>
-     *  <code>SwingConstants.WEST</code>
-     *  <code>SwingConstants.EAST</code>
-     *  <code>SwingConstants.NORTH</code>
-     *  <code>SwingConstants.SOUTH</code>
+     *  <ul style="list-style-type:none">
+     *  <li><code>SwingConstants.WEST</code></li>
+     *  <li><code>SwingConstants.EAST</code></li>
+     *  <li><code>SwingConstants.NORTH</code></li>
+     *  <li><code>SwingConstants.SOUTH</code></li>
      *  </ul>
      * @param biasRet an array contain the bias that was checked
      * @return the location within the model that best represents the next
@@ -1007,8 +1007,8 @@
          * with one or more calls to getChildAllocation that
          * should also be in the synchronized block.
          *
-         * @param x the X coordinate >= 0
-         * @param y the Y coordinate >= 0
+         * @param x the X coordinate &gt;= 0
+         * @param y the Y coordinate &gt;= 0
          * @param a the allocation to the View
          * @return the nearest child index
          */
--- a/jdk/src/share/classes/javax/swing/text/AttributeSet.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/text/AttributeSet.java	Tue Oct 15 13:54:01 2013 +0100
@@ -89,7 +89,7 @@
      * Returns the number of attributes that are defined locally in this set.
      * Attributes that are defined in the parent set are not included.
      *
-     * @return the number of attributes >= 0
+     * @return the number of attributes &gt;= 0
      */
     public int getAttributeCount();
 
--- a/jdk/src/share/classes/javax/swing/text/BadLocationException.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/text/BadLocationException.java	Tue Oct 15 13:54:01 2013 +0100
@@ -33,7 +33,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
--- a/jdk/src/share/classes/javax/swing/text/DateFormatter.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/text/DateFormatter.java	Tue Oct 15 13:54:01 2013 +0100
@@ -39,7 +39,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
--- a/jdk/src/share/classes/javax/swing/text/DefaultCaret.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/text/DefaultCaret.java	Tue Oct 15 13:54:01 2013 +0100
@@ -98,7 +98,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
@@ -237,7 +237,7 @@
      * <p>
      * This method is thread safe, although most Swing methods
      * are not. Please see
-     * <A HREF="http://download.oracle.com/javase/tutorial/uiswing/concurrency/index.html">Concurrency
+     * <A HREF="http://docs.oracle.com/javase/tutorial/uiswing/concurrency/index.html">Concurrency
      * in Swing</A> for more information.
      */
     protected final synchronized void repaint() {
--- a/jdk/src/share/classes/javax/swing/text/DefaultEditorKit.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/text/DefaultEditorKit.java	Tue Oct 15 13:54:01 2013 +0100
@@ -840,7 +840,7 @@
      * 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>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      *
@@ -899,7 +899,7 @@
      * 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>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      *
@@ -947,7 +947,7 @@
      * 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>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      *
@@ -989,7 +989,7 @@
      * 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>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      *
@@ -1265,7 +1265,7 @@
      * 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>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      *
@@ -1301,7 +1301,7 @@
      * 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>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      *
@@ -1338,7 +1338,7 @@
      * 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>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      *
@@ -1373,7 +1373,7 @@
      * 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>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      *
--- a/jdk/src/share/classes/javax/swing/text/DefaultFormatter.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/text/DefaultFormatter.java	Tue Oct 15 13:54:01 2013 +0100
@@ -51,7 +51,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
--- a/jdk/src/share/classes/javax/swing/text/DefaultFormatterFactory.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/text/DefaultFormatterFactory.java	Tue Oct 15 13:54:01 2013 +0100
@@ -64,7 +64,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
--- a/jdk/src/share/classes/javax/swing/text/DefaultStyledDocument.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/text/DefaultStyledDocument.java	Tue Oct 15 13:54:01 2013 +0100
@@ -61,7 +61,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
@@ -173,7 +173,7 @@
      * <p>
      * This method is thread safe, although most Swing methods
      * are not. Please see
-     * <A HREF="http://download.oracle.com/javase/tutorial/uiswing/concurrency/index.html">Concurrency
+     * <A HREF="http://docs.oracle.com/javase/tutorial/uiswing/concurrency/index.html">Concurrency
      * in Swing</A> for more information.
      *
      * @param offset the starting offset &gt;= 0
@@ -426,7 +426,7 @@
      * <p>
      * This method is thread safe, although most Swing methods
      * are not. Please see
-     * <A HREF="http://download.oracle.com/javase/tutorial/uiswing/concurrency/index.html">Concurrency
+     * <A HREF="http://docs.oracle.com/javase/tutorial/uiswing/concurrency/index.html">Concurrency
      * in Swing</A> for more information.
      *
      * @param pos the offset from the start of the document &gt;= 0
@@ -483,7 +483,7 @@
      * <p>
      * This method is thread safe, although most Swing methods
      * are not. Please see
-     * <A HREF="http://download.oracle.com/javase/tutorial/uiswing/concurrency/index.html">Concurrency
+     * <A HREF="http://docs.oracle.com/javase/tutorial/uiswing/concurrency/index.html">Concurrency
      * in Swing</A> for more information.
      *
      * @param offset the offset in the document &gt;= 0
@@ -536,7 +536,7 @@
      * <p>
      * This method is thread safe, although most Swing methods
      * are not. Please see
-     * <A HREF="http://download.oracle.com/javase/tutorial/uiswing/concurrency/index.html">Concurrency
+     * <A HREF="http://docs.oracle.com/javase/tutorial/uiswing/concurrency/index.html">Concurrency
      * in Swing</A> for more information.
      *
      * @param offset the offset into the paragraph &gt;= 0
@@ -1124,7 +1124,7 @@
      * 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>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      */
@@ -1155,7 +1155,7 @@
      * 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>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      */
@@ -1390,7 +1390,7 @@
      * 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>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      */
--- a/jdk/src/share/classes/javax/swing/text/Document.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/text/Document.java	Tue Oct 15 13:54:01 2013 +0100
@@ -46,7 +46,7 @@
  * used are the location between two characters.  As the diagram
  * below shows, a location in a text document can be referred to
  * as a position, or an offset. This position is zero-based.
- * <p align=center><img src="doc-files/Document-coord.gif"
+ * <p style="text-align:center"><img src="doc-files/Document-coord.gif"
  * alt="The following text describes this graphic.">
  * <p>
  * In the example, if the content of a document is the
@@ -69,7 +69,7 @@
  * Exactly what structure is modeled is up to a particular Document
  * implementation.  It might be as simple as no structure (i.e. a
  * simple text field), or it might be something like diagram below.
- * <p align=center><img src="doc-files/Document-structure.gif"
+ * <p style="text-align:center"><img src="doc-files/Document-structure.gif"
  * alt="Diagram shows Book->Chapter->Paragraph">
  * <p>
  * The unit of structure (i.e. a node of the tree) is referred to
@@ -122,7 +122,7 @@
  * generated since that edit is actually the source of the change
  * rather than a mutation to the <code>Document</code> made through its
  * api.
- * <p align=center><img src="doc-files/Document-notification.gif"
+ * <p style="text-align:center"><img src="doc-files/Document-notification.gif"
  * alt="The preceeding text describes this graphic.">
  * <p>
  * Referring to the above diagram, suppose that the component shown
@@ -187,7 +187,7 @@
      * Returns number of characters of content currently
      * in the document.
      *
-     * @return number of characters >= 0
+     * @return number of characters &gt;= 0
      */
     public int getLength();
 
@@ -267,7 +267,7 @@
      * For a removal, the end of the removal range is collapsed
      * down to the start of the range, and any marks in the removal
      * range are collapsed down to the start of the range.
-     * <p align=center><img src="doc-files/Document-remove.gif"
+     * <p style="text-align:center"><img src="doc-files/Document-remove.gif"
      *  alt="Diagram shows removal of 'quick' from 'The quick brown fox.'">
      * <p>
      * If the Document structure changed as result of the removal,
@@ -280,8 +280,8 @@
      * If the Document supports undo/redo, an UndoableEditEvent will
      * also be generated.
      *
-     * @param offs  the offset from the beginning >= 0
-     * @param len   the number of characters to remove >= 0
+     * @param offs  the offset from the beginning &gt;= 0
+     * @param len   the number of characters to remove &gt;= 0
      * @exception BadLocationException  some portion of the removal range
      *   was not a valid part of the document.  The location in the exception
      *   is the first bad position encountered.
@@ -300,7 +300,7 @@
      * insertUpdate method on the DocumentListener.
      * The offset and length of the generated DocumentEvent
      * will indicate what change was actually made to the Document.
-     * <p align=center><img src="doc-files/Document-insert.gif"
+     * <p style="text-align:center"><img src="doc-files/Document-insert.gif"
      *  alt="Diagram shows insertion of 'quick' in 'The quick brown fox'">
      * <p>
      * If the Document structure changed as result of the insertion,
@@ -313,7 +313,7 @@
      * If the Document supports undo/redo, an UndoableEditEvent will
      * also be generated.
      *
-     * @param offset  the offset into the document to insert the content >= 0.
+     * @param offset  the offset into the document to insert the content &gt;= 0.
      *    All positions that track change at or after the given location
      *    will move.
      * @param str    the string to insert
@@ -333,9 +333,9 @@
      * of the document.
      *
      * @param offset  the offset into the document representing the desired
-     *   start of the text >= 0
-     * @param length  the length of the desired string >= 0
-     * @return the text, in a String of length >= 0
+     *   start of the text &gt;= 0
+     * @param length  the length of the desired string &gt;= 0
+     * @return the text, in a String of length &gt;= 0
      * @exception BadLocationException  some portion of the given range
      *   was not a valid part of the document.  The location in the exception
      *   is the first bad position encountered.
@@ -361,7 +361,7 @@
      * &nbsp; Segment text = new Segment();
      * &nbsp; int offs = 0;
      * &nbsp; text.setPartialReturn(true);
-     * &nbsp; while (nleft > 0) {
+     * &nbsp; while (nleft &gt; 0) {
      * &nbsp;     doc.getText(offs, nleft, text);
      * &nbsp;     // do someting with text
      * &nbsp;     nleft -= text.count;
@@ -371,8 +371,8 @@
      * </code></pre>
      *
      * @param offset  the offset into the document representing the desired
-     *   start of the text >= 0
-     * @param length  the length of the desired string >= 0
+     *   start of the text &gt;= 0
+     * @param length  the length of the desired string &gt;= 0
      * @param txt the Segment object to return the text in
      *
      * @exception BadLocationException  Some portion of the given range
@@ -409,7 +409,7 @@
      * insertion is forced to a position that follows the
      * original position.
      *
-     * @param offs  the offset from the start of the document >= 0
+     * @param offs  the offset from the start of the document &gt;= 0
      * @return the position
      * @exception BadLocationException  if the given position does not
      *   represent a valid location in the associated document
--- a/jdk/src/share/classes/javax/swing/text/Element.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/text/Element.java	Tue Oct 15 13:54:01 2013 +0100
@@ -69,7 +69,7 @@
      * children, this will be the offset of the first child.
      * As a document position, there is an implied forward bias.
      *
-     * @return the starting offset >= 0 and < getEndOffset();
+     * @return the starting offset &gt;= 0 and &lt; getEndOffset();
      * @see Document
      * @see AbstractDocument
      */
@@ -87,8 +87,8 @@
      * the document. As a result of this, it is possible for this to
      * return a value greater than the length of the document.
      *
-     * @return the ending offset > getStartOffset() and
-     *     <= getDocument().getLength() + 1
+     * @return the ending offset &gt; getStartOffset() and
+     *     &lt;= getDocument().getLength() + 1
      * @see Document
      * @see AbstractDocument
      */
@@ -105,8 +105,8 @@
      * <code>getElementCount() - 1</code> if the location is
      * greater than or equal to the end offset.
      *
-     * @param offset the specified offset >= 0
-     * @return the element index >= 0
+     * @param offset the specified offset &gt;= 0
+     * @return the element index &gt;= 0
      */
     public int getElementIndex(int offset);
 
@@ -114,14 +114,14 @@
      * Gets the number of child elements contained by this element.
      * If this element is a leaf, a count of zero is returned.
      *
-     * @return the number of child elements >= 0
+     * @return the number of child elements &gt;= 0
      */
     public int getElementCount();
 
     /**
      * Fetches the child element at the given index.
      *
-     * @param index the specified index >= 0
+     * @param index the specified index &gt;= 0
      * @return the child element
      */
     public Element getElement(int index);
--- a/jdk/src/share/classes/javax/swing/text/InternationalFormatter.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/text/InternationalFormatter.java	Tue Oct 15 13:54:01 2013 +0100
@@ -83,7 +83,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
--- a/jdk/src/share/classes/javax/swing/text/JTextComponent.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/text/JTextComponent.java	Tue Oct 15 13:54:01 2013 +0100
@@ -84,7 +84,7 @@
  * support).
  * You can find information on how to use the functionality
  * this class provides in
- * <a href="http://java.sun.com/docs/books/tutorial/uiswing/components/generaltext.html">General Rules for Using Text Components</a>,
+ * <a href="http://docs.oracle.com/javase/tutorial/uiswing/components/generaltext.html">General Rules for Using Text Components</a>,
  * a section in <em>The Java Tutorial.</em>
  *
  * <p>
@@ -281,7 +281,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
@@ -1122,7 +1122,7 @@
      * 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>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      */
@@ -2215,7 +2215,7 @@
      * <p>
      * This method is thread-safe, although most Swing methods are not. Please
      * see <A
-     * HREF="http://download.oracle.com/javase/tutorial/uiswing/concurrency/index.html">
+     * HREF="http://docs.oracle.com/javase/tutorial/uiswing/concurrency/index.html">
      * Concurrency in Swing</A> for more information.
      *
      * <p>
@@ -2473,7 +2473,7 @@
      * <p>
      * This method is thread-safe, although most Swing methods are not. Please
      * see <A
-     * HREF="http://download.oracle.com/javase/tutorial/uiswing/concurrency/index.html">
+     * HREF="http://docs.oracle.com/javase/tutorial/uiswing/concurrency/index.html">
      * Concurrency in Swing</A> for more information.
      *
      * <p>
@@ -2539,7 +2539,7 @@
      * 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>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      */
--- a/jdk/src/share/classes/javax/swing/text/MaskFormatter.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/text/MaskFormatter.java	Tue Oct 15 13:54:01 2013 +0100
@@ -40,7 +40,7 @@
  * <table border=1 summary="Valid characters and their descriptions">
  * <tr>
  *    <th>Character&nbsp;</th>
- *    <th><p align="left">Description</p></th>
+ *    <th><p style="text-align:left">Description</p></th>
  * </tr>
  * <tr>
  *    <td>#</td>
@@ -143,7 +143,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
--- a/jdk/src/share/classes/javax/swing/text/NumberFormatter.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/text/NumberFormatter.java	Tue Oct 15 13:54:01 2013 +0100
@@ -85,7 +85,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
--- a/jdk/src/share/classes/javax/swing/text/PlainDocument.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/text/PlainDocument.java	Tue Oct 15 13:54:01 2013 +0100
@@ -48,7 +48,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
@@ -100,7 +100,7 @@
      * <p>
      * This method is thread safe, although most Swing methods
      * are not. Please see
-     * <A HREF="http://download.oracle.com/javase/tutorial/uiswing/concurrency/index.html">Concurrency
+     * <A HREF="http://docs.oracle.com/javase/tutorial/uiswing/concurrency/index.html">Concurrency
      * in Swing</A> for more information.
      *
      * @param offs the starting offset &gt;= 0
--- a/jdk/src/share/classes/javax/swing/text/SimpleAttributeSet.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/text/SimpleAttributeSet.java	Tue Oct 15 13:54:01 2013 +0100
@@ -41,7 +41,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
--- a/jdk/src/share/classes/javax/swing/text/StringContent.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/text/StringContent.java	Tue Oct 15 13:54:01 2013 +0100
@@ -44,7 +44,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
--- a/jdk/src/share/classes/javax/swing/text/StyleContext.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/text/StyleContext.java	Tue Oct 15 13:54:01 2013 +0100
@@ -56,7 +56,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
@@ -292,7 +292,7 @@
      * <p>
      * This method is thread safe, although most Swing methods
      * are not. Please see
-     * <A HREF="http://download.oracle.com/javase/tutorial/uiswing/concurrency/index.html">Concurrency
+     * <A HREF="http://docs.oracle.com/javase/tutorial/uiswing/concurrency/index.html">Concurrency
      * in Swing</A> for more information.
      *
      * @param old the old attribute set
@@ -321,7 +321,7 @@
      * <p>
      * This method is thread safe, although most Swing methods
      * are not. Please see
-     * <A HREF="http://download.oracle.com/javase/tutorial/uiswing/concurrency/index.html">Concurrency
+     * <A HREF="http://docs.oracle.com/javase/tutorial/uiswing/concurrency/index.html">Concurrency
      * in Swing</A> for more information.
      *
      * @param old the old attribute set
@@ -349,7 +349,7 @@
      * <p>
      * This method is thread safe, although most Swing methods
      * are not. Please see
-     * <A HREF="http://download.oracle.com/javase/tutorial/uiswing/concurrency/index.html">Concurrency
+     * <A HREF="http://docs.oracle.com/javase/tutorial/uiswing/concurrency/index.html">Concurrency
      * in Swing</A> for more information.
      *
      * @param old the old set of attributes
@@ -377,7 +377,7 @@
      * <p>
      * This method is thread safe, although most Swing methods
      * are not. Please see
-     * <A HREF="http://download.oracle.com/javase/tutorial/uiswing/concurrency/index.html">Concurrency
+     * <A HREF="http://docs.oracle.com/javase/tutorial/uiswing/concurrency/index.html">Concurrency
      * in Swing</A> for more information.
      *
      * @param old the old attribute set
@@ -405,7 +405,7 @@
      * <p>
      * This method is thread safe, although most Swing methods
      * are not. Please see
-     * <A HREF="http://download.oracle.com/javase/tutorial/uiswing/concurrency/index.html">Concurrency
+     * <A HREF="http://docs.oracle.com/javase/tutorial/uiswing/concurrency/index.html">Concurrency
      * in Swing</A> for more information.
      *
      * @param old the old attribute set
@@ -445,7 +445,7 @@
      * <p>
      * This method is thread safe, although most Swing methods
      * are not. Please see
-     * <A HREF="http://download.oracle.com/javase/tutorial/uiswing/concurrency/index.html">Concurrency
+     * <A HREF="http://docs.oracle.com/javase/tutorial/uiswing/concurrency/index.html">Concurrency
      * in Swing</A> for more information.
      *
      * @param a the set to reclaim
@@ -1240,7 +1240,7 @@
      * 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>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      */
--- a/jdk/src/share/classes/javax/swing/text/StyledEditorKit.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/text/StyledEditorKit.java	Tue Oct 15 13:54:01 2013 +0100
@@ -371,7 +371,7 @@
      * 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>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      */
@@ -490,7 +490,7 @@
      * 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>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      */
@@ -546,7 +546,7 @@
      * 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>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      */
@@ -613,7 +613,7 @@
      * 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>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      */
@@ -679,7 +679,7 @@
      * 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>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      */
@@ -729,7 +729,7 @@
      * 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>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      */
@@ -768,7 +768,7 @@
      * 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>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      */
@@ -807,7 +807,7 @@
      * 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>
+     * of all JavaBeans&trade;
      * has been added to the <code>java.beans</code> package.
      * Please see {@link java.beans.XMLEncoder}.
      */
--- a/jdk/src/share/classes/javax/swing/text/TabSet.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/text/TabSet.java	Tue Oct 15 13:54:01 2013 +0100
@@ -37,7 +37,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
--- a/jdk/src/share/classes/javax/swing/text/TabStop.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/text/TabStop.java	Tue Oct 15 13:54:01 2013 +0100
@@ -37,7 +37,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
--- a/jdk/src/share/classes/javax/swing/text/TextAction.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/text/TextAction.java	Tue Oct 15 13:54:01 2013 +0100
@@ -52,7 +52,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
--- a/jdk/src/share/classes/javax/swing/text/View.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/text/View.java	Tue Oct 15 13:54:01 2013 +0100
@@ -68,7 +68,7 @@
     implementation, the minimum span will be &lt;= the preferred span which in turn
     will be &lt;= the maximum span.
     </p>
-    <p align=center><img src="doc-files/View-flexibility.jpg"
+    <p style="text-align:center"><img src="doc-files/View-flexibility.jpg"
                      alt="The above text describes this graphic.">
     <p>The minimum set of methods for layout are:
     <ul>
@@ -95,7 +95,7 @@
     This allows parent View implementations to cache the child requirements if
     desired.  The calling sequence looks something like the following:
     </p>
-    <p align=center>
+    <p style="text-align:center">
       <img src="doc-files/View-layout.jpg"
        alt="Sample calling sequence between parent view and child view:
        setSize, getMinimum, getPreferred, getMaximum, getAlignment, setSize">
@@ -293,7 +293,7 @@
     /**
      * Determines the desired alignment for this view along an
      * axis.  The desired alignment is returned.  This should be
-     * a value >= 0.0 and <= 1.0, where 0 indicates alignment at
+     * a value &gt;= 0.0 and &lt;= 1.0, where 0 indicates alignment at
      * the origin and 1.0 indicates alignment to the full span
      * away from the origin.  An alignment of 0.5 would be the
      * center of the view.
@@ -351,7 +351,7 @@
      * the default is to not be a composite view this
      * returns 0.
      *
-     * @return the number of views >= 0
+     * @return the number of views &gt;= 0
      * @see View#getViewCount
      */
     public int getViewCount() {
@@ -362,7 +362,7 @@
      * Gets the <i>n</i>th child view.  Since there are no
      * children by default, this returns <code>null</code>.
      *
-     * @param n the number of the view to get, >= 0 && < getViewCount()
+     * @param n the number of the view to get, &gt;= 0 &amp;&amp; &lt; getViewCount()
      * @return the view
      */
     public View getView(int n) {
@@ -393,7 +393,7 @@
      * Inserts a single child view.  This is a convenience
      * call to <code>replace</code>.
      *
-     * @param offs the offset of the view to insert before >= 0
+     * @param offs the offset of the view to insert before &gt;= 0
      * @param v the view
      * @see #replace
      * @since 1.3
@@ -428,9 +428,9 @@
      * a view has no children.
      *
      * @param offset the starting index into the child views to insert
-     *   the new views.  This should be a value >= 0 and <= getViewCount
+     *   the new views.  This should be a value &gt;= 0 and &lt;= getViewCount
      * @param length the number of existing child views to remove
-     *   This should be a value >= 0 and <= (getViewCount() - offset).
+     *   This should be a value &gt;= 0 and &lt;= (getViewCount() - offset).
      * @param views the child views to add.  This value can be
      *   <code>null</code> to indicate no children are being added
      *   (useful to remove).
@@ -445,7 +445,7 @@
      * to return -1 to indicate there is no valid child index for any
      * position.
      *
-     * @param pos the position >= 0
+     * @param pos the position &gt;= 0
      * @return  index of the view representing the given position, or
      *   -1 if no view represents that position
      * @since 1.3
@@ -461,7 +461,7 @@
      * their location.  This returns <code>null</code> since the
      * default is to not have any child views.
      *
-     * @param index the index of the child, >= 0 && <
+     * @param index the index of the child, &gt;= 0 &amp;&amp; &lt;
      *          <code>getViewCount()</code>
      * @param a  the allocation to this view
      * @return the allocation to the child
@@ -477,7 +477,7 @@
      * 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.
      *
-     * @param pos the position to convert >= 0
+     * @param pos the position to convert &gt;= 0
      * @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.
@@ -566,7 +566,7 @@
      * from the document model coordinate space
      * to the view coordinate space.
      *
-     * @param pos the position of the desired character (>=0)
+     * @param pos the position of the desired character (&gt;=0)
      * @param a the area of the view, which encompasses the requested character
      * @param b the bias toward the previous character or the
      *  next character represented by the offset, in case the
@@ -592,17 +592,17 @@
      * to the view coordinate space. The specified region is
      * created as a union of the first and last character positions.
      *
-     * @param p0 the position of the first character (>=0)
+     * @param p0 the position of the first character (&gt;=0)
      * @param b0 the bias of the first character position,
      *  toward the previous character or the
      *  next character represented by the offset, in case the
      *  position is a boundary of two views; <code>b0</code> will have one
      *  of these values:
-     * <ul>
+     * <ul style="list-style-type:none">
      * <li> <code>Position.Bias.Forward</code>
      * <li> <code>Position.Bias.Backward</code>
      * </ul>
-     * @param p1 the position of the last character (>=0)
+     * @param p1 the position of the last character (&gt;=0)
      * @param b1 the bias for the second character position, defined
      *          one of the legal values shown above
      * @param a the area of the view, which encompasses the requested region
@@ -656,11 +656,11 @@
      * closer to the next character in the model or the previous
      * character in the model.
      *
-     * @param x the X coordinate >= 0
-     * @param y the Y coordinate >= 0
+     * @param x the X coordinate &gt;= 0
+     * @param y the Y coordinate &gt;= 0
      * @param a the allocated region in which to render
      * @return the location within the model that best represents the
-     *  given point in the view >= 0.  The <code>biasReturn</code>
+     *  given point in the view &gt;= 0.  The <code>biasReturn</code>
      *  argument will be
      * filled in to indicate that the point given is closer to the next
      * character in the model or the previous character in the model.
@@ -804,7 +804,7 @@
      * Fetches the portion of the model for which this view is
      * responsible.
      *
-     * @return the starting offset into the model >= 0
+     * @return the starting offset into the model &gt;= 0
      * @see View#getStartOffset
      */
     public int getStartOffset() {
@@ -815,7 +815,7 @@
      * Fetches the portion of the model for which this view is
      * responsible.
      *
-     * @return the ending offset into the model >= 0
+     * @return the ending offset into the model &gt;= 0
      * @see View#getEndOffset
      */
     public int getEndOffset() {
@@ -884,14 +884,14 @@
      * @param axis may be either <code>View.X_AXIS</code> or
      *          <code>View.Y_AXIS</code>
      * @param offset the location in the document model
-     *   that a broken fragment would occupy >= 0.  This
+     *   that a broken fragment would occupy &gt;= 0.  This
      *   would be the starting offset of the fragment
      *   returned
      * @param pos the position along the axis that the
-     *  broken view would occupy >= 0.  This may be useful for
+     *  broken view would occupy &gt;= 0.  This may be useful for
      *  things like tab calculations
      * @param len specifies the distance along the axis
-     *  where a potential break is desired >= 0
+     *  where a potential break is desired &gt;= 0
      * @return the fragment of the view that represents the
      *  given span, if the view can be broken.  If the view
      *  doesn't support breaking behavior, the view itself is
@@ -909,10 +909,10 @@
      * the view doesn't support fragmenting (the default), it
      * should return itself.
      *
-     * @param p0 the starting offset >= 0.  This should be a value
+     * @param p0 the starting offset &gt;= 0.  This should be a value
      *   greater or equal to the element starting offset and
      *   less than the element ending offset.
-     * @param p1 the ending offset > p0.  This should be a value
+     * @param p1 the ending offset &gt; p0.  This should be a value
      *   less than or equal to the elements end offset and
      *   greater than the elements starting offset.
      * @return the view fragment, or itself if the view doesn't
@@ -949,10 +949,10 @@
      * @param axis may be either <code>View.X_AXIS</code> or
      *          <code>View.Y_AXIS</code>
      * @param pos the potential location of the start of the
-     *   broken view >= 0.  This may be useful for calculating tab
+     *   broken view &gt;= 0.  This may be useful for calculating tab
      *   positions
      * @param len specifies the relative length from <em>pos</em>
-     *   where a potential break is desired >= 0
+     *   where a potential break is desired &gt;= 0
      * @return the weight, which should be a value between
      *   ForcedBreakWeight and BadBreakWeight
      * @see LabelView
@@ -986,8 +986,8 @@
      * layout of the view along the given axis, if it
      * has any layout duties.
      *
-     * @param width the width >= 0
-     * @param height the height >= 0
+     * @param width the width &gt;= 0
+     * @param height the height &gt;= 0
      */
     public void setSize(float width, float height) {
     }
@@ -1314,7 +1314,7 @@
      * implemented to default the bias to <code>Position.Bias.Forward</code>
      * which was previously implied.
      *
-     * @param pos the position to convert >= 0
+     * @param pos the position to convert &gt;= 0
      * @param a the allocated region in which to render
      * @return the bounding box of the given position is returned
      * @exception BadLocationException  if the given position does
@@ -1332,11 +1332,11 @@
      * Provides a mapping from the view coordinate space to the logical
      * coordinate space of the model.
      *
-     * @param x the X coordinate >= 0
-     * @param y the Y coordinate >= 0
+     * @param x the X coordinate &gt;= 0
+     * @param y the Y coordinate &gt;= 0
      * @param a the allocated region in which to render
      * @return the location within the model that best represents the
-     *  given point in the view >= 0
+     *  given point in the view &gt;= 0
      * @see View#viewToModel
      * @deprecated
      */
--- a/jdk/src/share/classes/javax/swing/text/html/HTMLDocument.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/text/html/HTMLDocument.java	Tue Oct 15 13:54:01 2013 +0100
@@ -195,14 +195,14 @@
  *     <th><code>setOuterHTML</code></th>
  *   </tr>
  *   <tr valign="top">
- *     <td nowrap="nowrap">
+ *     <td style="white-space:nowrap">
  *       <div style="background-color: silver;">
  *         <p>Paragraph 1</p>
  *         <p>Paragraph 2</p>
  *       </div>
  *     </td>
  * <!--insertAfterStart-->
- *     <td nowrap="nowrap">
+ *     <td style="white-space:nowrap">
  *       <div style="background-color: silver;">
  *         <ul style="color: red;">
  *           <li>List Item</li>
@@ -212,7 +212,7 @@
  *       </div>
  *     </td>
  * <!--insertBeforeEnd-->
- *     <td nowrap="nowrap">
+ *     <td style="white-space:nowrap">
  *       <div style="background-color: silver;">
  *         <p>Paragraph 1</p>
  *         <p>Paragraph 2</p>
@@ -222,7 +222,7 @@
  *       </div>
  *     </td>
  * <!--insertBeforeStart-->
- *     <td nowrap="nowrap">
+ *     <td style="white-space:nowrap">
  *       <ul style="color: red;">
  *         <li>List Item</li>
  *       </ul>
@@ -232,7 +232,7 @@
  *       </div>
  *     </td>
  * <!--insertAfterEnd-->
- *     <td nowrap="nowrap">
+ *     <td style="white-space:nowrap">
  *       <div style="background-color: silver;">
  *         <p>Paragraph 1</p>
  *         <p>Paragraph 2</p>
@@ -242,7 +242,7 @@
  *       </ul>
  *     </td>
  * <!--setInnerHTML-->
- *     <td nowrap="nowrap">
+ *     <td style="white-space:nowrap">
  *       <div style="background-color: silver;">
  *         <ul style="color: red;">
  *           <li>List Item</li>
@@ -250,7 +250,7 @@
  *       </div>
  *     </td>
  * <!--setOuterHTML-->
- *     <td nowrap="nowrap">
+ *     <td style="white-space:nowrap">
  *       <ul style="color: red;">
  *         <li>List Item</li>
  *       </ul>
@@ -475,7 +475,7 @@
      * <p>
      * This method is thread safe, although most Swing methods
      * are not. Please see
-     * <A HREF="http://download.oracle.com/javase/tutorial/uiswing/concurrency/index.html">Concurrency
+     * <A HREF="http://docs.oracle.com/javase/tutorial/uiswing/concurrency/index.html">Concurrency
      * in Swing</A> for more information.
      *
      * @param offset the offset into the paragraph (must be at least 0)
--- a/jdk/src/share/classes/javax/swing/text/html/Option.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/text/html/Option.java	Tue Oct 15 13:54:01 2013 +0100
@@ -38,7 +38,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
--- a/jdk/src/share/classes/javax/swing/tree/AbstractLayoutCache.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/tree/AbstractLayoutCache.java	Tue Oct 15 13:54:01 2013 +0100
@@ -36,7 +36,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
--- a/jdk/src/share/classes/javax/swing/tree/DefaultMutableTreeNode.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/tree/DefaultMutableTreeNode.java	Tue Oct 15 13:54:01 2013 +0100
@@ -35,7 +35,7 @@
  * structure.
  * For examples of using default mutable tree nodes, see
  * <a
- href="http://java.sun.com/docs/books/tutorial/uiswing/components/tree.html">How to Use Trees</a>
+ href="http://docs.oracle.com/javase/tutorial/uiswing/components/tree.html">How to Use Trees</a>
  * in <em>The Java Tutorial.</em>
  *
  * <p>
@@ -76,7 +76,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
--- a/jdk/src/share/classes/javax/swing/tree/DefaultTreeCellEditor.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/tree/DefaultTreeCellEditor.java	Tue Oct 15 13:54:01 2013 +0100
@@ -52,7 +52,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
--- a/jdk/src/share/classes/javax/swing/tree/DefaultTreeCellRenderer.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/tree/DefaultTreeCellRenderer.java	Tue Oct 15 13:54:01 2013 +0100
@@ -49,7 +49,7 @@
  * <code>DefaultTreeCellRenderer</code> is not opaque and
  * unless you subclass paint you should not change this.
  * See <a
- href="http://java.sun.com/docs/books/tutorial/uiswing/components/tree.html">How to Use Trees</a>
+ href="http://docs.oracle.com/javase/tutorial/uiswing/components/tree.html">How to Use Trees</a>
  * in <em>The Java Tutorial</em>
  * for examples of customizing node display using this class.
  * <p>
@@ -95,7 +95,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
--- a/jdk/src/share/classes/javax/swing/tree/DefaultTreeModel.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/tree/DefaultTreeModel.java	Tue Oct 15 13:54:01 2013 +0100
@@ -33,7 +33,7 @@
 /**
  * A simple tree data model that uses TreeNodes.
  * For further information and examples that use DefaultTreeModel,
- * see <a href="http://java.sun.com/docs/books/tutorial/uiswing/components/tree.html">How to Use Trees</a>
+ * see <a href="http://docs.oracle.com/javase/tutorial/uiswing/components/tree.html">How to Use Trees</a>
  * in <em>The Java Tutorial.</em>
  * <p>
  * <strong>Warning:</strong>
@@ -41,7 +41,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
--- a/jdk/src/share/classes/javax/swing/tree/DefaultTreeSelectionModel.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/tree/DefaultTreeSelectionModel.java	Tue Oct 15 13:54:01 2013 +0100
@@ -53,7 +53,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
--- a/jdk/src/share/classes/javax/swing/tree/ExpandVetoException.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/tree/ExpandVetoException.java	Tue Oct 15 13:54:01 2013 +0100
@@ -30,7 +30,7 @@
 /**
  * Exception used to stop and expand/collapse from happening.
  * See <a
- href="http://java.sun.com/docs/books/tutorial/uiswing/events/treewillexpandlistener.html">How to Write a Tree-Will-Expand Listener</a>
+ href="http://docs.oracle.com/javase/tutorial/uiswing/events/treewillexpandlistener.html">How to Write a Tree-Will-Expand Listener</a>
  * in <em>The Java Tutorial</em>
  * for further information and examples.
  *
--- a/jdk/src/share/classes/javax/swing/tree/FixedHeightLayoutCache.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/tree/FixedHeightLayoutCache.java	Tue Oct 15 13:54:01 2013 +0100
@@ -42,7 +42,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
--- a/jdk/src/share/classes/javax/swing/tree/TreeCellRenderer.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/tree/TreeCellRenderer.java	Tue Oct 15 13:54:01 2013 +0100
@@ -30,7 +30,7 @@
 /**
  * Defines the requirements for an object that displays a tree node.
  * See <a
- href="http://java.sun.com/docs/books/tutorial/uiswing/components/tree.html">How to Use Trees</a>
+ href="http://docs.oracle.com/javase/tutorial/uiswing/components/tree.html">How to Use Trees</a>
  * in <em>The Java Tutorial</em>
  * for an example of implementing a tree cell renderer
  * that displays custom icons.
--- a/jdk/src/share/classes/javax/swing/tree/TreeModel.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/tree/TreeModel.java	Tue Oct 15 13:54:01 2013 +0100
@@ -50,7 +50,7 @@
  * For further information on tree models,
  * including an example of a custom implementation,
  * see <a
- href="http://java.sun.com/docs/books/tutorial/uiswing/components/tree.html">How to Use Trees</a>
+ href="http://docs.oracle.com/javase/tutorial/uiswing/components/tree.html">How to Use Trees</a>
  * in <em>The Java Tutorial.</em>
  *
  * @see TreePath
--- a/jdk/src/share/classes/javax/swing/tree/TreeNode.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/tree/TreeNode.java	Tue Oct 15 13:54:01 2013 +0100
@@ -37,7 +37,7 @@
  *
  * For further information and examples of using tree nodes,
  * see <a
- href="http://java.sun.com/docs/books/tutorial/uiswing/components/tree.html">How to Use Tree Nodes</a>
+ href="http://docs.oracle.com/javase/tutorial/uiswing/components/tree.html">How to Use Tree Nodes</a>
  * in <em>The Java Tutorial.</em>
  *
  * @author Rob Davis
--- a/jdk/src/share/classes/javax/swing/tree/TreePath.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/tree/TreePath.java	Tue Oct 15 13:54:01 2013 +0100
@@ -66,7 +66,7 @@
  * <p>
  * For further information and examples of using tree paths,
  * see <a
- href="http://java.sun.com/docs/books/tutorial/uiswing/components/tree.html">How to Use Trees</a>
+ href="http://docs.oracle.com/javase/tutorial/uiswing/components/tree.html">How to Use Trees</a>
  * in <em>The Java Tutorial.</em>
  * <p>
  * <strong>Warning:</strong>
@@ -74,7 +74,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
--- a/jdk/src/share/classes/javax/swing/tree/TreeSelectionModel.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/tree/TreeSelectionModel.java	Tue Oct 15 13:54:01 2013 +0100
@@ -32,7 +32,7 @@
   * This interface represents the current state of the selection for
   * the tree component.
   * For information and examples of using tree selection models,
-  * see <a href="http://java.sun.com/docs/books/tutorial/uiswing/components/tree.html">How to Use Trees</a>
+  * see <a href="http://docs.oracle.com/javase/tutorial/uiswing/components/tree.html">How to Use Trees</a>
   * in <em>The Java Tutorial.</em>
   *
   * <p>
--- a/jdk/src/share/classes/javax/swing/tree/VariableHeightLayoutCache.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/tree/VariableHeightLayoutCache.java	Tue Oct 15 13:54:01 2013 +0100
@@ -43,7 +43,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
--- a/jdk/src/share/classes/javax/swing/undo/CannotRedoException.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/undo/CannotRedoException.java	Tue Oct 15 13:54:01 2013 +0100
@@ -32,7 +32,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
--- a/jdk/src/share/classes/javax/swing/undo/CannotUndoException.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/undo/CannotUndoException.java	Tue Oct 15 13:54:01 2013 +0100
@@ -33,7 +33,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
--- a/jdk/src/share/classes/javax/swing/undo/UndoManager.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/javax/swing/undo/UndoManager.java	Tue Oct 15 13:54:01 2013 +0100
@@ -126,7 +126,7 @@
  * 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>
+ * of all JavaBeans&trade;
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
  *
--- a/jdk/src/share/classes/sun/awt/AppContext.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/sun/awt/AppContext.java	Tue Oct 15 13:54:01 2013 +0100
@@ -839,6 +839,15 @@
                 return (numAppContexts.get() == 1 && mainAppContext != null);
             }
 
+            private boolean hasRootThreadGroup(final AppContext ecx) {
+                return AccessController.doPrivileged(new PrivilegedAction<Boolean>() {
+                    @Override
+                    public Boolean run() {
+                        return ecx.threadGroup.getParent() == null;
+                    }
+                });
+            }
+
             /**
              * Returns the AppContext used for applet logging isolation, or null if
              * the default global context can be used.
@@ -886,7 +895,7 @@
                 // See: JDK-8023258
                 final boolean isMainAppContext = ecx == null
                     || mainAppContext == ecx
-                    || mainAppContext == null && ecx.threadGroup.getParent() == null;
+                    || mainAppContext == null && hasRootThreadGroup(ecx);
 
                 return isMainAppContext ? null : ecx;
             }
--- a/jdk/src/share/classes/sun/awt/NullComponentPeer.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/sun/awt/NullComponentPeer.java	Tue Oct 15 13:54:01 2013 +0100
@@ -141,10 +141,6 @@
         return new Dimension(1,1);
     }
 
-    public java.awt.Toolkit getToolkit() {
-        return null;
-    }
-
     public ColorModel getColorModel() {
         return null;
     }
--- a/jdk/src/share/classes/sun/awt/datatransfer/DataTransferer.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/sun/awt/datatransfer/DataTransferer.java	Tue Oct 15 13:54:01 2013 +0100
@@ -1793,8 +1793,17 @@
             } catch (Exception e) {
                 throw new IOException(e.getMessage());
             }
+            // Target data is Image
+        } else if (DataFlavor.imageFlavor.equals(flavor)) {
+            if (!isImageFormat(format)) {
+                throw new IOException("data translation failed");
+            }
+            theObject = platformImageBytesToImage(inputStreamToByteArray(str), format);
         }
 
+        if (theObject == null) {
+            throw new IOException("data translation failed");
+        }
 
         return theObject;
 
--- a/jdk/src/share/classes/sun/font/FreetypeFontScaler.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/sun/font/FreetypeFontScaler.java	Tue Oct 15 13:54:01 2013 +0100
@@ -169,7 +169,7 @@
 
     public synchronized void dispose() {
         if (nativeScaler != 0L) {
-            disposeNativeScaler(nativeScaler);
+            disposeNativeScaler(font.get(), nativeScaler);
             nativeScaler = 0L;
         }
     }
@@ -190,7 +190,7 @@
 
     synchronized int getGlyphCode(char charCode) throws FontScalerException {
         if (nativeScaler != 0L) {
-            return getGlyphCodeNative(nativeScaler, charCode);
+            return getGlyphCodeNative(font.get(), nativeScaler, charCode);
         }
         return FontScaler.getNullScaler().getGlyphCode(charCode);
     }
@@ -245,9 +245,9 @@
 
     private native long getLayoutTableCacheNative(long pScaler);
 
-    private native void disposeNativeScaler(long pScaler);
+    private native void disposeNativeScaler(Font2D font2D, long pScaler);
 
-    private native int getGlyphCodeNative(long pScaler, char charCode);
+    private native int getGlyphCodeNative(Font2D font, long pScaler, char charCode);
     private native int getNumGlyphsNative(long pScaler);
     private native int getMissingGlyphCodeNative(long pScaler);
 
--- a/jdk/src/share/classes/sun/java2d/SunGraphicsEnvironment.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/sun/java2d/SunGraphicsEnvironment.java	Tue Oct 15 13:54:01 2013 +0100
@@ -25,6 +25,7 @@
 
 package sun.java2d;
 
+import java.awt.AWTError;
 import java.awt.Color;
 import java.awt.Font;
 import java.awt.Graphics2D;
@@ -165,7 +166,11 @@
      * Returns the default screen graphics device.
      */
     public GraphicsDevice getDefaultScreenDevice() {
-        return getScreenDevices()[0];
+        GraphicsDevice[] screens = getScreenDevices();
+        if (screens.length == 0) {
+            throw new AWTError("no screen devices");
+        }
+        return screens[0];
     }
 
     /**
--- a/jdk/src/share/classes/sun/net/www/protocol/http/HttpURLConnection.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/sun/net/www/protocol/http/HttpURLConnection.java	Tue Oct 15 13:54:01 2013 +0100
@@ -46,7 +46,7 @@
 import java.net.CacheResponse;
 import java.net.SecureCacheResponse;
 import java.net.CacheRequest;
-import java.net.HttpURLPermission;
+import java.net.URLPermission;
 import java.net.Authenticator.RequestorType;
 import java.security.AccessController;
 import java.security.PrivilegedExceptionAction;
@@ -389,7 +389,7 @@
     private int connectTimeout = NetworkClient.DEFAULT_CONNECT_TIMEOUT;
     private int readTimeout = NetworkClient.DEFAULT_READ_TIMEOUT;
 
-    /* A permission converted from a HttpURLPermission */
+    /* A permission converted from a URLPermission */
     private SocketPermission socketPermission;
 
     /* Logging support */
@@ -930,8 +930,7 @@
                             plainConnect0();
                             return null;
                         }
-                    }
-//                    }, null, p -- replace line above, when limited doPriv ready
+                    }, null, p
                 );
             } catch (PrivilegedActionException e) {
                     throw (IOException) e.getException();
@@ -943,7 +942,7 @@
     }
 
     /**
-     *  if the caller has a HttpURLPermission for connecting to the
+     *  if the caller has a URLPermission for connecting to the
      *  given URL, then return a SocketPermission which permits
      *  access to that destination. Return null otherwise. The permission
      *  is cached in a field (which can only be changed by redirects)
@@ -969,7 +968,10 @@
         String actions = getRequestMethod()+":" +
                 getUserSetHeaders().getHeaderNamesInList();
 
-        HttpURLPermission p = new HttpURLPermission(url.toString(), actions);
+        String urlstring = url.getProtocol() + "://" + url.getAuthority()
+                + url.getPath();
+
+        URLPermission p = new URLPermission(urlstring, actions);
         try {
             sm.checkPermission(p);
             socketPermission = newPerm;
@@ -1188,8 +1190,7 @@
                         public OutputStream run() throws IOException {
                             return getOutputStream0();
                         }
-                    }
-//                    }, null, p -- replace line above, when limited doPriv ready
+                    }, null, p
                 );
             } catch (PrivilegedActionException e) {
                 throw (IOException) e.getException();
@@ -1372,8 +1373,7 @@
                         public InputStream run() throws IOException {
                             return getInputStream0();
                         }
-                    }
-//                    }, null, p -- replace line above, when limited doPriv ready
+                    }, null, p
                 );
             } catch (PrivilegedActionException e) {
                 throw (IOException) e.getException();
@@ -2507,8 +2507,7 @@
                         public Boolean run() throws IOException {
                             return followRedirect0(loc, stat, locUrl0);
                         }
-                    }
-//                    }, null, p -- replace line above, when limited doPriv ready
+                    }, null, p
                 );
             } catch (PrivilegedActionException e) {
                 throw (IOException) e.getException();
--- a/jdk/src/share/classes/sun/reflect/AccessorGenerator.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/sun/reflect/AccessorGenerator.java	Tue Oct 15 13:54:01 2013 +0100
@@ -379,6 +379,10 @@
         return Modifier.isStatic(modifiers);
     }
 
+    protected boolean isPrivate() {
+        return Modifier.isPrivate(modifiers);
+    }
+
     /** Returns class name in "internal" form (i.e., '/' separators
         instead of '.') */
     protected static String getClassName
--- a/jdk/src/share/classes/sun/reflect/MethodAccessorGenerator.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/sun/reflect/MethodAccessorGenerator.java	Tue Oct 15 13:54:01 2013 +0100
@@ -639,10 +639,14 @@
                                     typeSizeInStackSlots(returnType));
             } else {
                 if (isInterface()) {
-                    cb.opc_invokeinterface(targetMethodRef,
-                                           count,
-                                           count,
-                                           typeSizeInStackSlots(returnType));
+                    if (isPrivate()) {
+                        cb.opc_invokespecial(targetMethodRef, count, 0);
+                    } else {
+                        cb.opc_invokeinterface(targetMethodRef,
+                                               count,
+                                               count,
+                                               typeSizeInStackSlots(returnType));
+                    }
                 } else {
                     cb.opc_invokevirtual(targetMethodRef,
                                          count,
--- a/jdk/src/share/classes/sun/security/provider/DomainKeyStore.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/sun/security/provider/DomainKeyStore.java	Tue Oct 15 13:54:01 2013 +0100
@@ -652,9 +652,12 @@
 
                     // Store the keystores
                     KeyStore keystore = keystores.get(builder.name);
-                    keystore.store(new FileOutputStream(builder.file),
-                        password);
 
+                    try (FileOutputStream stream =
+                        new FileOutputStream(builder.file)) {
+
+                        keystore.store(stream, password);
+                    }
                 } catch (KeyStoreException e) {
                     throw new IOException(e);
                 }
--- a/jdk/src/share/classes/sun/security/tools/policytool/PolicyTool.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/sun/security/tools/policytool/PolicyTool.java	Tue Oct 15 13:54:01 2013 +0100
@@ -1447,7 +1447,7 @@
         PERM_ARRAY.add(new AWTPerm());
         PERM_ARRAY.add(new DelegationPerm());
         PERM_ARRAY.add(new FilePerm());
-        PERM_ARRAY.add(new HttpURLPerm());
+        PERM_ARRAY.add(new URLPerm());
         PERM_ARRAY.add(new InqSecContextPerm());
         PERM_ARRAY.add(new LogPerm());
         PERM_ARRAY.add(new MgmtPerm());
@@ -3843,10 +3843,10 @@
     }
 }
 
-class HttpURLPerm extends Perm {
-    public HttpURLPerm() {
-        super("HttpURLPermission",
-                "java.net.HttpURLPermission",
+class URLPerm extends Perm {
+    public URLPerm() {
+        super("URLPermission",
+                "java.net.URLPermission",
                 new String[]    {
                     "<"+ PolicyTool.rb.getString("url") + ">",
                 },
--- a/jdk/src/share/classes/sun/swing/PrintingStatus.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/sun/swing/PrintingStatus.java	Tue Oct 15 13:54:01 2013 +0100
@@ -43,7 +43,7 @@
  * <p/>
  * Methods of these class are thread safe, although most Swing methods
  * are not. Please see
- * <A HREF="http://download.oracle.com/javase/tutorial/uiswing/concurrency/index.html">Concurrency
+ * <A HREF="http://docs.oracle.com/javase/tutorial/uiswing/concurrency/index.html">Concurrency
  * in Swing</A> for more information.
  *
  * @author Alexander Potochkin
--- a/jdk/src/share/classes/sun/text/normalizer/UCharacter.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/classes/sun/text/normalizer/UCharacter.java	Tue Oct 15 13:54:01 2013 +0100
@@ -42,7 +42,7 @@
 /**
  * <p>
  * The UCharacter class provides extensions to the
- * <a href="http://java.sun.com/j2se/1.5/docs/api/java/lang/Character.html">
+ * <a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Character.html">
  * java.lang.Character</a> class. These extensions provide support for
  * more Unicode properties and together with the <a href=../text/UTF16.html>UTF16</a>
  * class, provide support for supplementary characters (those with code
--- a/jdk/src/share/demo/jfc/FileChooserDemo/FileChooserDemo.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/demo/jfc/FileChooserDemo/FileChooserDemo.java	Tue Oct 15 13:54:01 2013 +0100
@@ -800,7 +800,7 @@
                      * NOTE: By default, the look and feel will be set to the
                      * Cross Platform Look and Feel (which is currently Metal).
                      * The following code tries to set the Look and Feel to Nimbus.
-                     * http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/nimbus.html
+                     * http://docs.oracle.com/javase/tutorial/uiswing/lookandfeel/nimbus.html
                      */
                     try {
                         for (LookAndFeelInfo info : UIManager.
--- a/jdk/src/share/native/sun/font/freetypeScaler.c	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/native/sun/font/freetypeScaler.c	Tue Oct 15 13:54:01 2013 +0100
@@ -252,7 +252,6 @@
         JNIEnv *env, jobject scaler, jobject font2D, jint type,
         jint indexInCollection, jboolean supportsCJK, jint filesize) {
     FTScalerInfo* scalerInfo = NULL;
-    FT_Stream ftstream;
     FT_Open_Args ft_open_args;
     int error;
     jobject bBuffer;
@@ -309,34 +308,36 @@
         }
     } else { /* Truetype */
         scalerInfo->fontData = (unsigned char*) malloc(FILEDATACACHESIZE);
-        ftstream = (FT_Stream) calloc(1, sizeof(FT_StreamRec));
 
-        if (ftstream != NULL && scalerInfo->fontData != NULL) {
-            scalerInfo->directBuffer = (*env)->NewDirectByteBuffer(env,
-                                        scalerInfo->fontData,
-                                        FILEDATACACHESIZE);
-            if (scalerInfo->directBuffer != NULL) {
-                scalerInfo->directBuffer = (*env)->NewGlobalRef(env,
-                                            scalerInfo->directBuffer);
-                ftstream->base = NULL;
-                ftstream->size = filesize;
-                ftstream->pos = 0;
-                ftstream->read = (FT_Stream_IoFunc) ReadTTFontFileFunc;
-                ftstream->close = (FT_Stream_CloseFunc) CloseTTFontFileFunc;
-                ftstream->pathname.pointer = (void *) scalerInfo;
+        if (scalerInfo->fontData != NULL) {
+            FT_Stream ftstream = (FT_Stream) calloc(1, sizeof(FT_StreamRec));
+            if (ftstream != NULL) {
+                scalerInfo->directBuffer = (*env)->NewDirectByteBuffer(env,
+                                           scalerInfo->fontData,
+                                           FILEDATACACHESIZE);
+                if (scalerInfo->directBuffer != NULL) {
+                    scalerInfo->directBuffer = (*env)->NewGlobalRef(env,
+                                               scalerInfo->directBuffer);
+                    ftstream->base = NULL;
+                    ftstream->size = filesize;
+                    ftstream->pos = 0;
+                    ftstream->read = (FT_Stream_IoFunc) ReadTTFontFileFunc;
+                    ftstream->close = (FT_Stream_CloseFunc) CloseTTFontFileFunc;
+                    ftstream->pathname.pointer = (void *) scalerInfo;
 
-                memset(&ft_open_args, 0, sizeof(FT_Open_Args));
-                ft_open_args.flags = FT_OPEN_STREAM;
-                ft_open_args.stream = ftstream;
+                    memset(&ft_open_args, 0, sizeof(FT_Open_Args));
+                    ft_open_args.flags = FT_OPEN_STREAM;
+                    ft_open_args.stream = ftstream;
 
-                error = FT_Open_Face(scalerInfo->library,
-                                     &ft_open_args,
-                                     indexInCollection,
-                                     &scalerInfo->face);
-           }
-           if (error || scalerInfo->directBuffer == NULL) {
-               free(ftstream);
-           }
+                    error = FT_Open_Face(scalerInfo->library,
+                                         &ft_open_args,
+                                         indexInCollection,
+                                         &scalerInfo->face);
+                }
+                if (error || scalerInfo->directBuffer == NULL) {
+                    free(ftstream);
+                }
+            }
         }
     }
 
@@ -902,13 +903,13 @@
  */
 JNIEXPORT void JNICALL
 Java_sun_font_FreetypeFontScaler_disposeNativeScaler(
-        JNIEnv *env, jobject scaler, jlong pScaler) {
+        JNIEnv *env, jobject scaler, jobject font2D, jlong pScaler) {
     FTScalerInfo* scalerInfo = (FTScalerInfo *) jlong_to_ptr(pScaler);
 
     /* Freetype functions *may* cause callback to java
        that can use cached values. Make sure our cache is up to date.
        NB: scaler context is not important at this point, can use NULL. */
-    int errCode = setupFTContext(env, scaler, scalerInfo, NULL);
+    int errCode = setupFTContext(env, font2D, scalerInfo, NULL);
     if (errCode) {
         return;
     }
@@ -957,7 +958,8 @@
  */
 JNIEXPORT jint JNICALL
 Java_sun_font_FreetypeFontScaler_getGlyphCodeNative(
-        JNIEnv *env, jobject scaler, jlong pScaler, jchar charCode) {
+        JNIEnv *env, jobject scaler,
+        jobject font2D, jlong pScaler, jchar charCode) {
 
     FTScalerInfo* scalerInfo = (FTScalerInfo *) jlong_to_ptr(pScaler);
     int errCode;
@@ -970,7 +972,7 @@
     /* Freetype functions *may* cause callback to java
        that can use cached values. Make sure our cache is up to date.
        Scaler context is not important here, can use NULL. */
-    errCode = setupFTContext(env, scaler, scalerInfo, NULL);
+    errCode = setupFTContext(env, font2D, scalerInfo, NULL);
     if (errCode) {
         return 0;
     }
--- a/jdk/src/share/native/sun/java2d/Disposer.c	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/native/sun/java2d/Disposer.c	Tue Oct 15 13:54:01 2013 +0100
@@ -38,10 +38,9 @@
 {
     addRecordMID = (*env)->GetStaticMethodID(env, disposerClass, "addRecord",
                                              "(Ljava/lang/Object;JJ)V");
-    if (addRecordMID == 0) {
-        JNU_ThrowNoSuchMethodError(env, "Disposer.addRecord");
+    if (addRecordMID != 0) {
+        dispClass = (*env)->NewGlobalRef(env, disposerClass);
     }
-    dispClass = (*env)->NewGlobalRef(env, disposerClass);
 }
 
 JNIEXPORT void JNICALL
@@ -50,6 +49,10 @@
     if (dispClass == NULL) {
         /* Needed to initialize the Disposer class as it may be not yet referenced */
         jclass clazz = (*env)->FindClass(env, "sun/java2d/Disposer");
+        if ((*env)->ExceptionCheck(env)) {
+            // If there's exception pending, we'll just return.
+            return;
+        }
     }
 
     (*env)->CallStaticVoidMethod(env, dispClass, addRecordMID,
--- a/jdk/src/share/native/sun/java2d/SurfaceData.c	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/native/sun/java2d/SurfaceData.c	Tue Oct 15 13:54:01 2013 +0100
@@ -237,7 +237,9 @@
     SurfaceData_SetOps(env, sData, ops);
     if (ops != NULL) {
         memset(ops, 0, opsSize);
-        ops->sdObject = (*env)->NewWeakGlobalRef(env, sData);
+        if (!(*env)->ExceptionCheck(env)) {
+            ops->sdObject = (*env)->NewWeakGlobalRef(env, sData);
+        }
     }
     return ops;
 }
--- a/jdk/src/share/native/sun/java2d/loops/Blit.c	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/native/sun/java2d/loops/Blit.c	Tue Oct 15 13:54:01 2013 +0100
@@ -60,8 +60,11 @@
     }
 
     srcOps = SurfaceData_GetOps(env, srcData);
+    if (srcOps == 0) {
+        return;
+    }
     dstOps = SurfaceData_GetOps(env, dstData);
-    if (srcOps == 0 || dstOps == 0) {
+    if (dstOps == 0) {
         return;
     }
 
--- a/jdk/src/share/native/sun/java2d/loops/BlitBg.c	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/native/sun/java2d/loops/BlitBg.c	Tue Oct 15 13:54:01 2013 +0100
@@ -60,8 +60,11 @@
     }
 
     srcOps = SurfaceData_GetOps(env, srcData);
+    if (srcOps == 0) {
+        return;
+    }
     dstOps = SurfaceData_GetOps(env, dstData);
-    if (srcOps == 0 || dstOps == 0) {
+    if (dstOps == 0) {
         return;
     }
 
--- a/jdk/src/share/native/sun/java2d/loops/DrawPath.c	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/native/sun/java2d/loops/DrawPath.c	Tue Oct 15 13:54:01 2013 +0100
@@ -75,7 +75,8 @@
     CompositeInfo compInfo;
     jint ret;
     NativePrimitive *pPrim = GetNativePrim(env, self);
-    jint stroke = (*env)->GetIntField(env, sg2d, sg2dStrokeHintID);
+    jint stroke;
+    jboolean throwExc = JNI_FALSE;
 
     if (pPrim == NULL) {
         return;
@@ -84,6 +85,8 @@
         GrPrim_Sg2dGetCompInfo(env, sg2d, pPrim, &compInfo);
     }
 
+    stroke = (*env)->GetIntField(env, sg2d, sg2dStrokeHintID);
+
     sdOps = SurfaceData_GetOps(env, sData);
     if (sdOps == 0) {
         return;
@@ -112,6 +115,10 @@
     maxCoords = (*env)->GetArrayLength(env, coordsArray);
     coords = (jfloat*)(*env)->GetPrimitiveArrayCritical(
             env, coordsArray, NULL);
+    if (coords == NULL) {
+        SurfaceData_InvokeUnlock(env, sdOps, &rasInfo);
+        return;
+    }
 
     if (ret == SD_SLOWLOCK) {
         GrPrim_RefineBounds(&rasInfo.bounds, transX, transY,
@@ -157,22 +164,29 @@
                 drawHandler.yMax = rasInfo.bounds.y2;
                 drawHandler.pData = &dHData;
 
-                if (!doDrawPath(&drawHandler, NULL, transX, transY,
-                                coords, maxCoords, types, numTypes,
-                                (stroke == sunHints_INTVAL_STROKE_PURE)?
-                                    PH_STROKE_PURE : PH_STROKE_DEFAULT))
-                {
-                    JNU_ThrowArrayIndexOutOfBoundsException(env,
-                                                            "coords array");
+                if (types != NULL) {
+                    if (!doDrawPath(&drawHandler, NULL, transX, transY,
+                                    coords, maxCoords, types, numTypes,
+                                    (stroke == sunHints_INTVAL_STROKE_PURE)?
+                                            PH_STROKE_PURE : PH_STROKE_DEFAULT))
+                    {
+                        throwExc = JNI_TRUE;
+                    }
+
+                    (*env)->ReleasePrimitiveArrayCritical(env, typesArray, types,
+                                                          JNI_ABORT);
                 }
-
-                (*env)->ReleasePrimitiveArrayCritical(env, typesArray, types,
-                                                      JNI_ABORT);
             }
         }
         SurfaceData_InvokeRelease(env, sdOps, &rasInfo);
     }
     (*env)->ReleasePrimitiveArrayCritical(env, coordsArray, coords,
                                           JNI_ABORT);
+
+    if (throwExc) {
+        JNU_ThrowArrayIndexOutOfBoundsException(env,
+                                                "coords array");
+    }
+
     SurfaceData_InvokeUnlock(env, sdOps, &rasInfo);
 }
--- a/jdk/src/share/native/sun/java2d/loops/DrawPolygons.c	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/native/sun/java2d/loops/DrawPolygons.c	Tue Oct 15 13:54:01 2013 +0100
@@ -186,10 +186,15 @@
         }
 
         xPointsPtr = (*env)->GetPrimitiveArrayCritical(env, xPointsArray, NULL);
-        yPointsPtr = (*env)->GetPrimitiveArrayCritical(env, yPointsArray, NULL);
-        if (!xPointsPtr || !yPointsPtr) {
+        if (!xPointsPtr) {
             ok = JNI_FALSE;
         }
+        if (ok) {
+            yPointsPtr = (*env)->GetPrimitiveArrayCritical(env, yPointsArray, NULL);
+            if (!yPointsPtr) {
+                ok = JNI_FALSE;
+            }
+        }
     }
 
     if (ok) {
--- a/jdk/src/share/native/sun/java2d/loops/FillPath.c	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/native/sun/java2d/loops/FillPath.c	Tue Oct 15 13:54:01 2013 +0100
@@ -64,7 +64,8 @@
     CompositeInfo compInfo;
     jint ret;
     NativePrimitive *pPrim = GetNativePrim(env, self);
-    jint stroke = (*env)->GetIntField(env, sg2d, sg2dStrokeHintID);
+    jint stroke;
+    jboolean throwExc = JNI_FALSE;
 
     if (pPrim == NULL) {
         return;
@@ -73,6 +74,8 @@
         GrPrim_Sg2dGetCompInfo(env, sg2d, pPrim, &compInfo);
     }
 
+    stroke = (*env)->GetIntField(env, sg2d, sg2dStrokeHintID);
+
     sdOps = SurfaceData_GetOps(env, sData);
     if (sdOps == 0) {
         return;
@@ -102,6 +105,10 @@
     maxCoords = (*env)->GetArrayLength(env, coordsArray);
     coords = (jfloat*)(*env)->GetPrimitiveArrayCritical(
             env, coordsArray, NULL);
+    if (coords == NULL) {
+        SurfaceData_InvokeUnlock(env, sdOps, &rasInfo);
+        return;
+    }
 
     if (ret == SD_SLOWLOCK) {
         GrPrim_RefineBounds(&rasInfo.bounds, transX, transY,
@@ -146,24 +153,31 @@
                 drawHandler.yMax = rasInfo.bounds.y2;
                 drawHandler.pData = &dHData;
 
-                if (!doFillPath(&drawHandler,
-                                transX, transY, coords,
-                                maxCoords, types, numTypes,
-                                (stroke == sunHints_INTVAL_STROKE_PURE)?
-                                     PH_STROKE_PURE : PH_STROKE_DEFAULT,
-                                fillRule))
-                {
-                    JNU_ThrowArrayIndexOutOfBoundsException(env,
-                                                            "coords array");
+                if (types != NULL) {
+                    if (!doFillPath(&drawHandler,
+                                    transX, transY, coords,
+                                    maxCoords, types, numTypes,
+                                    (stroke == sunHints_INTVAL_STROKE_PURE)?
+                                            PH_STROKE_PURE : PH_STROKE_DEFAULT,
+                                    fillRule))
+                    {
+                        throwExc = JNI_TRUE;
+                    }
+
+                    (*env)->ReleasePrimitiveArrayCritical(env, typesArray, types,
+                                                      JNI_ABORT);
                 }
-
-                (*env)->ReleasePrimitiveArrayCritical(env, typesArray, types,
-                                                      JNI_ABORT);
             }
         }
         SurfaceData_InvokeRelease(env, sdOps, &rasInfo);
     }
     (*env)->ReleasePrimitiveArrayCritical(env, coordsArray, coords,
                                           JNI_ABORT);
+
+    if (throwExc) {
+        JNU_ThrowArrayIndexOutOfBoundsException(env,
+                                                "coords array");
+    }
+
     SurfaceData_InvokeUnlock(env, sdOps, &rasInfo);
 }
--- a/jdk/src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.c	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.c	Tue Oct 15 13:54:01 2013 +0100
@@ -205,33 +205,36 @@
     RegisterFunc RegisterFourByteAbgr;
     RegisterFunc RegisterFourByteAbgrPre;
 
-    RegisterAnyByte(env);
-    RegisterByteBinary1Bit(env);
-    RegisterByteBinary2Bit(env);
-    RegisterByteBinary4Bit(env);
-    RegisterByteIndexed(env);
-    RegisterByteGray(env);
-    RegisterIndex8Gray(env);
-    RegisterIndex12Gray(env);
-    RegisterAnyShort(env);
-    RegisterUshort555Rgb(env);
-    RegisterUshort565Rgb(env);
-    RegisterUshort4444Argb(env);
-    RegisterUshort555Rgbx(env);
-    RegisterUshortGray(env);
-    RegisterUshortIndexed(env);
-    RegisterAny3Byte(env);
-    RegisterThreeByteBgr(env);
-    RegisterAnyInt(env);
-    RegisterIntArgb(env);
-    RegisterIntArgbPre(env);
-    RegisterIntArgbBm(env);
-    RegisterIntRgb(env);
-    RegisterIntBgr(env);
-    RegisterIntRgbx(env);
-    RegisterAny4Byte(env);
-    RegisterFourByteAbgr(env);
-    RegisterFourByteAbgrPre(env);
+    if (!RegisterAnyByte(env) ||
+        !RegisterByteBinary1Bit(env) ||
+        !RegisterByteBinary2Bit(env) ||
+        !RegisterByteBinary4Bit(env) ||
+        !RegisterByteIndexed(env) ||
+        !RegisterByteGray(env) ||
+        !RegisterIndex8Gray(env) ||
+        !RegisterIndex12Gray(env) ||
+        !RegisterAnyShort(env) ||
+        !RegisterUshort555Rgb(env) ||
+        !RegisterUshort565Rgb(env) ||
+        !RegisterUshort4444Argb(env) ||
+        !RegisterUshort555Rgbx(env) ||
+        !RegisterUshortGray(env) ||
+        !RegisterUshortIndexed(env) ||
+        !RegisterAny3Byte(env) ||
+        !RegisterThreeByteBgr(env) ||
+        !RegisterAnyInt(env) ||
+        !RegisterIntArgb(env) ||
+        !RegisterIntArgbPre(env) ||
+        !RegisterIntArgbBm(env) ||
+        !RegisterIntRgb(env) ||
+        !RegisterIntBgr(env) ||
+        !RegisterIntRgbx(env) ||
+        !RegisterAny4Byte(env) ||
+        !RegisterFourByteAbgr(env) ||
+        !RegisterFourByteAbgrPre(env))
+    {
+        return;
+    }
 }
 
 #define _StartOf(T)     ((T *) (&T##s))
--- a/jdk/src/share/native/sun/java2d/loops/MaskBlit.c	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/native/sun/java2d/loops/MaskBlit.c	Tue Oct 15 13:54:01 2013 +0100
@@ -60,8 +60,11 @@
     }
 
     srcOps = SurfaceData_GetOps(env, srcData);
+    if (srcOps == 0) {
+        return;
+    }
     dstOps = SurfaceData_GetOps(env, dstData);
-    if (srcOps == 0 || dstOps == 0) {
+    if (dstOps == 0) {
         return;
     }
 
@@ -98,6 +101,13 @@
                  : 0);
             jint savesx = srcInfo.bounds.x1;
             jint savedx = dstInfo.bounds.x1;
+            if (maskArray != NULL && pMask == NULL) {
+                SurfaceData_InvokeRelease(env, dstOps, &dstInfo);
+                SurfaceData_InvokeRelease(env, srcOps, &srcInfo);
+                SurfaceData_InvokeUnlock(env, dstOps, &dstInfo);
+                SurfaceData_InvokeUnlock(env, srcOps, &srcInfo);
+                return;
+            }
             Region_StartIteration(env, &clipInfo);
             while (Region_NextIteration(&clipInfo, &span)) {
                 void *pSrc = PtrCoord(srcInfo.rasBase,
--- a/jdk/src/share/native/sun/java2d/loops/MaskFill.c	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/native/sun/java2d/loops/MaskFill.c	Tue Oct 15 13:54:01 2013 +0100
@@ -84,6 +84,11 @@
                 (maskArray
                  ? (*env)->GetPrimitiveArrayCritical(env, maskArray, 0)
                  : 0);
+            if (maskArray != NULL && pMask == NULL) {
+                SurfaceData_InvokeRelease(env, sdOps, &rasInfo);
+                SurfaceData_InvokeUnlock(env, sdOps, &rasInfo);
+                return;
+            }
             maskoff += ((rasInfo.bounds.y1 - y) * maskscan +
                         (rasInfo.bounds.x1 - x));
             (*pPrim->funcs.maskfill)(pDst,
--- a/jdk/src/share/native/sun/java2d/loops/ScaledBlit.c	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/native/sun/java2d/loops/ScaledBlit.c	Tue Oct 15 13:54:01 2013 +0100
@@ -296,8 +296,11 @@
     }
 
     srcOps = SurfaceData_GetOps(env, srcData);
+    if (srcOps == 0) {
+        return;
+    }
     dstOps = SurfaceData_GetOps(env, dstData);
-    if (srcOps == 0 || dstOps == 0) {
+    if (dstOps == 0) {
         return;
     }
 
--- a/jdk/src/share/native/sun/java2d/loops/TransformHelper.c	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/native/sun/java2d/loops/TransformHelper.c	Tue Oct 15 13:54:01 2013 +0100
@@ -326,8 +326,11 @@
     }
 
     srcOps = SurfaceData_GetOps(env, srcData);
+    if (srcOps == 0) {
+        return;
+    }
     dstOps = SurfaceData_GetOps(env, dstData);
-    if (srcOps == 0 || dstOps == 0) {
+    if (dstOps == 0) {
         return;
     }
 
@@ -411,7 +414,7 @@
     }
 
     if (pEdges == NULL) {
-        if (numedges > 0) {
+        if (!(*env)->ExceptionCheck(env) && numedges > 0) {
             JNU_ThrowInternalError(env, "Unable to allocate edge list");
         }
         SurfaceData_InvokeUnlock(env, dstOps, &dstInfo);
--- a/jdk/src/share/native/sun/java2d/pipe/BufferedRenderPipe.c	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/native/sun/java2d/pipe/BufferedRenderPipe.c	Tue Oct 15 13:54:01 2013 +0100
@@ -53,6 +53,7 @@
     unsigned char *bbuf;
     jint *ibuf;
     jint ipos;
+    jboolean hasException;
 
     J2dTraceLn2(J2D_TRACE_INFO,
                 "BufferedRenderPipe_fillSpans: bpos=%d limit=%d",
@@ -104,7 +105,10 @@
             ibuf[1] = spanCount;
 
             // flush the queue
-            JNU_CallMethodByName(env, NULL, rq, "flushNow", "(I)V", bpos);
+            JNU_CallMethodByName(env, &hasException, rq, "flushNow", "(I)V", bpos);
+            if (hasException) {
+                break;
+            }
 
             // now start a new operation
             ibuf = (jint *)bbuf;
--- a/jdk/src/share/native/sun/java2d/pipe/Region.c	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/native/sun/java2d/pipe/Region.c	Tue Oct 15 13:54:01 2013 +0100
@@ -260,6 +260,10 @@
             /* return; REMIND: What to do here? */
         }
         Region_StartIteration(env, &clipInfo);
+        if ((*env)->ExceptionCheck(env)) {
+            return 0;
+        }
+
         numrects = Region_CountIterationRects(&clipInfo);
         if ((unsigned long)numrects > initialBufferSize) {
             *pRect = (RECT_T *) SAFE_SIZE_ARRAY_ALLOC(malloc, numrects, sizeof(RECT_T));
--- a/jdk/src/share/native/sun/java2d/pipe/ShapeSpanIterator.c	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/native/sun/java2d/pipe/ShapeSpanIterator.c	Tue Oct 15 13:54:01 2013 +0100
@@ -653,12 +653,15 @@
                     pd->curx = x;
                     pd->cury = y;
                 }
+                (*env)->ReleasePrimitiveArrayCritical(env, yArray,
+                                                      yPoints, JNI_ABORT);
             }
-            (*env)->ReleasePrimitiveArrayCritical(env, yArray,
-                                                  yPoints, JNI_ABORT);
+            (*env)->ReleasePrimitiveArrayCritical(env, xArray,
+                                                  xPoints, JNI_ABORT);
         }
-        (*env)->ReleasePrimitiveArrayCritical(env, xArray,
-                                              xPoints, JNI_ABORT);
+        if (xPoints == NULL || yPoints == NULL) {
+            return;
+        }
     }
     if (!oom) {
         HANDLEENDPATH(pd, {oom = JNI_TRUE;});
--- a/jdk/src/share/native/sun/java2d/pipe/SpanClipRenderer.c	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/share/native/sun/java2d/pipe/SpanClipRenderer.c	Tue Oct 15 13:54:01 2013 +0100
@@ -44,21 +44,27 @@
 {
     /* Region fields */
     pBandsArrayID = (*env)->GetFieldID(env, rc, "bands", "[I");
+    if (pBandsArrayID == NULL) {
+        return;
+    }
     pEndIndexID = (*env)->GetFieldID(env, rc, "endIndex", "I");
+    if (pEndIndexID == NULL) {
+        return;
+    }
 
     /* RegionIterator fields */
     pRegionID = (*env)->GetFieldID(env, ric, "region",
                                    "Lsun/java2d/pipe/Region;");
+    if (pRegionID == NULL) {
+        return;
+    }
     pCurIndexID = (*env)->GetFieldID(env, ric, "curIndex", "I");
+    if (pCurIndexID == NULL) {
+        return;
+    }
     pNumXbandsID = (*env)->GetFieldID(env, ric, "numXbands", "I");
-
-    if((pBandsArrayID == NULL)
-       || (pEndIndexID == NULL)
-       || (pRegionID == NULL)
-       || (pCurIndexID == NULL)
-       || (pNumXbandsID == NULL))
-    {
-        JNU_ThrowInternalError(env, "NULL field ID");
+    if (pNumXbandsID == NULL) {
+        return;
     }
 }
 
@@ -129,10 +135,14 @@
 
     if ((*env)->GetArrayLength(env, boxArray) < 4) {
         JNU_ThrowArrayIndexOutOfBoundsException(env, "band array");
+        return;
     }
     alphalen = (*env)->GetArrayLength(env, alphaTile);
 
     box = (*env)->GetPrimitiveArrayCritical(env, boxArray, 0);
+    if (box == NULL) {
+        return;
+    }
 
     w = box[2] - box[0];
     h = box[3] - box[1];
@@ -140,9 +150,14 @@
     if (alphalen < offset || (alphalen - offset) / tsize < h) {
         (*env)->ReleasePrimitiveArrayCritical(env, boxArray, box, 0);
         JNU_ThrowArrayIndexOutOfBoundsException(env, "alpha tile array");
+        return;
     }
 
     alpha = (*env)->GetPrimitiveArrayCritical(env, alphaTile, 0);
+    if (alpha == NULL) {
+        (*env)->ReleasePrimitiveArrayCritical(env, boxArray, box, 0);
+        return;
+    }
 
     fill(alpha, offset, tsize, 0, 0, w, h, (jbyte) 0xff);
 
@@ -182,6 +197,7 @@
 
     if ((*env)->GetArrayLength(env, boxArray) < 4) {
         JNU_ThrowArrayIndexOutOfBoundsException(env, "band array");
+        return;
     }
     alphalen = (*env)->GetArrayLength(env, alphaTile);
 
@@ -196,6 +212,9 @@
     }
 
     box = (*env)->GetPrimitiveArrayCritical(env, boxArray, 0);
+    if (box == NULL) {
+        return;
+    }
 
     lox = box[0];
     loy = box[1];
@@ -207,10 +226,20 @@
         (alphalen - offset - (hix-lox)) / tsize < (hiy - loy - 1)) {
         (*env)->ReleasePrimitiveArrayCritical(env, boxArray, box, 0);
         JNU_ThrowArrayIndexOutOfBoundsException(env, "alpha tile array");
+        return;
     }
 
     bands = (*env)->GetPrimitiveArrayCritical(env, bandsArray, 0);
+    if (bands == NULL) {
+        (*env)->ReleasePrimitiveArrayCritical(env, boxArray, box, 0);
+        return;
+    }
     alpha = (*env)->GetPrimitiveArrayCritical(env, alphaTile, 0);
+    if (alpha == NULL) {
+        (*env)->ReleasePrimitiveArrayCritical(env, bandsArray, bands, 0);
+        (*env)->ReleasePrimitiveArrayCritical(env, boxArray, box, 0);
+        return;
+    }
 
     curIndex = saveCurIndex;
     numXbands = saveNumXbands;
--- a/jdk/src/solaris/classes/sun/awt/X11/XBaseMenuWindow.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/solaris/classes/sun/awt/X11/XBaseMenuWindow.java	Tue Oct 15 13:54:01 2013 +0100
@@ -116,6 +116,8 @@
     protected Point grabInputPoint = null;
     protected boolean hasPointerMoved = false;
 
+    private AppContext disposeAppContext;
+
     /************************************************
      *
      * Mapping data
@@ -174,6 +176,8 @@
     XBaseMenuWindow() {
         super(new XCreateWindowParams(new Object[] {
             DELAYED, Boolean.TRUE}));
+
+        disposeAppContext = AppContext.getAppContext();
     }
 
     /************************************************
@@ -904,12 +908,12 @@
      */
     public void dispose() {
         setDisposed(true);
-        InvocationEvent ev = new InvocationEvent(target, new Runnable() {
+
+        SunToolkit.invokeLaterOnAppContext(disposeAppContext, new Runnable()  {
             public void run() {
                 doDispose();
             }
         });
-        super.postEvent(ev);
     }
 
     /**
@@ -923,7 +927,6 @@
         if (oldData != null) {
             oldData.invalidate();
         }
-        XToolkit.targetDisposedPeer(target, this);
         destroy();
     }
 
--- a/jdk/src/solaris/classes/sun/awt/X11/XComponentPeer.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/solaris/classes/sun/awt/X11/XComponentPeer.java	Tue Oct 15 13:54:01 2013 +0100
@@ -607,10 +607,6 @@
 
     public void layout() {}
 
-    public java.awt.Toolkit getToolkit() {
-        return Toolkit.getDefaultToolkit();
-    }
-
     void updateMotifColors(Color bg) {
         int red = bg.getRed();
         int green = bg.getGreen();
@@ -745,11 +741,11 @@
     }
 
     public boolean prepareImage(Image img, int w, int h, ImageObserver o) {
-        return getToolkit().prepareImage(img, w, h, o);
+        return Toolkit.getDefaultToolkit().prepareImage(img, w, h, o);
     }
 
     public int checkImage(Image img, int w, int h, ImageObserver o) {
-        return getToolkit().checkImage(img, w, h, o);
+        return Toolkit.getDefaultToolkit().checkImage(img, w, h, o);
     }
 
     public Dimension preferredSize() {
--- a/jdk/src/solaris/classes/sun/awt/X11/XSelection.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/solaris/classes/sun/awt/X11/XSelection.java	Tue Oct 15 13:54:01 2013 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2011, 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
@@ -375,7 +375,7 @@
                                 XToolkit.awtUnlock();
                             }
 
-                            validateDataGetter(dataGetter);
+                            validateDataGetter(incrDataGetter);
 
                             if (incrDataGetter.getActualFormat() != 8) {
                                 throw new IOException("Unsupported data format: " +
--- a/jdk/src/solaris/classes/sun/awt/X11/XTextAreaPeer.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/solaris/classes/sun/awt/X11/XTextAreaPeer.java	Tue Oct 15 13:54:01 2013 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2011, 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
@@ -64,41 +64,20 @@
 import sun.awt.SunToolkit;
 
 
-class XTextAreaPeer extends XComponentPeer implements TextAreaPeer {
-    boolean editable;
-
-    AWTTextPane textPane;
-    AWTTextArea jtext;
-
-    boolean firstChangeSkipped;
-
-    private final JavaMouseEventHandler javaMouseEventHandler
-        = new JavaMouseEventHandler( this );
-
-    /* FIXME  */
+final class XTextAreaPeer extends XComponentPeer implements TextAreaPeer {
 
-    public long filterEvents(long mask) {
-        Thread.dumpStack();
-        return 0;
-    }
+    private final AWTTextPane textPane;
+    private final AWTTextArea jtext;
+    private final boolean firstChangeSkipped;
 
-    /* FIXME   */
-    public Rectangle getCharacterBounds(int i) {
-        Thread.dumpStack();
-        return null;
-    }
-
-    public int getIndexAtPoint(int x, int y) {
-        Thread.dumpStack();
-        return 0;
-    }
-
+    private final JavaMouseEventHandler javaMouseEventHandler =
+            new JavaMouseEventHandler(this);
 
     /**
      * Create a Text area.
      */
     XTextAreaPeer(TextArea target) {
-        super( target  );
+        super(target);
 
         // some initializations require that target be set even
         // though init(target) has not been called
@@ -106,8 +85,7 @@
 
         //ComponentAccessor.enableEvents(target,AWTEvent.MOUSE_WHEEL_EVENT_MASK);
 
-        firstChangeSkipped = false;
-        String text = ((TextArea)target).getText();
+        String text = target.getText();
         jtext = new AWTTextArea(text, this);
         jtext.setWrapStyleWord(true);
         jtext.getDocument().addDocumentListener(jtext);
@@ -143,29 +121,27 @@
 
         setFont(font);
 
+        // set the text of this object to the text of its target
+        setTextImpl(target.getText());  //?? should this be setText
+
         int start = target.getSelectionStart();
         int end = target.getSelectionEnd();
-
-        if (end > start) {
-            select(start, end);
-        }
         // Fix for 5100200
         // Restoring Motif behaviour
         // Since the end position of the selected text can be greater then the length of the text,
         // so we should set caret to max position of the text
-        int caretPosition = Math.min(end, text.length());
-        setCaretPosition(caretPosition);
-
+        setCaretPosition(Math.min(end, text.length()));
+        if (end > start) {
+            // Should be called after setText() and setCaretPosition()
+            select(start, end);
+        }
         setEditable(target.isEditable());
-
         setScrollBarVisibility();
-        // set the text of this object to the text of its target
-        setTextImpl(target.getText());  //?? should this be setText
-
         // After this line we should not change the component's text
         firstChangeSkipped = true;
     }
 
+    @Override
     public void dispose() {
         XToolkit.specialPeerMap.remove(jtext);
         // visible caret has a timer thread which must be stopped
@@ -175,7 +151,6 @@
         super.dispose();
     }
 
-
     /*
      * The method overrides one from XComponentPeer
      * If ignoreSubComponents=={@code true} it calls super.
@@ -201,7 +176,7 @@
         javaMouseEventHandler.setCursor();
     }
 
-    void setScrollBarVisibility() {
+    private void setScrollBarVisibility() {
         int visibility = ((TextArea)target).getScrollbarVisibility();
         jtext.setLineWrap(false);
 
@@ -229,10 +204,12 @@
     /**
      * Compute minimum size.
      */
+    @Override
     public Dimension getMinimumSize() {
         return getMinimumSize(10, 60);
     }
 
+    @Override
     public Dimension getPreferredSize(int rows, int cols) {
         return getMinimumSize(rows, cols);
     }
@@ -240,7 +217,7 @@
     /**
      * @see java.awt.peer.TextAreaPeer
      */
-
+    @Override
     public Dimension getMinimumSize(int rows, int cols) {
         /*    Dimension d = null;
               if (jtext != null) {
@@ -269,10 +246,12 @@
                              fm.getHeight() * rows + /*2*YMARGIN +*/ hsbheight);
     }
 
+    @Override
     public boolean isFocusable() {
         return true;
     }
 
+    @Override
     public void setVisible(boolean b) {
         super.setVisible(b);
         if (textPane != null)
@@ -283,27 +262,30 @@
         jtext.repaintNow();
     }
 
+    @Override
     public void focusGained(FocusEvent e) {
         super.focusGained(e);
         jtext.forwardFocusGained(e);
     }
 
+    @Override
     public void focusLost(FocusEvent e) {
         super.focusLost(e);
         jtext.forwardFocusLost(e);
     }
 
-
     /**
      * Paint the component
      * this method is called when the repaint instruction has been used
      */
+    @Override
     public void repaint() {
         if (textPane  != null)  {
             //textPane.validate();
             textPane.repaint();
         }
     }
+
     @Override
     void paintPeer(final Graphics g) {
         if (textPane  != null)  {
@@ -311,6 +293,7 @@
         }
     }
 
+    @Override
     public void setBounds(int x, int y, int width, int height, int op) {
         super.setBounds(x, y, width, height, op);
         if (textPane != null) {
@@ -337,21 +320,26 @@
         }
     }
 
+    @Override
     void handleJavaKeyEvent(KeyEvent e) {
         AWTAccessor.getComponentAccessor().processEvent(jtext,e);
     }
 
+    @Override
     public boolean handlesWheelScrolling() { return true; }
 
+    @Override
     void handleJavaMouseWheelEvent(MouseWheelEvent e) {
-        AWTAccessor.getComponentAccessor().processEvent(textPane,e);
+        AWTAccessor.getComponentAccessor().processEvent(textPane, e);
     }
 
+    @Override
     public void handleJavaMouseEvent( MouseEvent e ) {
         super.handleJavaMouseEvent( e );
         javaMouseEventHandler.handle( e );
     }
 
+    @Override
     void handleJavaInputMethodEvent(InputMethodEvent e) {
         if (jtext != null)
             jtext.processInputMethodEventPublic((InputMethodEvent)e);
@@ -360,13 +348,15 @@
     /**
      * @see java.awt.peer.TextComponentPeer
      */
+    @Override
     public void select(int s, int e) {
-        jtext.select(s,e);
+        jtext.select(s, e);
         // Fixed 5100806
         // We must take care that Swing components repainted correctly
         jtext.repaint();
     }
 
+    @Override
     public void setBackground(Color c) {
         super.setBackground(c);
 //          synchronized (getStateLock()) {
@@ -379,6 +369,7 @@
 //          repaintText();
     }
 
+    @Override
     public void setForeground(Color c) {
         super.setForeground(c);
 //          synchronized (getStateLock()) {
@@ -392,6 +383,7 @@
 //          repaintText();
     }
 
+    @Override
     public void setFont(Font f) {
         super.setFont(f);
 //          synchronized (getStateLock()) {
@@ -403,12 +395,11 @@
         textPane.validate();
     }
 
-
     /**
      * @see java.awt.peer.TextComponentPeer
      */
+    @Override
     public void setEditable(boolean editable) {
-        this.editable = editable;
         if (jtext != null) jtext.setEditable(editable);
         repaintText();
     }
@@ -416,6 +407,7 @@
     /**
      * @see java.awt.peer.ComponentPeer
      */
+    @Override
     public void setEnabled(boolean enabled) {
         super.setEnabled(enabled);
         if (jtext != null) {
@@ -427,6 +419,7 @@
     /**
      * @see java.awt.peer.TextComponentPeer
      */
+    @Override
     public InputMethodRequests getInputMethodRequests() {
         if (jtext != null) return jtext.getInputMethodRequests();
         else  return null;
@@ -435,6 +428,7 @@
     /**
      * @see java.awt.peer.TextComponentPeer
      */
+    @Override
     public int getSelectionStart() {
         return jtext.getSelectionStart();
     }
@@ -442,6 +436,7 @@
     /**
      * @see java.awt.peer.TextComponentPeer
      */
+    @Override
     public int getSelectionEnd() {
         return jtext.getSelectionEnd();
     }
@@ -449,6 +444,7 @@
     /**
      * @see java.awt.peer.TextComponentPeer
      */
+    @Override
     public String getText() {
         return jtext.getText();
     }
@@ -456,12 +452,13 @@
     /**
      * @see java.awt.peer.TextComponentPeer
      */
-    public void setText(String txt) {
-        setTextImpl(txt);
+    @Override
+    public void setText(String text) {
+        setTextImpl(text);
         repaintText();
     }
 
-    protected boolean setTextImpl(String txt) {
+    private void setTextImpl(String txt) {
         if (jtext != null) {
             // JTextArea.setText() posts two different events (remove & insert).
             // Since we make no differences between text events,
@@ -474,13 +471,13 @@
             }
             jtext.getDocument().addDocumentListener(jtext);
         }
-        return true;
     }
 
     /**
      * insert the text "txt on position "pos" in the array lines
      * @see java.awt.peer.TextAreaPeer
      */
+    @Override
     public void insert(String txt, int p) {
         if (jtext != null) {
             boolean doScroll = (p >= jtext.getDocument().getLength() && jtext.getDocument().getLength() != 0);
@@ -499,6 +496,7 @@
      * replace the text between the position "s" and "e" with "txt"
      * @see java.awt.peer.TextAreaPeer
      */
+    @Override
     public void replaceRange(String txt, int s, int e) {
         if (jtext != null) {
             // JTextArea.replaceRange() posts two different events.
@@ -516,6 +514,7 @@
      * to be implemented.
      * @see java.awt.peer.TextComponentPeer
      */
+    @Override
     public void setCaretPosition(int position) {
         jtext.setCaretPosition(position);
     }
@@ -524,54 +523,19 @@
      * to be implemented.
      * @see java.awt.peer.TextComponentPeer
      */
+    @Override
     public int getCaretPosition() {
         return jtext.getCaretPosition();
     }
 
-    /**
-     * DEPRECATED
-     * @see java.awt.peer.TextAreaPeer
-     */
-    public void insertText(String txt, int pos) {
-        insert(txt, pos);
-    }
-
-    /**
-     * DEPRECATED
-     * @see java.awt.peer.TextAreaPeer
-     */
-    public void replaceText(String txt, int start, int end) {
-        replaceRange(txt, start, end);
-    }
+    final class AWTTextAreaUI extends MotifTextAreaUI {
 
-    /**
-     * DEPRECATED
-     * @see java.awt.peer.TextAreaPeer
-     */
-    public Dimension minimumSize(int rows, int cols) {
-        return getMinimumSize(rows, cols);
-    }
+        private JTextArea jta;
 
-    /**
-     * DEPRECATED
-     * @see java.awt.peer.TextAreaPeer
-     */
-    public Dimension preferredSize(int rows, int cols) {
-        return getPreferredSize(rows, cols);
-    }
-
-
-    class  AWTTextAreaUI extends MotifTextAreaUI {
-        /**
-         * Creates a UI for a JTextArea.
-         *
-         * @param c the text field
-         * @return the UI
-         */
-        JTextArea jta;
-
+        @Override
         protected String getPropertyPrefix() { return "TextArea"; }
 
+        @Override
         public void installUI(JComponent c) {
             super.installUI(c);
 
@@ -627,6 +591,7 @@
             }
         }
 
+        @Override
         protected void installKeyboardActions() {
             super.installKeyboardActions();
 
@@ -644,13 +609,15 @@
             }
         }
 
+        @Override
         protected Caret createCaret() {
             return new XAWTCaret();
         }
     }
 
 
-    static class XAWTCaret extends DefaultCaret {
+    static final class XAWTCaret extends DefaultCaret {
+        @Override
         public void focusGained(FocusEvent e) {
             super.focusGained(e);
             if (getComponent().isEnabled()){
@@ -660,6 +627,7 @@
             getComponent().repaint();
         }
 
+        @Override
         public void focusLost(FocusEvent e) {
             super.focusLost(e);
             getComponent().repaint();
@@ -668,6 +636,7 @@
         // Fix for 5100950: textarea.getSelectedText() returns the de-selected text, on XToolkit
         // Restoring Motif behaviour
         // If the text is unhighlighted then we should sets the selection range to zero
+        @Override
         public void setSelectionVisible(boolean vis) {
             if (vis){
                 super.setSelectionVisible(vis);
@@ -678,16 +647,14 @@
         }
     }
 
+    final class XAWTScrollBarButton extends BasicArrowButton {
 
-    class XAWTScrollBarButton extends BasicArrowButton
-    {
-        UIDefaults uidefaults = XToolkit.getUIDefaults();
+        private UIDefaults uidefaults = XToolkit.getUIDefaults();
         private Color darkShadow = SystemColor.controlShadow;
         private Color lightShadow = SystemColor.controlLtHighlight;
         private Color buttonBack = uidefaults.getColor("ScrollBar.track");
 
-        public XAWTScrollBarButton(int direction)
-        {
+        XAWTScrollBarButton(int direction) {
             super(direction);
 
             switch (direction) {
@@ -707,6 +674,7 @@
             setForeground(uidefaults.getColor("ScrollBar.foreground"));
         }
 
+        @Override
         public Dimension getPreferredSize() {
             switch (direction) {
             case NORTH:
@@ -719,18 +687,22 @@
             }
         }
 
+        @Override
         public Dimension getMinimumSize() {
             return getPreferredSize();
         }
 
+        @Override
         public Dimension getMaximumSize() {
             return getPreferredSize();
         }
 
+        @Override
         public boolean isFocusTraversable() {
             return false;
         }
 
+        @Override
         public void paint(Graphics g)
         {
             int w = getWidth();
@@ -846,19 +818,16 @@
         }
     }
 
+    final class XAWTScrollBarUI extends BasicScrollBarUI {
 
-    class XAWTScrollBarUI extends BasicScrollBarUI
-    {
-        public XAWTScrollBarUI() {
-            super();
-        }
-
+        @Override
         protected void installDefaults()
         {
             super.installDefaults();
             scrollbar.setBorder(new BevelBorder(false,SystemColor.controlDkShadow,SystemColor.controlLtHighlight) );
         }
 
+        @Override
         protected void configureScrollBarColors() {
             UIDefaults uidefaults = XToolkit.getUIDefaults();
             Color bg = scrollbar.getBackground();
@@ -881,12 +850,14 @@
 
         }
 
+        @Override
         protected JButton createDecreaseButton(int orientation) {
             JButton b = new XAWTScrollBarButton(orientation);
             return b;
 
         }
 
+        @Override
         protected JButton createIncreaseButton(int orientation) {
             JButton b = new XAWTScrollBarButton(orientation);
             return b;
@@ -900,12 +871,14 @@
             return incrButton;
         }
 
+        @Override
         public void paint(Graphics g, JComponent c) {
             paintTrack(g, c, getTrackBounds());
             Rectangle thumbBounds = getThumbBounds();
             paintThumb(g, c, thumbBounds);
         }
 
+        @Override
         public void paintThumb(Graphics g, JComponent c, Rectangle thumbBounds)
         {
             if(!scrollbar.isEnabled()) {
@@ -934,17 +907,18 @@
         }
     }
 
+    final class AWTTextArea extends JTextArea implements DocumentListener {
 
-    class AWTTextArea extends JTextArea implements DocumentListener {
-        boolean isFocused = false;
-        XTextAreaPeer peer;
+        private boolean isFocused = false;
+        private final XTextAreaPeer peer;
 
-        public AWTTextArea(String text, XTextAreaPeer peer) {
+        AWTTextArea(String text, XTextAreaPeer peer) {
             super(text);
             setFocusable(false);
             this.peer = peer;
         }
 
+        @Override
         public void insertUpdate(DocumentEvent e) {
             if (peer != null) {
                 peer.postEvent(new TextEvent(peer.target,
@@ -952,6 +926,7 @@
             }
         }
 
+        @Override
         public void removeUpdate(DocumentEvent e) {
             if (peer != null) {
                 peer.postEvent(new TextEvent(peer.target,
@@ -959,6 +934,7 @@
             }
         }
 
+        @Override
         public void changedUpdate(DocumentEvent e) {
             if (peer != null) {
                 peer.postEvent(new TextEvent(peer.target,
@@ -979,6 +955,7 @@
             super.processFocusEvent(fe);
         }
 
+        @Override
         public boolean hasFocus() {
             return isFocused;
         }
@@ -999,6 +976,7 @@
             processInputMethodEvent(e);
         }
 
+        @Override
         public void updateUI() {
             ComponentUI ui = new AWTTextAreaUI();
             setUI(ui);
@@ -1006,6 +984,7 @@
 
         // Fix for 4915454 - override the default implementation to avoid
         // loading SystemFlavorMap and associated classes.
+        @Override
         public void setTransferHandler(TransferHandler newHandler) {
             TransferHandler oldHandler = (TransferHandler)
                 getClientProperty(AWTAccessor.getClientPropertyKeyAccessor()
@@ -1018,9 +997,8 @@
         }
     }
 
+    final class XAWTScrollPaneUI extends BasicScrollPaneUI {
 
-    class XAWTScrollPaneUI extends BasicScrollPaneUI
-    {
         private final Border vsbMarginBorderR = new EmptyBorder(0, 2, 0, 0);
         private final Border vsbMarginBorderL = new EmptyBorder(0, 0, 0, 2);
         private final Border hsbMarginBorder = new EmptyBorder(2, 0, 0, 0);
@@ -1030,12 +1008,14 @@
 
         private PropertyChangeListener propertyChangeHandler;
 
+        @Override
         protected void installListeners(JScrollPane scrollPane) {
             super.installListeners(scrollPane);
             propertyChangeHandler = createPropertyChangeHandler();
             scrollPane.addPropertyChangeListener(propertyChangeHandler);
         }
 
+        @Override
         public void paint(Graphics g, JComponent c) {
             Border vpBorder = scrollpane.getViewportBorder();
             if (vpBorder != null) {
@@ -1051,6 +1031,7 @@
 
         private PropertyChangeListener createPropertyChangeHandler() {
             return new PropertyChangeListener() {
+                    @Override
                     public void propertyChange(PropertyChangeEvent e) {
                         String propertyName = e.getPropertyName();
 
@@ -1075,7 +1056,7 @@
             return c.getComponentOrientation().isLeftToRight();
         }
 
-
+        @Override
         protected void installDefaults(JScrollPane scrollpane) {
             Border b = scrollpane.getBorder();
             UIDefaults uidefaults = XToolkit.getUIDefaults();
@@ -1102,6 +1083,7 @@
             }
         }
 
+        @Override
         protected void uninstallDefaults(JScrollPane c) {
             super.uninstallDefaults(c);
 
@@ -1123,15 +1105,15 @@
         }
     }
 
+    private class AWTTextPane extends JScrollPane implements FocusListener {
 
-    private class AWTTextPane extends JScrollPane implements FocusListener {
-        JTextArea jtext;
-        XWindow xwin;
+        private final JTextArea jtext;
+        private final XWindow xwin;
 
-        Color control = SystemColor.control;
-        Color focus = SystemColor.activeCaptionBorder;
+        private final Color control = SystemColor.control;
+        private final Color focus = SystemColor.activeCaptionBorder;
 
-        public AWTTextPane(JTextArea jt, XWindow xwin, Container parent) {
+        AWTTextPane(JTextArea jt, XWindow xwin, Container parent) {
             super(jt);
             this.xwin = xwin;
             setDoubleBuffered(true);
@@ -1156,6 +1138,7 @@
             }
         }
 
+        @Override
         public void focusGained(FocusEvent e) {
             Graphics g = getGraphics();
             Rectangle r = getViewportBorderBounds();
@@ -1164,6 +1147,7 @@
             g.dispose();
         }
 
+        @Override
         public void focusLost(FocusEvent e) {
             Graphics g = getGraphics();
             Rectangle r = getViewportBorderBounds();
@@ -1176,19 +1160,23 @@
             return (Window) xwin.target;
         }
 
+        @Override
         public ComponentPeer getPeer() {
             return (ComponentPeer) (xwin);
         }
 
+        @Override
         public void updateUI() {
             ComponentUI ui = new XAWTScrollPaneUI();
             setUI(ui);
         }
 
+        @Override
         public JScrollBar createVerticalScrollBar() {
             return new XAWTScrollBar(JScrollBar.VERTICAL);
         }
 
+        @Override
         public JScrollBar createHorizontalScrollBar() {
             return new XAWTScrollBar(JScrollBar.HORIZONTAL);
         }
@@ -1197,18 +1185,19 @@
             return this.jtext;
         }
 
+        @Override
         public Graphics getGraphics() {
             return xwin.getGraphics();
         }
 
+        final class XAWTScrollBar extends ScrollBar {
 
-        class XAWTScrollBar extends ScrollBar {
-
-            public XAWTScrollBar(int i) {
+            XAWTScrollBar(int i) {
                 super(i);
                 setFocusable(false);
             }
 
+            @Override
             public void updateUI() {
                 ComponentUI ui = new XAWTScrollBarUI();
                 setUI(ui);
@@ -1222,12 +1211,13 @@
         private Color control = SystemColor.controlShadow;
         private boolean isRaised;
 
-        public BevelBorder(boolean isRaised, Color darkShadow, Color lightShadow) {
+        BevelBorder(boolean isRaised, Color darkShadow, Color lightShadow) {
             this.isRaised = isRaised;
             this.darkShadow = darkShadow;
             this.lightShadow = lightShadow;
         }
 
+        @Override
         public void paintBorder(Component c, Graphics g, int x, int y, int w, int h) {
             g.setColor((isRaised) ? lightShadow : darkShadow);
             g.drawLine(x, y, x+w-1, y);           // top
@@ -1246,10 +1236,12 @@
             g.drawLine(x+w-2, y+h-2, x+w-2, y+1); // right
         }
 
+        @Override
         public Insets getBorderInsets(Component c) {
             return getBorderInsets(c, new Insets(0,0,0,0));
         }
 
+        @Override
         public Insets getBorderInsets(Component c, Insets insets) {
             insets.top = insets.left = insets.bottom = insets.right = 2;
             return insets;
--- a/jdk/src/solaris/classes/sun/awt/X11/XTextFieldPeer.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/solaris/classes/sun/awt/X11/XTextFieldPeer.java	Tue Oct 15 13:54:01 2013 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2007, 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
@@ -57,51 +57,47 @@
 import sun.awt.CausedFocusEvent;
 import sun.awt.AWTAccessor;
 
-public class XTextFieldPeer extends XComponentPeer implements TextFieldPeer {
+final class XTextFieldPeer extends XComponentPeer implements TextFieldPeer {
     private static final PlatformLogger log = PlatformLogger.getLogger("sun.awt.X11.XTextField");
 
-    String text;
-    XAWTTextField xtext;
-
-    boolean firstChangeSkipped;
+    private String text;
+    private final XAWTTextField xtext;
+    private final boolean firstChangeSkipped;
 
-    public XTextFieldPeer(TextField target) {
+    XTextFieldPeer(TextField target) {
         super(target);
-        int start, end;
-        firstChangeSkipped = false;
         text = target.getText();
         xtext = new XAWTTextField(text,this, target.getParent());
         xtext.getDocument().addDocumentListener(xtext);
         xtext.setCursor(target.getCursor());
         XToolkit.specialPeerMap.put(xtext,this);
 
-        TextField txt = (TextField) target;
         initTextField();
-        setText(txt.getText());
-        if (txt.echoCharIsSet()) {
-            setEchoChar(txt.getEchoChar());
+        setText(target.getText());
+        if (target.echoCharIsSet()) {
+            setEchoChar(target.getEchoChar());
         }
         else setEchoChar((char)0);
 
-        start = txt.getSelectionStart();
-        end = txt.getSelectionEnd();
-
-        if (end > start) {
-            select(start, end);
-        }
+        int start = target.getSelectionStart();
+        int end = target.getSelectionEnd();
         // Fix for 5100200
         // Restoring Motif behaviour
         // Since the end position of the selected text can be greater then the length of the text,
         // so we should set caret to max position of the text
-        int caretPosition = Math.min(end, text.length());
-        setCaretPosition(caretPosition);
+        setCaretPosition(Math.min(end, text.length()));
+        if (end > start) {
+            // Should be called after setText() and setCaretPosition()
+            select(start, end);
+        }
 
-        setEditable(txt.isEditable());
+        setEditable(target.isEditable());
 
         // After this line we should not change the component's text
         firstChangeSkipped = true;
     }
 
+    @Override
     public void dispose() {
         XToolkit.specialPeerMap.remove(xtext);
         // visible caret has a timer thread which must be stopped
@@ -141,10 +137,10 @@
         setFont(font);
     }
 
-
     /**
      * @see java.awt.peer.TextComponentPeer
      */
+    @Override
     public void setEditable(boolean editable) {
         if (xtext != null) {
             xtext.setEditable(editable);
@@ -155,6 +151,7 @@
     /**
      * @see java.awt.peer.ComponentPeer
      */
+    @Override
     public void setEnabled(boolean enabled) {
         super.setEnabled(enabled);
         if (xtext != null) {
@@ -166,22 +163,23 @@
     /**
      * @see java.awt.peer.TextComponentPeer
      */
-
+    @Override
     public InputMethodRequests getInputMethodRequests() {
         if (xtext != null) return xtext.getInputMethodRequests();
         else  return null;
 
     }
 
+    @Override
     void handleJavaInputMethodEvent(InputMethodEvent e) {
         if (xtext != null)
             xtext.processInputMethodEventImpl(e);
     }
 
-
     /**
      * @see java.awt.peer.TextFieldPeer
      */
+    @Override
     public void setEchoChar(char c) {
         if (xtext != null) {
             xtext.setEchoChar(c);
@@ -193,6 +191,7 @@
     /**
      * @see java.awt.peer.TextComponentPeer
      */
+    @Override
     public int getSelectionStart() {
         return xtext.getSelectionStart();
     }
@@ -200,6 +199,7 @@
     /**
      * @see java.awt.peer.TextComponentPeer
      */
+    @Override
     public int getSelectionEnd() {
         return xtext.getSelectionEnd();
     }
@@ -207,6 +207,7 @@
     /**
      * @see java.awt.peer.TextComponentPeer
      */
+    @Override
     public String getText() {
         return xtext.getText();
     }
@@ -214,12 +215,13 @@
     /**
      * @see java.awt.peer.TextComponentPeer
      */
-    public void setText(String txt) {
-        setXAWTTextField(txt);
+    @Override
+    public void setText(String text) {
+        setXAWTTextField(text);
         repaint();
     }
 
-    protected boolean setXAWTTextField(String txt) {
+    private void setXAWTTextField(String txt) {
         text = txt;
         if (xtext != null)  {
             // JTextField.setText() posts two different events (remove & insert).
@@ -234,29 +236,22 @@
             xtext.getDocument().addDocumentListener(xtext);
             xtext.setCaretPosition(0);
         }
-        return true;
     }
 
     /**
      * to be implemented.
      * @see java.awt.peer.TextComponentPeer
      */
+    @Override
     public void setCaretPosition(int position) {
         if (xtext != null) xtext.setCaretPosition(position);
     }
 
-    /**
-     * DEPRECATED
-     * @see java.awt.peer.TextFieldPeer
-     */
-    public void setEchoCharacter(char c) {
-        setEchoChar(c);
-    }
-
     void repaintText() {
         xtext.repaintNow();
     }
 
+    @Override
     public void setBackground(Color c) {
         if (log.isLoggable(PlatformLogger.Level.FINE)) {
             log.fine("target="+ target + ", old=" + background + ", new=" + c);
@@ -269,6 +264,7 @@
         repaintText();
     }
 
+    @Override
     public void setForeground(Color c) {
         foreground = c;
         if (xtext != null) {
@@ -279,6 +275,7 @@
         repaintText();
     }
 
+    @Override
     public void setFont(Font f) {
         synchronized (getStateLock()) {
             font = f;
@@ -290,14 +287,6 @@
     }
 
     /**
-     * DEPRECATED
-     * @see java.awt.peer.TextFieldPeer
-     */
-    public Dimension preferredSize(int cols) {
-        return getPreferredSize(cols);
-    }
-
-    /**
      * Deselects the the highlighted text.
      */
     public void deselect() {
@@ -308,20 +297,19 @@
         }
     }
 
-
     /**
      * to be implemented.
      * @see java.awt.peer.TextComponentPeer
      */
+    @Override
     public int getCaretPosition() {
         return xtext.getCaretPosition();
     }
 
-
-
     /**
      * @see java.awt.peer.TextComponentPeer
      */
+    @Override
     public void select(int s, int e) {
         xtext.select(s,e);
         // Fixed 5100806
@@ -329,29 +317,32 @@
         xtext.repaint();
     }
 
-
+    @Override
     public Dimension getMinimumSize() {
         return xtext.getMinimumSize();
     }
 
+    @Override
     public Dimension getPreferredSize() {
         return xtext.getPreferredSize();
     }
 
+    @Override
     public Dimension getPreferredSize(int cols) {
         return getMinimumSize(cols);
     }
 
     private static final int PADDING = 16;
 
+    @Override
     public Dimension getMinimumSize(int cols) {
         Font f = xtext.getFont();
         FontMetrics fm = xtext.getFontMetrics(f);
         return new Dimension(fm.charWidth('0') * cols + 10,
                              fm.getMaxDescent() + fm.getMaxAscent() + PADDING);
-
     }
 
+    @Override
     public boolean isFocusable() {
         return true;
     }
@@ -364,11 +355,10 @@
                                   modifiers));
     }
 
-
     protected void disposeImpl() {
     }
 
-
+    @Override
     public void repaint() {
         if (xtext  != null) xtext.repaint();
     }
@@ -377,27 +367,32 @@
         if (xtext  != null) xtext.paint(g);
     }
 
+    @Override
     public void print(Graphics g) {
         if (xtext != null) {
             xtext.print(g);
         }
     }
 
+    @Override
     public void focusLost(FocusEvent e) {
         super.focusLost(e);
         xtext.forwardFocusLost(e);
     }
 
+    @Override
     public void focusGained(FocusEvent e) {
         super.focusGained(e);
         xtext.forwardFocusGained(e);
     }
 
+    @Override
     void handleJavaKeyEvent(KeyEvent e) {
         AWTAccessor.getComponentAccessor().processEvent(xtext,e);
     }
 
 
+    @Override
     public void handleJavaMouseEvent( MouseEvent mouseEvent ) {
         super.handleJavaMouseEvent(mouseEvent);
         if (xtext != null)  {
@@ -410,26 +405,21 @@
         }
     }
 
-
     /**
      * DEPRECATED
      */
+    @Override
     public Dimension minimumSize() {
         return getMinimumSize();
     }
 
-    /**
-     * DEPRECATED
-     */
-    public Dimension minimumSize(int cols) {
-        return getMinimumSize(cols);
-    }
-
+    @Override
     public void setVisible(boolean b) {
         super.setVisible(b);
         if (xtext != null) xtext.setVisible(b);
     }
 
+    @Override
     public void setBounds(int x, int y, int width, int height, int op) {
         super.setBounds(x, y, width, height, op);
         if (xtext != null) {
@@ -456,47 +446,11 @@
         }
     }
 
-
-    //
-    // Accessibility support
-    //
-
-    // stub functions: to be fully implemented in a future release
-    public int getIndexAtPoint(int x, int y) { return -1; }
-    public Rectangle getCharacterBounds(int i) { return null; }
-    public long filterEvents(long mask) { return 0; }
-
-
-    /*  To be fully implemented in a future release
-
-        int oldSelectionStart;
-        int oldSelectionEnd;
-
-        public native int getIndexAtPoint(int x, int y);
-        public native Rectangle getCharacterBounds(int i);
-        public native long filterEvents(long mask);
+    final class AWTTextFieldUI extends MotifPasswordFieldUI {
 
-        /**
-         * Handle a change in the text selection endpoints
-         * (Note: could be simply a change in the caret location)
-         *
-         public void selectionValuesChanged(int start, int end) {
-         return;  // Need to write implemetation of this.
-         }
-    */
-
+        private JTextField jtf;
 
-    class  AWTTextFieldUI extends MotifPasswordFieldUI {
-
-        /**
-         * Creates a UI for a JTextField.
-         *
-         * @param c the text field
-         * @return the UI
-         */
-        JTextField jtf;
-
-
+        @Override
         protected String getPropertyPrefix() {
             JTextComponent comp = getComponent();
             if (comp instanceof JPasswordField && ((JPasswordField)comp).echoCharIsSet()) {
@@ -506,6 +460,7 @@
             }
         }
 
+        @Override
         public void installUI(JComponent c) {
             super.installUI(c);
 
@@ -562,6 +517,7 @@
             }
         }
 
+        @Override
         protected void installKeyboardActions() {
             super.installKeyboardActions();
 
@@ -579,21 +535,19 @@
             }
         }
 
+        @Override
         protected Caret createCaret() {
             return new XTextAreaPeer.XAWTCaret();
         }
     }
 
-    class XAWTTextField extends JPasswordField
-        implements ActionListener,
-                   DocumentListener
-    {
+    final class XAWTTextField extends JPasswordField
+            implements ActionListener, DocumentListener {
 
-        boolean isFocused = false;
+        private boolean isFocused = false;
+        private final XComponentPeer peer;
 
-        XComponentPeer peer;
-
-        public XAWTTextField(String text, XComponentPeer peer, Container parent) {
+        XAWTTextField(String text, XComponentPeer peer, Container parent) {
             super(text);
             this.peer = peer;
             setDoubleBuffered(true);
@@ -608,6 +562,7 @@
 
         }
 
+        @Override
         public void actionPerformed( ActionEvent actionEvent ) {
             peer.postEvent(new ActionEvent(peer.target,
                                            ActionEvent.ACTION_PERFORMED,
@@ -617,6 +572,7 @@
 
         }
 
+        @Override
         public void insertUpdate(DocumentEvent e) {
             if (peer != null) {
                 peer.postEvent(new TextEvent(peer.target,
@@ -624,6 +580,7 @@
             }
         }
 
+        @Override
         public void removeUpdate(DocumentEvent e) {
             if (peer != null) {
                 peer.postEvent(new TextEvent(peer.target,
@@ -631,6 +588,7 @@
             }
         }
 
+        @Override
         public void changedUpdate(DocumentEvent e) {
             if (peer != null) {
                 peer.postEvent(new TextEvent(peer.target,
@@ -638,33 +596,32 @@
             }
         }
 
+        @Override
         public ComponentPeer getPeer() {
             return (ComponentPeer) peer;
         }
 
-
         public void repaintNow() {
             paintImmediately(getBounds());
         }
 
+        @Override
         public Graphics getGraphics() {
             return peer.getGraphics();
         }
 
+        @Override
         public void updateUI() {
             ComponentUI ui = new AWTTextFieldUI();
             setUI(ui);
         }
 
-
         void forwardFocusGained( FocusEvent e) {
             isFocused = true;
             FocusEvent fe = CausedFocusEvent.retarget(e, this);
             super.processFocusEvent(fe);
-
         }
 
-
         void forwardFocusLost( FocusEvent e) {
             isFocused = false;
             FocusEvent fe = CausedFocusEvent.retarget(e, this);
@@ -672,11 +629,11 @@
 
         }
 
+        @Override
         public boolean hasFocus() {
             return isFocused;
         }
 
-
         public void processInputMethodEventImpl(InputMethodEvent e) {
             processInputMethodEvent(e);
         }
@@ -691,6 +648,7 @@
 
         // Fix for 4915454 - override the default implementation to avoid
         // loading SystemFlavorMap and associated classes.
+        @Override
         public void setTransferHandler(TransferHandler newHandler) {
             TransferHandler oldHandler = (TransferHandler)
                 getClientProperty(AWTAccessor.getClientPropertyKeyAccessor()
@@ -702,6 +660,7 @@
             firePropertyChange("transferHandler", oldHandler, newHandler);
         }
 
+        @Override
         public void setEchoChar(char c) {
             super.setEchoChar(c);
             ((AWTTextFieldUI)ui).installKeyboardActions();
--- a/jdk/src/solaris/classes/sun/awt/X11/XToolkit.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/solaris/classes/sun/awt/X11/XToolkit.java	Tue Oct 15 13:54:01 2013 +0100
@@ -240,9 +240,14 @@
                 @Override
                 public void dispatchEvent(XEvent ev) {
                     if (ev.get_type() == XConstants.ConfigureNotify) {
-                        ((X11GraphicsEnvironment)GraphicsEnvironment.
-                         getLocalGraphicsEnvironment()).
-                            displayChanged();
+                        awtUnlock();
+                        try {
+                            ((X11GraphicsEnvironment)GraphicsEnvironment.
+                             getLocalGraphicsEnvironment()).
+                                displayChanged();
+                        } finally {
+                            awtLock();
+                        }
                     }
                 }
             });
--- a/jdk/src/solaris/classes/sun/awt/X11GraphicsEnvironment.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/solaris/classes/sun/awt/X11GraphicsEnvironment.java	Tue Oct 15 13:54:01 2013 +0100
@@ -25,8 +25,8 @@
 
 package sun.awt;
 
+import java.awt.AWTError;
 import java.awt.GraphicsDevice;
-
 import java.awt.Point;
 import java.awt.Rectangle;
 import java.io.BufferedReader;
@@ -96,6 +96,7 @@
 
                     // Now check for XRender system property
                     boolean xRenderRequested = true;
+                    boolean xRenderIgnoreLinuxVersion = false;
                     String xProp = System.getProperty("sun.java2d.xrender");
                         if (xProp != null) {
                         if (xProp.equals("false") || xProp.equals("f")) {
@@ -104,6 +105,10 @@
                             xRenderRequested = true;
                             xRenderVerbose = true;
                         }
+
+                        if(xProp.equalsIgnoreCase("t") || xProp.equalsIgnoreCase("true")) {
+                            xRenderIgnoreLinuxVersion = true;
+                        }
                     }
 
                     // initialize the X11 display connection
@@ -121,7 +126,7 @@
 
                     // only attempt to initialize Xrender if it was requested
                     if (xRenderRequested) {
-                        xRenderAvailable = initXRender(xRenderVerbose);
+                        xRenderAvailable = initXRender(xRenderVerbose, xRenderIgnoreLinuxVersion);
                         if (xRenderVerbose && !xRenderAvailable) {
                             System.out.println(
                                          "Could not enable XRender pipeline");
@@ -159,7 +164,7 @@
     private static boolean xRenderVerbose;
     private static boolean xRenderAvailable;
 
-    private static native boolean initXRender(boolean verbose);
+    private static native boolean initXRender(boolean verbose, boolean ignoreLinuxVersion);
     public static boolean isXRenderAvailable() {
         return xRenderAvailable;
     }
@@ -200,7 +205,12 @@
      * Returns the default screen graphics device.
      */
     public GraphicsDevice getDefaultScreenDevice() {
-        return getScreenDevices()[getDefaultScreenNum()];
+        GraphicsDevice[] screens = getScreenDevices();
+        if (screens.length == 0) {
+            throw new AWTError("no screen devices");
+        }
+        int index = getDefaultScreenNum();
+        return screens[0 < index && index < screens.length ? index : 0];
     }
 
     public boolean isDisplayLocal() {
--- a/jdk/src/solaris/classes/sun/java2d/xr/GrowableRectArray.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/solaris/classes/sun/java2d/xr/GrowableRectArray.java	Tue Oct 15 13:54:01 2013 +0100
@@ -38,6 +38,20 @@
         super(RECT_SIZE, initialSize);
     }
 
+    public final void pushRectValues(int x, int y, int width, int height) {
+        int currSize = size;
+        size += RECT_SIZE;
+
+        if (size >= array.length) {
+            growArray();
+        }
+
+        array[currSize] = x;
+        array[currSize + 1] = y;
+        array[currSize + 2] = width;
+        array[currSize + 3] = height;
+    }
+
     public final void setX(int index, int x) {
         array[getCellIndex(index)] = x;
     }
--- a/jdk/src/solaris/classes/sun/java2d/xr/MaskTile.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/solaris/classes/sun/java2d/xr/MaskTile.java	Tue Oct 15 13:54:01 2013 +0100
@@ -41,98 +41,6 @@
         dirtyArea = new DirtyRegion();
     }
 
-    public void addRect(int x, int y, int width, int height) {
-        int index = rects.getNextIndex();
-        rects.setX(index, x);
-        rects.setY(index, y);
-        rects.setWidth(index, width);
-        rects.setHeight(index, height);
-    }
-
-    public void addLine(int x1, int y1, int x2, int y2) {
-        /*
-         * EXA is not able to accalerate diagonal lines, we try to "guide" it a
-         * bit to avoid excessive migration See project documentation for an
-         * detailed explanation
-         */
-        DirtyRegion region = new DirtyRegion();
-        region.setDirtyLineRegion(x1, y1, x2, y2);
-        int xDiff = region.x2 - region.x;
-        int yDiff = region.y2 - region.y;
-
-        if (xDiff == 0 || yDiff == 0) {
-            addRect(region.x, region.y,
-                    region.x2 - region.x + 1, region.y2 - region.y + 1);
-        } else if (xDiff == 1 && yDiff == 1) {
-            addRect(x1, y1, 1, 1);
-            addRect(x2, y2, 1, 1);
-        } else {
-            lineToRects(x1, y1, x2, y2);
-        }
-    }
-
-    private void lineToRects(int xstart, int ystart, int xend, int yend) {
-        int x, y, t, dx, dy, incx, incy, pdx, pdy, ddx, ddy, es, el, err;
-
-        /* Entfernung in beiden Dimensionen berechnen */
-        dx = xend - xstart;
-        dy = yend - ystart;
-
-        /* Vorzeichen des Inkrements bestimmen */
-        incx = dx > 0 ? 1 : (dx < 0) ? -1 : 0;
-        incy = dy > 0 ? 1 : (dy < 0) ? -1 : 0;
-        if (dx < 0)
-            dx = -dx;
-        if (dy < 0)
-            dy = -dy;
-
-        /* feststellen, welche Entfernung groesser ist */
-        if (dx > dy) {
-            /* x ist schnelle Richtung */
-            pdx = incx;
-            pdy = 0; /* pd. ist Parallelschritt */
-            ddx = incx;
-            ddy = incy; /* dd. ist Diagonalschritt */
-            es = dy;
-            el = dx; /* Fehlerschritte schnell, langsam */
-        } else {
-            /* y ist schnelle Richtung */
-            pdx = 0;
-            pdy = incy; /* pd. ist Parallelschritt */
-            ddx = incx;
-            ddy = incy; /* dd. ist Diagonalschritt */
-            es = dx;
-            el = dy; /* Fehlerschritte schnell, langsam */
-        }
-
-        /* Initialisierungen vor Schleifenbeginn */
-        x = xstart;
-        y = ystart;
-        err = el / 2;
-        addRect(x, y, 1, 1);
-
-        /* Pixel berechnen */
-        for (t = 0; t < el; ++t) /* t zaehlt die Pixel, el ist auch Anzahl */
-        {
-            /* Aktualisierung Fehlerterm */
-            err -= es;
-            if (err < 0) {
-                /* Fehlerterm wieder positiv (>=0) machen */
-                err += el;
-                /* Schritt in langsame Richtung, Diagonalschritt */
-                x += ddx;
-                y += ddy;
-            } else {
-                /* Schritt in schnelle Richtung, Parallelschritt */
-                x += pdx;
-                y += pdy;
-            }
-            addRect(x, y, 1, 1);
-            // SetPixel(x,y);
-            // System.out.println(x+":"+y);
-        }
-    }
-
     public void calculateDirtyAreas()
     {
         for (int i=0; i < rects.getSize(); i++) {
--- a/jdk/src/solaris/classes/sun/java2d/xr/MaskTileManager.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/solaris/classes/sun/java2d/xr/MaskTileManager.java	Tue Oct 15 13:54:01 2013 +0100
@@ -54,10 +54,6 @@
     int maskPixmap;
     int maskPicture;
     long maskGC;
-    int lineMaskPixmap;
-    int lineMaskPicture;
-    long drawLineGC;
-    long clearLineGC;
 
     public MaskTileManager(XRCompositeManager xrMgr, int parentXid) {
         tileList = new ArrayList<MaskTile>();
@@ -71,34 +67,6 @@
                             0, 0, MASK_SIZE, MASK_SIZE);
         maskGC = con.createGC(maskPixmap);
         con.setGCExposures(maskGC, false);
-
-        lineMaskPixmap = con.createPixmap(parentXid, 8, MASK_SIZE, MASK_SIZE);
-        lineMaskPicture =
-             con.createPicture(lineMaskPixmap, XRUtils.PictStandardA8);
-        con.renderRectangle(lineMaskPicture, XRUtils.PictOpClear,
-                          new XRColor(Color.black), 0, 0, MASK_SIZE, MASK_SIZE);
-
-        drawLineGC = con.createGC(lineMaskPixmap);
-        con.setGCExposures(drawLineGC, false);
-        con.setGCForeground(drawLineGC, 255);
-
-        clearLineGC = con.createGC(lineMaskPixmap);
-        con.setGCExposures(clearLineGC, false);
-        con.setGCForeground(clearLineGC, 0);
-    }
-
-    /**
-     * Adds a rectangle to the mask.
-     */
-    public void addRect(int x, int y, int width, int height) {
-        mainTile.addRect(x, y, width, height);
-    }
-
-    /**
-     * Adds a line to the mask.
-     */
-    public void addLine(int x1, int y1, int x2, int y2) {
-        mainTile.addLine(x1, y1, x2, y2);
     }
 
     /**
@@ -324,4 +292,11 @@
             rects.setY(index, 0);
         }
     }
+
+    /**
+     * @return MainTile to which rectangles are added before composition.
+     */
+    public MaskTile getMainTile() {
+        return mainTile;
+     }
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/solaris/classes/sun/java2d/xr/XRDrawLine.java	Tue Oct 15 13:54:01 2013 +0100
@@ -0,0 +1,425 @@
+/*
+ * 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.
+ */
+
+/**
+ * Bresenham line-drawing implementation decomposing line segments
+ * into a series of rectangles.
+ * This is required, because xrender doesn't support line primitives directly.
+ * The code here is an almost 1:1 port of the existing C-source contained in
+ * sun/java2d/loop/DrawLine.c and sun/java2d/loop/LoopMacros.h
+ */
+package sun.java2d.xr;
+
+public class XRDrawLine {
+    static final int BIG_MAX = ((1 << 29) - 1);
+    static final int BIG_MIN = (-(1 << 29));
+
+    static final int OUTCODE_TOP = 1;
+    static final int OUTCODE_BOTTOM = 2;
+    static final int OUTCODE_LEFT = 4;
+    static final int OUTCODE_RIGHT = 8;
+
+    int x1, y1, x2, y2;
+    int ucX1, ucY1, ucX2, ucY2;
+
+    DirtyRegion region = new DirtyRegion();
+
+    protected void rasterizeLine(GrowableRectArray rectBuffer, int _x1,
+            int _y1, int _x2, int _y2, int cxmin, int cymin, int cxmax,
+            int cymax, boolean clip, boolean overflowCheck) {
+        float diagF;
+        int error;
+        int steps;
+        int errminor, errmajor;
+        boolean xmajor;
+        int dx, dy, ax, ay;
+
+        initCoordinates(_x1, _y1, _x2, _y2, overflowCheck);
+
+        dx = x2 - x1;
+        dy = y2 - y1;
+        ax = Math.abs(dx);
+        ay = Math.abs(dy);
+        xmajor = (ax >= ay);
+        diagF = ((float) ax) / ay;
+
+        if (clip
+                && !clipCoordinates(cxmin, cymin, cxmax, cymax, xmajor, dx, dy,
+                        ax, ay)) {
+            // whole line was clipped away
+            return;
+        }
+
+        region.setDirtyLineRegion(x1, y1, x2, y2);
+        int xDiff = region.x2 - region.x;
+        int yDiff = region.y2 - region.y;
+
+        if (xDiff == 0 || yDiff == 0) {
+            // horizontal / diagonal lines can be represented by a single
+            // rectangle
+            rectBuffer.pushRectValues(region.x, region.y, region.x2 - region.x
+                    + 1, region.y2 - region.y + 1);
+            return;
+        }
+
+        // Setup bresenham
+        if (xmajor) {
+            errmajor = ay * 2;
+            errminor = ax * 2;
+            ax = -ax; /* For clipping adjustment below */
+            steps = x2 - x1;
+        } else {
+            errmajor = ax * 2;
+            errminor = ay * 2;
+            ay = -ay; /* For clipping adjustment below */
+            steps = y2 - y1;
+        }
+
+        if ((steps = (Math.abs(steps) + 1)) == 0) {
+            return;
+        }
+
+        error = -(errminor / 2);
+
+        if (y1 != ucY1) {
+            int ysteps = y1 - ucY1;
+            if (ysteps < 0) {
+                ysteps = -ysteps;
+            }
+            error += ysteps * ax * 2;
+        }
+
+        if (x1 != ucX1) {
+            int xsteps = x1 - ucX1;
+            if (xsteps < 0) {
+                xsteps = -xsteps;
+            }
+            error += xsteps * ay * 2;
+        }
+        error += errmajor;
+        errminor -= errmajor;
+
+        int xStep = (dx > 0 ? 1 : -1);
+        int yStep = (dy > 0 ? 1 : -1);
+        int orthogonalXStep = xmajor ? xStep : 0;
+        int orthogonalYStep = !xmajor ? yStep : 0;
+
+        /*
+         * For lines which proceed in one direction faster, we try to generate
+         * rectangles instead of points. Otherwise we try to avoid the extra
+         * work...
+         */
+        if (diagF <= 0.9 || diagF >= 1.1) {
+            lineToRects(rectBuffer, steps, error, errmajor, errminor, xStep,
+                    yStep, orthogonalXStep, orthogonalYStep);
+        } else {
+            lineToPoints(rectBuffer, steps, error, errmajor, errminor, xStep,
+                    yStep, orthogonalXStep, orthogonalYStep);
+        }
+    }
+
+    private void lineToPoints(GrowableRectArray rectBuffer, int steps,
+            int error, int errmajor, int errminor, int xStep, int yStep,
+            int orthogonalXStep, int orthogonalYStep) {
+        int x = x1, y = y1;
+
+        do {
+            rectBuffer.pushRectValues(x, y, 1, 1);
+
+            // "Traditional" Bresenham line drawing
+            if (error < 0) {
+                error += errmajor;
+                x += orthogonalXStep;
+                y += orthogonalYStep;
+            } else {
+                error -= errminor;
+                x += xStep;
+                y += yStep;
+            }
+        } while (--steps > 0);
+    }
+
+    private void lineToRects(GrowableRectArray rectBuffer, int steps,
+            int error, int errmajor, int errminor, int xStep, int yStep,
+            int orthogonalXStep, int orthogonalYStep) {
+        int x = x1, y = y1;
+        int rectX = Integer.MIN_VALUE, rectY = 0;
+        int rectW = 0, rectH = 0;
+
+        do {
+            // Combine the resulting rectangles
+            // for steps performed in a single direction.
+            if (y == rectY) {
+                if (x == (rectX + rectW)) {
+                    rectW++;
+                } else if (x == (rectX - 1)) {
+                    rectX--;
+                    rectW++;
+                }
+            } else if (x == rectX) {
+                if (y == (rectY + rectH)) {
+                    rectH++;
+                } else if (y == (rectY - 1)) {
+                    rectY--;
+                    rectH++;
+                }
+            } else {
+                // Diagonal step: add the previous rectangle to the list,
+                // iff it was "real" (= not initialized before the first
+                // iteration)
+                if (rectX != Integer.MIN_VALUE) {
+                    rectBuffer.pushRectValues(rectX, rectY, rectW, rectH);
+                }
+                rectX = x;
+                rectY = y;
+                rectW = rectH = 1;
+            }
+
+            // "Traditional" Bresenham line drawing
+            if (error < 0) {
+                error += errmajor;
+                x += orthogonalXStep;
+                y += orthogonalYStep;
+            } else {
+                error -= errminor;
+                x += xStep;
+                y += yStep;
+            }
+        } while (--steps > 0);
+
+        // Add last rectangle which isn't handled by the combination-code
+        // anymore
+        rectBuffer.pushRectValues(rectX, rectY, rectW, rectH);
+    }
+
+    private boolean clipCoordinates(int cxmin, int cymin, int cxmax, int cymax,
+            boolean xmajor, int dx, int dy, int ax, int ay) {
+        int outcode1, outcode2;
+
+        outcode1 = outcode(x1, y1, cxmin, cymin, cxmax, cymax);
+        outcode2 = outcode(x2, y2, cxmin, cymin, cxmax, cymax);
+
+        while ((outcode1 | outcode2) != 0) {
+            int xsteps = 0, ysteps = 0;
+
+            if ((outcode1 & outcode2) != 0) {
+                return false;
+            }
+
+            if (outcode1 != 0) {
+                if ((outcode1 & (OUTCODE_TOP | OUTCODE_BOTTOM)) != 0) {
+                    if ((outcode1 & OUTCODE_TOP) != 0) {
+                        y1 = cymin;
+                    } else {
+                        y1 = cymax;
+                    }
+                    ysteps = y1 - ucY1;
+                    if (ysteps < 0) {
+                        ysteps = -ysteps;
+                    }
+                    xsteps = 2 * ysteps * ax + ay;
+                    if (xmajor) {
+                        xsteps += ay - ax - 1;
+                    }
+                    xsteps = xsteps / (2 * ay);
+                    if (dx < 0) {
+                        xsteps = -xsteps;
+                    }
+                    x1 = ucX1 + (int) xsteps;
+                } else if ((outcode1 & (OUTCODE_LEFT | OUTCODE_RIGHT)) != 0) {
+                    if ((outcode1 & OUTCODE_LEFT) != 0) {
+                        x1 = cxmin;
+                    } else {
+                        x1 = cxmax;
+                    }
+                    xsteps = x1 - ucX1;
+                    if (xsteps < 0) {
+                        xsteps = -xsteps;
+                    }
+                    ysteps = 2 * xsteps * ay + ax;
+                    if (!xmajor) {
+                        ysteps += ax - ay - 1;
+                    }
+                    ysteps = ysteps / (2 * ax);
+                    if (dy < 0) {
+                        ysteps = -ysteps;
+                    }
+                    y1 = ucY1 + (int) ysteps;
+                }
+                outcode1 = outcode(x1, y1, cxmin, cymin, cxmax, cymax);
+            } else {
+                if ((outcode2 & (OUTCODE_TOP | OUTCODE_BOTTOM)) != 0) {
+                    if ((outcode2 & OUTCODE_TOP) != 0) {
+                        y2 = cymin;
+                    } else {
+                        y2 = cymax;
+                    }
+                    ysteps = y2 - ucY2;
+                    if (ysteps < 0) {
+                        ysteps = -ysteps;
+                    }
+                    xsteps = 2 * ysteps * ax + ay;
+                    if (xmajor) {
+                        xsteps += ay - ax;
+                    } else {
+                        xsteps -= 1;
+                    }
+                    xsteps = xsteps / (2 * ay);
+                    if (dx > 0) {
+                        xsteps = -xsteps;
+                    }
+                    x2 = ucX2 + (int) xsteps;
+                } else if ((outcode2 & (OUTCODE_LEFT | OUTCODE_RIGHT)) != 0) {
+                    if ((outcode2 & OUTCODE_LEFT) != 0) {
+                        x2 = cxmin;
+                    } else {
+                        x2 = cxmax;
+                    }
+                    xsteps = x2 - ucX2;
+                    if (xsteps < 0) {
+                        xsteps = -xsteps;
+                    }
+                    ysteps = 2 * xsteps * ay + ax;
+                    if (xmajor) {
+                        ysteps -= 1;
+                    } else {
+                        ysteps += ax - ay;
+                    }
+                    ysteps = ysteps / (2 * ax);
+                    if (dy > 0) {
+                        ysteps = -ysteps;
+                    }
+                    y2 = ucY2 + (int) ysteps;
+                }
+                outcode2 = outcode(x2, y2, cxmin, cymin, cxmax, cymax);
+            }
+        }
+
+        return true;
+    }
+
+    private void initCoordinates(int x1, int y1, int x2, int y2,
+            boolean checkOverflow) {
+        /*
+         * Part of calculating the Bresenham parameters for line stepping
+         * involves being able to store numbers that are twice the magnitude of
+         * the biggest absolute difference in coordinates. Since we want the
+         * stepping parameters to be stored in jints, we then need to avoid any
+         * absolute differences more than 30 bits. Thus, we need to preprocess
+         * the coordinates to reduce their range to 30 bits regardless of
+         * clipping. We need to cut their range back before we do the clipping
+         * because the Bresenham stepping values need to be calculated based on
+         * the "unclipped" coordinates.
+         *
+         * Thus, first we perform a "pre-clipping" stage to bring the
+         * coordinates within the 30-bit range and then we proceed to the
+         * regular clipping procedure, pretending that these were the original
+         * coordinates all along. Since this operation occurs based on a
+         * constant "pre-clip" rectangle of +/- 30 bits without any
+         * consideration for the final clip, the rounding errors that occur here
+         * will depend only on the line coordinates and be invariant with
+         * respect to the particular device/user clip rectangles in effect at
+         * the time. Thus, rendering a given large-range line will be consistent
+         * under a variety of clipping conditions.
+         */
+        if (checkOverflow
+                && (OverflowsBig(x1) || OverflowsBig(y1) || OverflowsBig(x2) || OverflowsBig(y2))) {
+            /*
+             * Use doubles to get us into range for "Big" arithmetic.
+             *
+             * The math of adjusting an endpoint for clipping can involve an
+             * intermediate result with twice the number of bits as the original
+             * coordinate range. Since we want to maintain as much as 30 bits of
+             * precision in the resulting coordinates, we will get roundoff here
+             * even using IEEE double-precision arithmetic which cannot carry 60
+             * bits of mantissa. Since the rounding errors will be consistent
+             * for a given set of input coordinates the potential roundoff error
+             * should not affect the consistency of our rendering.
+             */
+            double x1d = x1;
+            double y1d = y1;
+            double x2d = x2;
+            double y2d = y2;
+            double dxd = x2d - x1d;
+            double dyd = y2d - y1d;
+
+            if (x1 < BIG_MIN) {
+                y1d = y1 + (BIG_MIN - x1) * dyd / dxd;
+                x1d = BIG_MIN;
+            } else if (x1 > BIG_MAX) {
+                y1d = y1 - (x1 - BIG_MAX) * dyd / dxd;
+                x1d = BIG_MAX;
+            }
+            /* Use Y1d instead of _y1 for testing now as we may have modified it */
+            if (y1d < BIG_MIN) {
+                x1d = x1 + (BIG_MIN - y1) * dxd / dyd;
+                y1d = BIG_MIN;
+            } else if (y1d > BIG_MAX) {
+                x1d = x1 - (y1 - BIG_MAX) * dxd / dyd;
+                y1d = BIG_MAX;
+            }
+            if (x2 < BIG_MIN) {
+                y2d = y2 + (BIG_MIN - x2) * dyd / dxd;
+                x2d = BIG_MIN;
+            } else if (x2 > BIG_MAX) {
+                y2d = y2 - (x2 - BIG_MAX) * dyd / dxd;
+                x2d = BIG_MAX;
+            }
+            /* Use Y2d instead of _y2 for testing now as we may have modified it */
+            if (y2d < BIG_MIN) {
+                x2d = x2 + (BIG_MIN - y2) * dxd / dyd;
+                y2d = BIG_MIN;
+            } else if (y2d > BIG_MAX) {
+                x2d = x2 - (y2 - BIG_MAX) * dxd / dyd;
+                y2d = BIG_MAX;
+            }
+
+            x1 = (int) x1d;
+            y1 = (int) y1d;
+            x2 = (int) x2d;
+            y2 = (int) y2d;
+        }
+
+        this.x1 = ucX1 = x1;
+        this.y1 = ucY1 = y1;
+        this.x2 = ucX2 = x2;
+        this.y2 = ucY2 = y2;
+    }
+
+    private boolean OverflowsBig(int v) {
+        return ((v) != (((v) << 2) >> 2));
+    }
+
+    private int out(int v, int vmin, int vmax, int cmin, int cmax) {
+        return ((v < vmin) ? cmin : ((v > vmax) ? cmax : 0));
+    }
+
+    private int outcode(int x, int y, int xmin, int ymin, int xmax, int ymax) {
+        return out(y, ymin, ymax, OUTCODE_TOP, OUTCODE_BOTTOM)
+                | out(x, xmin, xmax, OUTCODE_LEFT, OUTCODE_RIGHT);
+    }
+}
--- a/jdk/src/solaris/classes/sun/java2d/xr/XRRenderer.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/solaris/classes/sun/java2d/xr/XRRenderer.java	Tue Oct 15 13:54:01 2013 +0100
@@ -53,10 +53,15 @@
 public class XRRenderer implements PixelDrawPipe, PixelFillPipe, ShapeDrawPipe {
     XRDrawHandler drawHandler;
     MaskTileManager tileManager;
+    XRDrawLine lineGen;
+    GrowableRectArray rectBuffer;
 
     public XRRenderer(MaskTileManager tileManager) {
         this.tileManager = tileManager;
+        this.rectBuffer = tileManager.getMainTile().getRects();
+
         this.drawHandler = new XRDrawHandler();
+        this.lineGen = new XRDrawLine();
     }
 
     /**
@@ -77,19 +82,15 @@
         int transX2 = Region.clipAdd(x2, sg2d.transX);
         int transY2 = Region.clipAdd(y2, sg2d.transY);
 
-        // Non clipped fast path
-        if (compClip.contains(transX1, transY1)
-                && compClip.contains(transX2, transY2)) {
-            SunToolkit.awtLock();
-            try {
-                validateSurface(sg2d);
-                tileManager.addLine(transX1, transY1, transX2, transY2);
-                tileManager.fillMask((XRSurfaceData) sg2d.surfaceData);
-            } finally {
-                SunToolkit.awtUnlock();
-            }
-        } else {
-            draw(sg2d, new Line2D.Float(x1, y1, x2, y2));
+        SunToolkit.awtLock();
+        try {
+            validateSurface(sg2d);
+            lineGen.rasterizeLine(rectBuffer, transX1, transY1,
+                    transX2, transY2, compClip.getLoX(), compClip.getLoY(),
+                    compClip.getHiX(), compClip.getHiY(), true, true);
+            tileManager.fillMask((XRSurfaceData) sg2d.surfaceData);
+        } finally {
+            SunToolkit.awtUnlock();
         }
     }
 
@@ -148,7 +149,7 @@
         SunToolkit.awtLock();
         try {
             validateSurface(sg2d);
-            tileManager.addRect(x, y, width, height);
+            rectBuffer.pushRectValues(x, y, width, height);
             tileManager.fillMask((XRSurfaceData) sg2d.surfaceData);
         } finally {
             SunToolkit.awtUnlock();
@@ -199,11 +200,13 @@
     }
 
     private class XRDrawHandler extends ProcessPath.DrawHandler {
+        DirtyRegion region;
 
         XRDrawHandler() {
             // these are bogus values; the caller will use validate()
             // to ensure that they are set properly prior to each usage
             super(0, 0, 0, 0);
+            this.region = new DirtyRegion();
         }
 
         /**
@@ -218,15 +221,32 @@
         }
 
         public void drawLine(int x1, int y1, int x2, int y2) {
-            tileManager.addLine(x1, y1, x2, y2);
+            region.setDirtyLineRegion(x1, y1, x2, y2);
+            int xDiff = region.x2 - region.x;
+            int yDiff = region.y2 - region.y;
+
+            if (xDiff == 0 || yDiff == 0) {
+                // horizontal / diagonal lines can be represented by a single
+                // rectangle
+                rectBuffer.pushRectValues(region.x, region.y, region.x2 - region.x
+                        + 1, region.y2 - region.y + 1);
+            } else if (xDiff == 1 && yDiff == 1) {
+                // fast path for pattern commonly generated by
+                // ProcessPath.DrawHandler
+                rectBuffer.pushRectValues(x1, y1, 1, 1);
+                rectBuffer.pushRectValues(x2, y2, 1, 1);
+            } else {
+                lineGen.rasterizeLine(rectBuffer, x1, y1, x2, y2, 0, 0,
+                                      0, 0, false, false);
+            }
         }
 
         public void drawPixel(int x, int y) {
-            tileManager.addRect(x, y, 1, 1);
+            rectBuffer.pushRectValues(x, y, 1, 1);
         }
 
         public void drawScanline(int x1, int x2, int y) {
-            tileManager.addRect(x1, y, x2 - x1 + 1, 1);
+            rectBuffer.pushRectValues(x1, y, x2 - x1 + 1, 1);
         }
     }
 
@@ -263,7 +283,7 @@
             validateSurface(sg2d);
             int[] spanBox = new int[4];
             while (si.nextSpan(spanBox)) {
-                tileManager.addRect(spanBox[0] + transx,
+                rectBuffer.pushRectValues(spanBox[0] + transx,
                                     spanBox[1] + transy,
                                     spanBox[2] - spanBox[0],
                                     spanBox[3] - spanBox[1]);
--- a/jdk/src/solaris/classes/sun/java2d/xr/XRSurfaceData.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/solaris/classes/sun/java2d/xr/XRSurfaceData.java	Tue Oct 15 13:54:01 2013 +0100
@@ -457,15 +457,15 @@
         if (sg2d != null && sg2d.compositeState == SunGraphics2D.COMP_XOR) {
             if (validatedXorComp != sg2d.getComposite()) {
                 validatedXorComp = (XORComposite) sg2d.getComposite();
-                int xorpixelmod = validatedXorComp.getXorPixel();
                 renderQueue.setGCMode(xgc, false);
+            }
 
-                // validate pixel
-                int pixel = sg2d.pixel;
-                if (validatedGCForegroundPixel != pixel) {
-                    renderQueue.setGCForeground(xgc, pixel ^ xorpixelmod);
-                    validatedGCForegroundPixel = pixel;
-                }
+            // validate pixel
+            int pixel = sg2d.pixel;
+            if (validatedGCForegroundPixel != pixel) {
+                int xorpixelmod = validatedXorComp.getXorPixel();
+                renderQueue.setGCForeground(xgc, pixel ^ xorpixelmod);
+                validatedGCForegroundPixel = pixel;
             }
 
             if (updateGCClip) {
--- a/jdk/src/solaris/native/sun/awt/awt_LoadLibrary.c	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/solaris/native/sun/awt/awt_LoadLibrary.c	Tue Oct 15 13:54:01 2013 +0100
@@ -79,10 +79,8 @@
 
 
 #ifdef MACOSX
-  #define XAWT_PATH "/libawt_xawt.dylib"
   #define LWAWT_PATH "/libawt_lwawt.dylib"
   #define DEFAULT_PATH LWAWT_PATH
-  #define HEADLESS_PATH "/libawt_headless.dylib"
 #else
   #define XAWT_PATH "/libawt_xawt.so"
   #define DEFAULT_PATH XAWT_PATH
@@ -100,11 +98,6 @@
     struct utsname name;
     JNIEnv *env = (JNIEnv *)JNU_GetEnv(vm, JNI_VERSION_1_2);
     void *v;
-    char *envvar;
-    int xt_before_xm = 0;
-    int XAWT = 0;
-    jstring toolkit = NULL;
-    jstring propname = NULL;
     jstring fmanager = NULL;
     jstring fmProp = NULL;
 
@@ -124,56 +117,32 @@
     /*
      * The code below is responsible for:
      * 1. Loading appropriate awt library, i.e. libawt_xawt or libawt_headless
-     * 2. Setting "awt.toolkit" system property to use the appropriate Java toolkit class,
-     *    (if user has specified the toolkit in env varialble)
+     * 2. Set the "sun.font.fontmanager" system property.
      */
 
-    propname = (*env)->NewStringUTF(env, "awt.toolkit");
     fmProp = (*env)->NewStringUTF(env, "sun.font.fontmanager");
-    tk = DEFAULT_PATH; /* default value, may be changed below */
-
-    /* Check if toolkit is specified in env variable */
-    envvar = getenv("AWT_TOOLKIT");
-    if (envvar && (strstr(envvar, "XToolkit"))) {
-        toolkit = (*env)->NewStringUTF(env, "sun.awt.X11.XToolkit");
-        tk = XAWT_PATH;
-        fmanager = (*env)->NewStringUTF(env, "sun.awt.X11FontManager");
 #ifdef MACOSX
-    } else {
         fmanager = (*env)->NewStringUTF(env, "sun.font.CFontManager");
         tk = LWAWT_PATH;
+#else
+        fmanager = (*env)->NewStringUTF(env, "sun.awt.X11FontManager");
+        tk = XAWT_PATH;
 #endif
-    }
-    /* If user specified toolkit then set java system property */
-    if (toolkit && propname) {
-        JNU_CallStaticMethodByName (env,
-                    NULL,
-                    "java/lang/System",
-                    "setProperty",
-                    "(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;",
-                    propname,toolkit);
-    }
     if (fmanager && fmProp) {
-        JNU_CallStaticMethodByName (env,
-                    NULL,
-                    "java/lang/System",
-                        "setProperty",
-                    "(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;",
-                    fmProp, fmanager);
+        JNU_CallStaticMethodByName(env, NULL, "java/lang/System", "setProperty",
+                                   "(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;",
+                                   fmProp, fmanager);
     }
 
-    /* Calculate library name to load */
+#ifndef MACOSX
     if (AWTIsHeadless()) {
         tk = HEADLESS_PATH;
     }
+#endif
+
+    /* Calculate library name to load */
     strncpy(p, tk, MAXPATHLEN-len-1);
 
-    if (toolkit) {
-        (*env)->DeleteLocalRef(env, toolkit);
-    }
-    if (propname) {
-        (*env)->DeleteLocalRef(env, propname);
-    }
     if (fmProp) {
         (*env)->DeleteLocalRef(env, fmProp);
     }
--- a/jdk/src/solaris/native/sun/java2d/x11/X11Renderer.c	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/solaris/native/sun/java2d/x11/X11Renderer.c	Tue Oct 15 13:54:01 2013 +0100
@@ -465,9 +465,7 @@
 
     points = transformPoints(env, xcoordsArray, ycoordsArray, transx, transy,
                              pTmp, (int *)&npoints, isclosed);
-    if (points == 0) {
-        JNU_ThrowOutOfMemoryError(env, "translated coordinate array");
-    } else {
+    if (points != 0) {
         if (npoints == 2) {
             /*
              * Some X11 implementations fail to draw anything for
@@ -588,6 +586,7 @@
         NULL
     };
     PHStroke stroke;
+    jboolean ok = JNI_TRUE;
 
     if (xsdo == NULL) {
         return;
@@ -625,8 +624,6 @@
         types = (jbyte*)
             (*env)->GetPrimitiveArrayCritical(env, typesArray, NULL);
         if (types != NULL) {
-            jboolean ok;
-
             if (isFill) {
                 drawHandler.pDrawScanline = &drawScanline;
                 ok = doFillPath(&drawHandler,
@@ -643,14 +640,14 @@
                                 types, numTypes,
                                 stroke);
             }
-            if (!ok) {
-                JNU_ThrowArrayIndexOutOfBoundsException(env, "coords array");
-            }
             (*env)->ReleasePrimitiveArrayCritical(env, typesArray, types,
                                                   JNI_ABORT);
         }
         (*env)->ReleasePrimitiveArrayCritical(env, coordsArray, coords,
                                               JNI_ABORT);
+        if (!ok) {
+            JNU_ThrowArrayIndexOutOfBoundsException(env, "coords array");
+        }
     }
 
     XDHD_FREE_POINTS(&dHData);
@@ -893,9 +890,7 @@
 
     points = transformPoints(env, xcoordsArray, ycoordsArray, transx, transy,
                              pTmp, (int *)&npoints, JNI_FALSE);
-    if (points == 0) {
-        JNU_ThrowOutOfMemoryError(env, "translated coordinate array");
-    } else {
+    if (points != 0) {
         if (npoints > 2) {
             XFillPolygon(awt_display, xsdo->drawable, (GC) xgc,
                          points, npoints, Complex, CoordModeOrigin);
--- a/jdk/src/solaris/native/sun/java2d/x11/X11SurfaceData.c	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/solaris/native/sun/java2d/x11/X11SurfaceData.c	Tue Oct 15 13:54:01 2013 +0100
@@ -227,7 +227,7 @@
 #if defined(HEADLESS) || !defined(MITSHM)
     return JNI_FALSE;
 #else
-    return useMitShmPixmaps;
+    return (jboolean)useMitShmPixmaps;
 #endif /* HEADLESS, MITSHM */
 }
 
@@ -258,6 +258,7 @@
 {
 #ifndef HEADLESS
     X11SDOps *xsdo = (X11SDOps*)SurfaceData_InitOps(env, xsd, sizeof(X11SDOps));
+    jboolean hasException;
     if (xsdo == NULL) {
         JNU_ThrowOutOfMemoryError(env, "Initialization of SurfaceData failed.");
         return;
@@ -270,7 +271,10 @@
     xsdo->ReleasePixmapWithBg = X11SD_ReleasePixmapWithBg;
     xsdo->widget = NULL;
     if (peer != NULL) {
-        xsdo->drawable = JNU_CallMethodByName(env, NULL, peer, "getWindow", "()J").j;
+        xsdo->drawable = JNU_CallMethodByName(env, &hasException, peer, "getWindow", "()J").j;
+        if (hasException) {
+            return;
+        }
     } else {
         xsdo->drawable = 0;
     }
--- a/jdk/src/solaris/native/sun/java2d/x11/XRBackendNative.c	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/solaris/native/sun/java2d/x11/XRBackendNative.c	Tue Oct 15 13:54:01 2013 +0100
@@ -31,6 +31,10 @@
 
 #include <X11/extensions/Xrender.h>
 
+#ifdef __linux__
+    #include <sys/utsname.h>
+#endif
+
 /* On Solaris 10 updates 8, 9, the render.h file defines these
  * protocol values but does not define the structs in Xrender.h.
  * Thus in order to get these always defined on Solaris 10
@@ -131,7 +135,7 @@
 #define MAX_PAYLOAD (262140u - 36u)
 #define MAXUINT (0xffffffffu)
 
-static jboolean IsXRenderAvailable(jboolean verbose) {
+static jboolean IsXRenderAvailable(jboolean verbose, jboolean ignoreLinuxVersion) {
 
     void *xrenderlib;
 
@@ -253,6 +257,31 @@
     }
 #endif
 
+#ifdef __linux__
+    /*
+     * Check for Linux >= 3.5 (Ubuntu 12.04.02 LTS) to avoid hitting
+     * https://bugs.freedesktop.org/show_bug.cgi?id=48045
+     */
+    struct utsname utsbuf;
+    if(uname(&utsbuf) >= 0) {
+        int major, minor, revision;
+        if(sscanf(utsbuf.release, "%i.%i.%i", &major, &minor, &revision) == 3) {
+            if(major < 3 || (major == 3 && minor < 5)) {
+                if(!ignoreLinuxVersion) {
+                    available = JNI_FALSE;
+                }
+                else if(verbose) {
+                 printf("WARNING: Linux < 3.5 detected.\n"
+                        "The pipeline will be enabled, but graphical "
+                        "artifacts can occur with old graphic drivers.\n"
+                        "See the release notes for more details.\n");
+                        fflush(stdout);
+                }
+            }
+        }
+    }
+#endif // __linux__
+
     return available;
 }
 /*
@@ -262,7 +291,7 @@
  */
 JNIEXPORT jboolean JNICALL
 Java_sun_awt_X11GraphicsEnvironment_initXRender
-(JNIEnv *env, jclass x11ge, jboolean verbose)
+(JNIEnv *env, jclass x11ge, jboolean verbose, jboolean ignoreLinuxVersion)
 {
 #ifndef HEADLESS
     static jboolean xrenderAvailable = JNI_FALSE;
@@ -277,7 +306,7 @@
         }
 #endif
         AWT_LOCK();
-        xrenderAvailable = IsXRenderAvailable(verbose);
+        xrenderAvailable = IsXRenderAvailable(verbose, ignoreLinuxVersion);
         AWT_UNLOCK();
         firstTime = JNI_FALSE;
     }
@@ -297,7 +326,13 @@
     jlong fmt32;
 
     jfieldID a8ID = (*env)->GetStaticFieldID(env, cls, "FMTPTR_A8", "J");
+    if (a8ID == NULL) {
+        return;
+    }
     jfieldID argb32ID = (*env)->GetStaticFieldID(env, cls, "FMTPTR_ARGB32", "J");
+    if (argb32ID == NULL) {
+        return;
+    }
 
     if (awt_display == (Display *)NULL) {
         return;
@@ -317,6 +352,10 @@
     defaultImg = XCreateImage(awt_display, NULL, 8, ZPixmap, 0, maskData, 32, 32, 8, 0);
     defaultImg->data = maskData; //required?
     maskImgID = (*env)->GetStaticFieldID(env, cls, "MASK_XIMG", "J");
+    if (maskImgID == NULL) {
+       return;
+    }
+
     (*env)->SetStaticLongField(env, cls, maskImgID, ptr_to_jlong(defaultImg));
 }
 
--- a/jdk/src/solaris/native/sun/java2d/x11/XRSurfaceData.c	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/solaris/native/sun/java2d/x11/XRSurfaceData.c	Tue Oct 15 13:54:01 2013 +0100
@@ -88,7 +88,13 @@
   J2dTraceLn(J2D_TRACE_INFO, "in XRSurfaceData_initIDs");
 
   pictID = (*env)->GetFieldID(env, xsd, "picture", "I");
+  if (pictID == NULL) {
+      return;
+  }
   xidID = (*env)->GetFieldID(env, xsd, "xid", "I");
+  if (xidID == NULL) {
+      return;
+  }
 
   XShared_initIDs(env, JNI_FALSE);
 #endif /* !HEADLESS */
--- a/jdk/src/windows/classes/sun/awt/Win32GraphicsEnvironment.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/windows/classes/sun/awt/Win32GraphicsEnvironment.java	Tue Oct 15 13:54:01 2013 +0100
@@ -25,6 +25,7 @@
 
 package sun.awt;
 
+import java.awt.AWTError;
 import java.awt.GraphicsConfiguration;
 import java.awt.GraphicsDevice;
 import java.awt.GraphicsEnvironment;
@@ -93,7 +94,12 @@
     protected native int getDefaultScreen();
 
     public GraphicsDevice getDefaultScreenDevice() {
-        return getScreenDevices()[getDefaultScreen()];
+        GraphicsDevice[] screens = getScreenDevices();
+        if (screens.length == 0) {
+            throw new AWTError("no screen devices");
+        }
+        int index = getDefaultScreen();
+        return screens[0 < index && index < screens.length ? index : 0];
     }
 
     /**
--- a/jdk/src/windows/classes/sun/awt/windows/WButtonPeer.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/windows/classes/sun/awt/windows/WButtonPeer.java	Tue Oct 15 13:54:01 2013 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2006, 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
@@ -29,7 +29,7 @@
 import java.awt.event.ActionEvent;
 import java.awt.event.KeyEvent;
 
-class WButtonPeer extends WComponentPeer implements ButtonPeer {
+final class WButtonPeer extends WComponentPeer implements ButtonPeer {
 
     static {
         initIDs();
@@ -84,13 +84,6 @@
     }
 
     /**
-     * DEPRECATED
-     */
-    public Dimension minimumSize() {
-        return getMinimumSize();
-    }
-
-    /**
      * Initialize JNI field and method IDs
      */
     private static native void initIDs();
--- a/jdk/src/windows/classes/sun/awt/windows/WCheckboxPeer.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/windows/classes/sun/awt/windows/WCheckboxPeer.java	Tue Oct 15 13:54:01 2013 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2005, 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
@@ -28,7 +28,7 @@
 import java.awt.peer.*;
 import java.awt.event.ItemEvent;
 
-public class WCheckboxPeer extends WComponentPeer implements CheckboxPeer {
+final class WCheckboxPeer extends WComponentPeer implements CheckboxPeer {
 
     // CheckboxPeer implementation
 
@@ -100,12 +100,4 @@
             }
         });
     }
-
-    /**
-     * DEPRECATED
-     */
-    public Dimension minimumSize() {
-            return getMinimumSize();
-    }
-
 }
--- a/jdk/src/windows/classes/sun/awt/windows/WChoicePeer.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/windows/classes/sun/awt/windows/WChoicePeer.java	Tue Oct 15 13:54:01 2013 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2007, 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
@@ -32,7 +32,7 @@
 import java.awt.event.WindowAdapter;
 import sun.awt.SunToolkit;
 
-class WChoicePeer extends WComponentPeer implements ChoicePeer {
+final class WChoicePeer extends WComponentPeer implements ChoicePeer {
 
     // WComponentPeer overrides
 
@@ -151,12 +151,5 @@
         return fm.getHeight() * maxItems;
     }
 
-    /**
-     * DEPRECATED
-     */
-    public Dimension minimumSize() {
-            return getMinimumSize();
-    }
-
     native void closeList();
 }
--- a/jdk/src/windows/classes/sun/awt/windows/WComponentPeer.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/windows/classes/sun/awt/windows/WComponentPeer.java	Tue Oct 15 13:54:01 2013 +0100
@@ -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
@@ -50,7 +50,6 @@
 import sun.java2d.d3d.D3DSurfaceData;
 import sun.java2d.opengl.OGLSurfaceData;
 import sun.java2d.pipe.Region;
-import sun.awt.DisplayChangedListener;
 import sun.awt.PaintEventDispatcher;
 import sun.awt.SunToolkit;
 import sun.awt.event.IgnorePaintEvent;
@@ -546,9 +545,6 @@
             return null;
         }
     }
-    public java.awt.Toolkit getToolkit() {
-        return Toolkit.getDefaultToolkit();
-    }
 
     // fallback default font object
     final static Font defaultFont = new Font(Font.DIALOG, Font.PLAIN, 12);
@@ -739,11 +735,11 @@
     }
 
     public boolean prepareImage(Image img, int w, int h, ImageObserver o) {
-        return getToolkit().prepareImage(img, w, h, o);
+        return Toolkit.getDefaultToolkit().prepareImage(img, w, h, o);
     }
 
     public int checkImage(Image img, int w, int h, ImageObserver o) {
-        return getToolkit().checkImage(img, w, h, o);
+        return Toolkit.getDefaultToolkit().checkImage(img, w, h, o);
     }
 
     // Object overrides
@@ -887,13 +883,6 @@
     /**
      * DEPRECATED
      */
-    public Dimension minimumSize() {
-        return getMinimumSize();
-    }
-
-    /**
-     * DEPRECATED
-     */
     public Dimension preferredSize() {
         return getPreferredSize();
     }
--- a/jdk/src/windows/classes/sun/awt/windows/WLabelPeer.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/windows/classes/sun/awt/windows/WLabelPeer.java	Tue Oct 15 13:54:01 2013 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2001, 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
@@ -27,7 +27,7 @@
 import java.awt.*;
 import java.awt.peer.*;
 
-class WLabelPeer extends WComponentPeer implements LabelPeer {
+final class WLabelPeer extends WComponentPeer implements LabelPeer {
 
     // ComponentPeer overrides
 
@@ -82,12 +82,4 @@
 
         super.initialize();
     }
-
-    /**
-     * DEPRECATED
-     */
-    public Dimension minimumSize() {
-            return getMinimumSize();
-    }
-
 }
--- a/jdk/src/windows/classes/sun/awt/windows/WListPeer.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/windows/classes/sun/awt/windows/WListPeer.java	Tue Oct 15 13:54:01 2013 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2006, 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
@@ -29,13 +29,8 @@
 import java.awt.event.ActionEvent;
 import java.awt.event.ItemEvent;
 
-class WListPeer extends WComponentPeer implements ListPeer {
-
-    // ComponentPeer overrides
+final class WListPeer extends WComponentPeer implements ListPeer {
 
-    public Dimension minimumSize() {
-        return minimumSize(4);
-    }
     public boolean isFocusable() {
         return true;
     }
--- a/jdk/src/windows/classes/sun/awt/windows/WPrinterJob.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/windows/classes/sun/awt/windows/WPrinterJob.java	Tue Oct 15 13:54:01 2013 +0100
@@ -96,7 +96,6 @@
 import javax.print.attribute.standard.JobMediaSheetsSupported;
 import javax.print.attribute.standard.PageRanges;
 import javax.print.attribute.Size2DSyntax;
-import javax.print.StreamPrintService;
 
 import sun.awt.Win32FontManager;
 
@@ -440,7 +439,7 @@
             throw new HeadlessException();
         }
 
-        if (getPrintService() instanceof StreamPrintService) {
+        if (!(getPrintService() instanceof Win32PrintService)) {
             return super.pageDialog(page);
         }
 
@@ -586,7 +585,7 @@
             attributes = new HashPrintRequestAttributeSet();
         }
 
-        if (getPrintService() instanceof StreamPrintService) {
+        if (!(getPrintService() instanceof Win32PrintService)) {
             return super.printDialog(attributes);
         }
 
@@ -611,7 +610,7 @@
     public void setPrintService(PrintService service)
         throws PrinterException {
         super.setPrintService(service);
-        if (service instanceof StreamPrintService) {
+        if (!(service instanceof Win32PrintService)) {
             return;
         }
         driverDoesMultipleCopies = false;
@@ -648,7 +647,7 @@
             }
 
             myService = PrintServiceLookup.lookupDefaultPrintService();
-            if (myService != null) {
+            if (myService instanceof Win32PrintService) {
                 try {
                     setNativePrintServiceIfNeeded(myService.getName());
                 } catch (Exception e) {
--- a/jdk/src/windows/classes/sun/awt/windows/WScrollbarPeer.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/windows/classes/sun/awt/windows/WScrollbarPeer.java	Tue Oct 15 13:54:01 2013 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2002, 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
@@ -28,8 +28,7 @@
 import java.awt.peer.*;
 import java.awt.event.AdjustmentEvent;
 
-class WScrollbarPeer extends WComponentPeer implements ScrollbarPeer {
-
+final class WScrollbarPeer extends WComponentPeer implements ScrollbarPeer {
 
     // Returns width for vertial scrollbar as SM_CXHSCROLL,
     // height for horizontal scrollbar as SM_CYVSCROLL
@@ -140,12 +139,4 @@
     public boolean shouldClearRectBeforePaint() {
         return false;
     }
-
-    /**
-     * DEPRECATED
-     */
-    public Dimension minimumSize() {
-        return getMinimumSize();
-    }
-
 }
--- a/jdk/src/windows/classes/sun/awt/windows/WTextAreaPeer.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/windows/classes/sun/awt/windows/WTextAreaPeer.java	Tue Oct 15 13:54:01 2013 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2003, 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
@@ -30,34 +30,36 @@
 import java.awt.im.InputMethodRequests;
 
 
-class WTextAreaPeer extends WTextComponentPeer implements TextAreaPeer {
+final class WTextAreaPeer extends WTextComponentPeer implements TextAreaPeer {
 
     // WComponentPeer overrides
 
+    @Override
     public Dimension getMinimumSize() {
         return getMinimumSize(10, 60);
     }
 
     // TextAreaPeer implementation
 
-    /* This should eventually be a direct native method. */
-    public void insert(String txt, int pos) {
-        insertText(txt, pos);
+    @Override
+    public void insert(String text, int pos) {
+        replaceRange(text, pos, pos);
     }
 
-    /* This should eventually be a direct native method. */
-    public void replaceRange(String txt, int start, int end) {
-        replaceText(txt, start, end);
-    }
+    @Override
+    public native void replaceRange(String text, int start, int end);
 
+    @Override
     public Dimension getPreferredSize(int rows, int cols) {
         return getMinimumSize(rows, cols);
     }
+    @Override
     public Dimension getMinimumSize(int rows, int cols) {
         FontMetrics fm = getFontMetrics(((TextArea)target).getFont());
         return new Dimension(fm.charWidth('0') * cols + 20, fm.getHeight() * rows + 20);
     }
 
+    @Override
     public InputMethodRequests getInputMethodRequests() {
            return null;
     }
@@ -68,42 +70,6 @@
         super(target);
     }
 
+    @Override
     native void create(WComponentPeer parent);
-
-    // native callbacks
-
-
-    // deprecated methods
-
-    /**
-     * DEPRECATED but, for now, still called by insert(String, int).
-     */
-    public native void insertText(String txt, int pos);
-
-    /**
-     * DEPRECATED but, for now, still called by replaceRange(String, int, int).
-     */
-    public native void replaceText(String txt, int start, int end);
-
-    /**
-     * DEPRECATED
-     */
-    public Dimension minimumSize() {
-        return getMinimumSize();
-    }
-
-    /**
-     * DEPRECATED
-     */
-    public Dimension minimumSize(int rows, int cols) {
-        return getMinimumSize(rows, cols);
-    }
-
-    /**
-     * DEPRECATED
-     */
-    public Dimension preferredSize(int rows, int cols) {
-        return getPreferredSize(rows, cols);
-    }
-
 }
--- a/jdk/src/windows/classes/sun/awt/windows/WTextComponentPeer.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/windows/classes/sun/awt/windows/WTextComponentPeer.java	Tue Oct 15 13:54:01 2013 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2001, 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
@@ -38,14 +38,20 @@
 
     // TextComponentPeer implementation
 
+    @Override
     public void setEditable(boolean editable) {
         enableEditing(editable);
         setBackground(((TextComponent)target).getBackground());
     }
+    @Override
     public native String getText();
-    public native void setText(String txt);
+    @Override
+    public native void setText(String text);
+    @Override
     public native int getSelectionStart();
+    @Override
     public native int getSelectionEnd();
+    @Override
     public native void select(int selStart, int selEnd);
 
     // Toolkit & peer internals
@@ -54,6 +60,7 @@
         super(target);
     }
 
+    @Override
     void initialize() {
         TextComponent tc = (TextComponent)target;
         String text = tc.getText();
@@ -64,14 +71,12 @@
         select(tc.getSelectionStart(), tc.getSelectionEnd());
         setEditable(tc.isEditable());
 
-//      oldSelectionStart = -1; // accessibility support
-//      oldSelectionEnd = -1;   // accessibility support
-
         super.initialize();
     }
 
     native void enableEditing(boolean e);
 
+    @Override
     public boolean isFocusable() {
         return true;
     }
@@ -81,6 +86,7 @@
      * unfortunately resets the selection, but seems to be the
      * only way to get this to work.
      */
+    @Override
     public void setCaretPosition(int pos) {
         select(pos,pos);
     }
@@ -89,6 +95,7 @@
      * Get the caret position by looking up the end of the current
      * selection.
      */
+    @Override
     public int getCaretPosition() {
         return getSelectionStart();
     }
@@ -105,34 +112,8 @@
      */
     private static native void initIDs();
 
-    // stub functions: to be fully implemented in a future release
-    public int getIndexAtPoint(int x, int y) { return -1; }
-    public Rectangle getCharacterBounds(int i) { return null; }
-    public long filterEvents(long mask) { return 0; }
-
+    @Override
     public boolean shouldClearRectBeforePaint() {
         return false;
     }
-
-//
-// Accessibility support
-//
-
-/*  To be fully implemented in a future release
-
-    int oldSelectionStart;
-    int oldSelectionEnd;
-
-    public native int getIndexAtPoint(int x, int y);
-    public native Rectangle getCharacterBounds(int i);
-    public native long filterEvents(long mask);
-
-    /**
-     * Handle a change in the text selection endpoints
-     * (Note: could be simply a change in the caret location)
-     *
-    public void selectionValuesChanged(int start, int end) {
-        return;  // Need to write implementation of this.
-    }
-*/
 }
--- a/jdk/src/windows/classes/sun/awt/windows/WTextFieldPeer.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/windows/classes/sun/awt/windows/WTextFieldPeer.java	Tue Oct 15 13:54:01 2013 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2006, 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
@@ -31,16 +31,18 @@
 import java.awt.event.KeyEvent;
 import java.awt.im.InputMethodRequests;
 
-class WTextFieldPeer extends WTextComponentPeer implements TextFieldPeer {
+final class WTextFieldPeer extends WTextComponentPeer implements TextFieldPeer {
 
     // WComponentPeer overrides
 
+    @Override
     public Dimension getMinimumSize() {
         FontMetrics fm = getFontMetrics(((TextField)target).getFont());
         return new Dimension(fm.stringWidth(getText()) + 24,
                              fm.getHeight() + 8);
     }
 
+    @Override
     public boolean handleJavaKeyEvent(KeyEvent e) {
         switch (e.getID()) {
            case KeyEvent.KEY_TYPED:
@@ -56,35 +58,35 @@
 
     // TextFieldPeer implementation
 
+    @Override
+    public native void setEchoChar(char echoChar);
 
-    /* This should eventually be a direct native method. */
-    public void setEchoChar(char c) {
-        setEchoCharacter(c);
-    }
-
+    @Override
     public Dimension getPreferredSize(int cols) {
         return getMinimumSize(cols);
     }
 
+    @Override
     public Dimension getMinimumSize(int cols) {
         FontMetrics fm = getFontMetrics(((TextField)target).getFont());
         return new Dimension(fm.charWidth('0') * cols + 24, fm.getHeight() + 8);
     }
 
+    @Override
     public InputMethodRequests getInputMethodRequests() {
-           return null;
+        return null;
     }
 
-
-
     // Toolkit & peer internals
 
     WTextFieldPeer(TextField target) {
         super(target);
     }
 
+    @Override
     native void create(WComponentPeer parent);
 
+    @Override
     void initialize() {
         TextField tf = (TextField)target;
         if (tf.echoCharIsSet()) {
@@ -92,33 +94,4 @@
         }
         super.initialize();
     }
-
-    // deprecated methods
-
-    /**
-     * DEPRECATED but, for now, called by setEchoChar(char).
-     */
-    public native void setEchoCharacter(char c);
-
-    /**
-     * DEPRECATED
-     */
-    public Dimension minimumSize() {
-        return getMinimumSize();
-    }
-
-    /**
-     * DEPRECATED
-     */
-    public Dimension minimumSize(int cols) {
-        return getMinimumSize(cols);
-    }
-
-    /**
-     * DEPRECATED
-     */
-    public Dimension preferredSize(int cols) {
-        return getPreferredSize(cols);
-    }
-
 }
--- a/jdk/src/windows/native/sun/windows/awt_TextArea.cpp	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/windows/native/sun/windows/awt_TextArea.cpp	Tue Oct 15 13:54:01 2013 +0100
@@ -767,11 +767,11 @@
 
 /*
  * Class:     sun_awt_windows_WTextAreaPeer
- * Method:    replaceText
+ * Method:    replaceRange
  * Signature: (Ljava/lang/String;II)V
  */
 JNIEXPORT void JNICALL
-Java_sun_awt_windows_WTextAreaPeer_replaceText(JNIEnv *env, jobject self,
+Java_sun_awt_windows_WTextAreaPeer_replaceRange(JNIEnv *env, jobject self,
                                                jstring text,
                                                jint start, jint end)
 {
@@ -791,19 +791,4 @@
 
     CATCH_BAD_ALLOC;
 }
-
-/*
- * Class:     sun_awt_windows_WTextAreaPeer
- * Method:    insertText
- * Signature: (Ljava/lang/String;I)V
- */
-JNIEXPORT void JNICALL
-Java_sun_awt_windows_WTextAreaPeer_insertText(JNIEnv *env, jobject self,
-                                              jstring text, jint pos)
-{
-    Java_sun_awt_windows_WTextAreaPeer_replaceText(env, self, text, pos, pos);
-}
-
 } /* extern "C" */
-
-
--- a/jdk/src/windows/native/sun/windows/awt_TextComponent.cpp	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/windows/native/sun/windows/awt_TextComponent.cpp	Tue Oct 15 13:54:01 2013 +0100
@@ -987,30 +987,6 @@
 // Accessibility support
 //
 
-/* To be fully implemented in a future release
- *
- * Class:     sun_awt_windows_WTextComponentPeer
- * Method:    getIndexAtPoint
- * Signature: (II)I
- *
-JNIEXPORT jlong JNICALL
-Java_sun_awt_windows_WTextComponentPeer_filterEvents(JNIEnv *env, jobject self, jlong mask)
-{
-    TRY;
-
-    PDATA pData;
-    JNI_CHECK_PEER_RETURN_NULL(self);
-    AwtTextComponent* c = (AwtTextComponent*)pData;
-
-    jlong oldMask = c->javaEventsMask;
-    c->javaEventsMask = mask;
-
-    return oldMask;
-
-    CATCH_BAD_ALLOC_RET(0);
-}
-*/
-
 // [[[FIXME]]] need to switch to rich edit field; look for EN_SELCHANGE event instead
 /*
  * Handle WmKeyDown to catch keystrokes which may move the caret,
@@ -1051,112 +1027,4 @@
     return AwtComponent::WmKeyDown(wkey, repCnt, flags, system);
 }
 */
-
-/* To be fully implemented in a future release
- *
- * Class:     sun_awt_windows_WTextComponentPeer
- * Method:    getIndexAtPoint
- * Signature: (II)I
- *
-JNIEXPORT jint JNICALL
-Java_sun_awt_windows_WTextComponentPeer_getIndexAtPoint(JNIEnv *env, jobject self, jint x, jint y)
-{
-    TRY;
-
-    PDATA pData;
-//    JNI_CHECK_PEER_RETURN_VAL(self, -1);   [[[FIXME]]] Peter Korn -> should return -1 here
-    JNI_CHECK_PEER_RETURN_NULL(self);
-    AwtTextComponent* c = (AwtTextComponent*)pData;
-    int indicies = c->SendMessage(EM_CHARFROMPOS, (WPARAM) 0, (LPARAM) MAKELPARAM(x, y));
-    int index = LOWORD(indicies);   // index into the line the (x,y) coord is on
-    int lineIndex = c->SendMessage(EM_LINEINDEX, HIWORD(indicies));  // index of start of line
-    return (index + lineIndex);
-
-    CATCH_BAD_ALLOC_RET(-1);
-}
-*/
-
-/* To be fully implemented in a future release
- *
- * Class:     sun_awt_windows_WTextComponentPeer
- * Method:    getCharacterBounds
- * Signature: (I)Ljava/awt/Rectangle;
- *
-JNIEXPORT jobject JNICALL
-Java_sun_awt_windows_WTextComponentPeer_getCharacterBounds(JNIEnv *env, jobject self, jint i)
-{
-
-    //  loop through lines with EM_LINELENGTH?  e.g.:
-    //     line = 0; ttl = 0;   // index is passed in as 'i' above
-    //     while (ttl < index) {
-    //        ttl += SendMessage(EM_LINELENGTH, line++);
-    //     }
-    //     line-- (decrement back again)
-    //  alternately, we could use EM_LINEINDEX to the same effect; perhaps slightly cleaner:
-    //     computedIndex = 0; line = 0;
-    //     while (computedIndex < index) {
-    //        computedIndex = SendMessage(EM_LINEINDEX, 1 + line++);
-    //     }
-    //     line--;
-
-    // EM_POSFROMCHAR  - convert char index into a Point
-    // wParam = (LPPOINT) lpPoint;        // address of structure
-                                                  // receiving character position
-    // lParam = (LPARAM) wCharIndex;      // zero-based index of character
-    //
-    // still need to turn the above into a Rect somehow...
-    // (use font metrics on font info for letter to get height?  use
-    // getLineHeight type of message?).
-
-    // WM_GETFONT - get the font struct for the window control
-    // wParam = lParam = 0
-    // returns an HFONT
-    //  -or-
-    // GetTextMetrics(hDC) to get the text info for the font selected
-    // into the hDC of the control (tmHeight is what we want in the
-    // TEXTMETRIC struct).
-    // also GetCharWidth32() with the char at the index in question to get
-    // the width of that char
-    // *** Can't use GetTextMetrics/GetCharWidth32, as we don't have an hDC!! ***
-
-    TRY;
-
-    PDATA pData;
-    JNI_CHECK_PEER_RETURN_NULL(self);
-    AwtComponent* c = (AwtComponent*)pData;
-/*
-    int line = 0;
-    int lineIndex = 0;
-    while (lineIndex < i) {
-        lineIndex = c->SendMessage(EM_LINEINDEX, 1 + line++);
-    }
-    line--;     // line is now the line which contains our character at position 'i'
-    int offsetIndex = i - lineIndex;    // offsetIndex is now distance in on the line
-* /
-    POINT p;
-
-    c->SendMessage(EM_POSFROMCHAR, (WPARAM) &p, (LPARAM) i);    // x coord is meaningful; y may not be
-
-    // need to calculate charWidth, charHeight, and set p.y to something meangful
-
-    jint charWidth;
-    jint charHeight;
-
-/*
-    HFONT font = c->SendMessage(WM_GETFONT);
-    if (GetCharWidth32(c->hdc, i, i, &charWidth) != 0) {        // [[[FIXME]]] need to get hDC!
-
-        JNIEnv *env = (JNIEnv *)JNU_GetEnv(jvm, JNI_VERSION_1_2);
-        jobject rect = JNU_NewObjectByName(env, "java/awt/Rectangle", "(IIII)V",
-                                           (jint) p.x, (jint) p.y, charWidth, charHeight);
-
-        return rect;
-    }
-* /
-    return (jobject) 0;
-
-    CATCH_BAD_ALLOC_RET(0);
-}
-*/
-
 } /* extern "C" */
--- a/jdk/src/windows/native/sun/windows/awt_TextField.cpp	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/windows/native/sun/windows/awt_TextField.cpp	Tue Oct 15 13:54:01 2013 +0100
@@ -316,12 +316,12 @@
 
 /*
  * Class:     sun_awt_windows_WTextFieldPeer
- * Method:    setEchoCharacter
+ * Method:    setEchoChar
  * Signature: (C)V
  */
 JNIEXPORT void JNICALL
-Java_sun_awt_windows_WTextFieldPeer_setEchoCharacter(JNIEnv *env, jobject self,
-                                                     jchar ch)
+Java_sun_awt_windows_WTextFieldPeer_setEchoChar(JNIEnv *env, jobject self,
+                                                jchar ch)
 {
     TRY;
 
--- a/jdk/src/windows/native/sun/windows/awt_Toolkit.cpp	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/src/windows/native/sun/windows/awt_Toolkit.cpp	Tue Oct 15 13:54:01 2013 +0100
@@ -1516,10 +1516,19 @@
      * the mouse, not the Component with the input focus.
      */
 
-    if (msg.message == WM_MOUSEWHEEL &&
-        AwtToolkit::MainThread() == ::GetWindowThreadProcessId(hWndForWheel, NULL)) {
+    if (msg.message == WM_MOUSEWHEEL) {
             //i.e. mouse is over client area for this window
-            msg.hwnd = hWndForWheel;
+            DWORD hWndForWheelProcess;
+            DWORD hWndForWheelThread = ::GetWindowThreadProcessId(hWndForWheel, &hWndForWheelProcess);
+            if (::GetCurrentProcessId() == hWndForWheelProcess) {
+                if (AwtToolkit::MainThread() == hWndForWheelThread) {
+                    msg.hwnd = hWndForWheel;
+                } else {
+                    // Interop mode, redispatch the event to another toolkit.
+                    ::SendMessage(hWndForWheel, msg.message, mouseWParam, mouseLParam);
+                    return TRUE;
+                }
+            }
     }
 
     /*
--- a/jdk/test/TEST.groups	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/test/TEST.groups	Tue Oct 15 13:54:01 2013 +0100
@@ -360,6 +360,7 @@
   java/security/Security/ClassLoaderDeadlock/Deadlock.sh \
   java/util/logging/Listeners.java \
   java/util/logging/ListenersWithSM.java \
+  java/util/logging/TestMainAppContext.java \
   java/util/ResourceBundle/Control/Bug6530694.java \
   java/text/Bidi/BidiConformance.java \
   java/text/Bidi/BidiEmbeddingTest.java \
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/Frame/MaximizedToMaximized/MaximizedToMaximized.java	Tue Oct 15 13:54:01 2013 +0100
@@ -0,0 +1,76 @@
+/*
+ * 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.Dimension;
+import java.awt.Frame;
+import java.awt.GraphicsDevice;
+import java.awt.GraphicsEnvironment;
+import java.awt.Insets;
+import java.awt.Rectangle;
+import java.awt.Toolkit;
+import sun.awt.SunToolkit;
+
+/**
+ * @test
+ * @bug 8007219
+ * @author Alexander Scherbatiy
+ * @summary Frame size reverts meaning of maximized attribute
+ * @run main MaximizedToMaximized
+ */
+public class MaximizedToMaximized {
+
+    public static void main(String[] args) throws Exception {
+
+       Frame frame = new Frame();
+        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);
+
+        frame.setBounds(availableScreenBounds.x, availableScreenBounds.y,
+                availableScreenBounds.width, availableScreenBounds.height);
+        frame.setVisible(true);
+
+        Rectangle frameBounds = frame.getBounds();
+        frame.setExtendedState(Frame.MAXIMIZED_BOTH);
+        ((SunToolkit) toolkit).realSync();
+
+        Rectangle maximizedFrameBounds = frame.getBounds();
+        if (maximizedFrameBounds.width < frameBounds.width
+                || maximizedFrameBounds.height < frameBounds.height) {
+            throw new RuntimeException("Maximized frame is smaller than non maximized");
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/Graphics/LineClipTest.java	Tue Oct 15 13:54:01 2013 +0100
@@ -0,0 +1,504 @@
+/*
+ * Copyright (c) 2002, 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   4780022 4862193 7179526
+ * @summary  Tests that clipped lines are drawn over the same pixels
+ * as unclipped lines (within the clip bounds)
+ * @run main/timeout=600/othervm -Dsun.java2d.ddforcevram=true LineClipTest
+ * @run main/timeout=600/othervm LineClipTest
+ */
+
+
+/**
+ * This app tests whether we are drawing clipped lines the same
+ * as unclipped lines.  The problem occurred when we started
+ * clipping d3d lines using simple integer clipping, which did not
+ * account for sub-pixel precision and ended up drawing very different
+ * pixels than the same line drawn unclipped.  A supposed fix
+ * to that problem used floating-point clipping instead, but there
+ * was some problem with very limited precision inside of d3d
+ * (presumably in hardware) that caused some variation in pixels.
+ * We decided that whatever the fix was, we needed a serious
+ * line check test to make sure that all kinds of different
+ * lines would be drawn exactly the same inside the clip area,
+ * regardless of whether clipping was enabled.  This test should
+ * check all kinds of different cases, such as lines that fall
+ * completely outside, completely inside, start outside and
+ * end inside, etc., and lines should end and originate in
+ * all quadrants of the space divided up by the clip box.
+ *
+ * The test works as follows:
+ * We create nine quadrants using the spaces bisected by the
+ * edges of the clip bounds (note that only one of these
+ * quadrants is actually visible when clipping is enabled).
+ * We create several points in each of these quadrants
+ * (three in each of the invisible quadrants, nine in the
+ * center/visible quadrant).  Our resulting grid looks like
+ * this:
+ *
+ *  x         x|x    x    x|x         x
+ *             |           |
+ *             |           |
+ *             |           |
+ *             |           |
+ *             |           |
+ *  x          |           |          x
+ *  -----------------------------------
+ *  x          |x    x    x|          x
+ *             |           |
+ *             |           |
+ *  x          |x    x    x|          x
+ *             |           |
+ *             |           |
+ *  x          |x    x    x|          x
+ *  -----------------------------------
+ *  x          |           |          x
+ *             |           |
+ *             |           |
+ *             |           |
+ *             |           |
+ *             |           |
+ *  x         x|x    x    x|x         x
+ *
+ * The test then draws lines from every point to every other
+ * point.  First, we draw unclipped lines in blue and
+ * then we draw clipped lines in red.
+ * At certain times (after every point during the default
+ * test, after every quadrant of lines if you run with the -quick
+ * option), we check for errors and draw the current image
+ * to the screen.  Error checking consists of copying the
+ * VolatileImage to a BufferedImage (because we need access
+ * to the pixels directly) and checking every pixel in the
+ * image.  The check is simple: everything outside the
+ * clip bounds should be blue (or the background color) and
+ * everything inside the clip bounds should be red (or the
+ * background color).  So any blue pixel inside or red
+ * pixel outside means that there was a drawing error and
+ * the test fails.
+ * There are 4 modes that the test can run in (dynamic mode is
+ * exclusive to the other modes, but the other modes are combinable):
+ *
+ *      (default): the clip is set
+ *      to a default size (100x100) and the test is run.
+ *
+ *      -quick: The error
+ *      check is run only after every quadrant of lines is
+ *      drawn.  This speeds up the test considerably with
+ *      some less accuracy in error checking (because pixels
+ *      from some lines may overdrawn pixels from other lines
+ *      before we have verified the correctness of those
+ *      pixels).
+ *
+ *      -dynamic: There is no error checking, but this version
+ *      of the test automatically resizes the clip bounds and
+ *      reruns the test over and over.  Nothing besides the
+ *      visual check verifies that the test is running correctly.
+ *
+ *      -rect: Instead of drawing lines, the test draws rectangles
+ *      to/from all points in all quadrants.  This tests similar
+ *      clipping functionality for drawRect().
+ *
+ *      n (where "n" is a number): sets the clip size to the
+ *      given value.  Just like the default test except that
+ *      the clip size is as specified.
+ *
+ * Note: this test must be run with the -Dsun.java2d.ddforcevram=true
+ * option to force the test image to stay in VRAM.  We currently
+ * punt VRAM images to system memory when we detect lots of
+ * reads.  Since we read the whole buffer on every error check
+ * to copy it to the BufferedImage), this causes us to punt the
+ * buffer.  A system memory surface will have no d3d capabilities,
+ * thus we are not testing the d3d line quality when this happens.
+ * By using the ddforcevram flag, we make sure the buffer
+ * stays put in VRAM and d3d is used to draw the lines.
+ */
+
+import javax.swing.*;
+import java.awt.*;
+import java.awt.image.*;
+
+
+public class LineClipTest extends Component implements Runnable {
+
+    int clipBumpVal = 5;
+    static int clipSize = 100;
+    int clipX1;
+    int clipY1;
+    static final int NUM_QUADS = 9;
+    Point quadrants[][] = new Point[NUM_QUADS][];
+    static boolean dynamic = false;
+    BufferedImage imageChecker = null;
+    Color unclippedColor = Color.blue;
+    Color clippedColor = Color.red;
+    int testW = -1, testH = -1;
+    VolatileImage testImage = null;
+    static boolean keepRunning = false;
+    static boolean quickTest = false;
+    static boolean rectTest = false;
+    static boolean runTestDone = false;
+    static Frame f = null;
+
+    /**
+     * Check for errors in the grid.  This error check consists of
+     * copying the buffer into a BufferedImage and reading all pixels
+     * in that image.  No pixel outside the clip bounds should be
+     * of the color clippedColor and no pixel inside should be
+     * of the color unclippedColor.  Any wrong color returns an error.
+     */
+    boolean gridError(Graphics g) {
+        boolean error = false;
+        if (imageChecker == null || (imageChecker.getWidth() != testW) ||
+            (imageChecker.getHeight() != testH))
+        {
+            // Recreate BufferedImage as necessary
+            GraphicsConfiguration gc = getGraphicsConfiguration();
+            ColorModel cm = gc.getColorModel();
+            WritableRaster wr =
+                cm.createCompatibleWritableRaster(getWidth(), getHeight());
+            imageChecker =
+                new BufferedImage(cm, wr,
+                                  cm.isAlphaPremultiplied(), null);
+        }
+        // Copy buffer to BufferedImage
+        Graphics gChecker = imageChecker.getGraphics();
+        gChecker.drawImage(testImage, 0, 0, this);
+
+        // Set up pixel colors to check against
+        int clippedPixelColor = clippedColor.getRGB();
+        int unclippedPixelColor = unclippedColor.getRGB();
+        int wrongPixelColor = clippedPixelColor;
+        boolean insideClip = false;
+        for (int row = 0; row < getHeight(); ++row) {
+            for (int col = 0; col < getWidth(); ++col) {
+                if (row >= clipY1 && row < (clipY1 + clipSize) &&
+                    col >= clipX1 && col < (clipX1 + clipSize))
+                {
+                    // Inside clip bounds - should not see unclipped color
+                    wrongPixelColor = unclippedPixelColor;
+                } else {
+                    // Outside clip - should not see clipped color
+                    wrongPixelColor = clippedPixelColor;
+                }
+                int pixel = imageChecker.getRGB(col, row);
+                if (pixel == wrongPixelColor) {
+                    System.out.println("FAILED: pixel = " +
+                                       Integer.toHexString(pixel) +
+                                       " at (x, y) = " + col + ", " + row);
+                    // Draw magenta rectangle around problem pixel in buffer
+                    // for visual feedback to user
+                    g.setColor(Color.magenta);
+                    g.drawRect(col - 1, row - 1, 2, 2);
+                    error = true;
+                }
+            }
+        }
+        return error;
+    }
+
+    /**
+     * Draw all test lines and check for errors (unless running
+     * with -dynamic option)
+     */
+    void drawLineGrid(Graphics screenGraphics, Graphics g) {
+        // Fill buffer with background color
+        g.setColor(Color.white);
+        g.fillRect(0, 0, getWidth(), getHeight());
+
+        // Now, iterate through all quadrants
+        for (int srcQuad = 0; srcQuad < NUM_QUADS; ++srcQuad) {
+            // Draw lines to all other quadrants
+            for (int dstQuad = 0; dstQuad < NUM_QUADS; ++dstQuad) {
+                for (int srcPoint = 0;
+                     srcPoint < quadrants[srcQuad].length;
+                     ++srcPoint)
+                {
+                    // For every point in the source quadrant
+                    int sx = quadrants[srcQuad][srcPoint].x;
+                    int sy = quadrants[srcQuad][srcPoint].y;
+                    for (int dstPoint = 0;
+                         dstPoint < quadrants[dstQuad].length;
+                         ++dstPoint)
+                    {
+                        int dx = quadrants[dstQuad][dstPoint].x;
+                        int dy = quadrants[dstQuad][dstPoint].y;
+                        if (!rectTest) {
+                            // Draw unclipped/clipped lines to every
+                            // point in the dst quadrant
+                            g.setColor(unclippedColor);
+                            g.drawLine(sx, sy, dx, dy);
+                            g.setClip(clipX1, clipY1, clipSize, clipSize);
+                            g.setColor(clippedColor);
+                            g.drawLine(sx,sy, dx, dy);
+                        } else {
+                            // Draw unclipped/clipped rectangles to every
+                            // point in the dst quadrant
+                            g.setColor(unclippedColor);
+                            int w = dx - sx;
+                            int h = dy - sy;
+                            g.drawRect(sx, sy, w, h);
+                            g.setClip(clipX1, clipY1, clipSize, clipSize);
+                            g.setColor(clippedColor);
+                            g.drawRect(sx, sy, w, h);
+                        }
+                        g.setClip(null);
+                    }
+                    if (!dynamic) {
+                        // Draw screen update for visual feedback
+                        screenGraphics.drawImage(testImage, 0, 0, this);
+                        // On default test, check for errors after every
+                        // src point
+                        if (!quickTest && gridError(g)) {
+                            throw new java.lang.RuntimeException("Failed");
+                        }
+                    }
+                }
+            }
+            if (!dynamic && quickTest && gridError(g)) {
+                // On quick test, check for errors only after every
+                // src quadrant
+                throw new java.lang.RuntimeException("Failed");
+                //return;
+            }
+        }
+        if (!dynamic) {
+            System.out.println("PASSED");
+            if (!keepRunning) {
+                f.dispose();
+            }
+        }
+    }
+
+    /**
+     * If we have not yet run the test, or if the window size has
+     * changed, or if we are running the test in -dynamic mode,
+     * run the test.  Then draw the test buffer to the screen
+     */
+    public void paint(Graphics g) {
+        if (dynamic || testImage == null ||
+            getWidth() != testW || getHeight() != testH)
+        {
+            runTest(g);
+        }
+        if (testImage != null) {
+            g.drawImage(testImage, 0, 0, this);
+        }
+    }
+
+    /*
+     * Create the quadrant of points and run the test to draw all the lines
+     */
+    public void runTest(Graphics screenGraphics) {
+        if (getWidth() == 0 || getHeight() == 0) {
+            // May get here before window is really ready
+            return;
+        }
+        clipX1 = (getWidth() - clipSize) / 2;
+        clipY1 = (getHeight() - clipSize) / 2;
+        int clipX2 = clipX1 + clipSize;
+        int clipY2 = clipY1 + clipSize;
+        int centerX = getWidth()/2;
+        int centerY = getHeight()/2;
+        int leftX = 0;
+        int topY = 0;
+        int rightX = getWidth() - 1;
+        int bottomY = getHeight() - 1;
+        int quadIndex = 0;
+        // Offsets are used to force diagonal (versus hor/vert) lines
+        int xOffset = 0;
+        int yOffset = 0;
+
+        if (quadrants[0] == null) {
+            for (int i = 0; i < 9; ++i) {
+                int numPoints = (i == 4) ? 9 : 3;
+                quadrants[i] = new Point[numPoints];
+            }
+        }
+        // Upper-left
+        quadrants[quadIndex] = new Point[] {
+            new Point(leftX + xOffset,          clipY1 - 1 - yOffset),
+            new Point(leftX + xOffset,          topY + yOffset),
+            new Point(clipX1 - 1 - xOffset,     topY + yOffset),
+        };
+
+        quadIndex++;
+        yOffset++;
+        // Upper-middle
+        quadrants[quadIndex] = new Point[] {
+            new Point(clipX1 + 1 + xOffset,     topY + yOffset),
+            new Point(centerX + xOffset,        topY + yOffset),
+            new Point(clipX2 - 1 - xOffset,     topY + yOffset),
+        };
+
+        quadIndex++;
+        ++yOffset;
+        // Upper-right
+        quadrants[quadIndex] = new Point[] {
+            new Point(clipX2 + 1 + xOffset,     topY + yOffset),
+            new Point(rightX - xOffset,         topY + yOffset),
+            new Point(rightX - xOffset,         clipY1 - 1 - yOffset),
+        };
+
+        quadIndex++;
+        yOffset = 0;
+        ++xOffset;
+        // Middle-left
+        quadrants[quadIndex] = new Point[] {
+            new Point(leftX + xOffset,          clipY1 + 1 + yOffset),
+            new Point(leftX + xOffset,          centerY + yOffset),
+            new Point(leftX + xOffset,          clipY2 - 1 - yOffset),
+        };
+
+        quadIndex++;
+        ++yOffset;
+        // Middle-middle
+        quadrants[quadIndex] = new Point[] {
+            new Point(clipX1 + 1 + xOffset,     clipY1 + 1 + yOffset),
+            new Point(centerX + xOffset,        clipY1 + 1 + yOffset),
+            new Point(clipX2 - 1 - xOffset,     clipY1 + 1 + yOffset),
+            new Point(clipX1 + 1 + xOffset,     centerY + yOffset),
+            new Point(centerX + xOffset,        centerY + yOffset),
+            new Point(clipX2 - 1 - xOffset,     centerY + yOffset),
+            new Point(clipX1 + 1 + xOffset,     clipY2 - 1 - yOffset),
+            new Point(centerX + xOffset,        clipY2 - 1 - yOffset),
+            new Point(clipX2 - 1 - xOffset,     clipY2 - 1 - yOffset),
+        };
+
+        quadIndex++;
+        ++yOffset;
+        // Middle-right
+        quadrants[quadIndex] = new Point[] {
+            new Point(rightX - xOffset,         clipY1 + 1 + yOffset),
+            new Point(rightX - xOffset,         centerY + yOffset),
+            new Point(rightX - xOffset,         clipY2 - 1 - yOffset),
+        };
+
+        quadIndex++;
+        yOffset = 0;
+        ++xOffset;
+        // Lower-left
+        quadrants[quadIndex] = new Point[] {
+            new Point(leftX + xOffset,          clipY2 + 1 + yOffset),
+            new Point(leftX + xOffset,          bottomY - yOffset),
+            new Point(clipX1 - 1 - xOffset,     bottomY - yOffset),
+        };
+
+        quadIndex++;
+        ++yOffset;
+        // Lower-middle
+        quadrants[quadIndex] = new Point[] {
+            new Point(clipX1 + 1 + xOffset,     bottomY - yOffset),
+            new Point(centerX + xOffset,        bottomY - yOffset),
+            new Point(clipX2 - 1 - xOffset,     bottomY - yOffset),
+        };
+
+        quadIndex++;
+        ++yOffset;
+        // Lower-right
+        quadrants[quadIndex] = new Point[] {
+            new Point(clipX2 + 1 + xOffset,     bottomY - yOffset),
+            new Point(rightX - xOffset,         bottomY - yOffset),
+            new Point(rightX - xOffset,         clipY2 + 1 + yOffset),
+        };
+
+
+        if (testImage != null) {
+            testImage.flush();
+        }
+        testW = getWidth();
+        testH = getHeight();
+        testImage = createVolatileImage(testW, testH);
+        Graphics g = testImage.getGraphics();
+        do {
+            int valCode = testImage.validate(getGraphicsConfiguration());
+            if (valCode == VolatileImage.IMAGE_INCOMPATIBLE) {
+                testImage.flush();
+                testImage = createVolatileImage(testW, testH);
+                g = testImage.getGraphics();
+            }
+            drawLineGrid(screenGraphics, g);
+        } while (testImage.contentsLost());
+        if (dynamic) {
+            // Draw clip box if dynamic
+            g.setClip(null);
+            g.setColor(Color.black);
+            g.drawRect(clipX1, clipY1, clipSize, clipSize);
+            screenGraphics.drawImage(testImage, 0, 0, this);
+        }
+        runTestDone = true;
+    }
+
+    /**
+     * When running -dynamic, resize the clip bounds and run the test
+     * over and over
+     */
+    public void run() {
+        while (true) {
+            clipSize += clipBumpVal;
+            if (clipSize > getWidth() || clipSize < 0) {
+                clipBumpVal = -clipBumpVal;
+                clipSize += clipBumpVal;
+            }
+            update(getGraphics());
+            try {
+                Thread.sleep(50);
+            } catch (Exception e) {}
+        }
+    }
+
+    public static void main(String args[]) {
+        for (int i = 0; i < args.length; ++i) {
+            if (args[i].equals("-dynamic")) {
+                dynamic = true;
+            } else if (args[i].equals("-rect")) {
+                rectTest = true;
+            } else if (args[i].equals("-quick")) {
+                quickTest = true;
+            } else if (args[i].equals("-keep")) {
+                keepRunning = true;
+            } else {
+                // could be clipSize
+                try {
+                    clipSize = Integer.parseInt(args[i]);
+                } catch (Exception e) {}
+            }
+        }
+        f = new Frame();
+        f.setSize(500, 500);
+        LineClipTest test = new LineClipTest();
+        f.add(test);
+        if (dynamic) {
+            Thread t = new Thread(test);
+            t.start();
+        }
+        f.setVisible(true);
+        while (!runTestDone) {
+            // need to make sure jtreg doesn't exit before the
+            // test is done...
+            try {
+                Thread.sleep(50);
+            } catch (Exception e) {}
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/InputMethods/InputMethodsTest/InputMethodsTest.html	Tue Oct 15 13:54:01 2013 +0100
@@ -0,0 +1,17 @@
+<html>
+<head>
+<title> InputMethodsTest </title>
+</head>
+<body>
+<applet code="InputMethodsTest.class" width=350 height=200></applet>
+
+This test is for Linux only. For other platforms please simply push "Pass".
+
+Test run requires some Japanese input method to be installed.
+
+To test JDK-7146572 fix please perform the following steps:
+1. Switch on input method and type Japanese in the above text fields.
+2. Push "Disable Input Methods" button.
+3. Try to type Japanese again. If it can be done then the test is failed; otherwise passed.
+</body>
+</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/InputMethods/InputMethodsTest/InputMethodsTest.java	Tue Oct 15 13:54:01 2013 +0100
@@ -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 7146572 8024122
+  @summary Check if 'enableInputMethods' works properly for TextArea and TextField on Linux platform
+  @author a.stepanov
+  @run applet/manual=yesno InputMethodsTest.html
+*/
+
+
+import java.applet.Applet;
+import java.awt.*;
+import javax.swing.*;
+import java.awt.event.*;
+
+
+public class InputMethodsTest extends Applet {
+
+    TextArea txtArea = null;
+    TextField txtField = null;
+    JButton btnIM = null;
+    boolean inputMethodsEnabled = true;
+
+    public void init() {
+        this.setLayout(new BorderLayout());
+    }
+
+    public void start() {
+
+        setSize(350, 200);
+
+        JPanel panel = new JPanel();
+        panel.setLayout(new GridLayout(2, 1));
+
+        txtArea = new TextArea();
+        panel.add(txtArea);
+
+        txtField = new TextField();
+        panel.add(txtField);
+
+        add(panel, BorderLayout.CENTER);
+
+        btnIM = new JButton();
+        setBtnText();
+
+        btnIM.addActionListener(new ActionListener() {
+            @Override
+            public void actionPerformed(ActionEvent e) {
+                inputMethodsEnabled = !inputMethodsEnabled;
+                setBtnText();
+                txtArea.enableInputMethods(inputMethodsEnabled);
+                txtField.enableInputMethods(inputMethodsEnabled);
+            }
+        });
+
+        add(btnIM, BorderLayout.SOUTH);
+
+        validate();
+        setVisible(true);
+    }
+
+    private void setBtnText() {
+        String s = inputMethodsEnabled ? "Disable" : "Enable";
+        btnIM.setText(s +  " Input Methods");
+    }
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/List/NofocusListDblClickTest/NofocusListDblClickTest.java	Tue Oct 15 13:54:01 2013 +0100
@@ -0,0 +1,129 @@
+/*
+ * 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       6240202
+  @summary   Tests that non-focusable List in a Window generates ActionEvent.
+  @author    anton.tarasov@sun.com: area=awt-list
+  @run       main NofocusListDblClickTest
+*/
+
+import java.awt.*;
+import java.awt.event.*;
+import java.util.concurrent.atomic.AtomicInteger;
+import javax.swing.SwingUtilities;
+import sun.awt.SunToolkit;
+
+public class NofocusListDblClickTest {
+    static final int EXPECTED_ACTION_COUNT = 2;
+    static Robot robot;
+    static final AtomicInteger actionPerformed = new AtomicInteger(0);
+    static List lst;
+    private static final SunToolkit toolkit = (SunToolkit) Toolkit.getDefaultToolkit();
+
+    public static void main(String[] args) throws Exception {
+        SwingUtilities.invokeAndWait(new Runnable() {
+            public void run() {
+                createAndShowGUI();
+            }
+        });
+        toolkit.realSync();
+        Thread.sleep(1000);
+
+        robot = new Robot();
+        robot.setAutoDelay(50);
+        // ACTION_PERFORMED event happens only on even clicks
+        clickTwiceOn(lst);
+        Thread.sleep(500);
+        clickTwiceOn(lst);
+        toolkit.realSync();
+        Thread.sleep(1000);
+
+        synchronized (actionPerformed) {
+            if (actionPerformed.get() != EXPECTED_ACTION_COUNT) {
+                try {
+                    actionPerformed.wait(3000);
+                } catch (InterruptedException e) {
+                    System.out.println("Interrupted unexpectedly!");
+                    throw new RuntimeException(e);
+                }
+            }
+        }
+
+        if (actionPerformed.get() != EXPECTED_ACTION_COUNT) {
+            System.out.println("No ActionEvent was generated. " + actionPerformed.get());
+            throw new RuntimeException("Test failed!");
+        }
+
+        System.out.println("Test passed.");
+    }
+
+    public static void createAndShowGUI() {
+        Frame f = new Frame("Owner");
+        Window w = new Window(f);
+        lst = new List(3, true);
+        //this.setLayout (new BorderLayout ());
+        f.setBounds(800, 0, 100, 100);
+        w.setLocation(800, 150);
+
+        lst.add("item 0");
+        lst.add("item 1");
+        lst.add("item 2");
+
+        lst.setFocusable(false);
+
+        lst.addActionListener(new ActionListener() {
+                public void actionPerformed(ActionEvent e) {
+                    System.out.println(e.toString());
+                    synchronized (actionPerformed) {
+                        if (EXPECTED_ACTION_COUNT == actionPerformed.incrementAndGet()) {
+                            actionPerformed.notifyAll();
+                        }
+                    }
+                }
+            });
+
+        w.add(lst);
+        w.pack();
+
+        f.setVisible(true);
+        w.setVisible(true);
+    }
+
+    static void clickTwiceOn(Component c) throws Exception {
+        Point p = c.getLocationOnScreen();
+        Dimension d = c.getSize();
+
+        if (c instanceof Frame) {
+            robot.mouseMove(p.x + (int)(d.getWidth()/2), p.y + ((Frame)c).getInsets().top/2);
+        } else {
+            robot.mouseMove(p.x + (int)(d.getWidth()/2), p.y + (int)(d.getHeight()/2));
+        }
+
+        robot.mousePress(InputEvent.BUTTON1_MASK);
+        robot.mouseRelease(InputEvent.BUTTON1_MASK);
+        Thread.sleep(20);
+        robot.mousePress(InputEvent.BUTTON1_MASK);
+        robot.mouseRelease(InputEvent.BUTTON1_MASK);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/TextArea/SelectionVisible/SelectionVisible.html	Tue Oct 15 13:54:01 2013 +0100
@@ -0,0 +1,42 @@
+<html>
+<!--
+ Copyright (c) 1999, 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 4082144 7150100
+  @summary  Ensures that TextArea.select() works when called 
+            before setVisible() 
+  @author Eric.Hawkes: area=TextComponent
+  @run applet/manual=yesno SelectionVisible.html
+  -->
+<head>
+<title> SelectionVisible </title>
+</head>
+<body>
+
+<h1> SelectionVisible<br> Bugid: 4082144 </h1>
+
+<APPLET CODE="SelectionVisible.class" WIDTH=400 HEIGHT=160></APPLET>
+</body>
+</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/TextArea/SelectionVisible/SelectionVisible.java	Tue Oct 15 13:54:01 2013 +0100
@@ -0,0 +1,62 @@
+/*
+ * Copyright (c) 1999, 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.applet.Applet;
+import java.awt.BorderLayout;
+import java.awt.Dimension;
+import java.awt.FlowLayout;
+import java.awt.Panel;
+import java.awt.TextArea;
+
+public final class SelectionVisible extends Applet {
+
+    TextArea tf;
+
+    @Override
+    public void init() {
+        tf = new TextArea(3, 20);
+        tf.setText("0123456789");
+        tf.select(0, 6);
+
+        final TextArea ta = new TextArea("INSTRUCTIONS:\n"
+                                                 + "The text 012345 should be selected in the TextArea.\n"
+                                                 + "If this is what you observe, then the test passes.\n"
+                                                 + "Otherwise, the test fails.", 40, 5,
+                                         TextArea.SCROLLBARS_NONE);
+        ta.setEditable(false);
+        ta.setPreferredSize(new Dimension(300, 70));
+        final Panel panel = new Panel();
+        panel.setLayout(new FlowLayout());
+        panel.add(tf);
+        setLayout(new BorderLayout());
+        add(ta, BorderLayout.CENTER);
+        add(panel, BorderLayout.PAGE_END);
+    }
+
+    @Override
+    public void start() {
+        setVisible(true);
+        tf.requestFocus();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/TextField/SelectionVisible/SelectionVisible.html	Tue Oct 15 13:54:01 2013 +0100
@@ -0,0 +1,42 @@
+<html>
+<!--
+ Copyright (c) 1999, 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 4082144 7150100
+  @summary  Ensures that TextField.select() works when called 
+            before setVisible() 
+  @author Eric.Hawkes: area=TextComponent
+  @run applet/manual=yesno SelectionVisible.html
+  -->
+<head>
+<title> SelectionVisible </title>
+</head>
+<body>
+
+<h1> SelectionVisible<br> Bugid: 4082144 </h1>
+
+<APPLET CODE="SelectionVisible.class" WIDTH=400 HEIGHT=160></APPLET>
+</body>
+</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/TextField/SelectionVisible/SelectionVisible.java	Tue Oct 15 13:54:01 2013 +0100
@@ -0,0 +1,63 @@
+/*
+ * Copyright (c) 1999, 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.applet.Applet;
+import java.awt.BorderLayout;
+import java.awt.Dimension;
+import java.awt.FlowLayout;
+import java.awt.Panel;
+import java.awt.TextArea;
+import java.awt.TextField;
+
+public final class SelectionVisible extends Applet {
+
+    TextField tf;
+
+    @Override
+    public void init() {
+        tf = new TextField(20);
+        tf.setText("0123456789");
+        tf.select(0, 6);
+
+        final TextArea ta = new TextArea("INSTRUCTIONS:\n"
+                                         + "The text 012345 should be selected in the TextField.\n"
+                                         + "If this is what you observe, then the test passes.\n"
+                                         + "Otherwise, the test fails.", 40, 5,
+                                         TextArea.SCROLLBARS_NONE);
+        ta.setEditable(false);
+        ta.setPreferredSize(new Dimension(300, 70));
+        final Panel panel = new Panel();
+        panel.setLayout(new FlowLayout());
+        panel.add(tf);
+        setLayout(new BorderLayout());
+        add(ta, BorderLayout.CENTER);
+        add(panel, BorderLayout.PAGE_END);
+    }
+
+    @Override
+    public void start() {
+        setVisible(true);
+        tf.requestFocus();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/Window/AlwaysOnTop/AlwaysOnTopFieldTest.java	Tue Oct 15 13:54:01 2013 +0100
@@ -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.Dialog;
+import java.awt.Frame;
+import java.awt.Toolkit;
+import java.awt.Window;
+import sun.awt.SunToolkit;
+/**
+ * @test
+ * @bug 7081594
+ * @author Alexander Scherbatiy
+ * @summary Windows owned by an always-on-top window DO NOT automatically become always-on-top
+ * @run main AlwaysOnTopFieldTest
+ */
+public class AlwaysOnTopFieldTest {
+
+    public static void main(String[] args) {
+        SunToolkit toolkit = (SunToolkit) Toolkit.getDefaultToolkit();
+
+        Window window = new Frame("Window 1");
+        window.setSize(200, 200);
+        window.setAlwaysOnTop(true);
+        window.setVisible(true);
+        toolkit.realSync();
+
+        Dialog dialog = new Dialog(window, "Owned dialog 1");
+        dialog.setSize(200, 200);
+        dialog.setLocation(100, 100);
+        dialog.setVisible(true);
+        toolkit.realSync();
+
+        try {
+            if (!window.isAlwaysOnTop()) {
+                throw new RuntimeException("Window has wrong isAlwaysOnTop value");
+            }
+            if (!dialog.isAlwaysOnTop()) {
+                throw new RuntimeException("Dialog has wrong isAlwaysOnTop value");
+            }
+        } finally {
+            window.dispose();
+            dialog.dispose();
+        }
+
+        window = new Frame("Window 2");
+        window.setSize(200, 200);
+        window.setVisible(true);
+        toolkit.realSync();
+
+
+        dialog = new Dialog(window, "Owned dialog 2");
+        dialog.setSize(200, 200);
+        dialog.setLocation(100, 100);
+        dialog.setVisible(true);
+        toolkit.realSync();
+
+        window.setAlwaysOnTop(true);
+        toolkit.realSync();
+
+        try {
+            if (!window.isAlwaysOnTop()) {
+                throw new RuntimeException("Window has wrong isAlwaysOnTop value");
+            }
+            if (!dialog.isAlwaysOnTop()) {
+                throw new RuntimeException("Dialog has wrong isAlwaysOnTop value");
+            }
+        } finally {
+            window.dispose();
+            dialog.dispose();
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/Window/LocationByPlatform/LocationByPlatformTest.java	Tue Oct 15 13:54:01 2013 +0100
@@ -0,0 +1,75 @@
+/*
+ * 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 7092283
+ * @author Alexander Scherbatiy
+ * @summary Property Window.locationByPlatform is not cleared by calling
+ *          setVisible(false)
+ * @run main LocationByPlatformTest
+ */
+import java.awt.Window;
+
+public class LocationByPlatformTest {
+
+    public static void main(String[] args) {
+
+        Window window = new Window(null);
+        window.setSize(100, 100);
+        window.setLocationByPlatform(true);
+
+        if (!window.isLocationByPlatform()) {
+            throw new RuntimeException("Location by platform is not set");
+        }
+
+        window.setLocation(10, 10);
+
+        if (window.isLocationByPlatform()) {
+            throw new RuntimeException("Location by platform is not cleared");
+        }
+
+        window.setLocationByPlatform(true);
+        window.setBounds(20, 20, 50, 50);
+
+        if (window.isLocationByPlatform()) {
+            throw new RuntimeException("Location by platform is not cleared");
+        }
+
+        window.setLocationByPlatform(true);
+        window.setVisible(false);
+
+        if (window.isLocationByPlatform()) {
+            throw new RuntimeException("Location by platform is not cleared");
+        }
+
+        window.setLocationByPlatform(true);
+        window.setVisible(true);
+
+        if (window.isLocationByPlatform()) {
+            throw new RuntimeException("Location by platform is not cleared");
+        }
+
+        window.dispose();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/Window/WindowsLeak/WindowsLeak.java	Tue Oct 15 13:54:01 2013 +0100
@@ -0,0 +1,71 @@
+/*
+ * 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 8013563
+ * @summary Tests that windows are removed from windows list
+ * @run main/othervm -Xms32M -Xmx32M WindowsLeak
+*/
+
+import java.awt.*;
+import sun.awt.AppContext;
+
+import java.lang.ref.WeakReference;
+
+import java.util.Vector;
+
+public class WindowsLeak {
+
+    public static void main(String[] args) {
+        for (int i = 0; i < 100; i++)
+        {
+            Frame f = new Frame();
+            f.pack();
+            f.dispose();
+        }
+
+        Vector garbage = new Vector();
+        while (true)
+        {
+            try
+            {
+                garbage.add(new byte[1000]);
+            }
+            catch (OutOfMemoryError e)
+            {
+                break;
+            }
+        }
+        garbage = null;
+
+        Vector<WeakReference<Window>> windowList =
+                        (Vector<WeakReference<Window>>) AppContext.getAppContext().get(Window.class);
+
+        if (windowList != null && !windowList.isEmpty()) {
+            throw new RuntimeException("Test FAILED: Window list is not empty: " + windowList.size());
+        }
+
+        System.out.println("Test PASSED");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/dnd/DropTargetEnterExitTest/ExtraDragEnterTest.java	Tue Oct 15 13:54:01 2013 +0100
@@ -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.
+ */
+
+/**
+ * @test
+ * @bug 8024163
+ * @summary Checks the dragEnter event is correctly generated
+ * @library ../../regtesthelpers
+ * @build Util
+ * @compile ExtraDragEnterTest.java
+ * @run main/othervm ExtraDragEnterTest
+ * @author Petr Pchelko
+ */
+
+import test.java.awt.regtesthelpers.Util;
+
+import javax.swing.*;
+import java.awt.*;
+import java.awt.datatransfer.StringSelection;
+import java.awt.dnd.DnDConstants;
+import java.awt.dnd.DragGestureEvent;
+import java.awt.dnd.DragGestureListener;
+import java.awt.dnd.DragSource;
+import java.awt.dnd.DropTarget;
+import java.awt.dnd.DropTargetAdapter;
+import java.awt.dnd.DropTargetDragEvent;
+import java.awt.dnd.DropTargetDropEvent;
+import java.awt.event.InputEvent;
+import java.util.concurrent.atomic.AtomicInteger;
+
+public class ExtraDragEnterTest {
+
+    private static final int FRAME_SIZE = 100;
+    private static final int FRAME_LOCATION = 100;
+
+    private static AtomicInteger dragEnterCalled = new AtomicInteger(0);
+
+    private static volatile Panel mainPanel;
+    private static volatile Frame f;
+
+    private static void initAndShowUI() {
+        f = new Frame("Test frame");
+        f.setBounds(FRAME_LOCATION,FRAME_LOCATION,FRAME_SIZE,FRAME_SIZE);
+        mainPanel = new Panel();
+        mainPanel.setBounds(0, 0, FRAME_SIZE, FRAME_SIZE);
+        mainPanel.setBackground(Color.black);
+        mainPanel.setLayout(new GridLayout(2, 1));
+
+        final DraggablePanel dragSource = new DraggablePanel();
+        dragSource.setBackground(Color.yellow);
+        dragSource.setDropTarget(null);
+        mainPanel.add(dragSource);
+
+        Panel dropTarget = new Panel();
+        dropTarget.setBackground(Color.red);
+        DropTarget dt = new DropTarget(dropTarget, new DropTargetAdapter() {
+            @Override public void drop(DropTargetDropEvent dtde) { }
+
+            @Override
+            public void dragEnter(DropTargetDragEvent dtde) {
+                dragEnterCalled.incrementAndGet();
+            }
+        });
+        dropTarget.setDropTarget(dt);
+        mainPanel.add(dropTarget);
+
+        f.add(mainPanel);
+        f.setVisible(true);
+    }
+
+    public static void main(String[] args) throws Throwable {
+        try {
+
+            SwingUtilities.invokeAndWait(new Runnable() {
+                @Override
+                public void run() {
+                    initAndShowUI();
+                }
+            });
+
+            Robot r = new Robot();
+            Util.waitForIdle(r);
+            Point leftCorner = new Point(mainPanel.getLocationOnScreen());
+            leftCorner.translate(5, 5);
+            Point rightCorner = new Point(mainPanel.getLocationOnScreen());
+            rightCorner.translate(mainPanel.getWidth(), mainPanel.getHeight());
+            rightCorner.translate(-5, -5);
+            Util.drag(r, leftCorner, rightCorner, InputEvent.BUTTON1_MASK);
+            Util.waitForIdle(r);
+
+            int called = dragEnterCalled.get();
+            if (called != 1) {
+                throw new RuntimeException("Failed. Drag enter called " + called + " times. Expected 1" );
+            }
+        } finally {
+            if (f != null) {
+                f.dispose();
+            }
+        }
+    }
+
+    private static class DraggablePanel extends Panel implements DragGestureListener {
+
+        public DraggablePanel() {
+            (new DragSource()).createDefaultDragGestureRecognizer(this, DnDConstants.ACTION_COPY, this);
+        }
+
+        @Override
+        public void dragGestureRecognized(DragGestureEvent dge) {
+            dge.startDrag(Cursor.getDefaultCursor(), new StringSelection("test"));
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/dnd/DropTargetEnterExitTest/MissedDragExitTest.java	Tue Oct 15 13:54:01 2013 +0100
@@ -0,0 +1,128 @@
+/*
+ * 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 8024163
+ * @summary Checks that dragExit is generated when the new DropTarget is created under the drag
+ * @library ../../regtesthelpers
+ * @build Util
+ * @compile MissedDragExitTest.java
+ * @run main/othervm MissedDragExitTest
+ * @author Petr Pchelko
+ */
+
+import test.java.awt.regtesthelpers.Util;
+
+import javax.swing.*;
+import java.awt.*;
+import java.awt.datatransfer.StringSelection;
+import java.awt.dnd.DnDConstants;
+import java.awt.dnd.DragGestureEvent;
+import java.awt.dnd.DragGestureListener;
+import java.awt.dnd.DragSource;
+import java.awt.dnd.DropTarget;
+import java.awt.dnd.DropTargetAdapter;
+import java.awt.dnd.DropTargetDragEvent;
+import java.awt.dnd.DropTargetDropEvent;
+import java.awt.dnd.DropTargetEvent;
+import java.awt.event.InputEvent;
+
+public class MissedDragExitTest {
+
+    private static final int FRAME_SIZE = 100;
+    private static final int FRAME_LOCATION = 100;
+
+    private static volatile boolean dragExitCalled = false;
+
+    private static volatile Frame f;
+
+    private static void initAndShowUI() {
+        f = new Frame("Test frame");
+        f.setBounds(FRAME_LOCATION,FRAME_LOCATION,FRAME_SIZE,FRAME_SIZE);
+
+        final DraggablePanel dragSource = new DraggablePanel();
+        dragSource.setBackground(Color.yellow);
+        DropTarget dt = new DropTarget(dragSource, new DropTargetAdapter() {
+            @Override public void drop(DropTargetDropEvent dtde) { }
+
+            @Override
+            public void dragExit(DropTargetEvent dte) {
+                dragExitCalled = true;
+            }
+
+            @Override
+            public void dragOver(DropTargetDragEvent dtde) {
+                Panel newDropTarget = new Panel();
+                newDropTarget.setDropTarget(new DropTarget());
+                newDropTarget.setBackground(Color.red);
+                newDropTarget.setBounds(0, 0, FRAME_SIZE, FRAME_SIZE);
+                dragSource.add(newDropTarget);
+            }
+        });
+        dragSource.setDropTarget(dt);
+        f.add(dragSource);
+
+        f.setVisible(true);
+    }
+
+    public static void main(String[] args) throws Throwable {
+        try {
+
+            SwingUtilities.invokeAndWait(new Runnable() {
+                @Override
+                public void run() {
+                    initAndShowUI();
+                }
+            });
+
+            Robot r = new Robot();
+            Util.waitForIdle(r);
+            Util.drag(r,
+                    new Point(FRAME_LOCATION + FRAME_SIZE / 3, FRAME_LOCATION + FRAME_SIZE / 3),
+                    new Point(FRAME_LOCATION + FRAME_SIZE / 3 * 2, FRAME_LOCATION + FRAME_SIZE / 3 * 2),
+                    InputEvent.BUTTON1_MASK);
+            Util.waitForIdle(r);
+
+            if (!dragExitCalled) {
+                throw new RuntimeException("Failed. Drag exit was not called" );
+            }
+        } finally {
+            if (f != null) {
+                f.dispose();
+            }
+        }
+    }
+
+    private static class DraggablePanel extends Panel implements DragGestureListener {
+
+        public DraggablePanel() {
+            (new DragSource()).createDefaultDragGestureRecognizer(this, DnDConstants.ACTION_COPY, this);
+        }
+
+        @Override
+        public void dragGestureRecognized(DragGestureEvent dge) {
+            dge.startDrag(Cursor.getDefaultCursor(), new StringSelection("test"));
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/print/PrinterJob/CustomPrintService/PrintDialog.java	Tue Oct 15 13:54:01 2013 +0100
@@ -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.
+ */
+
+import java.awt.*;
+import java.awt.print.PrinterJob;
+import javax.print.PrintServiceLookup;
+
+/**
+ * @test
+ * @bug 6870661
+ * @summary Verify that no native dialog is opened for a custom PrintService
+ * @run main/manual PrintDialog
+ * @author reinhapa
+ */
+public class PrintDialog {
+
+    private static final String instructions =
+        "This test shows a non native print dialog having a 'test' print service\n" +
+        "selected. No other options are selectable on the General tab. The other\n" +
+        "tabs are as follows:\n" +
+        "Page Setup: Media & Margins enabled, Orientation disabled\n" +
+        "Appearance: All parts disabled\n\n" +
+        "Test passes if the dialog is shown as described above.";
+
+    public static void main(String[] args) throws Exception {
+        // instruction dialog
+        Frame instruction = new Frame("Verify that no native print dialog is showed");
+        instruction.add(new TextArea(instructions));
+        instruction.pack();
+        instruction.show();
+        // test begin
+        PrintServiceStub service = new PrintServiceStub("test");
+        PrintServiceLookup.registerService(service);
+        PrinterJob job = PrinterJob.getPrinterJob();
+        job.setPrintService(service);
+        job.printDialog();
+        System.out.println("test passed");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/print/PrinterJob/CustomPrintService/PrintServiceStub.java	Tue Oct 15 13:54:01 2013 +0100
@@ -0,0 +1,160 @@
+/*
+ * 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.
+ */
+
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+
+import javax.print.DocFlavor;
+import javax.print.DocPrintJob;
+import javax.print.PrintService;
+import javax.print.ServiceUIFactory;
+import javax.print.attribute.Attribute;
+import javax.print.attribute.AttributeSet;
+import javax.print.attribute.HashPrintServiceAttributeSet;
+import javax.print.attribute.PrintServiceAttribute;
+import javax.print.attribute.PrintServiceAttributeSet;
+import javax.print.attribute.standard.Media;
+import javax.print.attribute.standard.MediaSizeName;
+import javax.print.attribute.standard.PrinterInfo;
+import javax.print.attribute.standard.PrinterIsAcceptingJobs;
+import javax.print.attribute.standard.PrinterMakeAndModel;
+import javax.print.attribute.standard.PrinterName;
+import javax.print.attribute.standard.PrinterState;
+import javax.print.event.PrintServiceAttributeListener;
+
+/**
+ * Stub implementation of a custom {@link PrintService}.
+ *
+ * @author reinhapa
+ */
+public class PrintServiceStub implements PrintService {
+    private final String _name;
+    private final Set<DocFlavor> _flavors;
+    private final Map<Class<?>, Object> _attributes;
+
+    public PrintServiceStub(String name) {
+        _name = name;
+        _flavors = new HashSet<DocFlavor>();
+        _flavors.add(DocFlavor.SERVICE_FORMATTED.PAGEABLE);
+        _flavors.add(DocFlavor.SERVICE_FORMATTED.PRINTABLE);
+        _attributes = new HashMap<>();
+        _attributes.put(PrinterName.class, new PrinterName(name, null));
+        _attributes.put(PrinterState.class, PrinterState.IDLE);
+        _attributes.put(PrinterInfo.class, new PrinterInfo("Custom location",
+                null));
+        _attributes.put(PrinterIsAcceptingJobs.class,
+                PrinterIsAcceptingJobs.ACCEPTING_JOBS);
+        _attributes.put(PrinterMakeAndModel.class, new PrinterMakeAndModel(
+                "Custom printer", null));
+        _attributes.put(Media.class, new Media[] { MediaSizeName.ISO_A4 });
+    }
+
+    @Override
+    public String getName() {
+        return _name;
+    }
+
+    @Override
+    public boolean isDocFlavorSupported(DocFlavor flavor) {
+        return _flavors.contains(flavor);
+    }
+
+    @Override
+    public Object getSupportedAttributeValues(
+            Class<? extends Attribute> category, DocFlavor flavor,
+            AttributeSet attributes) {
+        return _attributes.get(category);
+    }
+
+    @Override
+    public boolean isAttributeCategorySupported(
+            Class<? extends Attribute> category) {
+        return _attributes.containsKey(category);
+    }
+
+    @Override
+    public <T extends PrintServiceAttribute> T getAttribute(Class<T> category) {
+        return category.cast(_attributes.get(category));
+    }
+
+    @Override
+    public PrintServiceAttributeSet getAttributes() {
+        return new HashPrintServiceAttributeSet(_attributes.values().toArray(
+                new PrintServiceAttribute[_attributes.size()]));
+    }
+
+    @Override
+    public DocFlavor[] getSupportedDocFlavors() {
+        return _flavors.toArray(new DocFlavor[_flavors.size()]);
+    }
+
+    // not implemented methods
+
+    @Override
+    public DocPrintJob createPrintJob() {
+        return null;
+    }
+
+    @Override
+    public void addPrintServiceAttributeListener(
+            PrintServiceAttributeListener listener) {
+
+    }
+
+    @Override
+    public void removePrintServiceAttributeListener(
+            PrintServiceAttributeListener listener) {
+
+    }
+
+    @Override
+    public Class<?>[] getSupportedAttributeCategories() {
+        return null;
+    }
+
+    @Override
+    public Object getDefaultAttributeValue(Class<? extends Attribute> category) {
+        return null;
+    }
+
+    @Override
+    public boolean isAttributeValueSupported(Attribute attrval,
+            DocFlavor flavor, AttributeSet attributes) {
+        return false;
+    }
+
+    @Override
+    public AttributeSet getUnsupportedAttributes(DocFlavor flavor,
+            AttributeSet attributes) {
+        return null;
+    }
+
+    @Override
+    public ServiceUIFactory getServiceUIFactory() {
+        return null;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/print/PrinterJob/CustomPrintService/SetPrintServiceTest.java	Tue Oct 15 13:54:01 2013 +0100
@@ -0,0 +1,48 @@
+/*
+ * 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.
+ */
+
+import java.awt.print.PrinterException;
+import java.awt.print.PrinterJob;
+
+/**
+ * @test
+ * @bug 6870661
+ * @summary tests setPrintService() with a custom implementation
+ * @author reinhapa
+ */
+public class SetPrintServiceTest {
+
+    public static void main(String[] args) {
+        PrintServiceStub service = new PrintServiceStub("CustomPrintService");
+        PrinterJob printerJob = PrinterJob.getPrinterJob();
+        try {
+            printerJob.setPrintService(service);
+            System.out.println("Test Passed");
+        } catch (PrinterException e) {
+            throw new RuntimeException("Test FAILED", e);
+        }
+    }
+
+}
--- a/jdk/test/java/lang/invoke/lambda/LogGeneratedClassesTest.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/test/java/lang/invoke/lambda/LogGeneratedClassesTest.java	Tue Oct 15 13:54:01 2013 +0100
@@ -167,8 +167,12 @@
     public void testDumpDirNotWritable() throws IOException {
         if (! Files.getFileStore(Paths.get("."))
                    .supportsFileAttributeView(PosixFileAttributeView.class)) {
-            // No easy way to setup readonly directory
-            throw new SkipException("Posix not supported");
+            // No easy way to setup readonly directory without POSIX
+            // We would like to skip the test with a cause with
+            //     throw new SkipException("Posix not supported");
+            // but jtreg will report failure so we just pass the test
+            // which we can look at if jtreg changed its behavior
+            return;
         }
 
         Files.createDirectory(Paths.get("readOnly"),
--- a/jdk/test/java/lang/management/MemoryMXBean/LowMemoryTest2.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/test/java/lang/management/MemoryMXBean/LowMemoryTest2.java	Tue Oct 15 13:54:01 2013 +0100
@@ -26,7 +26,7 @@
  *
  * The test set a listener to be notified when any of the non-heap pools
  * exceed 80%. It then starts a thread that continuously loads classes.
- * In the HotSpot implementation this causes perm space to be consumed.
+ * In the HotSpot implementation this causes metaspace to be consumed.
  * Test completes when we the notification is received or an OutOfMemory
  * is generated.
  */
@@ -100,7 +100,14 @@
 
             // TestNNNNNN
 
-            String name = "Test" + Integer.toString(count++);
+            int load_count = count++;
+            if (load_count > 999999) {
+                // The test will create a corrupt class file if the count
+                // exceeds 999999. Fix the test if this exception is thrown.
+                throw new RuntimeException("Load count exceeded");
+            }
+
+            String name = "Test" + Integer.toString(load_count);
 
             byte value[];
             try {
@@ -133,8 +140,9 @@
          * Note: Once the usage threshold has been exceeded the low memory
          * detector thread will attempt to deliver its notification - this can
          * potentially create a race condition with this thread contining to
-         * fill up perm space. To avoid the low memory detector getting an OutOfMemory
-         * we throttle this thread once the threshold has been exceeded.
+         * fill up metaspace. To avoid the low memory detector getting an
+         * OutOfMemory we throttle this thread once the threshold has been
+         * exceeded.
          */
         public void run() {
             List pools = ManagementFactory.getMemoryPoolMXBeans();
@@ -180,7 +188,7 @@
 
         // Set threshold of 80% of all NON_HEAP memory pools
         // In the Hotspot implementation this means we should get a notification
-        // if the CodeCache or perm generation fills up.
+        // if the CodeCache or metaspace fills up.
 
         while (iter.hasNext()) {
             MemoryPoolMXBean p = (MemoryPoolMXBean) iter.next();
@@ -188,7 +196,12 @@
 
                 // set threshold
                 MemoryUsage mu = p.getUsage();
-                long threshold = (mu.getMax() * 80) / 100;
+                long max = mu.getMax();
+                if (max < 0) {
+                    throw new RuntimeException("There is no maximum set for "
+                            + p.getName() + " memory pool so the test is invalid");
+                }
+                long threshold = (max * 80) / 100;
 
                 p.setUsageThreshold(threshold);
 
--- a/jdk/test/java/lang/management/MemoryMXBean/LowMemoryTest2.sh	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/test/java/lang/management/MemoryMXBean/LowMemoryTest2.sh	Tue Oct 15 13:54:01 2013 +0100
@@ -51,14 +51,17 @@
 
 # Run test with each GC configuration
 # 
-# Notes: To ensure that perm gen fills up we disable class unloading.
-# Also we set the max perm space to 8MB - otherwise the test takes too
+# Notes: To ensure that metaspace fills up we disable class unloading.
+# Also we set the max metaspace to 8MB - otherwise the test takes too
 # long to run. 
 
-go -noclassgc -XX:PermSize=8m -XX:MaxPermSize=8m -XX:+UseSerialGC LowMemoryTest2
-go -noclassgc -XX:PermSize=8m -XX:MaxPermSize=8m -XX:+UseParallelGC LowMemoryTest2
-go -noclassgc -XX:PermSize=8m -XX:MaxPermSize=8m -XX:+UseParNewGC -XX:+UseConcMarkSweepGC \
-    LowMemoryTest2
+go -noclassgc -XX:MaxMetaspaceSize=16m -XX:+UseSerialGC LowMemoryTest2
+go -noclassgc -XX:MaxMetaspaceSize=16m -XX:+UseParallelGC LowMemoryTest2
+go -noclassgc -XX:MaxMetaspaceSize=16m -XX:+UseParNewGC -XX:+UseConcMarkSweepGC LowMemoryTest2
+
+# Test class metaspace - might hit MaxMetaspaceSize instead if
+# UseCompressedClassPointers is off or if 32 bit.
+go -noclassgc -XX:MaxMetaspaceSize=16m -XX:CompressedClassSpaceSize=4m LowMemoryTest2
 
 echo ''
 if [ $failures -gt 0 ];
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/lang/reflect/Method/invoke/TestPrivateInterfaceMethodReflect.java	Tue Oct 15 13:54:01 2013 +0100
@@ -0,0 +1,122 @@
+/*
+ * 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 8026213
+ * @summary Reflection support for private methods in interfaces
+ * @author  Robert Field
+ * @run main TestPrivateInterfaceMethodReflect
+ */
+
+import java.lang.reflect.*;
+
+import jdk.internal.org.objectweb.asm.ClassWriter;
+import jdk.internal.org.objectweb.asm.MethodVisitor;
+import jdk.internal.org.objectweb.asm.Opcodes;
+
+public class TestPrivateInterfaceMethodReflect {
+
+    static final String INTERFACE_NAME = "PrivateInterfaceMethodReflectTest_Interface";
+    static final String CLASS_NAME = "PrivateInterfaceMethodReflectTest_Class";
+    static final int EXPECTED = 1234;
+
+    static class TestClassLoader extends ClassLoader implements Opcodes {
+
+        @Override
+        public Class findClass(String name) throws ClassNotFoundException {
+            byte[] b;
+            try {
+                b = loadClassData(name);
+            } catch (Throwable th) {
+                // th.printStackTrace();
+                throw new ClassNotFoundException("Loading error", th);
+            }
+            return defineClass(name, b, 0, b.length);
+        }
+
+        private byte[] loadClassData(String name) throws Exception {
+            ClassWriter cw = new ClassWriter(0);
+            MethodVisitor mv;
+            switch (name) {
+                case INTERFACE_NAME:
+                    cw.visit(V1_8, ACC_ABSTRACT | ACC_INTERFACE | ACC_PUBLIC, INTERFACE_NAME, null, "java/lang/Object", null);
+                    {
+                        mv = cw.visitMethod(ACC_PRIVATE, "privInstance", "()I", null, null);
+                        mv.visitCode();
+                        mv.visitLdcInsn(EXPECTED);
+                        mv.visitInsn(IRETURN);
+                        mv.visitMaxs(1, 1);
+                        mv.visitEnd();
+                    }
+                    break;
+                case CLASS_NAME:
+                    cw.visit(52, ACC_SUPER | ACC_PUBLIC, CLASS_NAME, null, "java/lang/Object", new String[]{INTERFACE_NAME});
+                    {
+                        mv = cw.visitMethod(ACC_PUBLIC, "<init>", "()V", null, null);
+                        mv.visitCode();
+                        mv.visitVarInsn(ALOAD, 0);
+                        mv.visitMethodInsn(INVOKESPECIAL, "java/lang/Object", "<init>", "()V");
+                        mv.visitInsn(RETURN);
+                        mv.visitMaxs(1, 1);
+                        mv.visitEnd();
+                    }
+                    break;
+                default:
+                    break;
+            }
+            cw.visitEnd();
+
+            return cw.toByteArray();
+        }
+    }
+
+    public static void main(String[] args) throws Exception {
+        TestClassLoader tcl = new TestClassLoader();
+        Class<?> itf = tcl.loadClass(INTERFACE_NAME);
+        Class<?> k = tcl.loadClass(CLASS_NAME);
+        Object inst = k.newInstance();
+        Method[] meths = itf.getDeclaredMethods();
+        if (meths.length != 1) {
+            throw new Exception("Expected one method in " + INTERFACE_NAME + " instead " + meths.length);
+        }
+
+        Method m = meths[0];
+        int mod = m.getModifiers();
+        if ((mod & Modifier.PRIVATE) == 0) {
+            throw new Exception("Expected " + m + " to be private");
+        }
+        if ((mod & Modifier.STATIC) != 0) {
+            throw new Exception("Expected " + m + " to be instance method");
+        }
+
+        m.setAccessible(true);
+        for (int i = 1; i < 200; i++) {
+            if (!m.invoke(inst).equals(EXPECTED)) {
+                throw new Exception("Expected " + EXPECTED + " from " + m);
+            }
+        }
+
+        System.out.println("Passed.");
+    }
+}
--- a/jdk/test/java/net/HttpURLPermission/HttpURLPermissionTest.java	Tue Oct 15 09:27:32 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,204 +0,0 @@
-/*
- * 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.net.HttpURLPermission;
-import java.io.*;
-
-/**
- * @test
- * @bug 8010464
- */
-
-public class HttpURLPermissionTest {
-
-    // super class for all test types
-    abstract static class Test {
-        boolean expected;
-        abstract boolean execute();
-    };
-
-    // Tests URL part of implies() method. This is the main test.
-    static class URLImpliesTest extends Test {
-        String arg1, arg2;
-
-        URLImpliesTest(String arg1, String arg2, boolean expected) {
-            this.arg1 = arg1;
-            this.arg2 = arg2;
-            this.expected = expected;
-        }
-
-          boolean execute() {
-            HttpURLPermission p1 = new HttpURLPermission (arg1, "GET:*");
-            HttpURLPermission p2 = new HttpURLPermission (arg2, "GET:*");
-            boolean result = p1.implies(p2);
-            return result == expected;
-        }
-    };
-
-    static URLImpliesTest imtest(String arg1, String arg2, boolean expected) {
-        return new URLImpliesTest(arg1, arg2, expected);
-    }
-
-    static class ActionImpliesTest extends Test {
-        String arg1, arg2;
-
-        ActionImpliesTest(String arg1, String arg2, boolean expected) {
-            this.arg1 = arg1;
-            this.arg2 = arg2;
-            this.expected = expected;
-        }
-
-          boolean execute() {
-            String url1 = "http://www.foo.com/-";
-            String url2 = "http://www.foo.com/a/b";
-            HttpURLPermission p1 = new HttpURLPermission(url1, arg1);
-            HttpURLPermission p2 = new HttpURLPermission(url2, arg2);
-            boolean result = p1.implies(p2);
-            return result == expected;
-        }
-    }
-
-    static ActionImpliesTest actest(String arg1, String arg2, boolean expected) {
-        return new ActionImpliesTest(arg1, arg2, expected);
-    }
-
-    static Test[] pathImplies = {
-        // single
-        imtest("http://www.foo.com/", "http://www.foo.com/", true),
-        imtest("http://www.bar.com/", "http://www.foo.com/", false),
-        imtest("http://www.foo.com/a/b", "http://www.foo.com/", false),
-        imtest("http://www.foo.com/a/b", "http://www.foo.com/a/b/c", false),
-        // wildcard
-        imtest("http://www.foo.com/a/b/*", "http://www.foo.com/a/b/c", true),
-        imtest("http://www.foo.com/a/b/*", "http://www.foo.com/a/b/*", true),
-        imtest("http://www.foo.com/a/b/*", "http://www.foo.com/a/b/c#frag", true),
-        imtest("http://www.foo.com/a/b/*", "http://www.foo.com/a/b/c#frag?foo=foo", true),
-        imtest("http://www.foo.com/a/b/*", "http://www.foo.com/b/b/c", false),
-        imtest("http://www.foo.com/a/b/*", "http://www.foo.com/a/b/c.html", true),
-        imtest("http://www.foo.com/a/b/*", "http://www.foo.com/a/b/c.html", true),
-        imtest("http://www.foo.com/a/b/*", "https://www.foo.com/a/b/c", false),
-        // recursive
-        imtest("http://www.foo.com/a/b/-", "http://www.foo.com/a/b/-", true),
-        imtest("http://www.foo.com/a/b/-", "http://www.foo.com/a/b/c", true),
-        imtest("http://www.foo.com/a/b/-", "http://www.foo.com/a/b/c#frag", true),
-        imtest("http://www.foo.com/a/b/-", "http://www.foo.com/a/b/c#frag?foo=foo", true),
-        imtest("http://www.foo.com/a/b/-", "http://www.foo.com/b/b/c", false),
-        imtest("http://www.foo.com/a/b/-", "http://www.foo.com/a/b/c.html", true),
-        imtest("http://www.foo.com/a/b/-", "http://www.foo.com/a/b/c.html", true),
-        imtest("http://www.foo.com/a/b/-", "http://www.foo.com/a/b/c/d/e.html", true),
-        imtest("https://www.foo.com/a/b/-", "http://www.foo.com/a/b/c/d/e.html", false),
-        imtest("http://www.foo.com/a/b/-", "http://www.foo.com/a/b/c/d/e#frag", true),
-        imtest("http://www.foo.com/a/b/-", "https://www.foo.com/a/b/c", false),
-        // special cases
-        imtest("http:*", "https://www.foo.com/a/b/c", false),
-        imtest("http:*", "http://www.foo.com/a/b/c", true),
-        imtest("http:*", "http://foo/bar", true),
-        imtest("http://foo/bar", "https://foo/bar", false)
-    };
-
-    static Test[] actionImplies = {
-        actest("GET", "GET", true),
-        actest("GET", "POST", false),
-        actest("GET:", "PUT", false),
-        actest("GET:", "GET", true),
-        actest("GET,POST", "GET", true),
-        actest("GET,POST:", "GET", true),
-        actest("GET:X-Foo", "GET:x-foo", true),
-        actest("GET:X-Foo,X-bar", "GET:x-foo", true),
-        actest("GET:X-Foo", "GET:x-boo", false),
-        actest("GET:X-Foo,X-Bar", "GET:x-bar,x-foo", true),
-        actest("GET:X-Bar,X-Foo,X-Bar,Y-Foo", "GET:x-bar,x-foo", true),
-        actest("GET:*", "GET:x-bar,x-foo", true),
-        actest("*:*", "GET:x-bar,x-foo", true)
-    };
-
-    static boolean failed = false;
-
-    public static void main(String args[]) throws Exception {
-        for (int i=0; i<pathImplies.length ; i++) {
-            URLImpliesTest test = (URLImpliesTest)pathImplies[i];
-            Exception caught = null;
-            boolean result = false;
-            try {
-                result = test.execute();
-            } catch (Exception e) {
-                caught = e;
-                e.printStackTrace();
-            }
-            if (!result) {
-                failed = true;
-                System.out.println ("test failed: " + test.arg1 + ": " +
-                        test.arg2 + " Exception: " + caught);
-            }
-            System.out.println ("path test " + i + " OK");
-
-        }
-        for (int i=0; i<actionImplies.length ; i++) {
-            ActionImpliesTest test = (ActionImpliesTest)actionImplies[i];
-            Exception caught = null;
-            boolean result = false;
-            try {
-                result = test.execute();
-            } catch (Exception e) {
-                caught = e;
-                e.printStackTrace();
-            }
-            if (!result) {
-                failed = true;
-                System.out.println ("test failed: " + test.arg1 + ": " +
-                        test.arg2 + " Exception: " + caught);
-            }
-            System.out.println ("action test " + i + " OK");
-        }
-
-        serializationTest("http://www.foo.com/-", "GET,DELETE:*");
-        serializationTest("https://www.foo.com/-", "POST:X-Foo");
-        serializationTest("https:*", "*:*");
-        serializationTest("http://www.foo.com/a/b/s/", "POST:X-Foo");
-        serializationTest("http://www.foo.com/a/b/s/*", "POST:X-Foo");
-
-        if (failed) {
-            throw new RuntimeException("some tests failed");
-        }
-
-    }
-
-    static void serializationTest(String name, String actions)
-        throws Exception {
-
-        HttpURLPermission out = new HttpURLPermission(name, actions);
-
-        ByteArrayOutputStream baos = new ByteArrayOutputStream();
-        ObjectOutputStream o = new ObjectOutputStream(baos);
-        o.writeObject(out);
-        ByteArrayInputStream bain = new ByteArrayInputStream(baos.toByteArray());
-        ObjectInputStream i = new ObjectInputStream(bain);
-        HttpURLPermission in = (HttpURLPermission)i.readObject();
-        if (!in.equals(out)) {
-            System.out.println ("FAIL");
-            System.out.println ("in = " + in);
-            System.out.println ("out = " + out);
-            failed = true;
-        }
-    }
-}
--- a/jdk/test/java/net/HttpURLPermission/URLTest.java	Tue Oct 15 09:27:32 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,240 +0,0 @@
-/*
- * 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.net.HttpURLPermission;
-/*
- * Run the tests once without security manager and once with
- *
- * @test
- * @bug 8010464
- * @compile ../../../com/sun/net/httpserver/SimpleSSLContext.java
- * @run main/othervm/policy=policy.1 URLTest one
- * @run main/othervm URLTest one
- * @run main/othervm/policy=policy.2 URLTest two
- * @run main/othervm URLTest two
- * @run main/othervm/policy=policy.3 URLTest three
- * @run main/othervm URLTest three
- */
-
-import java.net.*;
-import java.io.*;
-import java.util.*;
-import java.util.concurrent.*;
-import java.util.logging.*;
-import com.sun.net.httpserver.*;
-import javax.net.ssl.*;
-
-public class URLTest {
-    static boolean failed = false;
-
-    public static void main (String[] args) throws Exception {
-        boolean no = false, yes = true;
-
-        if (System.getSecurityManager() == null) {
-            yes = false;
-        }
-        createServers();
-        InetSocketAddress addr1 = httpServer.getAddress();
-        int port1 = addr1.getPort();
-        InetSocketAddress addr2 = httpsServer.getAddress();
-        int port2 = addr2.getPort();
-
-          // each of the following cases is run with a different policy file
-
-        switch (args[0]) {
-          case "one":
-            String url1 = "http://127.0.0.1:"+ port1 + "/foo.html";
-            String url2 = "https://127.0.0.1:"+ port2 + "/foo.html";
-            String url3 = "http://127.0.0.1:"+ port1 + "/bar.html";
-            String url4 = "https://127.0.0.1:"+ port2 + "/bar.html";
-
-            // simple positive test. Should succceed
-            test(url1, "GET", "X-Foo", no);
-            test(url1, "GET", "Z-Bar", "X-Foo", no);
-            test(url1, "GET", "X-Foo", "Z-Bar", no);
-            test(url1, "GET", "Z-Bar", no);
-            test(url2, "POST", "X-Fob", no);
-
-            // reverse the methods, should fail
-            test(url1, "POST", "X-Foo", yes);
-            test(url2, "GET", "X-Fob", yes);
-
-            // different URLs, should fail
-            test(url3, "GET", "X-Foo", yes);
-            test(url4, "POST", "X-Fob", yes);
-            break;
-
-          case "two":
-            url1 = "http://127.0.0.1:"+ port1 + "/foo.html";
-            url2 = "https://127.0.0.1:"+ port2 + "/foo.html";
-            url3 = "http://127.0.0.1:"+ port1 + "/bar.html";
-            url4 = "https://127.0.0.1:"+ port2 + "/bar.html";
-
-            // simple positive test. Should succceed
-            test(url1, "GET", "X-Foo", no);
-            test(url2, "POST", "X-Fob", no);
-            test(url3, "GET", "X-Foo", no);
-            test(url4, "POST", "X-Fob", no);
-            break;
-
-          case "three":
-            url1 = "http://127.0.0.1:"+ port1 + "/foo.html";
-            url2 = "https://127.0.0.1:"+ port2 + "/a/c/d/e/foo.html";
-            url3 = "http://127.0.0.1:"+ port1 + "/a/b/c";
-            url4 = "https://127.0.0.1:"+ port2 + "/a/b/c";
-
-            test(url1, "GET", "X-Foo", yes);
-            test(url2, "POST", "X-Zxc", no);
-            test(url3, "DELETE", "Y-Foo", no);
-            test(url4, "POST", "Y-Foo", yes);
-            break;
-        }
-        shutdown();
-        if (failed) {
-            throw new RuntimeException("Test failed");
-        }
-    }
-
-    public static void test (
-        String u, String method,
-        String header, boolean exceptionExpected
-    )
-        throws Exception
-    {
-        test(u, method, header, null, exceptionExpected);
-    }
-
-    public static void test (
-        String u, String method,
-        String header1, String header2, boolean exceptionExpected
-    )
-        throws Exception
-    {
-        URL url = new URL(u);
-        System.out.println ("url=" + u + " method="+method + " header1="+header1
-                +" header2 = " + header2
-                +" exceptionExpected="+exceptionExpected);
-        HttpURLConnection urlc = (HttpURLConnection)url.openConnection();
-        if (urlc instanceof HttpsURLConnection) {
-            HttpsURLConnection ssl = (HttpsURLConnection)urlc;
-            ssl.setHostnameVerifier(new HostnameVerifier() {
-                public boolean verify(String host, SSLSession sess) {
-                    return true;
-                }
-            });
-            ssl.setSSLSocketFactory (ctx.getSocketFactory());
-        }
-        urlc.setRequestMethod(method);
-        if (header1 != null) {
-            urlc.addRequestProperty(header1, "foo");
-        }
-        if (header2 != null) {
-            urlc.addRequestProperty(header2, "bar");
-        }
-        try {
-            int g = urlc.getResponseCode();
-            if (exceptionExpected) {
-                failed = true;
-                System.out.println ("FAIL");
-                return;
-            }
-            if (g != 200) {
-                String s = Integer.toString(g);
-                throw new RuntimeException("unexpected response "+ s);
-            }
-            InputStream is = urlc.getInputStream();
-            int c,count=0;
-            byte[] buf = new byte[1024];
-            while ((c=is.read(buf)) != -1) {
-                count += c;
-            }
-            is.close();
-        } catch (RuntimeException e) {
-            if (! (e instanceof SecurityException) &&
-                        !(e.getCause() instanceof SecurityException)  ||
-                        !exceptionExpected)
-            {
-                System.out.println ("FAIL");
-                //e.printStackTrace();
-                failed = true;
-            }
-        }
-        System.out.println ("OK");
-    }
-
-    static HttpServer httpServer;
-    static HttpsServer httpsServer;
-    static HttpContext c, cs;
-    static ExecutorService e, es;
-    static SSLContext ctx;
-
-    // These ports need to be hard-coded until we support port number
-    // ranges in the permission class
-
-    static final int PORT1 = 12567;
-    static final int PORT2 = 12568;
-
-    static void createServers() throws Exception {
-        InetSocketAddress addr1 = new InetSocketAddress (PORT1);
-        InetSocketAddress addr2 = new InetSocketAddress (PORT2);
-        httpServer = HttpServer.create (addr1, 0);
-        httpsServer = HttpsServer.create (addr2, 0);
-
-        MyHandler h = new MyHandler();
-
-        c = httpServer.createContext ("/", h);
-        cs = httpsServer.createContext ("/", h);
-        e = Executors.newCachedThreadPool();
-        es = Executors.newCachedThreadPool();
-        httpServer.setExecutor (e);
-        httpsServer.setExecutor (es);
-
-        // take the keystore from elsewhere in test hierarchy
-        String keysdir = System.getProperty("test.src")
-                + "/../../../com/sun/net/httpserver/";
-        ctx = new SimpleSSLContext(keysdir).get();
-        httpsServer.setHttpsConfigurator(new HttpsConfigurator (ctx));
-
-        httpServer.start();
-        httpsServer.start();
-    }
-
-    static void shutdown() {
-        httpServer.stop(1);
-        httpsServer.stop(1);
-        e.shutdown();
-        es.shutdown();
-    }
-
-    static class MyHandler implements HttpHandler {
-
-        MyHandler() {
-        }
-
-        public void handle(HttpExchange x) throws IOException {
-            x.sendResponseHeaders(200, -1);
-            x.close();
-        }
-    }
-
-}
--- a/jdk/test/java/net/HttpURLPermission/policy.1	Tue Oct 15 09:27:32 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,48 +0,0 @@
-//
-// 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.
-//
-
-grant {
-    permission java.net.HttpURLPermission "http://127.0.0.1:12567/foo.html", "GET:X-Foo,Z-Bar";
-    permission java.net.HttpURLPermission "https://127.0.0.1:12568/foo.html", "POST:X-Fob,T-Bar";
-
-    // needed for HttpServer
-    permission "java.net.SocketPermission" "localhost:1024-", "listen,resolve,accept";
-    permission "java.util.PropertyPermission" "test.src", "read";
-    permission java.io.FilePermission "${test.src}/../../../com/sun/net/httpserver/testkeys", "read";
-
-    //permission "java.util.logging.LoggingPermission" "control";
-    //permission "java.io.FilePermission" "/tmp/-", "read,write";
-    permission "java.lang.RuntimePermission" "modifyThread";
-    permission "java.lang.RuntimePermission" "setFactory";
-};
-
-// Normal permissions that aren't granted when run under jtreg
-
-grant codeBase "file:${{java.ext.dirs}}/*" {
-        permission java.security.AllPermission;
-};
-
-grant codeBase "file:${{java.home}}/jre/lib/rt.jar" {
-        permission java.security.AllPermission;
-};
-
--- a/jdk/test/java/net/HttpURLPermission/policy.2	Tue Oct 15 09:27:32 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,46 +0,0 @@
-//
-// 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.
-//
-
-grant {
-    permission java.net.HttpURLPermission "http://127.0.0.1:12567/*", "GET:X-Foo";
-    permission java.net.HttpURLPermission "https://127.0.0.1:12568/*", "POST:X-Fob";
-
-    // needed for HttpServer
-    permission "java.net.SocketPermission" "localhost:1024-", "listen,resolve,accept";
-    permission "java.util.PropertyPermission" "test.src", "read";
-    permission java.io.FilePermission "${test.src}/../../../com/sun/net/httpserver/testkeys", "read";
-
-    //permission "java.util.logging.LoggingPermission" "control";
-    //permission "java.io.FilePermission" "/tmp/-", "read,write";
-    permission "java.lang.RuntimePermission" "modifyThread";
-    permission "java.lang.RuntimePermission" "setFactory";
-};
-
-grant codeBase "file:${{java.ext.dirs}}/*" {
-        permission java.security.AllPermission;
-};
-
-grant codeBase "file:///export/repos/jdk8/build/linux-x86_64-normal-server-fastdebug/images/j2sdk-image/jre/lib/rt.jar" {
-        permission java.security.AllPermission;
-};
-
--- a/jdk/test/java/net/HttpURLPermission/policy.3	Tue Oct 15 09:27:32 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,48 +0,0 @@
-//
-// 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.
-//
-
-grant {
-    permission java.net.HttpURLPermission "http://127.0.0.1:12567/a/b/-", "DELETE,GET:X-Foo,Y-Foo";
-    permission java.net.HttpURLPermission "https://127.0.0.1:12568/a/c/-", "POST:*";
-
-    // needed for HttpServer
-    permission "java.net.SocketPermission" "localhost:1024-", "listen,resolve,accept";
-    permission "java.util.PropertyPermission" "test.src", "read";
-    permission java.io.FilePermission "${test.src}/../../../com/sun/net/httpserver/testkeys", "read";
-
-    //permission "java.util.logging.LoggingPermission" "control";
-    //permission "java.io.FilePermission" "/tmp/-", "read,write";
-    permission "java.lang.RuntimePermission" "modifyThread";
-    permission "java.lang.RuntimePermission" "setFactory";
-};
-
-// Normal permissions that aren't granted when run under jtreg
-
-grant codeBase "file:${{java.ext.dirs}}/*" {
-        permission java.security.AllPermission;
-};
-
-grant codeBase "file:${{java.home}}/jre/lib/rt.jar" {
-        permission java.security.AllPermission;
-};
-
--- a/jdk/test/java/net/Socks/SocksProxyVersion.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/test/java/net/Socks/SocksProxyVersion.java	Tue Oct 15 13:54:01 2013 +0100
@@ -41,6 +41,10 @@
     volatile boolean failed;
 
     public static void main(String[] args) throws Exception {
+        if (InetAddress.getLocalHost().isLoopbackAddress()) {
+            System.out.println("Test cannot run. getLocalHost returns a loopback address");
+            return;
+        }
         new SocksProxyVersion();
     }
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/net/URLPermission/URLPermissionTest.java	Tue Oct 15 13:54:01 2013 +0100
@@ -0,0 +1,388 @@
+/*
+ * 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.net.URLPermission;
+import java.io.*;
+
+/**
+ * @test
+ * @bug 8010464
+ */
+
+public class URLPermissionTest {
+
+    // super class for all test types
+    abstract static class Test {
+        boolean expected;
+        abstract boolean execute();
+    };
+
+    // Should throw an IAE on construction
+    static class ExTest extends Test {
+        String arg;
+        ExTest(String arg) {
+            this.arg = arg;
+        }
+
+        @Override
+        boolean execute() {
+            try {
+                URLPermission p = new URLPermission(arg);
+                return false;
+            } catch (IllegalArgumentException e) {
+                return true;
+            }
+        }
+    };
+
+    static ExTest extest(String arg) {
+        return new ExTest(arg);
+    }
+
+    // Tests URL part of implies() method. This is the main test.
+    static class URLImpliesTest extends Test {
+        String arg1, arg2;
+
+        URLImpliesTest(String arg1, String arg2, boolean expected) {
+            this.arg1 = arg1;
+            this.arg2 = arg2;
+            this.expected = expected;
+        }
+
+          boolean execute() {
+            URLPermission p1 = new URLPermission (arg1, "GET:*");
+            URLPermission p2 = new URLPermission (arg2, "GET:*");
+            boolean result = p1.implies(p2);
+            if (result != expected) {
+                System.out.println("p1 = " + p1);
+                System.out.println("p2 = " + p2);
+            }
+            return result == expected;
+        }
+    };
+
+    static URLImpliesTest imtest(String arg1, String arg2, boolean expected) {
+        return new URLImpliesTest(arg1, arg2, expected);
+    }
+
+    static class ActionImpliesTest extends Test {
+        String arg1, arg2;
+
+        ActionImpliesTest(String arg1, String arg2, boolean expected) {
+            this.arg1 = arg1;
+            this.arg2 = arg2;
+            this.expected = expected;
+        }
+
+        @Override
+          boolean execute() {
+            String url1 = "http://www.foo.com/-";
+            String url2 = "http://www.foo.com/a/b";
+            URLPermission p1 = new URLPermission(url1, arg1);
+            URLPermission p2 = new URLPermission(url2, arg2);
+            boolean result = p1.implies(p2);
+
+            return result == expected;
+        }
+    }
+
+    static ActionImpliesTest actest(String arg1, String arg2, boolean expected) {
+        return new ActionImpliesTest(arg1, arg2, expected);
+    }
+
+    static class URLEqualityTest extends Test {
+        String arg1, arg2;
+
+        URLEqualityTest(String arg1, String arg2, boolean expected) {
+            this.arg1 = arg1;
+            this.arg2 = arg2;
+            this.expected = expected;
+        }
+
+        @Override
+          boolean execute() {
+            URLPermission p1 = new URLPermission(arg1);
+            URLPermission p2 = new URLPermission(arg2);
+            boolean result = p1.equals(p2);
+
+            return result == expected;
+        }
+    }
+
+    static URLEqualityTest eqtest(String arg1, String arg2, boolean expected) {
+        return new URLEqualityTest(arg1, arg2, expected);
+    }
+
+    static Test[] pathImplies = {
+        // single
+        imtest("http://www.foo.com/", "http://www.foo.com/", true),
+        imtest("http://www.bar.com/", "http://www.foo.com/", false),
+        imtest("http://www.foo.com/a/b", "http://www.foo.com/", false),
+        imtest("http://www.foo.com/a/b", "http://www.foo.com/a/b/c", false),
+        // wildcard
+        imtest("http://www.foo.com/a/b/*", "http://www.foo.com/a/b/c", true),
+        imtest("http://www.foo.com/a/b/*", "http://www.foo.com/a/b/*", true),
+        imtest("http://www.foo.com/a/b/*", "http://www.foo.com/a/b/c#frag", true),
+        imtest("http://www.foo.com/a/b/*", "http://www.foo.com/a/b/c#frag?foo=foo", true),
+        imtest("http://www.foo.com/a/b/*", "http://www.foo.com/b/b/c", false),
+        imtest("http://www.foo.com/a/b/*", "http://www.foo.com/a/b/c.html", true),
+        imtest("http://www.foo.com/a/b/*", "http://www.foo.com/a/b/c.html", true),
+        imtest("http://www.foo.com/a/b/*", "https://www.foo.com/a/b/c", false),
+        // recursive
+        imtest("http://www.foo.com/a/b/-", "http://www.foo.com/a/b/-", true),
+        imtest("http://www.foo.com/a/b/-", "http://www.foo.com/a/b/c", true),
+        imtest("http://www.foo.com/a/b/-", "http://www.foo.com/a/b/c#frag", true),
+        imtest("http://www.foo.com/a/b/-", "http://www.foo.com/a/b/c#frag?foo=foo", true),
+        imtest("http://www.foo.com/a/b/-", "http://www.foo.com/b/b/c", false),
+        imtest("http://www.foo.com/a/b/-", "http://www.foo.com/a/b/c.html", true),
+        imtest("http://www.foo.com/a/b/-", "http://www.foo.com/a/b/c.html", true),
+        imtest("http://www.foo.com/a/b/-", "http://www.foo.com/a/b/c/d/e.html", true),
+        imtest("https://www.foo.com/a/b/-", "http://www.foo.com/a/b/c/d/e.html", false),
+        imtest("http://www.foo.com/a/b/-", "http://www.foo.com/a/b/c/d/e#frag", true),
+        imtest("http://www.foo.com/a/b/-", "https://www.foo.com/a/b/c", false),
+        // special cases
+        imtest("http:*", "https://www.foo.com/a/b/c", false),
+        imtest("http:*", "http://www.foo.com/a/b/c", true),
+        imtest("http:*", "http://foo/bar", true),
+        imtest("http://foo/bar", "https://foo/bar", false)
+    };
+
+    // new functionality
+
+    static Test[] exceptionTests = {
+        extest("http://1.2.3.4.5/a/b/c"),
+        extest("http://www.*.com"),
+        //extest("http://www.foo.com:1-X"),
+        extest("http://[foo.com]:99"),
+        extest("http://[fec0::X]:99"),
+        extest("http:")
+    };
+
+    static Test[] pathImplies2 = {
+        imtest("http://[FE80::]:99", "http://[fe80:0::]:99", true),
+
+        // hostnames
+        imtest("http://*.foo.com/a/b/-", "http://www.foo.com/a/b/c/d", true),
+        imtest("http://*.foo.com/a/b/-", "http://www.bar.com/a/b/c/d", false),
+        imtest("http://*.foo.com/a/b/-", "http://www.biz.bar.foo.com/a/b/c/d", true),
+        imtest("http://*.foo.com/a/b/-", "http://www.biz.bar.foo.como/a/b/c/d", false),
+        imtest("http://*/a/b/-", "http://www.biz.bar.foo.fuzz/a/b/c/d", true),
+        imtest("http://*/a/b/-", "http://*/a/b/c/d", true),
+        imtest("http://*.foo.com/a/b/-", "http://*/a/b/c/d", false),
+        imtest("http:*", "http://*/a/b/c/d", true),
+
+        // literal IPv4 addresses
+        imtest("http://1.2.3.4/a/b/-", "http://www.biz.bar.foo.com/a/b/c/d", false),
+        imtest("http://1.2.3.4/a/b/-", "http://1.2.3.4/a/b/c/d", true),
+        imtest("http://1.2.3.4/a/b/-", "http://1.2.88.4/a/b/c/d", false),
+        imtest("http:*", "http://1.2.88.4/a/b/c/d", true),
+
+        // literal IPv6 addresses
+        imtest("http://[fe80::]/a/b/-", "http://[fe80::0]/a/b/c", true),
+        imtest("http://[fe80::]/a/b/-", "http://[fe80::3]/a/b/c", false),
+        imtest("http://[1:2:3:4:5:6:7:8]/a/b/-","http://[1:002:03:4:0005:6:07:8]/a/b/c", true),
+        imtest("http://[1:2:3:4:5:6:7:8]/a/b/-","http://[1:002:03:4:0033:6:07:8]/a/b/c", false),
+        imtest("http://[1::2]/a/b/-", "http://[1:0:0:0::2]/a/b/c", true),
+        imtest("http://[1::2]/a/b/-", "http://[1:0:0:0::3]/a/b/c", false),
+        imtest("http://[FE80::]:99", "http://[fe80:0::]:99", true),
+        imtest("http:*", "http://[fe80:0::]:99", true),
+
+        // portranges
+        imtest("http://*.foo.com:1-2/a/b/-", "http://www.foo.com:1/a/b/c/d", true),
+        imtest("http://*.foo.com:1-2/a/b/-", "http://www.foo.com:3/a/b/c/d", false),
+        imtest("http://*.foo.com:3-/a/b/-", "http://www.foo.com:1/a/b/c/d", false),
+        imtest("http://*.foo.com:3-/a/b/-", "http://www.foo.com:4-5/a/b/c/d", true),
+        imtest("http://*.foo.com:3-/a/b/-", "http://www.foo.com:3-3/a/b/c/d", true),
+        imtest("http://*.foo.com:3-99/a/b/-", "http://www.foo.com:55-100/a/b/c/d", false),
+        imtest("http://*.foo.com:-44/a/b/-", "http://www.foo.com:1/a/b/c/d", true),
+        imtest("http://*.foo.com:-44/a/b/-", "http://www.foo.com:1-10/a/b/c/d", true),
+        imtest("http://*.foo.com:-44/a/b/-", "http://www.foo.com:44/a/b/c/d", true),
+        imtest("http://*.foo.com:-44/a/b/-", "http://www.foo.com:45/a/b/c/d", false),
+        imtest("http://www.foo.com:70-90/a/b", "http://www.foo.com/a/b", true),
+        imtest("https://www.foo.com/a/b", "https://www.foo.com:80/a/b", false),
+        imtest("https://www.foo.com:70-90/a/b", "https://www.foo.com/a/b", false),
+        imtest("https://www.foo.com/a/b", "https://www.foo.com:443/a/b", true),
+        imtest("https://www.foo.com:200-500/a/b", "https://www.foo.com/a/b", true),
+        imtest("http://www.foo.com:*/a/b", "http://www.foo.com:1-12345/a/b", true),
+
+        // misc
+        imtest("https:*", "http://www.foo.com", false),
+        imtest("https:*", "http:*", false)
+    };
+
+    static Test[] actionImplies = {
+        actest("GET", "GET", true),
+        actest("GET", "POST", false),
+        actest("GET:", "PUT", false),
+        actest("GET:", "GET", true),
+        actest("GET,POST", "GET", true),
+        actest("GET,POST:", "GET", true),
+        actest("GET:X-Foo", "GET:x-foo", true),
+        actest("GET:X-Foo,X-bar", "GET:x-foo", true),
+        actest("GET:X-Foo", "GET:x-boo", false),
+        actest("GET:X-Foo,X-Bar", "GET:x-bar,x-foo", true),
+        actest("GET:X-Bar,X-Foo,X-Bar,Y-Foo", "GET:x-bar,x-foo", true),
+        actest("GET:*", "GET:x-bar,x-foo", true),
+        actest("*:*", "GET:x-bar,x-foo", true)
+    };
+
+    static Test[] equalityTests = {
+        eqtest("http://www.foo.com", "http://www.FOO.CoM", true),
+        eqtest("http://[fe80:0:0::]:1-2", "HTTP://[FE80::]:1-2", true),
+        eqtest("HTTP://1.2.3.5/A/B/C", "http://1.2.3.5/A/b/C", false),
+        eqtest("HTTP://1.2.3.5/A/B/C", "HTTP://1.2.3.5/A/b/C", false),
+        eqtest("http:*", "http:*", true),
+        eqtest("http://www.foo.com/a/b", "https://www.foo.com/a/b", false),
+        eqtest("http://w.foo.com", "http://w.foo.com/", false),
+        eqtest("http://*.foo.com", "http://*.foo.com", true),
+        eqtest("http://www.foo.com/a/b", "http://www.foo.com:80/a/b", true),
+        eqtest("http://www.foo.com/a/b", "http://www.foo.com:82/a/b", false),
+        eqtest("https://www.foo.com/a/b", "https://www.foo.com:443/a/b", true),
+        eqtest("https://www.foo.com/a/b", "https://www.foo.com:444/a/b", false),
+    };
+
+    static boolean failed = false;
+
+    public static void main(String args[]) throws Exception {
+        for (int i=0; i<pathImplies.length ; i++) {
+            URLImpliesTest test = (URLImpliesTest)pathImplies[i];
+            Exception caught = null;
+            boolean result = false;
+            try {
+                result = test.execute();
+            } catch (Exception e) {
+                caught = e;
+                e.printStackTrace();
+            }
+            if (!result) {
+                failed = true;
+                System.out.printf("path test %d failed: %s : %s\n", i, test.arg1,
+                        test.arg2);
+            } else {
+                System.out.println ("path test " + i + " OK");
+            }
+
+        }
+
+        // new tests for functionality added in revision of API
+
+        for (int i=0; i<pathImplies2.length ; i++) {
+            URLImpliesTest test = (URLImpliesTest)pathImplies2[i];
+            Exception caught = null;
+            boolean result = false;
+            try {
+                result = test.execute();
+            } catch (Exception e) {
+                caught = e;
+                e.printStackTrace();
+            }
+            if (!result) {
+                failed = true;
+                System.out.printf("path2 test %d failed: %s : %s\n", i, test.arg1,
+                        test.arg2);
+            } else {
+                System.out.println ("path2 test " + i + " OK");
+            }
+
+        }
+
+        for (int i=0; i<equalityTests.length ; i++) {
+            URLEqualityTest test = (URLEqualityTest)equalityTests[i];
+            Exception caught = null;
+            boolean result = false;
+            try {
+                result = test.execute();
+            } catch (Exception e) {
+                caught = e;
+                e.printStackTrace();
+            }
+            if (!result) {
+                failed = true;
+                System.out.printf("equality test %d failed: %s : %s\n", i, test.arg1,
+                        test.arg2);
+            } else {
+                System.out.println ("equality test " + i + " OK");
+            }
+
+        }
+
+        for (int i=0; i<exceptionTests.length; i++) {
+            ExTest test = (ExTest)exceptionTests[i];
+            boolean result = test.execute();
+            if (!result) {
+                System.out.println ("test failed: " + test.arg);
+                failed = true;
+            } else {
+                System.out.println ("exception test " + i + " OK");
+            }
+        }
+
+        for (int i=0; i<actionImplies.length ; i++) {
+            ActionImpliesTest test = (ActionImpliesTest)actionImplies[i];
+            Exception caught = null;
+            boolean result = false;
+            try {
+                result = test.execute();
+            } catch (Exception e) {
+                caught = e;
+                e.printStackTrace();
+            }
+            if (!result) {
+                failed = true;
+                System.out.println ("test failed: " + test.arg1 + ": " +
+                        test.arg2 + " Exception: " + caught);
+            }
+            System.out.println ("action test " + i + " OK");
+        }
+
+        serializationTest("http://www.foo.com/-", "GET,DELETE:*");
+        serializationTest("https://www.foo.com/-", "POST:X-Foo");
+        serializationTest("https:*", "*:*");
+        serializationTest("http://www.foo.com/a/b/s/", "POST:X-Foo");
+        serializationTest("http://www.foo.com/a/b/s/*", "POST:X-Foo");
+
+        if (failed) {
+            throw new RuntimeException("some tests failed");
+        }
+
+    }
+
+    static void serializationTest(String name, String actions)
+        throws Exception {
+
+        URLPermission out = new URLPermission(name, actions);
+
+        ByteArrayOutputStream baos = new ByteArrayOutputStream();
+        ObjectOutputStream o = new ObjectOutputStream(baos);
+        o.writeObject(out);
+        ByteArrayInputStream bain = new ByteArrayInputStream(baos.toByteArray());
+        ObjectInputStream i = new ObjectInputStream(bain);
+        URLPermission in = (URLPermission)i.readObject();
+        if (!in.equals(out)) {
+            System.out.println ("FAIL");
+            System.out.println ("in = " + in);
+            System.out.println ("out = " + out);
+            failed = true;
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/net/URLPermission/URLTest.java	Tue Oct 15 13:54:01 2013 +0100
@@ -0,0 +1,240 @@
+/*
+ * 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.net.URLPermission;
+/*
+ * Run the tests once without security manager and once with
+ *
+ * @test
+ * @bug 8010464
+ * @compile ../../../com/sun/net/httpserver/SimpleSSLContext.java
+ * @run main/othervm/policy=policy.1 URLTest one
+ * @run main/othervm URLTest one
+ * @run main/othervm/policy=policy.2 URLTest two
+ * @run main/othervm URLTest two
+ * @run main/othervm/policy=policy.3 URLTest three
+ * @run main/othervm URLTest three
+ */
+
+import java.net.*;
+import java.io.*;
+import java.util.*;
+import java.util.concurrent.*;
+import java.util.logging.*;
+import com.sun.net.httpserver.*;
+import javax.net.ssl.*;
+
+public class URLTest {
+    static boolean failed = false;
+
+    public static void main (String[] args) throws Exception {
+        boolean no = false, yes = true;
+
+        if (System.getSecurityManager() == null) {
+            yes = false;
+        }
+        createServers();
+        InetSocketAddress addr1 = httpServer.getAddress();
+        int port1 = addr1.getPort();
+        InetSocketAddress addr2 = httpsServer.getAddress();
+        int port2 = addr2.getPort();
+
+          // each of the following cases is run with a different policy file
+
+        switch (args[0]) {
+          case "one":
+            String url1 = "http://127.0.0.1:"+ port1 + "/foo.html";
+            String url2 = "https://127.0.0.1:"+ port2 + "/foo.html";
+            String url3 = "http://127.0.0.1:"+ port1 + "/bar.html";
+            String url4 = "https://127.0.0.1:"+ port2 + "/bar.html";
+
+            // simple positive test. Should succceed
+            test(url1, "GET", "X-Foo", no);
+            test(url1, "GET", "Z-Bar", "X-Foo", no);
+            test(url1, "GET", "X-Foo", "Z-Bar", no);
+            test(url1, "GET", "Z-Bar", no);
+            test(url2, "POST", "X-Fob", no);
+
+            // reverse the methods, should fail
+            test(url1, "POST", "X-Foo", yes);
+            test(url2, "GET", "X-Fob", yes);
+
+            // different URLs, should fail
+            test(url3, "GET", "X-Foo", yes);
+            test(url4, "POST", "X-Fob", yes);
+            break;
+
+          case "two":
+            url1 = "http://127.0.0.1:"+ port1 + "/foo.html";
+            url2 = "https://127.0.0.1:"+ port2 + "/foo.html";
+            url3 = "http://127.0.0.1:"+ port1 + "/bar.html";
+            url4 = "https://127.0.0.1:"+ port2 + "/bar.html";
+
+            // simple positive test. Should succceed
+            test(url1, "GET", "X-Foo", no);
+            test(url2, "POST", "X-Fob", no);
+            test(url3, "GET", "X-Foo", no);
+            test(url4, "POST", "X-Fob", no);
+            break;
+
+          case "three":
+            url1 = "http://127.0.0.1:"+ port1 + "/foo.html";
+            url2 = "https://127.0.0.1:"+ port2 + "/a/c/d/e/foo.html";
+            url3 = "http://127.0.0.1:"+ port1 + "/a/b/c";
+            url4 = "https://127.0.0.1:"+ port2 + "/a/b/c";
+
+            test(url1, "GET", "X-Foo", yes);
+            test(url2, "POST", "X-Zxc", no);
+            test(url3, "DELETE", "Y-Foo", no);
+            test(url4, "POST", "Y-Foo", yes);
+            break;
+        }
+        shutdown();
+        if (failed) {
+            throw new RuntimeException("Test failed");
+        }
+    }
+
+    public static void test (
+        String u, String method,
+        String header, boolean exceptionExpected
+    )
+        throws Exception
+    {
+        test(u, method, header, null, exceptionExpected);
+    }
+
+    public static void test (
+        String u, String method,
+        String header1, String header2, boolean exceptionExpected
+    )
+        throws Exception
+    {
+        URL url = new URL(u);
+        System.out.println ("url=" + u + " method="+method + " header1="+header1
+                +" header2 = " + header2
+                +" exceptionExpected="+exceptionExpected);
+        HttpURLConnection urlc = (HttpURLConnection)url.openConnection();
+        if (urlc instanceof HttpsURLConnection) {
+            HttpsURLConnection ssl = (HttpsURLConnection)urlc;
+            ssl.setHostnameVerifier(new HostnameVerifier() {
+                public boolean verify(String host, SSLSession sess) {
+                    return true;
+                }
+            });
+            ssl.setSSLSocketFactory (ctx.getSocketFactory());
+        }
+        urlc.setRequestMethod(method);
+        if (header1 != null) {
+            urlc.addRequestProperty(header1, "foo");
+        }
+        if (header2 != null) {
+            urlc.addRequestProperty(header2, "bar");
+        }
+        try {
+            int g = urlc.getResponseCode();
+            if (exceptionExpected) {
+                failed = true;
+                System.out.println ("FAIL");
+                return;
+            }
+            if (g != 200) {
+                String s = Integer.toString(g);
+                throw new RuntimeException("unexpected response "+ s);
+            }
+            InputStream is = urlc.getInputStream();
+            int c,count=0;
+            byte[] buf = new byte[1024];
+            while ((c=is.read(buf)) != -1) {
+                count += c;
+            }
+            is.close();
+        } catch (RuntimeException e) {
+            if (! (e instanceof SecurityException) &&
+                        !(e.getCause() instanceof SecurityException)  ||
+                        !exceptionExpected)
+            {
+                System.out.println ("FAIL");
+                //e.printStackTrace();
+                failed = true;
+            }
+        }
+        System.out.println ("OK");
+    }
+
+    static HttpServer httpServer;
+    static HttpsServer httpsServer;
+    static HttpContext c, cs;
+    static ExecutorService e, es;
+    static SSLContext ctx;
+
+    // These ports need to be hard-coded until we support port number
+    // ranges in the permission class
+
+    static final int PORT1 = 12567;
+    static final int PORT2 = 12568;
+
+    static void createServers() throws Exception {
+        InetSocketAddress addr1 = new InetSocketAddress (PORT1);
+        InetSocketAddress addr2 = new InetSocketAddress (PORT2);
+        httpServer = HttpServer.create (addr1, 0);
+        httpsServer = HttpsServer.create (addr2, 0);
+
+        MyHandler h = new MyHandler();
+
+        c = httpServer.createContext ("/", h);
+        cs = httpsServer.createContext ("/", h);
+        e = Executors.newCachedThreadPool();
+        es = Executors.newCachedThreadPool();
+        httpServer.setExecutor (e);
+        httpsServer.setExecutor (es);
+
+        // take the keystore from elsewhere in test hierarchy
+        String keysdir = System.getProperty("test.src")
+                + "/../../../com/sun/net/httpserver/";
+        ctx = new SimpleSSLContext(keysdir).get();
+        httpsServer.setHttpsConfigurator(new HttpsConfigurator (ctx));
+
+        httpServer.start();
+        httpsServer.start();
+    }
+
+    static void shutdown() {
+        httpServer.stop(1);
+        httpsServer.stop(1);
+        e.shutdown();
+        es.shutdown();
+    }
+
+    static class MyHandler implements HttpHandler {
+
+        MyHandler() {
+        }
+
+        public void handle(HttpExchange x) throws IOException {
+            x.sendResponseHeaders(200, -1);
+            x.close();
+        }
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/net/URLPermission/policy.1	Tue Oct 15 13:54:01 2013 +0100
@@ -0,0 +1,48 @@
+//
+// 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.
+//
+
+grant {
+    permission java.net.URLPermission "http://127.0.0.1:12567/foo.html", "GET:X-Foo,Z-Bar";
+    permission java.net.URLPermission "https://127.0.0.1:12568/foo.html", "POST:X-Fob,T-Bar";
+
+    // needed for HttpServer
+    permission "java.net.SocketPermission" "localhost:1024-", "listen,resolve,accept";
+    permission "java.util.PropertyPermission" "test.src", "read";
+    permission java.io.FilePermission "${test.src}/../../../com/sun/net/httpserver/testkeys", "read";
+
+    //permission "java.util.logging.LoggingPermission" "control";
+    //permission "java.io.FilePermission" "/tmp/-", "read,write";
+    permission "java.lang.RuntimePermission" "modifyThread";
+    permission "java.lang.RuntimePermission" "setFactory";
+};
+
+// Normal permissions that aren't granted when run under jtreg
+
+grant codeBase "file:${{java.ext.dirs}}/*" {
+        permission java.security.AllPermission;
+};
+
+grant codeBase "file:${{java.home}}/jre/lib/rt.jar" {
+        permission java.security.AllPermission;
+};
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/net/URLPermission/policy.2	Tue Oct 15 13:54:01 2013 +0100
@@ -0,0 +1,46 @@
+//
+// 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.
+//
+
+grant {
+    permission java.net.URLPermission "http://127.0.0.1:12567/*", "GET:X-Foo";
+    permission java.net.URLPermission "https://127.0.0.1:12568/*", "POST:X-Fob";
+
+    // needed for HttpServer
+    permission "java.net.SocketPermission" "localhost:1024-", "listen,resolve,accept";
+    permission "java.util.PropertyPermission" "test.src", "read";
+    permission java.io.FilePermission "${test.src}/../../../com/sun/net/httpserver/testkeys", "read";
+
+    //permission "java.util.logging.LoggingPermission" "control";
+    //permission "java.io.FilePermission" "/tmp/-", "read,write";
+    permission "java.lang.RuntimePermission" "modifyThread";
+    permission "java.lang.RuntimePermission" "setFactory";
+};
+
+grant codeBase "file:${{java.ext.dirs}}/*" {
+        permission java.security.AllPermission;
+};
+
+grant codeBase "file:///export/repos/jdk8/build/linux-x86_64-normal-server-fastdebug/images/j2sdk-image/jre/lib/rt.jar" {
+        permission java.security.AllPermission;
+};
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/net/URLPermission/policy.3	Tue Oct 15 13:54:01 2013 +0100
@@ -0,0 +1,48 @@
+//
+// 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.
+//
+
+grant {
+    permission java.net.URLPermission "http://127.0.0.1:12567/a/b/-", "DELETE,GET:X-Foo,Y-Foo";
+    permission java.net.URLPermission "https://127.0.0.1:12568/a/c/-", "POST:*";
+
+    // needed for HttpServer
+    permission "java.net.SocketPermission" "localhost:1024-", "listen,resolve,accept";
+    permission "java.util.PropertyPermission" "test.src", "read";
+    permission java.io.FilePermission "${test.src}/../../../com/sun/net/httpserver/testkeys", "read";
+
+    //permission "java.util.logging.LoggingPermission" "control";
+    //permission "java.io.FilePermission" "/tmp/-", "read,write";
+    permission "java.lang.RuntimePermission" "modifyThread";
+    permission "java.lang.RuntimePermission" "setFactory";
+};
+
+// Normal permissions that aren't granted when run under jtreg
+
+grant codeBase "file:${{java.ext.dirs}}/*" {
+        permission java.security.AllPermission;
+};
+
+grant codeBase "file:${{java.home}}/jre/lib/rt.jar" {
+        permission java.security.AllPermission;
+};
+
--- a/jdk/test/java/nio/file/Files/BytesAndLines.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/test/java/nio/file/Files/BytesAndLines.java	Tue Oct 15 13:54:01 2013 +0100
@@ -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
@@ -22,262 +22,318 @@
  */
 
 /* @test
- * @bug 7006126 8020669 8024788
+ * @bug 7006126 8020669 8024788 8019526
  * @build BytesAndLines PassThroughFileSystem
- * @run main BytesAndLines
+ * @run testng BytesAndLines
  * @summary Unit test for methods for Files readAllBytes, readAllLines and
  *     and write methods.
  */
 
-import java.nio.file.*;
-import static java.nio.file.Files.*;
-import java.io.*;
-import java.util.*;
-import java.nio.charset.*;
+import java.nio.ByteBuffer;
+import java.nio.CharBuffer;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.nio.file.OpenOption;
+import static java.nio.file.StandardOpenOption.*;
+import java.nio.charset.Charset;
+import java.nio.charset.CharacterCodingException;
+import java.nio.charset.MalformedInputException;
+import java.nio.charset.UnmappableCharacterException;
+import static java.nio.charset.StandardCharsets.*;
+import java.util.Arrays;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.Random;
+import java.util.concurrent.Callable;
+import java.io.IOException;
 
+import org.testng.annotations.AfterClass;
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.Test;
+import static org.testng.Assert.*;
+
+@Test(groups = "unit")
 public class BytesAndLines {
-    static final Random rand = new Random();
+
+    // data for text files
+    private static final String EN_STRING = "The quick brown fox jumps over the lazy dog";
+    private static final String JA_STRING = "\u65e5\u672c\u8a9e\u6587\u5b57\u5217";
 
-    static final Charset US_ASCII = Charset.forName("US-ASCII");
+    // used for random byte content
+    private static Random RAND = new Random();
+
+    // file used by most tests
+    private Path tmpfile;
 
-    public static void main(String[] args) throws IOException {
-        testReadAndWriteBytes();
-        testReadLines();
-        testWriteLines();
+    @BeforeClass
+    void setup() throws IOException {
+        tmpfile = Files.createTempFile("blah", null);
+    }
+
+    @AfterClass
+    void cleanup() throws IOException {
+        Files.deleteIfExists(tmpfile);
+    }
+
+    /**
+     * Returns a byte[] of the given size with random content
+     */
+    private byte[] genBytes(int size) {
+        byte[] arr = new byte[size];
+        RAND.nextBytes(arr);
+        return arr;
     }
 
     /**
-     * Test readAllBytes(Path) and write(Path, byte[], OpenOption...)
+     * Exercise NullPointerException
      */
-    static void testReadAndWriteBytes() throws IOException {
-        // exercise methods with various sizes
-        testReadAndWriteBytes(0);
-        for (int i=0; i<100; i++) {
-            testReadAndWriteBytes(rand.nextInt(32000));
-        }
-
-        // NullPointerException
+    public void testNulls() {
         Path file = Paths.get("foo");
+        byte[] bytes = new byte[100];
         List<String> lines = Collections.emptyList();
-        try {
-            readAllBytes(null);
-            throw new RuntimeException("NullPointerException expected");
-        } catch (NullPointerException ignore) { }
-        try {
-            write(null, lines, Charset.defaultCharset());
-            throw new RuntimeException("NullPointerException expected");
-        } catch (NullPointerException ignore) { }
-        try {
-            write(file, null, Charset.defaultCharset());
-            throw new RuntimeException("NullPointerException expected");
-        } catch (NullPointerException ignore) { }
+
+        checkNullPointerException(() -> Files.readAllBytes(null));
+
+        checkNullPointerException(() -> Files.write(null, bytes));
+        checkNullPointerException(() -> Files.write(file, (byte[])null));
+        checkNullPointerException(() -> Files.write(file, bytes, (OpenOption[])null));
+        checkNullPointerException(() -> Files.write(file, bytes, new OpenOption[] { null } ));
+
+        checkNullPointerException(() -> Files.readAllLines(null));
+        checkNullPointerException(() -> Files.readAllLines(file, (Charset)null));
+        checkNullPointerException(() -> Files.readAllLines(null, Charset.defaultCharset()));
+
+        checkNullPointerException(() -> Files.write(null, lines));
+        checkNullPointerException(() -> Files.write(file, (List<String>)null));
+        checkNullPointerException(() -> Files.write(file, lines, (OpenOption[])null));
+        checkNullPointerException(() -> Files.write(file, lines, new OpenOption[] { null } ));
+        checkNullPointerException(() -> Files.write(null, lines, Charset.defaultCharset()));
+        checkNullPointerException(() -> Files.write(file, null, Charset.defaultCharset()));
+        checkNullPointerException(() -> Files.write(file, lines, (Charset)null));
+        checkNullPointerException(() -> Files.write(file, lines, Charset.defaultCharset(), (OpenOption[])null));
+        checkNullPointerException(() -> Files.write(file, lines, Charset.defaultCharset(), new OpenOption[] { null } ));
+    }
+
+    private void checkNullPointerException(Callable<?> c) {
         try {
-            write(file, lines, null);
-            throw new RuntimeException("NullPointerException expected");
-        } catch (NullPointerException ignore) { }
-        try {
-            write(file, lines, Charset.defaultCharset(), (OpenOption[])null);
-            throw new RuntimeException("NullPointerException expected");
-        } catch (NullPointerException ignore) { }
-        try {
-            OpenOption[] opts = { null };
-            write(file, lines, Charset.defaultCharset(), opts);
-            throw new RuntimeException("NullPointerException expected");
-        } catch (NullPointerException ignore) { }
-
-        // read from procfs
-        if (System.getProperty("os.name").equals("Linux")) {
-            // Refer to the Linux proc(5) man page for details about /proc/self/stat file
-            // procfs reports it to be zero sized, even though data can be read from it
-            String statFile = "/proc/self/stat";
-            Path pathStat = Paths.get(statFile);
-            byte[] data = Files.readAllBytes(pathStat);
-            assertTrue(data.length > 0, "Files.readAllBytes('" + statFile + "') failed to read");
-        }
-
-        // test readAllBytes on custom file system
-        Path myfile = PassThroughFileSystem.create().getPath(file.toString());
-        for (int size=0; size<=1024; size+=512) {
-            byte[] b1 = new byte[size];
-            rand.nextBytes(b1);
-            Files.write(myfile, b1);
-            byte[] b2 = Files.readAllBytes(myfile);
-            assertTrue(Arrays.equals(b1, b2), "bytes not equal");
+            c.call();
+            fail("NullPointerException expected");
+        } catch (NullPointerException ignore) {
+        } catch (Exception e) {
+            fail(e + " not expected");
         }
     }
 
-
-    static void testReadAndWriteBytes(int size) throws IOException {
-        Path path = createTempFile("blah", null);
-        try {
-            boolean append = rand.nextBoolean();
-
-            byte[] b1 = new byte[size];
-            rand.nextBytes(b1);
+    /**
+     * Exercise Files.readAllBytes(Path) on varied file sizes
+     */
+    public void testReadAllBytes() throws IOException {
+        int size = 0;
+        while (size <= 16*1024) {
+            testReadAllBytes(size);
+            size += 512;
+        }
+    }
 
-            byte[] b2 = (append) ? new byte[size] : new byte[0];
-            rand.nextBytes(b2);
-
-            // write method should create file if it doesn't exist
-            if (rand.nextBoolean())
-                delete(path);
-
-            // write bytes to file
-            Path target = write(path, b1);
-            assertTrue(target==path, "Unexpected path");
-            assertTrue(size(path) == b1.length, "Unexpected file size");
+    private void testReadAllBytes(int size) throws IOException {
+        // write bytes to file (random content)
+        byte[] expected = genBytes(size);
+        Files.write(tmpfile, expected);
 
-            // append bytes to file (might be 0 bytes)
-            write(path, b2, StandardOpenOption.APPEND);
-            assertTrue(size(path) == b1.length + b2.length, "Unexpected file size");
-
-            // read entire file
-            byte[] read = readAllBytes(path);
+        // check expected bytes are read
+        byte[] read = Files.readAllBytes(tmpfile);
+        assertTrue(Arrays.equals(read, expected), "Bytes read not the same as written");
+    }
 
-            // check bytes are correct
-            byte[] expected;
-            if (append) {
-                expected = new byte[b1.length + b2.length];
-                System.arraycopy(b1, 0, expected, 0, b1.length);
-                System.arraycopy(b2, 0, expected, b1.length, b2.length);
-            } else {
-                expected = b1;
-            }
-            assertTrue(Arrays.equals(read, expected),
-                       "Bytes read not the same as bytes written");
-        } finally {
-            deleteIfExists(path);
+    /**
+     * Linux specific test to exercise Files.readAllBytes on /proc. This is
+     * special because file sizes are reported as 0 even though the file
+     * has content.
+     */
+    public void testReadAllBytesOnProcFS() throws IOException {
+        // read from procfs
+        if (System.getProperty("os.name").equals("Linux")) {
+            Path statFile = Paths.get("/proc/self/stat");
+            byte[] data = Files.readAllBytes(statFile);
+            assertTrue(data.length > 0, "Files.readAllBytes('" + statFile + "') failed to read");
         }
     }
 
     /**
-     * Test readAllLines(Path,Charset)
+     * Exercise Files.readAllBytes(Path) on custom file system. This is special
+     * because readAllBytes was originally implemented to use FileChannel
+     * and so may not be supported by custom file system providers.
      */
-    static void testReadLines() throws IOException {
-        Path tmpfile = createTempFile("blah", "txt");
+    public void testReadAllBytesOnCustomFS() throws IOException {
+        Path myfile = PassThroughFileSystem.create().getPath("myfile");
         try {
-            List<String> lines;
-
-            // zero lines
-            assertTrue(size(tmpfile) == 0, "File should be empty");
-            lines = readAllLines(tmpfile, US_ASCII);
-            assertTrue(lines.isEmpty(), "No line expected");
-
-            // one line
-            byte[] hi = { (byte)'h', (byte)'i' };
-            write(tmpfile, hi);
-            lines = readAllLines(tmpfile, US_ASCII);
-            assertTrue(lines.size() == 1, "One line expected");
-            assertTrue(lines.get(0).equals("hi"), "'Hi' expected");
-
-            // two lines using platform's line separator
-            List<String> expected = Arrays.asList("hi", "there");
-            write(tmpfile, expected, US_ASCII);
-            assertTrue(size(tmpfile) > 0, "File is empty");
-            lines = readAllLines(tmpfile, US_ASCII);
-            assertTrue(lines.equals(expected), "Unexpected lines");
-
-            // MalformedInputException
-            byte[] bad = { (byte)0xff, (byte)0xff };
-            write(tmpfile, bad);
-            try {
-                readAllLines(tmpfile, US_ASCII);
-                throw new RuntimeException("MalformedInputException expected");
-            } catch (MalformedInputException ignore) { }
-
-
-            // NullPointerException
-            try {
-                readAllLines(null, US_ASCII);
-                throw new RuntimeException("NullPointerException expected");
-            } catch (NullPointerException ignore) { }
-            try {
-                readAllLines(tmpfile, null);
-                throw new RuntimeException("NullPointerException expected");
-            } catch (NullPointerException ignore) { }
-
-            // read from procfs
-            if (System.getProperty("os.name").equals("Linux")) {
-                // Refer to the Linux proc(5) man page for details about /proc/self/status file
-                // procfs reports this file to be zero sized, even though data can be read from it
-                String statusFile = "/proc/self/status";
-                Path pathStatus = Paths.get(statusFile);
-                lines = Files.readAllLines(pathStatus, US_ASCII);
-                assertTrue(lines.size() > 0, "Files.readAllLines('" + pathStatus + "') failed to read");
+            int size = 0;
+            while (size <= 1024) {
+                byte[] b1 = genBytes(size);
+                Files.write(myfile, b1);
+                byte[] b2 = Files.readAllBytes(myfile);
+                assertTrue(Arrays.equals(b1, b2), "bytes not equal");
+                size += 512;
             }
-
         } finally {
-            delete(tmpfile);
+            Files.deleteIfExists(myfile);
         }
     }
 
     /**
-     * Test write(Path,Iterable<? extends CharSequence>,Charset,OpenOption...)
+     * Exercise Files.write(Path, byte[], OpenOption...) on various sizes
      */
-    static void testWriteLines() throws IOException {
-        Path tmpfile = createTempFile("blah", "txt");
-        try {
-            // write method should create file if it doesn't exist
-            if (rand.nextBoolean())
-                delete(tmpfile);
-
-            // zero lines
-            Path result = write(tmpfile, Collections.<String>emptyList(), US_ASCII);
-            assert(size(tmpfile) == 0);
-            assert(result == tmpfile);
-
-            // two lines
-            List<String> lines = Arrays.asList("hi", "there");
-            write(tmpfile, lines, US_ASCII);
-            List<String> actual = readAllLines(tmpfile, US_ASCII);
-            assertTrue(actual.equals(lines), "Unexpected lines");
-
-            // append two lines
-            write(tmpfile, lines, US_ASCII, StandardOpenOption.APPEND);
-            List<String> expected = new ArrayList<String>();
-            expected.addAll(lines);
-            expected.addAll(lines);
-            assertTrue(expected.size() == 4, "List should have 4 elements");
-            actual = readAllLines(tmpfile, US_ASCII);
-            assertTrue(actual.equals(expected), "Unexpected lines");
-
-            // UnmappableCharacterException
-            try {
-                String s = "\u00A0\u00A1";
-                write(tmpfile, Arrays.asList(s), US_ASCII);
-                throw new RuntimeException("UnmappableCharacterException expected");
-            } catch (UnmappableCharacterException ignore) { }
-
-            // NullPointerException
-            try {
-                write(null, lines, US_ASCII);
-                throw new RuntimeException("NullPointerException expected");
-            } catch (NullPointerException ignore) { }
-            try {
-                write(tmpfile, null, US_ASCII);
-                throw new RuntimeException("NullPointerException expected");
-            } catch (NullPointerException ignore) { }
-            try {
-                write(tmpfile, lines, null);
-                throw new RuntimeException("NullPointerException expected");
-            } catch (NullPointerException ignore) { }
-            try {
-                write(tmpfile, lines, US_ASCII, (OpenOption[])null);
-                throw new RuntimeException("NullPointerException expected");
-            } catch (NullPointerException ignore) { }
-            try {
-                OpenOption[] opts = { (OpenOption)null };
-                write(tmpfile, lines, US_ASCII, opts);
-                throw new RuntimeException("NullPointerException expected");
-            } catch (NullPointerException ignore) { }
-
-        } finally {
-            delete(tmpfile);
+    public void testWriteBytes() throws IOException {
+        int size = 0;
+        while (size < 16*1024) {
+            testWriteBytes(size, false);
+            testWriteBytes(size, true);
+            size += 512;
         }
     }
 
-    static void assertTrue(boolean expr, String errmsg) {
-        if (!expr)
-            throw new RuntimeException(errmsg);
+    private void testWriteBytes(int size, boolean append) throws IOException {
+        byte[] bytes = genBytes(size);
+        Path result = Files.write(tmpfile, bytes);
+        assertTrue(result == tmpfile);
+        if (append) {
+            Files.write(tmpfile, bytes, APPEND);
+            assertTrue(Files.size(tmpfile) == size*2);
+        }
+
+        byte[] expected;
+        if (append) {
+            expected = new byte[size << 1];
+            System.arraycopy(bytes, 0, expected, 0, bytes.length);
+            System.arraycopy(bytes, 0, expected, bytes.length, bytes.length);
+        } else {
+            expected = bytes;
+        }
+
+        byte[] read = Files.readAllBytes(tmpfile);
+        assertTrue(Arrays.equals(read, expected), "Bytes read not the same as written");
+    }
+
+    /**
+     * Exercise Files.readAllLines(Path, Charset)
+     */
+    public void testReadAllLines() throws IOException {
+        // zero lines
+        Files.write(tmpfile, new byte[0]);
+        List<String> lines = Files.readAllLines(tmpfile, US_ASCII);
+            assertTrue(lines.isEmpty(), "No line expected");
+
+        // one line
+        byte[] hi = { (byte)'h', (byte)'i' };
+        Files.write(tmpfile, hi);
+        lines = Files.readAllLines(tmpfile, US_ASCII);
+        assertTrue(lines.size() == 1, "One line expected");
+        assertTrue(lines.get(0).equals("hi"), "'Hi' expected");
+
+        // two lines using platform's line separator
+        List<String> expected = Arrays.asList("hi", "there");
+        Files.write(tmpfile, expected, US_ASCII);
+        assertTrue(Files.size(tmpfile) > 0, "File is empty");
+        lines = Files.readAllLines(tmpfile, US_ASCII);
+        assertTrue(lines.equals(expected), "Unexpected lines");
+
+        // MalformedInputException
+        byte[] bad = { (byte)0xff, (byte)0xff };
+        Files.write(tmpfile, bad);
+        try {
+            Files.readAllLines(tmpfile, US_ASCII);
+            fail("MalformedInputException expected");
+        } catch (MalformedInputException ignore) { }
+    }
+
+    /**
+     * Linux specific test to exercise Files.readAllLines(Path) on /proc. This
+     * is special because file sizes are reported as 0 even though the file
+     * has content.
+     */
+    public void testReadAllLinesOnProcFS() throws IOException {
+        if (System.getProperty("os.name").equals("Linux")) {
+            Path statFile = Paths.get("/proc/self/stat");
+            List<String> lines = Files.readAllLines(statFile);
+            assertTrue(lines.size() > 0, "Files.readAllLines('" + statFile + "') failed to read");
+        }
+    }
+
+    /**
+     * Exercise Files.readAllLines(Path)
+     */
+    public void testReadAllLinesUTF8() throws IOException {
+        Files.write(tmpfile, encodeAsUTF8(EN_STRING + "\n" + JA_STRING));
+
+        List<String> lines = Files.readAllLines(tmpfile);
+        assertTrue(lines.size() == 2, "Read " + lines.size() + " lines instead of 2");
+        assertTrue(lines.get(0).equals(EN_STRING));
+        assertTrue(lines.get(1).equals(JA_STRING));
+
+        // a sample of malformed sequences
+        testReadAllLinesMalformedUTF8((byte)0xFF); // one-byte sequence
+        testReadAllLinesMalformedUTF8((byte)0xC0, (byte)0x80);  // invalid first byte
+        testReadAllLinesMalformedUTF8((byte)0xC2, (byte)0x00); // invalid second byte
+    }
+
+    private byte[] encodeAsUTF8(String s) throws CharacterCodingException {
+        // not using s.getBytes here so as to catch unmappable characters
+        ByteBuffer bb = UTF_8.newEncoder().encode(CharBuffer.wrap(s));
+        byte[] result = new byte[bb.limit()];
+        bb.get(result);
+        assertTrue(bb.remaining() == 0);
+        return result;
+    }
+
+    private void testReadAllLinesMalformedUTF8(byte... bytes) throws IOException {
+        Files.write(tmpfile, bytes);
+        try {
+            Files.readAllLines(tmpfile);
+            fail("MalformedInputException expected");
+        } catch (MalformedInputException ignore) { }
+    }
+
+    /**
+     * Exercise Files.write(Path, Iterable<? extends CharSequence>, Charset, OpenOption...)
+     */
+    public void testWriteLines() throws IOException {
+        // zero lines
+        Path result = Files.write(tmpfile, Collections.<String>emptyList(), US_ASCII);
+        assert(Files.size(tmpfile) == 0);
+        assert(result == tmpfile);
+
+        // two lines
+        List<String> lines = Arrays.asList("hi", "there");
+        Files.write(tmpfile, lines, US_ASCII);
+        List<String> actual = Files.readAllLines(tmpfile, US_ASCII);
+        assertTrue(actual.equals(lines), "Unexpected lines");
+
+        // append two lines
+        Files.write(tmpfile, lines, US_ASCII, APPEND);
+        List<String> expected = new ArrayList<>();
+        expected.addAll(lines);
+        expected.addAll(lines);
+        assertTrue(expected.size() == 4, "List should have 4 elements");
+        actual = Files.readAllLines(tmpfile, US_ASCII);
+        assertTrue(actual.equals(expected), "Unexpected lines");
+
+        // UnmappableCharacterException
+        try {
+            String s = "\u00A0\u00A1";
+            Files.write(tmpfile, Arrays.asList(s), US_ASCII);
+            fail("UnmappableCharacterException expected");
+        } catch (UnmappableCharacterException ignore) { }
+    }
+
+    /**
+     * Exercise Files.write(Path, Iterable<? extends CharSequence>, OpenOption...)
+     */
+    public void testWriteLinesUTF8() throws IOException {
+        List<String> lines = Arrays.asList(EN_STRING, JA_STRING);
+        Files.write(tmpfile, lines);
+        List<String> actual = Files.readAllLines(tmpfile, UTF_8);
+        assertTrue(actual.equals(lines), "Unexpected lines");
     }
 }
--- a/jdk/test/java/nio/file/Files/StreamTest.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/test/java/nio/file/Files/StreamTest.java	Tue Oct 15 13:54:01 2013 +0100
@@ -22,11 +22,10 @@
  */
 
 /* @test
- * @bug 8006884
- * @summary Unit test for java.nio.file.Files
- * @library ..
+ * @bug 8006884 8019526
  * @build PassThroughFileSystem FaultyFileSystem
  * @run testng StreamTest
+ * @summary Unit test for java.nio.file.Files methods that return a Stream
  */
 
 import java.io.IOException;
@@ -43,11 +42,13 @@
 import java.nio.file.Paths;
 import java.nio.file.attribute.BasicFileAttributes;
 import java.util.Arrays;
+import java.util.Collections;
 import java.util.Iterator;
 import java.util.List;
 import java.util.Objects;
 import java.util.Set;
 import java.util.TreeSet;
+import java.util.concurrent.Callable;
 import java.util.function.BiPredicate;
 import java.util.stream.Stream;
 import java.util.stream.Collectors;
@@ -316,56 +317,80 @@
         try {
             // zero lines
             assertTrue(Files.size(tmpfile) == 0, "File should be empty");
+            try (Stream<String> s = Files.lines(tmpfile)) {
+                checkLines(s, Collections.emptyList());
+            }
             try (Stream<String> s = Files.lines(tmpfile, US_ASCII)) {
-                assertEquals(s.mapToInt(l -> 1).reduce(0, Integer::sum), 0, "No line expected");
+                checkLines(s, Collections.emptyList());
             }
 
             // one line
-            byte[] hi = { (byte)'h', (byte)'i' };
-            Files.write(tmpfile, hi);
+            List<String> oneLine = Arrays.asList("hi");
+            Files.write(tmpfile, oneLine, US_ASCII);
+            try (Stream<String> s = Files.lines(tmpfile)) {
+                checkLines(s, oneLine);
+            }
             try (Stream<String> s = Files.lines(tmpfile, US_ASCII)) {
-                List<String> lines = s.collect(Collectors.toList());
-                assertTrue(lines.size() == 1, "One line expected");
-                assertTrue(lines.get(0).equals("hi"), "'Hi' expected");
+                checkLines(s, oneLine);
             }
 
             // two lines using platform's line separator
-            List<String> expected = Arrays.asList("hi", "there");
-            Files.write(tmpfile, expected, US_ASCII);
-            assertTrue(Files.size(tmpfile) > 0, "File is empty");
+            List<String> twoLines = Arrays.asList("hi", "there");
+            Files.write(tmpfile, twoLines, US_ASCII);
+            try (Stream<String> s = Files.lines(tmpfile)) {
+                checkLines(s, twoLines);
+            }
             try (Stream<String> s = Files.lines(tmpfile, US_ASCII)) {
-                List<String> lines = s.collect(Collectors.toList());
-                assertTrue(lines.equals(expected), "Unexpected lines");
+                checkLines(s, twoLines);
             }
 
             // MalformedInputException
             byte[] bad = { (byte)0xff, (byte)0xff };
             Files.write(tmpfile, bad);
+            try (Stream<String> s = Files.lines(tmpfile)) {
+                checkMalformedInputException(s);
+            }
             try (Stream<String> s = Files.lines(tmpfile, US_ASCII)) {
-                try {
-                    List<String> lines = s.collect(Collectors.toList());
-                    throw new RuntimeException("UncheckedIOException expected");
-                } catch (UncheckedIOException ex) {
-                    assertTrue(ex.getCause() instanceof MalformedInputException,
-                               "MalformedInputException expected");
-                }
+                checkMalformedInputException(s);
             }
 
             // NullPointerException
-            try {
-                Files.lines(null, US_ASCII);
-                throw new RuntimeException("NullPointerException expected");
-            } catch (NullPointerException ignore) { }
-            try {
-                Files.lines(tmpfile, null);
-                throw new RuntimeException("NullPointerException expected");
-            } catch (NullPointerException ignore) { }
+            checkNullPointerException(() -> Files.lines(null));
+            checkNullPointerException(() -> Files.lines(null, US_ASCII));
+            checkNullPointerException(() -> Files.lines(tmpfile, null));
 
         } finally {
             Files.delete(tmpfile);
         }
     }
 
+    private void checkLines(Stream<String> s, List<String> expected) {
+        List<String> lines = s.collect(Collectors.toList());
+        assertTrue(lines.size() == expected.size(), "Unexpected number of lines");
+        assertTrue(lines.equals(expected), "Unexpected content");
+    }
+
+    private void checkMalformedInputException(Stream<String> s) {
+        try {
+            List<String> lines = s.collect(Collectors.toList());
+            fail("UncheckedIOException expected");
+        } catch (UncheckedIOException ex) {
+            IOException cause = ex.getCause();
+            assertTrue(cause instanceof MalformedInputException,
+                "MalformedInputException expected");
+        }
+    }
+
+    private void checkNullPointerException(Callable<?> c) {
+        try {
+            c.call();
+            fail("NullPointerException expected");
+        } catch (NullPointerException ignore) {
+        } catch (Exception e) {
+            fail(e + " not expected");
+        }
+    }
+
     public void testDirectoryIteratorException() throws IOException {
         Path dir = testFolder.resolve("dir2");
         Path trigger = dir.resolve("DirectoryIteratorException");
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/util/logging/TestMainAppContext.java	Tue Oct 15 13:54:01 2013 +0100
@@ -0,0 +1,85 @@
+/*
+ * 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.logging.Logger;
+import sun.awt.AppContext;
+import sun.awt.SunToolkit;
+
+
+/**
+ * @test
+ * @bug 8026404
+ * @summary checks that calling getLogger() from a Thread whose ThreadGroup is
+ *          a child of the main root group doesn't throw an exception.
+ * @build TestMainAppContext
+ * @run main/othervm TestMainAppContext
+ * @author danielfuchs
+ */
+public class TestMainAppContext {
+
+    static volatile Throwable thrown = null;
+
+    public static void main(String... args) throws Exception {
+        ThreadGroup rootTG = Thread.currentThread().getThreadGroup();
+        while (rootTG.getParent() != null) {
+            rootTG = rootTG.getParent();
+        }
+
+        ThreadGroup tg = new ThreadGroup(rootTG, "FakeApplet");
+        final Thread t1 = new Thread(tg, "createNewAppContext") {
+            @Override
+            public void run() {
+                try {
+                    AppContext context = SunToolkit.createNewAppContext();
+                } catch(Throwable t) {
+                    thrown = t;
+                }
+            }
+        };
+        t1.start();
+        t1.join();
+        if (thrown != null) {
+            throw new RuntimeException("Unexpected exception: " + thrown, thrown);
+        }
+        Thread t2 = new Thread(tg, "BugDetector") {
+
+            @Override
+            public void run() {
+                try {
+                    Logger.getLogger("foo").info("Done");
+                } catch (Throwable x) {
+                    thrown = x;
+                }
+            }
+
+        };
+
+        System.setSecurityManager(new SecurityManager());
+        t2.start();
+        t2.join();
+        if (thrown != null) {
+            throw new RuntimeException("Test failed: " + thrown, thrown);
+        }
+
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/plugins/wbmp/StreamResetTest.java	Tue Oct 15 13:54:01 2013 +0100
@@ -0,0 +1,97 @@
+/*
+ * 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     8022632
+ * @summary Test verifies that SPI of WBMP image reader
+ *           restores the stream position if an IOException
+ *           occurs during processing of image header.
+ * @run     main StreamResetTest
+ */
+
+
+import java.io.IOException;
+import javax.imageio.ImageIO;
+import javax.imageio.ImageReader;
+import javax.imageio.spi.ImageReaderSpi;
+import javax.imageio.stream.ImageInputStreamImpl;
+
+public class StreamResetTest {
+
+    public static void main(String[] args) {
+        IOException expectedException = null;
+        TestStream iis = new TestStream();
+
+        ImageReader wbmp = ImageIO.getImageReadersByFormatName("WBMP").next();
+        if (wbmp == null) {
+            System.out.println("No WBMP reader: skip the test");
+            return;
+        }
+
+        ImageReaderSpi spi = wbmp.getOriginatingProvider();
+
+        iis.checkPosition();
+
+        try {
+            spi.canDecodeInput(iis);
+        } catch (IOException e) {
+            expectedException = e;
+        }
+
+        if (expectedException == null) {
+            throw new RuntimeException("Test FAILED: stream was not used");
+        }
+
+        iis.checkPosition();
+
+        System.out.println("Test PASSED");
+
+    }
+
+    private static class TestStream extends ImageInputStreamImpl {
+        private final int errorPos = 1;
+
+        @Override
+        public int read() throws IOException {
+            if (streamPos == errorPos) {
+                throw new IOException("Test exception");
+            }
+            streamPos++;
+
+            return 0x03;
+        }
+
+        @Override
+        public int read(byte[] b, int off, int len) throws IOException {
+            streamPos += len;
+            return len;
+        }
+
+        public void checkPosition() {
+            if (streamPos != 0) {
+                throw new RuntimeException("Test FAILED");
+            }
+        }
+    }
+}
--- a/jdk/test/javax/swing/JInternalFrame/Test6505027.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/test/javax/swing/JInternalFrame/Test6505027.java	Tue Oct 15 13:54:01 2013 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 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
@@ -96,8 +96,10 @@
         SwingUtilities.convertPointToScreen(point, this.table);
 
         Robot robot = new Robot();
+        robot.setAutoDelay(50);
         robot.mouseMove(point.x + 1, point.y + 1);
         robot.mousePress(InputEvent.BUTTON1_MASK);
+        robot.mouseRelease(InputEvent.BUTTON1_MASK);
     }
 
     public static void validate() {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/swing/JScrollBar/bug4202954/bug4202954.java	Tue Oct 15 13:54:01 2013 +0100
@@ -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.
+ */
+/* @test
+   @bug 4202954
+   @library ../../regtesthelpers
+   @build Util
+   @author Michael C. Albers
+   @run main bug4202954
+*/
+
+import java.awt.*;
+import java.awt.event.InputEvent;
+import javax.swing.*;
+import sun.awt.*;
+
+public class bug4202954 {
+    static JScrollPane buttonScrollPane;
+    private static final SunToolkit toolkit = (SunToolkit) Toolkit.getDefaultToolkit();
+    static Robot robot;
+    public static void main(String[] args) throws Exception {
+        if (OSInfo.getOSType() == OSInfo.OSType.MACOSX) {
+            UIManager.setLookAndFeel(UIManager.getCrossPlatformLookAndFeelClassName());
+        }
+
+        SwingUtilities.invokeAndWait(new Runnable() {
+            public void run() {
+                createAndShowGUI();
+            }
+        });
+        Point centerOfScrollPane = Util.getCenterPoint(buttonScrollPane);
+        JButton rightScrollButton = findJButton(buttonScrollPane.getHorizontalScrollBar(), centerOfScrollPane.x, centerOfScrollPane.y);
+        JButton bottomScrollButton = findJButton(buttonScrollPane.getVerticalScrollBar(), centerOfScrollPane.x, centerOfScrollPane.y);
+
+        if (rightScrollButton == null || bottomScrollButton == null) {
+            String errMessage = "Test can't be executed: ";
+            errMessage = errMessage + rightScrollButton == null ? "can't find right button for horizontal scroll bar; " : ""
+                    + bottomScrollButton == null ? "can't find bottom scroll button for vertical scroll bar" : "";
+            throw new RuntimeException(errMessage);
+        }
+
+        robot = new Robot();
+        robot.setAutoDelay(50);
+
+        // test right, left and middle mouse buttons for horizontal scroll bar
+        if (!doTest(rightScrollButton, InputEvent.BUTTON1_DOWN_MASK, true)) {
+            throw new RuntimeException("Test failed: right arrow button didn't respond on left mouse button.");
+        }
+        if (!doTest(rightScrollButton, InputEvent.BUTTON2_DOWN_MASK, false)) {
+            throw new RuntimeException("Test failed: right arrow button respond on right mouse button.");
+        }
+        if (!doTest(rightScrollButton, InputEvent.BUTTON3_DOWN_MASK, false)) {
+            throw new RuntimeException("Test failed: right arrow button respond on middle mouse button.");
+        }
+
+        // test right, left and middle mouse buttons for vertical scroll bar
+        if (!doTest(bottomScrollButton, InputEvent.BUTTON1_DOWN_MASK, true)) {
+            throw new RuntimeException("Test failed: bottom arrow button didn't respond on left mouse button.");
+        }
+        if (!doTest(bottomScrollButton, InputEvent.BUTTON2_DOWN_MASK, false)) {
+            throw new RuntimeException("Test failed: bottom arrow button respond on right mouse button.");
+        }
+        if (!doTest(bottomScrollButton, InputEvent.BUTTON3_DOWN_MASK, false)) {
+            throw new RuntimeException("Test failed: bottom arrow button respond on middle mouse button.");
+        }
+    }
+    public static void createAndShowGUI() {
+        JPanel buttonPanel = new JPanel();
+        buttonPanel.setLayout(new GridLayout(5,5, 15,15));
+        int buttonCount = 1;
+        while (buttonCount <= 25) {
+            buttonPanel.add(new JButton("Button #"+buttonCount));
+            buttonCount++;
+        }
+        buttonScrollPane = new JScrollPane();
+        buttonScrollPane.setViewportView(buttonPanel);
+
+        JFrame testFrame = new JFrame("bug4202954");
+        testFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
+        testFrame.setLayout(new BorderLayout());
+        testFrame.add(BorderLayout.CENTER, buttonScrollPane);
+        testFrame.setSize(450, 100);
+        testFrame.setVisible(true);
+    }
+    public static JButton findJButton(final JScrollBar scrollBar, final int minX, final int minY) throws Exception {
+        JButton button = Util.invokeOnEDT(new java.util.concurrent.Callable<JButton>() {
+            @Override
+            public JButton call() throws Exception {
+                for (Component c: scrollBar.getComponents()) {
+                    if (c instanceof JButton) {
+                        Point p = c.getLocationOnScreen();
+                        if (p.x > minX && p.y > minY) {
+                            return (JButton) c;
+                        }
+                    }
+                }
+                return null;
+            }
+        });
+        return button;
+    }
+    public static void clickMouseOnComponent(Component c, int buttons) throws Exception {
+        Point p = Util.getCenterPoint(c);
+        robot.mouseMove(p.x, p.y);
+        robot.mousePress(buttons);
+        robot.mouseRelease(buttons);
+    }
+    public static boolean doTest(JButton scrollButton, int buttons, boolean expectScroll) throws Exception {
+        java.util.concurrent.Callable<Integer> horizontalValue = new java.util.concurrent.Callable<Integer>() {
+            @Override
+            public Integer call() throws Exception {
+                return buttonScrollPane.getHorizontalScrollBar().getValue();
+            }
+        };
+        java.util.concurrent.Callable<Integer> verticalValue = new java.util.concurrent.Callable<Integer>() {
+            @Override
+            public Integer call() throws Exception {
+                return buttonScrollPane.getVerticalScrollBar().getValue();
+            }
+        };
+        Integer oldHValue = Util.invokeOnEDT(horizontalValue);
+        Integer oldVValue = Util.invokeOnEDT(verticalValue);
+
+        clickMouseOnComponent(scrollButton, buttons);
+        toolkit.realSync();
+
+        int newHValue = Util.invokeOnEDT(horizontalValue);
+        int newVValue = Util.invokeOnEDT(verticalValue);
+
+        return (oldHValue != newHValue || oldVValue != newVValue) == expectScroll;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/swing/JSpinner/4973721/bug4973721.java	Tue Oct 15 13:54:01 2013 +0100
@@ -0,0 +1,120 @@
+/*
+ * 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 4973721
+   @summary Up and Down Arrow key buttons are not working for the JSpinner in Synth LAF
+   @library ../../regtesthelpers
+   @build Util
+   @author Oleg Mokhovikov
+   @run main bug4973721
+*/
+
+import java.awt.Robot;
+import java.awt.Toolkit;
+import javax.swing.event.ChangeListener;
+import javax.swing.event.ChangeEvent;
+import java.awt.event.KeyEvent;
+import java.awt.event.FocusListener;
+import java.awt.event.FocusEvent;
+import javax.swing.*;
+import sun.awt.SunToolkit;
+
+public class bug4973721 implements ChangeListener, FocusListener {
+    static volatile boolean bStateChanged = false;
+    static volatile boolean bFocusGained = false;
+    static JSpinner spinner;
+    static final Object listener = new bug4973721();
+    private static final SunToolkit toolkit = (SunToolkit) Toolkit.getDefaultToolkit();
+
+    public void focusLost(FocusEvent e) {}
+
+    public synchronized void focusGained(FocusEvent e) {
+        System.out.println("focusGained");
+        bFocusGained = true;
+        notifyAll();
+    }
+
+    public synchronized void stateChanged(ChangeEvent e) {
+        System.out.println("stateChanged");
+        bStateChanged = true;
+        notifyAll();
+    }
+
+    public static void main(String[] args) throws Exception {
+        UIManager.setLookAndFeel("javax.swing.plaf.synth.SynthLookAndFeel");
+
+        SwingUtilities.invokeAndWait(new Runnable() {
+            public void run() {
+                final JFrame frame = new JFrame();
+                spinner = new JSpinner();
+                frame.getContentPane().add(spinner);
+                frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
+
+                frame.pack();
+                frame.setVisible(true);
+                spinner.addChangeListener((ChangeListener)listener);
+                spinner.addFocusListener((FocusListener)listener);
+                spinner.requestFocus();
+
+            }
+        });
+
+        synchronized(listener) {
+            if (!bFocusGained) {
+                System.out.println("waiting focusGained...");
+                try { listener.wait(5000); } catch (InterruptedException e) {}
+            }
+        }
+
+        boolean hasFocus = Util.invokeOnEDT(new java.util.concurrent.Callable<Boolean>() {
+            @Override
+            public Boolean call() throws Exception {
+                return spinner.hasFocus();
+            }
+        });
+
+        if (!bFocusGained && !hasFocus) {
+            throw new RuntimeException("Couldn't request focus for spinner");
+        }
+        Robot robot = new Robot();
+        robot.setAutoDelay(50);
+
+        Util.hitKeys(robot, KeyEvent.VK_UP);
+        toolkit.realSync();
+        Thread.sleep(1000);
+
+        if (!bStateChanged) {
+            throw new RuntimeException("Up arrow key button doesn't work for a spinner in Synth L&F");
+        }
+
+        bStateChanged = false;
+
+        Util.hitKeys(robot, KeyEvent.VK_DOWN);
+        toolkit.realSync();
+        Thread.sleep(1000);
+
+        if (!bStateChanged) {
+            throw new RuntimeException("Down arrow key button doesn't work for a spinner in Synth L&F");
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/swing/JSplitPane/4514858/bug4514858.java	Tue Oct 15 13:54:01 2013 +0100
@@ -0,0 +1,210 @@
+/*
+ * 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 4514858 4164779
+   @summary F6, F8 Ctrl-TAB and Ctrl-Shift-TAB in JSplitPane
+   @author Andrey Pikalev
+   @run main/manual bug4514858
+*/
+
+import javax.swing.*;
+import javax.swing.border.TitledBorder;
+import java.awt.*;
+import java.awt.event.*;
+
+
+public class bug4514858  implements ActionListener {
+
+    static String intructions = "Test the F6, F8, Ctrl-TAB and Ctrl-Shift-TAB keybinding functionality in JSplitPane\n" +
+            "with different LookAndFeels (switch LookAndFeel with the buttoms at the bottom of the\n" +
+            "frame \"Test\"):\n\n" +
+            "1. Move focus to the button \"Button 1\" in the frame \"Test\". Then press F6 several times.\n" +
+            "The focus should cycle between five buttons in order from 1 to 5.\n\n" +
+            "2. Move focus to the button \"Button 2\" in the frame \"Test\". Then press F8 three times.\n" +
+            "The splitters of the splitpanes should be highlited in order:\n" +
+            "\"JSplitPane 3\", \"JSplitPane 2\", \"JSplitPane 1\".\n\n" +
+            "3. Move focus to the button \"Button 2\" in the frame \"Test\". Press Ctrl-TAB.\n" +
+            "The focus should go to the \"Button 4\". Then press Ctrl-TAB again.\n" +
+            "The focus should go to the first enabled button at the bottom of frame.\n\n" +
+            "4. Move focus to the button \"Button 4\" in the frame \"Test\". Press Ctrl-Shift-TAB three times.\n" +
+            "The focus should go through the button \"Button 3\", then \"Button 1\", then to the last\n" +
+            "enabled button at the bottom of frame.";
+    static Test test = new Test();
+    JFrame fr;
+    public static void main(String[] argv) throws Exception {
+        UIManager.setLookAndFeel(UIManager.getCrossPlatformLookAndFeelClassName());
+        SwingUtilities.invokeAndWait(new Runnable() {
+            public void run() {
+                new bug4514858().createAndShowGUI();
+            }
+        });
+        test.waitTestResult();
+    }
+    public void createAndShowGUI() {
+        fr = new JFrame("Test");
+
+        //-------------------------------------------------------------
+        JButton left2 = new JButton("Button 1");
+
+        JButton left3 = new JButton("Button 2");
+        JButton right3 = new JButton("Button 3");
+
+        JSplitPane right2 = new JSplitPane(JSplitPane.VERTICAL_SPLIT, left3, right3);
+        right2.setBorder(new TitledBorder("JSplitPane 3"));
+
+        JSplitPane left1 = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, left2, right2);
+        left1.setBorder(new TitledBorder("JSplitPane 2"));
+
+        JButton left4 = new JButton("Button 4");
+        JButton right4 = new JButton("Button 5");
+
+        JSplitPane right1 = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, left4, right4);
+        right1.setBorder(new TitledBorder("JSplitPane 4"));
+
+        JSplitPane sp = new JSplitPane(JSplitPane.VERTICAL_SPLIT, left1, right1);
+        sp.setBorder(new TitledBorder("JSplitPane 1"));
+        fr.getContentPane().add(sp);
+
+        //-------------------------------------------------------------
+        JPanel p = new JPanel();
+
+        JButton metal = new JButton("Metal");
+        metal.setActionCommand("Metal");
+        metal.setEnabled(isSupportedLAF("javax.swing.plaf.metal.MetalLookAndFeel"));
+        metal.addActionListener(this);
+        p.add(metal);
+
+        JButton motif = new JButton("Motif");
+        motif.setActionCommand("Motif");
+        motif.setEnabled(isSupportedLAF("com.sun.java.swing.plaf.motif.MotifLookAndFeel"));
+        motif.addActionListener(this);
+        p.add(motif);
+
+        JButton windows = new JButton("Windows");
+        windows.setActionCommand("Windows");
+        windows.setEnabled(isSupportedLAF("com.sun.java.swing.plaf.windows.WindowsLookAndFeel"));
+        windows.addActionListener(this);
+        p.add(windows);
+
+        fr.getContentPane().add(p, BorderLayout.SOUTH);
+
+        fr.pack();
+        fr.setVisible(true);
+
+        JFrame instrFrame = test.createTestFrame("bug4514858 instructions", null, intructions, 250);
+        instrFrame.setBounds(fr.getWidth() + 50, fr.getHeight(), 600, 400);
+        instrFrame.setVisible(true);
+    }
+
+    private boolean isSupportedLAF(String str) {
+        try {
+            Class c = Class.forName(str);
+            LookAndFeel laf = (LookAndFeel)c.newInstance();
+            return laf.isSupportedLookAndFeel();
+        } catch (Exception e) {
+            return false;
+        }
+    }
+
+    public void actionPerformed(ActionEvent e) {
+        String s = e.getActionCommand();
+        if (s.equals("Metal")) {
+            s = "javax.swing.plaf.metal.MetalLookAndFeel";
+        } else if (s.equals("Motif")) {
+            s = "com.sun.java.swing.plaf.motif.MotifLookAndFeel";
+        } else {
+            s = "com.sun.java.swing.plaf.windows.WindowsLookAndFeel";
+        }
+        try {
+            UIManager.setLookAndFeel(s);
+            SwingUtilities.updateComponentTreeUI(fr);
+            fr.pack();
+        } catch(Exception ex) {
+            ex.printStackTrace();
+            throw new RuntimeException(ex);
+        }
+    }
+   static class Test {
+        private boolean pass;
+        JFrame createTestFrame(String name, Component topComponent, String instructions, int instrHeight) {
+            final String PASS = "Pass";
+            final String FAIL = "Fail";
+            JFrame frame = new JFrame(name);
+            frame.setLayout(new BorderLayout());
+
+            JPanel testButtonsPanel = new JPanel();
+            testButtonsPanel.setMaximumSize(new Dimension(Integer.MAX_VALUE, 20));
+
+            ActionListener btnAL = new ActionListener() {
+                public void actionPerformed(ActionEvent event) {
+                    switch (event.getActionCommand()) {
+                        case PASS:
+                            pass();
+                            break;
+                        default:
+                            throw new RuntimeException("Test failed.");
+                    }
+                }
+            };
+            JButton passBtn = new JButton(PASS);
+            passBtn.addActionListener(btnAL);
+            passBtn.setActionCommand(PASS);
+
+            JButton failBtn = new JButton(FAIL);
+            failBtn.addActionListener(btnAL);
+            failBtn.setActionCommand(FAIL);
+
+            testButtonsPanel.add(BorderLayout.WEST, passBtn);
+            testButtonsPanel.add(BorderLayout.EAST, failBtn);
+
+            JTextArea instrText = new JTextArea();
+            instrText.setLineWrap(true);
+            instrText.setEditable(false);
+            JScrollPane instrScrollPane = new JScrollPane(instrText);
+            instrScrollPane.setMaximumSize(new Dimension(Integer.MAX_VALUE, instrHeight));
+            instrText.append(instructions);
+
+            JPanel servicePanel = new JPanel();
+            servicePanel.setLayout(new BorderLayout());
+            if (topComponent == null) {
+                frame.add(BorderLayout.CENTER, instrScrollPane);
+            } else {
+                servicePanel.add(BorderLayout.CENTER, instrScrollPane);
+                frame.add(BorderLayout.CENTER, topComponent);
+            }
+            servicePanel.add(BorderLayout.SOUTH, testButtonsPanel);
+
+            frame.add(BorderLayout.SOUTH, servicePanel);
+            return frame;
+        }
+        synchronized void pass() {
+            pass = true;
+            notifyAll();
+        }
+        synchronized void waitTestResult() throws InterruptedException {
+            while (!pass) {
+                wait();
+            }
+        }
+    }
+}
--- a/jdk/test/javax/swing/PopupFactory/6276087/NonOpaquePopupMenuTest.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/test/javax/swing/PopupFactory/6276087/NonOpaquePopupMenuTest.java	Tue Oct 15 13:54:01 2013 +0100
@@ -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
@@ -70,6 +70,7 @@
         Point p = getMenuClickPoint();
         robot.mouseMove(p.x, p.y);
         robot.mousePress(InputEvent.BUTTON1_MASK);
+        robot.mouseRelease(InputEvent.BUTTON1_MASK);
 
         toolkit.realSync();
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/swing/plaf/synth/SynthButtonUI/6276188/bug6276188.java	Tue Oct 15 13:54:01 2013 +0100
@@ -0,0 +1,81 @@
+/*
+ * 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 1.4 08/08/05
+ * @bug 6276188
+ * @library ../../../../regtesthelpers
+ * @build Util
+ * @author Romain Guy
+ * @summary Tests PRESSED and MOUSE_OVER and FOCUSED state for buttons with Synth.
+ * @run main bug6276188
+ */
+import java.awt.*;
+import java.awt.image.*;
+import java.awt.event.*;
+
+import javax.swing.*;
+import javax.swing.plaf.synth.*;
+import sun.awt.SunToolkit;
+
+public class bug6276188 extends JFrame {
+
+    private static JButton button;
+    private static Point p;
+    private static final SunToolkit toolkit = (SunToolkit) Toolkit.getDefaultToolkit();
+
+    public static void main(String[] args) throws Throwable {
+        SynthLookAndFeel lookAndFeel = new SynthLookAndFeel();
+        lookAndFeel.load(bug6276188.class.getResourceAsStream("bug6276188.xml"), bug6276188.class);
+
+        UIManager.setLookAndFeel(lookAndFeel);
+        SwingUtilities.invokeAndWait(new Runnable() {
+            public void run() {
+                JFrame testFrame = new JFrame();
+                testFrame.setLayout(new BorderLayout());
+                testFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
+                testFrame.add(BorderLayout.CENTER, button = new JButton());
+
+                testFrame.setSize(new Dimension(320, 200));
+                testFrame.setVisible(true);
+            }
+        });
+
+        p = Util.getCenterPoint(button);
+
+        Robot robot = new Robot();
+        robot.setAutoDelay(50);
+
+        robot.mouseMove(p.x , p.y);
+        robot.mousePress(InputEvent.BUTTON1_MASK);
+        toolkit.realSync();
+        robot.delay(1000);
+
+        Color color = robot.getPixelColor(p.x, p.y);
+        robot.mouseRelease(InputEvent.BUTTON1_MASK);
+        boolean red = color.getRed() > 0 && color.getGreen() == 0 && color.getBlue() == 0;
+        if (!red) {
+            System.err.println("Red: " + color.getRed() + "; Green: " + color.getGreen() + "; Blue: " + color.getBlue());
+            throw new RuntimeException("Synth ButtonUI does not handle PRESSED & MOUSE_OVER state");
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/swing/plaf/synth/SynthButtonUI/6276188/bug6276188.xml	Tue Oct 15 13:54:01 2013 +0100
@@ -0,0 +1,19 @@
+<synth>
+  <style id="backingStyle">
+    <font name="Dialog" size="12" />
+    
+    <state>
+      <color value="green" type="BACKGROUND" />
+      <color value="black" type="FOREGROUND" />
+    </state>
+  </style>
+  <bind style="backingStyle" type="REGION" key=".*" />
+
+  <style id="buttonStyle">
+    <state value="PRESSED and MOUSE_OVER">
+      <imagePainter method="buttonBackground" path="red.gif" center="true" />
+    </state>
+  </style>
+  <bind style="buttonStyle" type="REGION" key="Button" />
+</synth>
+  
Binary file jdk/test/javax/swing/plaf/synth/SynthButtonUI/6276188/red.gif has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/xml/jaxp/validation/8015092/XPathWhiteSpaceTest.java	Tue Oct 15 13:54:01 2013 +0100
@@ -0,0 +1,60 @@
+/*
+ * 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 8015092
+ * @summary whitespace within patterns in Selector XPath expression is accepted
+ * @run main/othervm XPathWhiteSpaceTest
+ */
+
+import java.io.*;
+import javax.xml.XMLConstants;
+import javax.xml.validation.Schema;
+import javax.xml.validation.SchemaFactory;
+import org.xml.sax.SAXException;
+
+/**
+ * http://www.w3.org/TR/xmlschema-1/#coss-identity-constraint
+ * For readability, whitespace may be used in selector XPath expressions even though
+ * not explicitly allowed by the grammar:
+ * whitespace may be freely added within patterns before or after any token.
+ *
+ * @author huizhe.wang@oracle.com
+ */
+public class XPathWhiteSpaceTest {
+    static final String XSDFILE = "idJ029.xsd";
+
+    public static void main(String[] args) throws Exception {
+        try{
+            SchemaFactory schemaFactory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
+            Schema schema = schemaFactory.newSchema(new File(System.getProperty("test.src", "."), XSDFILE));
+        } catch (SAXException e) {
+            throw new RuntimeException(e.getMessage());
+        }
+
+
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/xml/jaxp/validation/8015092/idIxpns.xsd	Tue Oct 15 13:54:01 2013 +0100
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="xpns.org" xmlns:xpns="xpns.org">
+	<xsd:element name="xsid" type="xsd:string"/>
+	<xsd:element name="xiid">
+		<xsd:complexType>
+			<xsd:sequence>
+				<xsd:element name="xiid2" type="xsd:string" maxOccurs="unbounded"/>
+			</xsd:sequence>
+			<xsd:attribute name="val" type="xsd:string"/>
+		</xsd:complexType>
+	</xsd:element>
+</xsd:schema>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/xml/jaxp/validation/8015092/idIxpns1.xsd	Tue Oct 15 13:54:01 2013 +0100
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="xpns1.org" xmlns:xpns="xpns1.org">
+	<xsd:element name="xsid" type="xsd:string"/>
+	<xsd:element name="xiid">
+		<xsd:complexType>
+			<xsd:sequence>
+				<xsd:element name="xiid2" type="xsd:string" maxOccurs="unbounded"/>
+			</xsd:sequence>
+			<xsd:attribute name="val" type="xsd:string"/>
+		</xsd:complexType>
+	</xsd:element>
+</xsd:schema>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/xml/jaxp/validation/8015092/idJ029.xsd	Tue Oct 15 13:54:01 2013 +0100
@@ -0,0 +1,21 @@
+<?xml version="1.0"?>
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xpns="xpns.org" xmlns:xpns1="xpns1.org" xmlns:xpns2="xpns2.org" xmlns:imp="importNS">
+	<xsd:import namespace="importNS" schemaLocation="idJimp.xsd"/>
+	<xsd:import namespace="xpns.org" schemaLocation="idIxpns.xsd"/>
+	<xsd:import namespace="xpns1.org" schemaLocation="idIxpns1.xsd"/>
+	<xsd:element name="root">
+		<xsd:complexType>
+			<xsd:sequence>
+				<xsd:element ref="tid" maxOccurs="unbounded"/>
+				<xsd:element ref="imp:iid1" maxOccurs="unbounded"/>
+				<xsd:element ref="imp:sid" maxOccurs="unbounded"/>
+				<xsd:element ref="xpns:xiid" maxOccurs="unbounded"/>
+			</xsd:sequence>
+		</xsd:complexType>
+		<xsd:unique id="foo123" name="uid">
+			<xsd:selector xpath=".//tid"/>
+			<xsd:field xpath=". //."/>
+		</xsd:unique>
+	</xsd:element>
+	<xsd:element name="tid" type="xsd:string"/>
+</xsd:schema>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/xml/jaxp/validation/8015092/idJimp.xsd	Tue Oct 15 13:54:01 2013 +0100
@@ -0,0 +1,11 @@
+<?xml version="1.0"?>
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="importNS" xmlns:imp="importNS">
+	<xsd:element name="sid" type="xsd:string"/>
+	<xsd:element name="iid1">
+		<xsd:complexType>
+			<xsd:sequence>
+				<xsd:element name="iid2" type="xsd:string" maxOccurs="unbounded"/>
+			</xsd:sequence>
+		</xsd:complexType>
+	</xsd:element>
+</xsd:schema>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/sun/java2d/AcceleratedXORModeTest.java	Tue Oct 15 13:54:01 2013 +0100
@@ -0,0 +1,143 @@
+/*
+ * 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     8024343
+* @summary Test verifies that accelerated pipelines
+*          correctly draws primitives in XOR mode.
+* @run main/othervm -Dsun.java2d.xrender=True AcceleratedXORModeTest
+*/
+
+import java.awt.Color;
+import java.awt.Graphics2D;
+import java.awt.GraphicsConfiguration;
+import java.awt.GraphicsEnvironment;
+import java.awt.image.BufferedImage;
+import java.awt.image.VolatileImage;
+import java.io.File;
+import java.io.IOException;
+import javax.imageio.ImageIO;
+
+public class AcceleratedXORModeTest {
+    public static void main(String argv[]) {
+        String fileName = argv.length > 0 ? argv[0] : null;
+        new AcceleratedXORModeTest(fileName).test();
+    }
+
+    static final Color backColor = Color.red;
+    static final Color color1 = Color.green;
+    static final Color color2 = Color.yellow;
+    static final Color xorColor1 = Color.blue;
+    static final Color xorColor2 = Color.white;
+
+    static final int width = 700, height = 300;
+
+    VolatileImage vImg = null;
+    String fileName;
+
+    public AcceleratedXORModeTest(String fileName) {
+        this.fileName = fileName;
+    }
+
+    void draw(Graphics2D g) {
+        g.setColor(backColor);
+        g.fillRect(0, 0, width, height);
+        g.setXORMode(xorColor1);
+        drawPattern(g, 100);
+        g.setXORMode(xorColor2);
+        drawPattern(g, 400);
+        g.dispose();
+    }
+
+    void test(BufferedImage bi) {
+        comparePattern(bi, 150, xorColor1.getRGB());
+        comparePattern(bi, 450, xorColor2.getRGB());
+    }
+
+    void comparePattern(BufferedImage bi, int startX, int xorColor) {
+        int[] expectedColors = {
+            backColor.getRGB() ^ color1.getRGB() ^ xorColor,
+            backColor.getRGB() ^ color1.getRGB() ^ xorColor ^
+                color2.getRGB() ^ xorColor,
+            backColor.getRGB() ^ color2.getRGB() ^ xorColor
+        };
+        for (int i = 0; i < 3; i++) {
+            int x = startX + 100 * i;
+            int rgb = bi.getRGB(x, 150);
+            if (rgb != expectedColors[i]) {
+                String msg = "Colors mismatch: x = " + x +
+                        ", got " + new Color(rgb) + ", expected " +
+                        new Color(expectedColors[i]);
+                System.err.println(msg);
+                write(bi);
+                throw new RuntimeException("FAILED: " + msg);
+            }
+        }
+    }
+
+    void drawPattern(Graphics2D g, int x) {
+        g.setColor(color1);
+        g.fillRect(x, 0, 200, 300);
+        g.setColor(color2);
+        g.fillRect(x+100, 0, 200, 300);
+    }
+
+    GraphicsConfiguration getDefaultGC() {
+        return GraphicsEnvironment.getLocalGraphicsEnvironment().
+                getDefaultScreenDevice().getDefaultConfiguration();
+    }
+
+    void createVImg() {
+        if (vImg != null) {
+            vImg.flush();
+            vImg = null;
+        }
+        vImg = getDefaultGC().createCompatibleVolatileImage(width, height);
+    }
+
+    void write(BufferedImage bi) {
+        if (fileName != null) {
+            try {
+                ImageIO.write(bi, "png", new File(fileName));
+            } catch (IOException e) {
+                System.err.println("Can't write image file " + fileName);
+            }
+        }
+    }
+
+    void test() {
+        createVImg();
+        do {
+            int valCode = vImg.validate(getDefaultGC());
+            if (valCode == VolatileImage.IMAGE_INCOMPATIBLE) {
+                createVImg();
+            }
+            Graphics2D g = vImg.createGraphics();
+            draw(g);
+            BufferedImage bi = vImg.getSnapshot();
+            test(bi);
+            write(bi);
+        } while (vImg.contentsLost());
+    }
+}
--- a/jdk/test/sun/management/jmxremote/bootstrap/JvmstatCountersTest.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/test/sun/management/jmxremote/bootstrap/JvmstatCountersTest.java	Tue Oct 15 13:54:01 2013 +0100
@@ -29,10 +29,10 @@
  * @author Luis-Miguel Alventosa
  * @run clean JvmstatCountersTest
  * @run build JvmstatCountersTest
- * @run main/othervm JvmstatCountersTest 1
- * @run main/othervm -Dcom.sun.management.jmxremote JvmstatCountersTest 2
- * @run main/othervm -Dcom.sun.management.jmxremote.port=0 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false JvmstatCountersTest 3
- * @run main/othervm JvmstatCountersTest 4
+ * @run main/othervm/timeout=600 JvmstatCountersTest 1
+ * @run main/othervm/timeout=600 -Dcom.sun.management.jmxremote JvmstatCountersTest 2
+ * @run main/othervm/timeout=600 -Dcom.sun.management.jmxremote.port=0 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false JvmstatCountersTest 3
+ * @run main/othervm/timeout=600 JvmstatCountersTest 4
  */
 
 import java.io.*;
--- a/jdk/test/sun/security/ssl/com/sun/net/ssl/internal/ssl/DHKeyExchange/DHEKeySizing.java	Tue Oct 15 09:27:32 2013 +0100
+++ b/jdk/test/sun/security/ssl/com/sun/net/ssl/internal/ssl/DHKeyExchange/DHEKeySizing.java	Tue Oct 15 13:54:01 2013 +0100
@@ -111,7 +111,15 @@
 
 public class DHEKeySizing {
 
-    private static boolean debug = true;
+    private final static boolean debug = true;
+
+    // key length bias because of the stripping of leading zero bytes of
+    // negotiated DH keys.
+    //
+    // This is an effort to mimum intermittent failure when we cannot
+    // estimate what's the exact number of leading zero bytes of
+    // negotiated DH keys.
+    private final static int KEY_LEN_BIAS = 6;
 
     private SSLContext sslc;
     private SSLEngine ssle1;    // client
@@ -269,7 +277,8 @@
         twoToOne.flip();
 
         log("Message length of ServerHello series: " + twoToOne.remaining());
-        if (lenServerKeyEx != twoToOne.remaining()) {
+        if (twoToOne.remaining() < (lenServerKeyEx - KEY_LEN_BIAS) ||
+                twoToOne.remaining() > lenServerKeyEx) {
             throw new Exception(
                 "Expected to generate ServerHello series messages of " +
                 lenServerKeyEx + " bytes, but not " + twoToOne.remaining());
@@ -289,7 +298,8 @@
         oneToTwo.flip();
 
         log("Message length of ClientKeyExchange: " + oneToTwo.remaining());
-        if (lenClientKeyEx != oneToTwo.remaining()) {
+        if (oneToTwo.remaining() < (lenClientKeyEx - KEY_LEN_BIAS) ||
+                oneToTwo.remaining() > lenClientKeyEx) {
             throw new Exception(
                 "Expected to generate ClientKeyExchange message of " +
                 lenClientKeyEx + " bytes, but not " + oneToTwo.remaining());