changeset 9477:9314c199003d

Merge
author lana
date Tue, 06 Aug 2013 22:47:14 -0700
parents c827ad8c1101 8ed8e2b4b90e
children ab64c138d5bd
files src/share/classes/java/net/package.html
diffstat 347 files changed, 14027 insertions(+), 5681 deletions(-) [+]
line wrap: on
line diff
--- a/.hgtags	Tue Aug 06 17:12:37 2013 -0700
+++ b/.hgtags	Tue Aug 06 22:47:14 2013 -0700
@@ -222,3 +222,4 @@
 c4908732fef5235f1b98cafe0ce507771ef7892c jdk8-b98
 6a099a36589bd933957272ba63e5263bede29971 jdk8-b99
 5be9c5bfcfe9b2a40412b4fb364377d49de014eb jdk8-b100
+6901612328239fbd471d20823113c1cf3fdaebee jdk8-b101
--- a/src/macosx/classes/com/apple/eawt/_AppMenuBarHandler.java	Tue Aug 06 17:12:37 2013 -0700
+++ b/src/macosx/classes/com/apple/eawt/_AppMenuBarHandler.java	Tue Aug 06 22:47:14 2013 -0700
@@ -31,6 +31,7 @@
 import javax.swing.*;
 import javax.swing.plaf.MenuBarUI;
 
+import com.apple.laf.ScreenMenuBar;
 import sun.lwawt.macosx.CMenuBar;
 
 import com.apple.laf.AquaMenuBarUI;
@@ -72,12 +73,15 @@
         // scan the current frames, and see if any are foreground
         final Frame[] frames = Frame.getFrames();
         for (final Frame frame : frames) {
-            if (frame.isVisible() && !isFrameMinimized(frame)) return;
+            if (frame.isVisible() && !isFrameMinimized(frame)) {
+                return;
+            }
         }
 
         // if we have no foreground frames, then we have to "kick" the menubar
         final JFrame pingFrame = new JFrame();
         pingFrame.getRootPane().putClientProperty("Window.alpha", new Float(0.0f));
+        pingFrame.setUndecorated(true);
         pingFrame.setVisible(true);
         pingFrame.toFront();
         pingFrame.setVisible(false);
@@ -101,7 +105,6 @@
             // Aqua was not installed
             throw new IllegalStateException("Application.setDefaultMenuBar() only works with the Aqua Look and Feel");
         }
-/* TODO: disabled until ScreenMenuBar is working
 
         final AquaMenuBarUI aquaUI = (AquaMenuBarUI)ui;
         final ScreenMenuBar screenMenuBar = aquaUI.getScreenMenuBar();
@@ -118,8 +121,7 @@
         }
 
         // grab the pointer to the CMenuBar, and retain it in native
-        nativeSetDefaultMenuBar(((CMenuBar)peer).getNativeMenuBarPeer());
-*/
+        nativeSetDefaultMenuBar(((CMenuBar)peer).getModel());
     }
 
     void setAboutMenuItemVisible(final boolean present) {
--- a/src/macosx/classes/sun/lwawt/macosx/CDataTransferer.java	Tue Aug 06 17:12:37 2013 -0700
+++ b/src/macosx/classes/sun/lwawt/macosx/CDataTransferer.java	Tue Aug 06 22:47:14 2013 -0700
@@ -182,7 +182,11 @@
         Long format = predefinedClipboardNameMap.get(str);
 
         if (format == null) {
-            format = new Long(registerFormatWithPasteboard(str));
+            if (java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment().isHeadlessInstance()) {
+                // Do not try to access native system for the unknown format
+                return -1L;
+            }
+            format = registerFormatWithPasteboard(str);
             predefinedClipboardNameMap.put(str, format);
             predefinedClipboardFormatMap.put(format, str);
         }
--- a/src/macosx/classes/sun/lwawt/macosx/CMenuComponent.java	Tue Aug 06 17:12:37 2013 -0700
+++ b/src/macosx/classes/sun/lwawt/macosx/CMenuComponent.java	Tue Aug 06 22:47:14 2013 -0700
@@ -43,7 +43,7 @@
         return target;
     }
 
-    long getModel() {
+    public long getModel() {
         return modelPtr;
     }
 
--- a/src/macosx/classes/sun/lwawt/macosx/CPlatformWindow.java	Tue Aug 06 17:12:37 2013 -0700
+++ b/src/macosx/classes/sun/lwawt/macosx/CPlatformWindow.java	Tue Aug 06 22:47:14 2013 -0700
@@ -47,7 +47,7 @@
 import com.sun.awt.AWTUtilities;
 
 public class CPlatformWindow extends CFRetainedResource implements PlatformWindow {
-    private native long nativeCreateNSWindow(long nsViewPtr, long styleBits, double x, double y, double w, double h);
+    private native long nativeCreateNSWindow(long nsViewPtr,long ownerPtr, long styleBits, double x, double y, double w, double h);
     private static native void nativeSetNSWindowStyleBits(long nsWindowPtr, int mask, int data);
     private static native void nativeSetNSWindowMenuBar(long nsWindowPtr, long menuBarPtr);
     private static native Insets nativeGetNSWindowInsets(long nsWindowPtr);
@@ -230,7 +230,8 @@
         contentView = createContentView();
         contentView.initialize(peer, responder);
 
-        final long nativeWindowPtr = nativeCreateNSWindow(contentView.getAWTView(), styleBits, 0, 0, 0, 0);
+        final long ownerPtr = owner != null ? owner.getNSWindowPtr() : 0L;
+        final long nativeWindowPtr = nativeCreateNSWindow(contentView.getAWTView(), ownerPtr, styleBits, 0, 0, 0, 0);
         setPtr(nativeWindowPtr);
 
         if (target instanceof javax.swing.RootPaneContainer) {
--- a/src/macosx/native/sun/awt/AWTWindow.h	Tue Aug 06 17:12:37 2013 -0700
+++ b/src/macosx/native/sun/awt/AWTWindow.h	Tue Aug 06 22:47:14 2013 -0700
@@ -44,6 +44,7 @@
     jint styleBits;
     BOOL isEnabled;
     NSWindow *nsWindow;
+    AWTWindow *ownerWindow;
 }
 
 // An instance of either AWTWindow_Normal or AWTWindow_Panel
@@ -51,12 +52,15 @@
 
 @property (nonatomic, retain) JNFWeakJObjectWrapper *javaPlatformWindow;
 @property (nonatomic, retain) CMenuBar *javaMenuBar;
+@property (nonatomic, retain) AWTWindow *ownerWindow;
 @property (nonatomic) NSSize javaMinSize;
 @property (nonatomic) NSSize javaMaxSize;
 @property (nonatomic) jint styleBits;
 @property (nonatomic) BOOL isEnabled;
 
+
 - (id) initWithPlatformWindow:(JNFWeakJObjectWrapper *)javaPlatformWindow
+                  ownerWindow:owner
                     styleBits:(jint)styleBits
                     frameRect:(NSRect)frameRect
                   contentView:(NSView *)contentView;
--- a/src/macosx/native/sun/awt/AWTWindow.m	Tue Aug 06 17:12:37 2013 -0700
+++ b/src/macosx/native/sun/awt/AWTWindow.m	Tue Aug 06 22:47:14 2013 -0700
@@ -30,6 +30,7 @@
 #import "sun_lwawt_macosx_CPlatformWindow.h"
 #import "com_apple_eawt_event_GestureHandler.h"
 #import "com_apple_eawt_FullScreenHandler.h"
+#import "ApplicationDelegate.h"
 
 #import "AWTWindow.h"
 #import "AWTView.h"
@@ -55,7 +56,7 @@
 // doesn't provide information about "opposite" window, so we
 // have to do a bit of tracking. This variable points to a window
 // which had been the key window just before a new key window
-// was set. It would be nil if the new key window isn't an AWT 
+// was set. It would be nil if the new key window isn't an AWT
 // window or the app currently has no key window.
 static AWTWindow* lastKeyWindow = nil;
 
@@ -120,6 +121,7 @@
 @synthesize javaMaxSize;
 @synthesize styleBits;
 @synthesize isEnabled;
+@synthesize ownerWindow;
 
 - (void) updateMinMaxSize:(BOOL)resizable {
     if (resizable) {
@@ -201,6 +203,7 @@
 }
 
 - (id) initWithPlatformWindow:(JNFWeakJObjectWrapper *)platformWindow
+                  ownerWindow:owner
                     styleBits:(jint)bits
                     frameRect:(NSRect)rect
                   contentView:(NSView *)view
@@ -245,6 +248,7 @@
     self.isEnabled = YES;
     self.javaPlatformWindow = platformWindow;
     self.styleBits = bits;
+    self.ownerWindow = owner;
     [self setPropertiesForStyleBits:styleBits mask:MASK(_METHOD_PROP_BITMASK)];
 
     return self;
@@ -350,7 +354,7 @@
     [self.javaPlatformWindow setJObject:nil withEnv:env];
 
     self.nsWindow = nil;
-
+    self.ownerWindow = nil;
     [super dealloc];
 }
 
@@ -539,11 +543,27 @@
 AWT_ASSERT_APPKIT_THREAD;
     [AWTToolkit eventCountPlusPlus];
     AWTWindow *opposite = [AWTWindow lastKeyWindow];
-    if (!IS(self.styleBits, IS_DIALOG)) {
-        [CMenuBar activate:self.javaMenuBar modallyDisabled:NO];
-    } else if ((opposite != NULL) && IS(self.styleBits, IS_MODAL)) {
-        [CMenuBar activate:opposite->javaMenuBar modallyDisabled:YES];        
+
+    // Finds appropriate menubar in our hierarchy,
+    AWTWindow *awtWindow = self;
+    while (awtWindow.ownerWindow != nil) {
+        awtWindow = awtWindow.ownerWindow;
     }
+
+    CMenuBar *menuBar = nil;
+    BOOL isDisabled = NO;
+    if ([awtWindow.nsWindow isVisible]){
+        menuBar = awtWindow.javaMenuBar;
+        isDisabled = !awtWindow.isEnabled;
+    }
+
+    if (menuBar == nil) {
+        menuBar = [[ApplicationDelegate sharedDelegate] defaultMenuBar];
+        isDisabled = NO;
+    }
+
+    [CMenuBar activate:menuBar modallyDisabled:isDisabled];
+
     [AWTWindow setLastKeyWindow:nil];
 
     [self _deliverWindowFocusEvent:YES oppositeWindow: opposite];
@@ -555,6 +575,14 @@
     [AWTToolkit eventCountPlusPlus];
     [self.javaMenuBar deactivate];
 
+    // In theory, this might cause flickering if the window gaining focus
+    // has its own menu. However, I couldn't reproduce it on practice, so
+    // perhaps this is a non issue.
+    CMenuBar* defaultMenu = [[ApplicationDelegate sharedDelegate] defaultMenuBar];
+    if (defaultMenu != nil) {
+        [CMenuBar activate:defaultMenu modallyDisabled:NO];
+    }
+
     // the new key window
     NSWindow *keyWindow = [NSApp keyWindow];
     AWTWindow *opposite = nil;
@@ -741,7 +769,7 @@
  * Signature: (JJIIII)J
  */
 JNIEXPORT jlong JNICALL Java_sun_lwawt_macosx_CPlatformWindow_nativeCreateNSWindow
-(JNIEnv *env, jobject obj, jlong contentViewPtr, jlong styleBits, jdouble x, jdouble y, jdouble w, jdouble h)
+(JNIEnv *env, jobject obj, jlong contentViewPtr, jlong ownerPtr, jlong styleBits, jdouble x, jdouble y, jdouble w, jdouble h)
 {
     __block AWTWindow *window = nil;
 
@@ -750,13 +778,14 @@
     JNFWeakJObjectWrapper *platformWindow = [JNFWeakJObjectWrapper wrapperWithJObject:obj withEnv:env];
     NSView *contentView = OBJC(contentViewPtr);
     NSRect frameRect = NSMakeRect(x, y, w, h);
-
+    AWTWindow *owner = [OBJC(ownerPtr) delegate];
     [ThreadUtilities performOnMainThreadWaiting:YES block:^(){
 
         window = [[AWTWindow alloc] initWithPlatformWindow:platformWindow
-                                                  styleBits:styleBits
-                                                  frameRect:frameRect
-                                                contentView:contentView];
+                                               ownerWindow:owner
+                                                 styleBits:styleBits
+                                                 frameRect:frameRect
+                                               contentView:contentView];
         // the window is released is CPlatformWindow.nativeDispose()
 
         if (window) CFRetain(window.nsWindow);
@@ -818,11 +847,19 @@
 
         AWTWindow *window = (AWTWindow*)[nsWindow delegate];
 
-        if ([nsWindow isKeyWindow]) [window.javaMenuBar deactivate];
+        if ([nsWindow isKeyWindow]) {
+            [window.javaMenuBar deactivate];
+        }
+
         window.javaMenuBar = menuBar;
 
+        CMenuBar* actualMenuBar = menuBar;
+        if (actualMenuBar == nil) {
+            actualMenuBar = [[ApplicationDelegate sharedDelegate] defaultMenuBar];
+        }
+
         if ([nsWindow isKeyWindow]) {
-            [CMenuBar activate:window.javaMenuBar modallyDisabled:NO];
+            [CMenuBar activate:actualMenuBar modallyDisabled:NO];
         }
     }];
 
--- a/src/macosx/native/sun/awt/CMenuBar.m	Tue Aug 06 17:12:37 2013 -0700
+++ b/src/macosx/native/sun/awt/CMenuBar.m	Tue Aug 06 22:47:14 2013 -0700
@@ -63,7 +63,7 @@
         if (excludingAppleMenu && ![currMenu isJavaMenu]) {
             continue;
         }
-
+        [currItem setSubmenu:nil];
         [theMainMenu removeItemAtIndex:index];
     }
 
@@ -154,7 +154,10 @@
     // Clean up extra items
     NSUInteger removedIndex, removedCount = [removedMenuArray count];
     for (removedIndex=removedCount; removedIndex > 0; removedIndex--) {
-        [theMainMenu removeItemAtIndex:[[removedMenuArray objectAtIndex:(removedIndex-1)] integerValue]];
+        NSUInteger index = [[removedMenuArray objectAtIndex:(removedIndex-1)] integerValue];
+        NSMenuItem *currItem = [theMainMenu itemAtIndex:index];
+        [currItem setSubmenu:nil];
+        [theMainMenu removeItemAtIndex:index];
     }
 
     i = cmenuIndex;
--- a/src/macosx/native/sun/awt/CMenuItem.m	Tue Aug 06 17:12:37 2013 -0700
+++ b/src/macosx/native/sun/awt/CMenuItem.m	Tue Aug 06 22:47:14 2013 -0700
@@ -70,9 +70,15 @@
     JNIEnv *env = [ThreadUtilities getJNIEnv];
 JNF_COCOA_ENTER(env);
 
-    // If we are called as a result of user pressing a shorcut, do nothing,
+    // If we are called as a result of user pressing a shortcut, do nothing,
     // because AVTView has already sent corresponding key event to the Java
-    // layer from performKeyEquivalent
+    // layer from performKeyEquivalent.
+    // There is an exception from the rule above, though: if a window with
+    // a menu gets minimized by user and there are no other windows to take
+    // focus, the window's menu won't be removed from the global menu bar.
+    // However, the Java layer won't handle invocation by a shortcut coming
+    // from this "frameless" menu, because there are no active windows. This
+    // means we have to handle it here.
     NSEvent *currEvent = [[NSApplication sharedApplication] currentEvent];
     if ([currEvent type] == NSKeyDown) {
         NSString *menuKey = [sender keyEquivalent];
@@ -91,7 +97,8 @@
             eventKey = [NSString stringWithCharacters: &newChar length: 1];
         }
 
-        if ([menuKey isEqualToString:eventKey]) {
+        NSWindow *keyWindow = [NSApp keyWindow];
+        if ([menuKey isEqualToString:eventKey] && keyWindow != nil) {
             return;
         }
     }
--- a/src/share/classes/com/sun/java/swing/plaf/gtk/resources/gtk.properties	Tue Aug 06 17:12:37 2013 -0700
+++ b/src/share/classes/com/sun/java/swing/plaf/gtk/resources/gtk.properties	Tue Aug 06 22:47:14 2013 -0700
@@ -1,54 +1,54 @@
-# Refer to the note in basic.properties for a description as to what
-# the mnemonics correspond to and how to calculate them.
-
-
-
-# GTK specific properties
-
-# GTK color chooser properties:
-GTKColorChooserPanel.textAndMnemonic=&GTK Color Chooser
-# mnemonic as a VK_ constant
-
-GTKColorChooserPanel.hue.textAndMnemonic=&Hue:
-
-GTKColorChooserPanel.red.textAndMnemonic=R&ed:
-
-GTKColorChooserPanel.saturation.textAndMnemonic=&Saturation:
-
-GTKColorChooserPanel.green.textAndMnemonic=&Green:
-
-GTKColorChooserPanel.value.textAndMnemonic=&Value:
-
-GTKColorChooserPanel.blue.textAndMnemonic=&Blue:
-
-GTKColorChooserPanel.color.textAndMnemonic=Color &Name:
-
-
-
-############ FILE CHOOSER STRINGS #############
-
-FileChooser.acceptAllFileFilter.textAndMnemonic=All Files
-FileChooser.newFolderButton.textAndMnemonic=&New Folder
-FileChooser.newFolderDialog.textAndMnemonic=Folder name:
-FileChooser.newFolderNoDirectoryErrorTitle.textAndMnemonic=Error
-FileChooser.newFolderNoDirectoryError.textAndMnemonic=Error creating directory "{0}": No such file or directory
-FileChooser.deleteFileButton.textAndMnemonic=De&lete File
-FileChooser.renameFileButton.textAndMnemonic=&Rename File
-FileChooser.cancelButton.textAndMnemonic=&Cancel
-FileChooser.saveButton.textAndMnemonic=&OK
-FileChooser.openButton.textAndMnemonic=&OK
-FileChooser.saveDialogTitle.textAndMnemonic=Save
-FileChooser.openDialogTitle.textAndMnemonic=Open
-FileChooser.pathLabel.textAndMnemonic=&Selection:
-FileChooser.filterLabel.textAndMnemonic=Filter:
-FileChooser.foldersLabel.textAndMnemonic=Fol&ders
-FileChooser.filesLabel.textAndMnemonic=&Files
-
-FileChooser.cancelButtonToolTip.textAndMnemonic=Abort file chooser dialog.
-FileChooser.saveButtonToolTip.textAndMnemonic=Save selected file.
-FileChooser.openButtonToolTip.textAndMnemonic=Open selected file.
-
-FileChooser.renameFileDialog.textAndMnemonic=Rename file "{0}" to
-FileChooser.renameFileError.titleAndMnemonic=Error
-FileChooser.renameFileError.textAndMnemonic=Error renaming file "{0}" to "{1}"
-
+# Refer to the note in basic.properties for a description as to what
+# the mnemonics correspond to and how to calculate them.
+
+
+
+# GTK specific properties
+
+# GTK color chooser properties:
+GTKColorChooserPanel.textAndMnemonic=&GTK Color Chooser
+# mnemonic as a VK_ constant
+
+GTKColorChooserPanel.hue.textAndMnemonic=&Hue:
+
+GTKColorChooserPanel.red.textAndMnemonic=R&ed:
+
+GTKColorChooserPanel.saturation.textAndMnemonic=&Saturation:
+
+GTKColorChooserPanel.green.textAndMnemonic=&Green:
+
+GTKColorChooserPanel.value.textAndMnemonic=&Value:
+
+GTKColorChooserPanel.blue.textAndMnemonic=&Blue:
+
+GTKColorChooserPanel.color.textAndMnemonic=Color &Name:
+
+
+
+############ FILE CHOOSER STRINGS #############
+
+FileChooser.acceptAllFileFilter.textAndMnemonic=All Files
+FileChooser.newFolderButton.textAndMnemonic=&New Folder
+FileChooser.newFolderDialog.textAndMnemonic=Folder name:
+FileChooser.newFolderNoDirectoryErrorTitle.textAndMnemonic=Error
+FileChooser.newFolderNoDirectoryError.textAndMnemonic=Error creating directory "{0}": No such file or directory
+FileChooser.deleteFileButton.textAndMnemonic=De&lete File
+FileChooser.renameFileButton.textAndMnemonic=&Rename File
+FileChooser.cancelButton.textAndMnemonic=&Cancel
+FileChooser.saveButton.textAndMnemonic=&OK
+FileChooser.openButton.textAndMnemonic=&OK
+FileChooser.saveDialogTitle.textAndMnemonic=Save
+FileChooser.openDialogTitle.textAndMnemonic=Open
+FileChooser.pathLabel.textAndMnemonic=&Selection:
+FileChooser.filterLabel.textAndMnemonic=Filter:
+FileChooser.foldersLabel.textAndMnemonic=Fol&ders
+FileChooser.filesLabel.textAndMnemonic=&Files
+
+FileChooser.cancelButtonToolTip.textAndMnemonic=Abort file chooser dialog.
+FileChooser.saveButtonToolTip.textAndMnemonic=Save selected file.
+FileChooser.openButtonToolTip.textAndMnemonic=Open selected file.
+
+FileChooser.renameFileDialog.textAndMnemonic=Rename file "{0}" to
+FileChooser.renameFileError.titleAndMnemonic=Error
+FileChooser.renameFileError.textAndMnemonic=Error renaming file "{0}" to "{1}"
+
--- a/src/share/classes/com/sun/java/swing/plaf/windows/WindowsComboBoxUI.java	Tue Aug 06 17:12:37 2013 -0700
+++ b/src/share/classes/com/sun/java/swing/plaf/windows/WindowsComboBoxUI.java	Tue Aug 06 22:47:14 2013 -0700
@@ -499,7 +499,8 @@
 
         public void setItem(Object item) {
             super.setItem(item);
-            if (editor.hasFocus()) {
+            Object focus = KeyboardFocusManager.getCurrentKeyboardFocusManager().getFocusOwner();
+            if ((focus == editor) || (focus == editor.getParent())) {
                 editor.selectAll();
             }
         }
--- a/src/share/classes/com/sun/swing/internal/plaf/synth/resources/synth.properties	Tue Aug 06 17:12:37 2013 -0700
+++ b/src/share/classes/com/sun/swing/internal/plaf/synth/resources/synth.properties	Tue Aug 06 22:47:14 2013 -0700
@@ -1,45 +1,45 @@
-# This properties file is used to create a PropertyResourceBundle
-# It contains Locale specific strings used be the Synth Look and Feel.
-# Currently, the following components need this for support:
-#
-#    FileChooser
-#
-# When this file is read in, the strings are put into the
-# defaults table.  This is an implementation detail of the current
-# workings of Swing.  DO NOT DEPEND ON THIS.
-# This may change in future versions of Swing as we improve localization
-# support.
-#
-# Refer to the note in basic.properties for a description as to what
-# the mnemonics correspond to and how to calculate them.
-#
-# @author Steve Wilson
-
-
-############ FILE CHOOSER STRINGS #############
-
-FileChooser.lookInLabel.textAndMnemonic=Look &In:
-FileChooser.saveInLabel.textAndMnemonic=Save In:
-FileChooser.fileNameLabel.textAndMnemonic=File &Name:
-FileChooser.folderNameLabel.textAndMnemonic=Folder &Name:
-FileChooser.filesOfTypeLabel.textAndMnemonic=Files of &Type:
-FileChooser.upFolderToolTip.textAndMnemonic=Up One Level
-FileChooser.upFolderAccessibleName=Up
-FileChooser.homeFolderToolTip.textAndMnemonic=Home
-FileChooser.homeFolderAccessibleName=Home
-FileChooser.newFolderToolTip.textAndMnemonic=Create New Folder
-FileChooser.newFolderAccessibleName=New Folder
-FileChooser.newFolderActionLabel.textAndMnemonic=New Folder
-FileChooser.listViewButtonToolTip.textAndMnemonic=List
-FileChooser.listViewButtonAccessibleName=List
-FileChooser.listViewActionLabel.textAndMnemonic=List
-FileChooser.detailsViewButtonToolTip.textAndMnemonic=Details
-FileChooser.detailsViewButtonAccessibleName=Details
-FileChooser.detailsViewActionLabel.textAndMnemonic=Details
-FileChooser.refreshActionLabel.textAndMnemonic=Refresh
-FileChooser.viewMenuLabel.textAndMnemonic=View
-FileChooser.fileNameHeader.textAndMnemonic=Name
-FileChooser.fileSizeHeader.textAndMnemonic=Size
-FileChooser.fileTypeHeader.textAndMnemonic=Type
-FileChooser.fileDateHeader.textAndMnemonic=Modified
-FileChooser.fileAttrHeader.textAndMnemonic=Attributes
+# This properties file is used to create a PropertyResourceBundle
+# It contains Locale specific strings used be the Synth Look and Feel.
+# Currently, the following components need this for support:
+#
+#    FileChooser
+#
+# When this file is read in, the strings are put into the
+# defaults table.  This is an implementation detail of the current
+# workings of Swing.  DO NOT DEPEND ON THIS.
+# This may change in future versions of Swing as we improve localization
+# support.
+#
+# Refer to the note in basic.properties for a description as to what
+# the mnemonics correspond to and how to calculate them.
+#
+# @author Steve Wilson
+
+
+############ FILE CHOOSER STRINGS #############
+
+FileChooser.lookInLabel.textAndMnemonic=Look &In:
+FileChooser.saveInLabel.textAndMnemonic=Save In:
+FileChooser.fileNameLabel.textAndMnemonic=File &Name:
+FileChooser.folderNameLabel.textAndMnemonic=Folder &Name:
+FileChooser.filesOfTypeLabel.textAndMnemonic=Files of &Type:
+FileChooser.upFolderToolTip.textAndMnemonic=Up One Level
+FileChooser.upFolderAccessibleName=Up
+FileChooser.homeFolderToolTip.textAndMnemonic=Home
+FileChooser.homeFolderAccessibleName=Home
+FileChooser.newFolderToolTip.textAndMnemonic=Create New Folder
+FileChooser.newFolderAccessibleName=New Folder
+FileChooser.newFolderActionLabel.textAndMnemonic=New Folder
+FileChooser.listViewButtonToolTip.textAndMnemonic=List
+FileChooser.listViewButtonAccessibleName=List
+FileChooser.listViewActionLabel.textAndMnemonic=List
+FileChooser.detailsViewButtonToolTip.textAndMnemonic=Details
+FileChooser.detailsViewButtonAccessibleName=Details
+FileChooser.detailsViewActionLabel.textAndMnemonic=Details
+FileChooser.refreshActionLabel.textAndMnemonic=Refresh
+FileChooser.viewMenuLabel.textAndMnemonic=View
+FileChooser.fileNameHeader.textAndMnemonic=Name
+FileChooser.fileSizeHeader.textAndMnemonic=Size
+FileChooser.fileTypeHeader.textAndMnemonic=Type
+FileChooser.fileDateHeader.textAndMnemonic=Modified
+FileChooser.fileAttrHeader.textAndMnemonic=Attributes
--- a/src/share/classes/com/sun/tools/script/shell/init.js	Tue Aug 06 17:12:37 2013 -0700
+++ b/src/share/classes/com/sun/tools/script/shell/init.js	Tue Aug 06 22:47:14 2013 -0700
@@ -332,7 +332,7 @@
  * @param str input from which script is loaded and evaluated
  */
 if (typeof(load) == 'undefined') {
-    var load = function(str) {
+    this.load = function(str) {
         var stream = inStream(str);
         var bstream = new BufferedInputStream(stream);
         var reader = new BufferedReader(new InputStreamReader(bstream));
@@ -712,7 +712,7 @@
      * @param exitCode integer code returned to OS shell.
      * optional, defaults to 0
      */
-    var exit = function (code) {
+    this.exit = function (code) {
         if (code) {
             java.lang.System.exit(code + 0);
         } else {
@@ -725,7 +725,7 @@
     /**
      * synonym for exit
      */
-    var quit = function (code) {
+    this.quit = function (code) {
         exit(code);
     }
 }
@@ -881,7 +881,7 @@
      * @param format string to format the rest of the print items
      * @param args variadic argument list
      */
-    var printf = function (format, args/*, more args*/) {  
+    this.printf = function (format, args/*, more args*/) {  
         var array = java.lang.reflect.Array.newInstance(java.lang.Object, 
                     arguments.length - 1);
         for (var i = 0; i < array.length; i++) {
@@ -921,25 +921,7 @@
 }
 
 if (typeof(println) == 'undefined') {
-    var print = function(str, newline) {
-        if (typeof(str) == 'undefined') {
-            str = 'undefined';
-        } else if (str == null) {
-            str = 'null';
-        }
+    // just synonym to print
+    this.println = print;
+}
 
-        if (!(out instanceof java.io.PrintWriter)) {
-            out = new java.io.PrintWriter(out);
-        }
-
-        out.print(String(str));
-        if (newline) {
-            out.print('\n');
-        }
-        out.flush();
-    }
-
-    var println = function(str) {
-        print(str, true);
-    };
-}
--- a/src/share/classes/java/awt/AWTException.java	Tue Aug 06 17:12:37 2013 -0700
+++ b/src/share/classes/java/awt/AWTException.java	Tue Aug 06 22:47:14 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1995, 1997, 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
@@ -26,7 +26,7 @@
 
 
 /**
- * Signals that an Absract Window Toolkit exception has occurred.
+ * Signals that an Abstract Window Toolkit exception has occurred.
  *
  * @author      Arthur van Hoff
  */
--- a/src/share/classes/java/io/DataInput.java	Tue Aug 06 17:12:37 2013 -0700
+++ b/src/share/classes/java/io/DataInput.java	Tue Aug 06 22:47:14 2013 -0700
@@ -48,132 +48,87 @@
  * may be thrown if the input stream has been
  * closed.
  *
- * <h4><a name="modified-utf-8">Modified UTF-8</a></h4>
+ * <h3><a name="modified-utf-8">Modified UTF-8</a></h3>
  * <p>
  * Implementations of the DataInput and DataOutput interfaces represent
  * Unicode strings in a format that is a slight modification of UTF-8.
  * (For information regarding the standard UTF-8 format, see section
  * <i>3.9 Unicode Encoding Forms</i> of <i>The Unicode Standard, Version
  * 4.0</i>).
- * Note that in the following tables, the most significant bit appears in the
+ * Note that in the following table, the most significant bit appears in the
  * far left-hand column.
- * <p>
- * All characters in the range {@code '\u005Cu0001'} to
- * {@code '\u005Cu007F'} are represented by a single byte:
  *
  * <blockquote>
- *   <table border="1" cellspacing="0" cellpadding="8" width="50%"
+ *   <table border="1" cellspacing="0" cellpadding="8"
  *          summary="Bit values and bytes">
  *     <tr>
+ *       <th colspan="9"><span style="font-weight:normal">
+ *         All characters in the range {@code '\u005Cu0001'} to
+ *         {@code '\u005Cu007F'} are represented by a single byte:</span></th>
+ *     </tr>
+ *     <tr>
  *       <td></td>
- *       <th id="bit_a">Bit Values</th>
+ *       <th colspan="8" id="bit_a">Bit Values</th>
  *     </tr>
  *     <tr>
  *       <th id="byte1_a">Byte 1</th>
- *       <td>
- *         <table border="1" cellspacing="0" width="100%">
- *           <tr>
- *             <td width="12%"><center>0</center>
- *             <td colspan="7"><center>bits 6-0</center>
- *           </tr>
- *         </table>
- *       </td>
+ *       <td><center>0</center>
+ *       <td colspan="7"><center>bits 6-0</center>
+ *     </tr>
+ *     <tr>
+ *       <th colspan="9"><span style="font-weight:normal">
+ *         The null character {@code '\u005Cu0000'} and characters
+ *         in the range {@code '\u005Cu0080'} to {@code '\u005Cu07FF'} are
+ *         represented by a pair of bytes:</span></th>
+ *     </tr>
+ *     <tr>
+ *       <td></td>
+ *       <th colspan="8" id="bit_b">Bit Values</th>
+ *     </tr>
+ *     <tr>
+ *       <th id="byte1_b">Byte 1</th>
+ *       <td><center>1</center>
+ *       <td><center>1</center>
+ *       <td><center>0</center>
+ *       <td colspan="5"><center>bits 10-6</center>
+ *     </tr>
+ *     <tr>
+ *       <th id="byte2_a">Byte 2</th>
+ *       <td><center>1</center>
+ *       <td><center>0</center>
+ *       <td colspan="6"><center>bits 5-0</center>
+ *     </tr>
+ *     <tr>
+ *       <th colspan="9"><span style="font-weight:normal">
+ *         {@code char} values in the range {@code '\u005Cu0800'}
+ *         to {@code '\u005CuFFFF'} are represented by three bytes:</span></th>
+ *     </tr>
+ *     <tr>
+ *       <td></td>
+ *       <th colspan="8"id="bit_c">Bit Values</th>
+ *     </tr>
+ *     <tr>
+ *       <th id="byte1_c">Byte 1</th>
+ *       <td><center>1</center>
+ *       <td><center>1</center>
+ *       <td><center>1</center>
+ *       <td><center>0</center>
+ *       <td colspan="4"><center>bits 15-12</center>
+ *     </tr>
+ *     <tr>
+ *       <th id="byte2_b">Byte 2</th>
+ *       <td><center>1</center>
+ *       <td><center>0</center>
+ *       <td colspan="6"><center>bits 11-6</center>
+ *     </tr>
+ *     <tr>
+ *       <th id="byte3">Byte 3</th>
+ *       <td><center>1</center>
+ *       <td><center>0</center>
+ *       <td colspan="6"><center>bits 5-0</center>
  *     </tr>
  *   </table>
  * </blockquote>
- *
- * <p>
- * The null character {@code '\u005Cu0000'} and characters in the
- * range {@code '\u005Cu0080'} to {@code '\u005Cu07FF'} are
- * represented by a pair of bytes:
- *
- * <blockquote>
- *   <table border="1" cellspacing="0" cellpadding="8" width="50%"
- *          summary="Bit values and bytes">
- *     <tr>
- *       <td></td>
- *       <th id="bit_b">Bit Values</th>
- *     </tr>
- *     <tr>
- *       <th id="byte1_b">Byte 1</th>
- *       <td>
- *         <table border="1" cellspacing="0" width="100%">
- *           <tr>
- *             <td width="12%"><center>1</center>
- *             <td width="13%"><center>1</center>
- *             <td width="12%"><center>0</center>
- *             <td colspan="5"><center>bits 10-6</center>
- *           </tr>
- *         </table>
- *       </td>
- *     </tr>
- *     <tr>
- *       <th id="byte2_a">Byte 2</th>
- *       <td>
- *         <table border="1" cellspacing="0" width="100%">
- *           <tr>
- *             <td width="12%"><center>1</center>
- *             <td width="13%"><center>0</center>
- *             <td colspan="6"><center>bits 5-0</center>
- *           </tr>
- *         </table>
- *       </td>
- *     </tr>
- *   </table>
- *  </blockquote>
- *
- * <br>
- * {@code char} values in the range {@code '\u005Cu0800'} to
- * {@code '\u005CuFFFF'} are represented by three bytes:
- *
- * <blockquote>
- *   <table border="1" cellspacing="0" cellpadding="8" width="50%"
- *          summary="Bit values and bytes">
- *     <tr>
- *       <td></td>
- *       <th id="bit_c">Bit Values</th>
- *     </tr>
- *     <tr>
- *       <th id="byte1_c">Byte 1</th>
- *       <td>
- *         <table border="1" cellspacing="0" width="100%">
- *           <tr>
- *             <td width="12%"><center>1</center>
- *             <td width="13%"><center>1</center>
- *             <td width="12%"><center>1</center>
- *             <td width="13%"><center>0</center>
- *             <td colspan="4"><center>bits 15-12</center>
- *           </tr>
- *         </table>
- *       </td>
- *     </tr>
- *     <tr>
- *       <th id="byte2_b">Byte 2</th>
- *       <td>
- *         <table border="1" cellspacing="0" width="100%">
- *           <tr>
- *             <td width="12%"><center>1</center>
- *             <td width="13%"><center>0</center>
- *             <td colspan="6"><center>bits 11-6</center>
- *           </tr>
- *         </table>
- *       </td>
- *     </tr>
- *     <tr>
- *       <th id="byte3">Byte 3</th>
- *       <td>
- *         <table border="1" cellspacing="0" width="100%">
- *           <tr>
- *             <td width="12%"><center>1</center>
- *             <td width="13%"><center>0</center>
- *             <td colspan="6"><center>bits 5-0</center>
- *           </tr>
- *         </table>
- *       </td>
- *     </tr>
- *   </table>
- *  </blockquote>
- *
  * <p>
  * The differences between this format and the
  * standard UTF-8 format are the following:
--- a/src/share/classes/java/io/File.java	Tue Aug 06 17:12:37 2013 -0700
+++ b/src/share/classes/java/io/File.java	Tue Aug 06 22:47:14 2013 -0700
@@ -129,7 +129,7 @@
  * created, the abstract pathname represented by a <code>File</code> object
  * will never change.
  *
- * <h4>Interoperability with {@code java.nio.file} package</h4>
+ * <h3>Interoperability with {@code java.nio.file} package</h3>
  *
  * <p> The <a href="../../java/nio/file/package-summary.html">{@code java.nio.file}</a>
  * package defines interfaces and classes for the Java virtual machine to access
--- a/src/share/classes/java/io/ObjectInputStream.java	Tue Aug 06 17:12:37 2013 -0700
+++ b/src/share/classes/java/io/ObjectInputStream.java	Tue Aug 06 22:47:14 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -313,6 +313,7 @@
      * @throws  SecurityException if a security manager exists and its
      *          <code>checkPermission</code> method denies enabling
      *          subclassing.
+     * @throws  IOException if an I/O error occurs while creating this stream
      * @see SecurityManager#checkPermission
      * @see java.io.SerializablePermission
      */
--- a/src/share/classes/java/io/ObjectOutputStream.java	Tue Aug 06 17:12:37 2013 -0700
+++ b/src/share/classes/java/io/ObjectOutputStream.java	Tue Aug 06 22:47:14 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2012, 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
@@ -265,6 +265,7 @@
      * @throws  SecurityException if a security manager exists and its
      *          <code>checkPermission</code> method denies enabling
      *          subclassing.
+     * @throws  IOException if an I/O error occurs while creating this stream
      * @see SecurityManager#checkPermission
      * @see java.io.SerializablePermission
      */
--- a/src/share/classes/java/io/ObjectStreamField.java	Tue Aug 06 17:12:37 2013 -0700
+++ b/src/share/classes/java/io/ObjectStreamField.java	Tue Aug 06 22:47:14 2013 -0700
@@ -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
@@ -240,6 +240,8 @@
      * Returns boolean value indicating whether or not the serializable field
      * represented by this ObjectStreamField instance is unshared.
      *
+     * @return {@code true} if this field is unshared
+     *
      * @since 1.4
      */
     public boolean isUnshared() {
--- a/src/share/classes/java/io/RandomAccessFile.java	Tue Aug 06 17:12:37 2013 -0700
+++ b/src/share/classes/java/io/RandomAccessFile.java	Tue Aug 06 22:47:14 2013 -0700
@@ -128,7 +128,7 @@
      * meanings are:
      *
      * <table summary="Access mode permitted values and meanings">
-     * <tr><th><p align="left">Value</p></th><th><p align="left">Meaning</p></th></tr>
+     * <tr><th align="left">Value</th><th align="left">Meaning</th></tr>
      * <tr><td valign="top"><tt>"r"</tt></td>
      *     <td> Open for reading only.  Invoking any of the <tt>write</tt>
      *     methods of the resulting object will cause an {@link
--- a/src/share/classes/java/lang/Class.java	Tue Aug 06 17:12:37 2013 -0700
+++ b/src/share/classes/java/lang/Class.java	Tue Aug 06 22:47:14 2013 -0700
@@ -157,10 +157,10 @@
      *
      * The string is formatted as a list of type modifiers, if any,
      * followed by the kind of type (empty string for primitive types
-     * and {@code class}, {@code enum}, {@code interface}, or {@code
-     * &#64;interface}, as appropriate), followed by the type's name,
-     * followed by an angle-bracketed comma-separated list of the
-     * type's type parameters, if any.
+     * and {@code class}, {@code enum}, {@code interface}, or
+     * <code>&#64;</code>{@code interface}, as appropriate), followed
+     * by the type's name, followed by an angle-bracketed
+     * comma-separated list of the type's type parameters, if any.
      *
      * A space is used to separate modifiers from one another and to
      * separate any modifiers from the kind of type. The modifiers
--- a/src/share/classes/java/lang/invoke/LambdaConversionException.java	Tue Aug 06 17:12:37 2013 -0700
+++ b/src/share/classes/java/lang/invoke/LambdaConversionException.java	Tue Aug 06 22:47:14 2013 -0700
@@ -29,6 +29,8 @@
  * LambdaConversionException
  */
 public class LambdaConversionException extends Exception {
+    private static final long serialVersionUID = 292L + 8L;
+
     /**
      * Constructs a {@code LambdaConversionException}.
      */
--- a/src/share/classes/java/lang/ref/FinalReference.java	Tue Aug 06 17:12:37 2013 -0700
+++ b/src/share/classes/java/lang/ref/FinalReference.java	Tue Aug 06 22:47:14 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2003, 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
@@ -25,13 +25,12 @@
 
 package java.lang.ref;
 
-
-/* Final references, used to implement finalization */
-
+/**
+ * Final references, used to implement finalization
+ */
 class FinalReference<T> extends Reference<T> {
 
     public FinalReference(T referent, ReferenceQueue<? super T> q) {
         super(referent, q);
     }
-
 }
--- a/src/share/classes/java/lang/ref/Finalizer.java	Tue Aug 06 17:12:37 2013 -0700
+++ b/src/share/classes/java/lang/ref/Finalizer.java	Tue Aug 06 22:47:14 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -29,16 +29,16 @@
 import java.security.AccessController;
 
 
-final class Finalizer extends FinalReference { /* Package-private; must be in
-                                                  same package as the Reference
-                                                  class */
+final class Finalizer extends FinalReference<Object> { /* Package-private; must be in
+                                                          same package as the Reference
+                                                          class */
 
     /* A native method that invokes an arbitrary object's finalize method is
        required since the finalize method is protected
      */
     static native void invokeFinalizeMethod(Object o) throws Throwable;
 
-    private static ReferenceQueue queue = new ReferenceQueue();
+    private static ReferenceQueue<Object> queue = new ReferenceQueue<>();
     private static Finalizer unfinalized = null;
     private static final Object lock = new Object();
 
--- a/src/share/classes/java/lang/ref/Reference.java	Tue Aug 06 17:12:37 2013 -0700
+++ b/src/share/classes/java/lang/ref/Reference.java	Tue Aug 06 22:47:14 2013 -0700
@@ -96,6 +96,7 @@
      *    Enqueued:   next reference in queue (or this if last)
      *    Inactive:   this
      */
+    @SuppressWarnings("rawtypes")
     Reference next;
 
     /* When active:   next element in a discovered reference list maintained by GC (or this if last)
@@ -119,7 +120,7 @@
      * them.  This list is protected by the above lock object. The
      * list uses the discovered field to link its elements.
      */
-    private static Reference pending = null;
+    private static Reference<Object> pending = null;
 
     /* High-priority thread to enqueue pending References
      */
@@ -131,7 +132,7 @@
 
         public void run() {
             for (;;) {
-                Reference r;
+                Reference<Object> r;
                 synchronized (lock) {
                     if (pending != null) {
                         r = pending;
@@ -166,7 +167,7 @@
                     continue;
                 }
 
-                ReferenceQueue q = r.queue;
+                ReferenceQueue<Object> q = r.queue;
                 if (q != ReferenceQueue.NULL) q.enqueue(r);
             }
         }
--- a/src/share/classes/java/lang/ref/ReferenceQueue.java	Tue Aug 06 17:12:37 2013 -0700
+++ b/src/share/classes/java/lang/ref/ReferenceQueue.java	Tue Aug 06 22:47:14 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2005, 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
@@ -40,14 +40,14 @@
      */
     public ReferenceQueue() { }
 
-    private static class Null extends ReferenceQueue {
-        boolean enqueue(Reference r) {
+    private static class Null<S> extends ReferenceQueue<S> {
+        boolean enqueue(Reference<? extends S> r) {
             return false;
         }
     }
 
-    static ReferenceQueue NULL = new Null();
-    static ReferenceQueue ENQUEUED = new Null();
+    static ReferenceQueue<Object> NULL = new Null<>();
+    static ReferenceQueue<Object> ENQUEUED = new Null<>();
 
     static private class Lock { };
     private Lock lock = new Lock();
@@ -58,7 +58,7 @@
         synchronized (lock) {
             // Check that since getting the lock this reference hasn't already been
             // enqueued (and even then removed)
-            ReferenceQueue queue = r.queue;
+            ReferenceQueue<?> queue = r.queue;
             if ((queue == NULL) || (queue == ENQUEUED)) {
                 return false;
             }
@@ -75,10 +75,13 @@
         }
     }
 
+    @SuppressWarnings("unchecked")
     private Reference<? extends T> reallyPoll() {       /* Must hold lock */
         Reference<? extends T> r = head;
         if (r != null) {
-            head = (r.next == r) ? null : r.next;
+            head = (r.next == r) ?
+                null :
+                r.next; // Unchecked due to the next field having a raw type in Reference
             r.queue = NULL;
             r.next = r;
             queueLength--;
--- a/src/share/classes/java/lang/reflect/Parameter.java	Tue Aug 06 17:12:37 2013 -0700
+++ b/src/share/classes/java/lang/reflect/Parameter.java	Tue Aug 06 22:47:14 2013 -0700
@@ -162,7 +162,7 @@
 
     /**
      * Returns the name of the parameter.  If the parameter's name is
-     * {@linkplain isNamePresent() present}, then this method returns
+     * {@linkplain #isNamePresent() present}, then this method returns
      * the name provided by the class file. Otherwise, this method
      * synthesizes a name of the form argN, where N is the index of
      * the parameter in the descriptor of the method which declares
--- a/src/share/classes/java/math/BigInteger.java	Tue Aug 06 17:12:37 2013 -0700
+++ b/src/share/classes/java/math/BigInteger.java	Tue Aug 06 22:47:14 2013 -0700
@@ -33,7 +33,6 @@
 import java.io.ObjectInputStream;
 import java.io.ObjectOutputStream;
 import java.io.ObjectStreamField;
-import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Random;
 import sun.misc.DoubleConsts;
@@ -101,6 +100,7 @@
  * @author  Josh Bloch
  * @author  Michael McCloskey
  * @author  Alan Eliasen
+ * @author  Timothy Buktu
  * @since JDK1.1
  */
 
@@ -215,6 +215,14 @@
     private static final int TOOM_COOK_SQUARE_THRESHOLD = 140;
 
     /**
+     * The threshold value for using Burnikel-Ziegler division.  If the number
+     * of ints in the number are larger than this value,
+     * Burnikel-Ziegler division will be used.   This value is found
+     * experimentally to work well.
+     */
+    static final int BURNIKEL_ZIEGLER_THRESHOLD = 50;
+
+    /**
      * The threshold value for using Schoenhage recursive base conversion. If
      * the number of ints in the number are larger than this value,
      * the Schoenhage algorithm will be used.  In practice, it appears that the
@@ -290,7 +298,7 @@
         if (signum < -1 || signum > 1)
             throw(new NumberFormatException("Invalid signum value"));
 
-        if (this.mag.length==0) {
+        if (this.mag.length == 0) {
             this.signum = 0;
         } else {
             if (signum == 0)
@@ -311,7 +319,7 @@
         if (signum < -1 || signum > 1)
             throw(new NumberFormatException("Invalid signum value"));
 
-        if (this.mag.length==0) {
+        if (this.mag.length == 0) {
             this.signum = 0;
         } else {
             if (signum == 0)
@@ -364,8 +372,10 @@
 
         // Skip leading zeros and compute number of digits in magnitude
         while (cursor < len &&
-               Character.digit(val.charAt(cursor), radix) == 0)
+               Character.digit(val.charAt(cursor), radix) == 0) {
             cursor++;
+        }
+
         if (cursor == len) {
             signum = 0;
             mag = ZERO.mag;
@@ -455,7 +465,7 @@
         if (result == -1)
             throw new NumberFormatException(new String(source));
 
-        for (int index = start; index<end; index++) {
+        for (int index = start; index < end; index++) {
             int nextVal = Character.digit(source[index], 10);
             if (nextVal == -1)
                 throw new NumberFormatException(new String(source));
@@ -622,9 +632,9 @@
         int highBit = 1 << ((bitLength+31) & 0x1f);  // High bit of high int
         int highMask = (highBit << 1) - 1;  // Bits to keep in high int
 
-        while(true) {
+        while (true) {
             // Construct a candidate
-            for (int i=0; i<magLen; i++)
+            for (int i=0; i < magLen; i++)
                 temp[i] = rnd.nextInt();
             temp[0] = (temp[0] & highMask) | highBit;  // Ensure exact length
             if (bitLength > 2)
@@ -710,7 +720,7 @@
             if (!result.testBit(0))
                 result = result.add(ONE);
 
-            while(true) {
+            while (true) {
                 // Do cheap "pre-test" if applicable
                 if (result.bitLength() > 6) {
                     long r = result.remainder(SMALL_PRIME_PRODUCT).longValue();
@@ -741,7 +751,7 @@
         // Looking for the next large prime
         int searchLen = (result.bitLength() / 20) * 64;
 
-        while(true) {
+        while (true) {
            BitSieve searchSieve = new BitSieve(result, searchLen);
            BigInteger candidate = searchSieve.retrieve(result,
                                                  DEFAULT_PRIME_CERTAINTY, null);
@@ -808,7 +818,7 @@
         int d = 5;
         while (jacobiSymbol(d, this) != -1) {
             // 5, -7, 9, -11, ...
-            d = (d<0) ? Math.abs(d)+2 : -(d+2);
+            d = (d < 0) ? Math.abs(d)+2 : -(d+2);
         }
 
         // Step 2
@@ -881,7 +891,7 @@
         BigInteger u = ONE; BigInteger u2;
         BigInteger v = ONE; BigInteger v2;
 
-        for (int i=k.bitLength()-2; i>=0; i--) {
+        for (int i=k.bitLength()-2; i >= 0; i--) {
             u2 = u.multiply(v).mod(n);
 
             v2 = v.square().add(d.multiply(u.square())).mod(n);
@@ -937,7 +947,7 @@
         if (rnd == null) {
             rnd = getSecureRandom();
         }
-        for (int i=0; i<iterations; i++) {
+        for (int i=0; i < iterations; i++) {
             // Generate a uniform random on (1, this)
             BigInteger b;
             do {
@@ -946,8 +956,8 @@
 
             int j = 0;
             BigInteger z = b.modPow(m, this);
-            while(!((j==0 && z.equals(ONE)) || z.equals(thisMinusOne))) {
-                if (j>0 && z.equals(ONE) || ++j==a)
+            while (!((j == 0 && z.equals(ONE)) || z.equals(thisMinusOne))) {
+                if (j > 0 && z.equals(ONE) || ++j == a)
                     return false;
                 z = z.modPow(TWO, this);
             }
@@ -961,7 +971,7 @@
      * arguments are correct, and it doesn't copy the magnitude array.
      */
     BigInteger(int[] magnitude, int signum) {
-        this.signum = (magnitude.length==0 ? 0 : signum);
+        this.signum = (magnitude.length == 0 ? 0 : signum);
         this.mag = magnitude;
     }
 
@@ -970,7 +980,7 @@
      * arguments are correct.
      */
     private BigInteger(byte[] magnitude, int signum) {
-        this.signum = (magnitude.length==0 ? 0 : signum);
+        this.signum = (magnitude.length == 0 ? 0 : signum);
         this.mag = stripLeadingZeroBytes(magnitude);
     }
 
@@ -1009,7 +1019,7 @@
         }
 
         int highWord = (int)(val >>> 32);
-        if (highWord==0) {
+        if (highWord == 0) {
             mag = new int[1];
             mag[0] = (int)val;
         } else {
@@ -1025,7 +1035,7 @@
      * BigInteger will reference the input array if feasible).
      */
     private static BigInteger valueOf(int val[]) {
-        return (val[0]>0 ? new BigInteger(val, 1) : new BigInteger(val));
+        return (val[0] > 0 ? new BigInteger(val, 1) : new BigInteger(val));
     }
 
     // Constants
@@ -1066,8 +1076,7 @@
         powerCache = new BigInteger[Character.MAX_RADIX+1][];
         logCache = new double[Character.MAX_RADIX+1];
 
-        for (int i=Character.MIN_RADIX; i<=Character.MAX_RADIX; i++)
-        {
+        for (int i=Character.MIN_RADIX; i <= Character.MAX_RADIX; i++) {
             powerCache[i] = new BigInteger[] { BigInteger.valueOf(i) };
             logCache[i] = Math.log(i);
         }
@@ -1161,7 +1170,7 @@
         int xIndex = x.length;
         int[] result;
         int highWord = (int)(val >>> 32);
-        if (highWord==0) {
+        if (highWord == 0) {
             result = new int[xIndex];
             sum = (x[--xIndex] & LONG_MASK) + val;
             result[xIndex] = (int)sum;
@@ -1214,12 +1223,12 @@
         int yIndex = y.length;
         int result[] = new int[xIndex];
         long sum = 0;
-        if(yIndex==1) {
+        if (yIndex == 1) {
             sum = (x[--xIndex] & LONG_MASK) + (y[0] & LONG_MASK) ;
             result[xIndex] = (int)sum;
         } else {
             // Add common parts of both numbers
-            while(yIndex > 0) {
+            while (yIndex > 0) {
                 sum = (x[--xIndex] & LONG_MASK) +
                       (y[--yIndex] & LONG_MASK) + (sum >>> 32);
                 result[xIndex] = (int)sum;
@@ -1246,24 +1255,24 @@
 
     private static int[] subtract(long val, int[] little) {
         int highWord = (int)(val >>> 32);
-        if (highWord==0) {
+        if (highWord == 0) {
             int result[] = new int[1];
             result[0] = (int)(val - (little[0] & LONG_MASK));
             return result;
         } else {
             int result[] = new int[2];
-            if(little.length==1) {
+            if (little.length == 1) {
                 long difference = ((int)val & LONG_MASK) - (little[0] & LONG_MASK);
                 result[1] = (int)difference;
                 // Subtract remainder of longer number while borrow propagates
                 boolean borrow = (difference >> 32 != 0);
-                if(borrow) {
+                if (borrow) {
                     result[0] = highWord - 1;
                 } else {        // Copy remainder of longer number
                     result[0] = highWord;
                 }
                 return result;
-            } else { // little.length==2
+            } else { // little.length == 2
                 long difference = ((int)val & LONG_MASK) - (little[1] & LONG_MASK);
                 result[1] = (int)difference;
                 difference = (highWord & LONG_MASK) - (little[0] & LONG_MASK) + (difference >> 32);
@@ -1286,7 +1295,7 @@
         int result[] = new int[bigIndex];
         long difference = 0;
 
-        if (highWord==0) {
+        if (highWord == 0) {
             difference = (big[--bigIndex] & LONG_MASK) - val;
             result[bigIndex] = (int)difference;
         } else {
@@ -1296,7 +1305,6 @@
             result[bigIndex] = (int)difference;
         }
 
-
         // Subtract remainder of longer number while borrow propagates
         boolean borrow = (difference >> 32 != 0);
         while (bigIndex > 0 && borrow)
@@ -1345,7 +1353,7 @@
         long difference = 0;
 
         // Subtract common parts of both numbers
-        while(littleIndex > 0) {
+        while (littleIndex > 0) {
             difference = (big[--bigIndex] & LONG_MASK) -
                          (little[--littleIndex] & LONG_MASK) +
                          (difference >> 32);
@@ -1377,29 +1385,29 @@
         int xlen = mag.length;
         int ylen = val.mag.length;
 
-        if ((xlen < KARATSUBA_THRESHOLD) || (ylen < KARATSUBA_THRESHOLD))
-        {
+        if ((xlen < KARATSUBA_THRESHOLD) || (ylen < KARATSUBA_THRESHOLD)) {
             int resultSign = signum == val.signum ? 1 : -1;
             if (val.mag.length == 1) {
                 return multiplyByInt(mag,val.mag[0], resultSign);
             }
-            if(mag.length == 1) {
+            if (mag.length == 1) {
                 return multiplyByInt(val.mag,mag[0], resultSign);
             }
             int[] result = multiplyToLen(mag, xlen,
                                          val.mag, ylen, null);
             result = trustedStripLeadingZeroInts(result);
             return new BigInteger(result, resultSign);
+        } else {
+            if ((xlen < TOOM_COOK_THRESHOLD) && (ylen < TOOM_COOK_THRESHOLD)) {
+                return multiplyKaratsuba(this, val);
+            } else {
+                return multiplyToomCook3(this, val);
+            }
         }
-        else
-            if ((xlen < TOOM_COOK_THRESHOLD) && (ylen < TOOM_COOK_THRESHOLD))
-                return multiplyKaratsuba(this, val);
-            else
-                return multiplyToomCook3(this, val);
     }
 
     private static BigInteger multiplyByInt(int[] x, int y, int sign) {
-        if(Integer.bitCount(y)==1) {
+        if (Integer.bitCount(y) == 1) {
             return new BigInteger(shiftLeft(x,Integer.numberOfTrailingZeros(y)), sign);
         }
         int xlen = x.length;
@@ -1474,7 +1482,7 @@
             z = new int[xlen+ylen];
 
         long carry = 0;
-        for (int j=ystart, k=ystart+1+xstart; j>=0; j--, k--) {
+        for (int j=ystart, k=ystart+1+xstart; j >= 0; j--, k--) {
             long product = (y[j] & LONG_MASK) *
                            (x[xstart] & LONG_MASK) + carry;
             z[k] = (int)product;
@@ -1484,7 +1492,7 @@
 
         for (int i = xstart-1; i >= 0; i--) {
             carry = 0;
-            for (int j=ystart, k=ystart+1+i; j>=0; j--, k--) {
+            for (int j=ystart, k=ystart+1+i; j >= 0; j--, k--) {
                 long product = (y[j] & LONG_MASK) *
                                (x[i] & LONG_MASK) +
                                (z[k] & LONG_MASK) + carry;
@@ -1511,8 +1519,7 @@
      *
      * See:  http://en.wikipedia.org/wiki/Karatsuba_algorithm
      */
-    private static BigInteger multiplyKaratsuba(BigInteger x, BigInteger y)
-    {
+    private static BigInteger multiplyKaratsuba(BigInteger x, BigInteger y) {
         int xlen = x.mag.length;
         int ylen = y.mag.length;
 
@@ -1535,10 +1542,11 @@
         // result = p1 * 2^(32*2*half) + (p3 - p1 - p2) * 2^(32*half) + p2
         BigInteger result = p1.shiftLeft(32*half).add(p3.subtract(p1).subtract(p2)).shiftLeft(32*half).add(p2);
 
-        if (x.signum != y.signum)
+        if (x.signum != y.signum) {
             return result.negate();
-        else
+        } else {
             return result;
+        }
     }
 
     /**
@@ -1569,8 +1577,7 @@
      * LNCS #4547. Springer, Madrid, Spain, June 21-22, 2007.
      *
      */
-    private static BigInteger multiplyToomCook3(BigInteger a, BigInteger b)
-    {
+    private static BigInteger multiplyToomCook3(BigInteger a, BigInteger b) {
         int alen = a.mag.length;
         int blen = b.mag.length;
 
@@ -1605,12 +1612,12 @@
              db1.add(b2).shiftLeft(1).subtract(b0));
         vinf = a2.multiply(b2);
 
-        /* The algorithm requires two divisions by 2 and one by 3.
-           All divisions are known to be exact, that is, they do not produce
-           remainders, and all results are positive.  The divisions by 2 are
-           implemented as right shifts which are relatively efficient, leaving
-           only an exact division by 3, which is done by a specialized
-           linear-time algorithm. */
+        // The algorithm requires two divisions by 2 and one by 3.
+        // All divisions are known to be exact, that is, they do not produce
+        // remainders, and all results are positive.  The divisions by 2 are
+        // implemented as right shifts which are relatively efficient, leaving
+        // only an exact division by 3, which is done by a specialized
+        // linear-time algorithm.
         t2 = v2.subtract(vm1).exactDivideBy3();
         tm1 = v1.subtract(vm1).shiftRight(1);
         t1 = v1.subtract(v0);
@@ -1624,10 +1631,11 @@
 
         BigInteger result = vinf.shiftLeft(ss).add(t2).shiftLeft(ss).add(t1).shiftLeft(ss).add(tm1).shiftLeft(ss).add(v0);
 
-        if (a.signum != b.signum)
+        if (a.signum != b.signum) {
             return result.negate();
-        else
+        } else {
             return result;
+        }
     }
 
 
@@ -1645,38 +1653,38 @@
      * numbers.
      */
     private BigInteger getToomSlice(int lowerSize, int upperSize, int slice,
-                                    int fullsize)
-    {
+                                    int fullsize) {
         int start, end, sliceSize, len, offset;
 
         len = mag.length;
         offset = fullsize - len;
 
-        if (slice == 0)
-        {
+        if (slice == 0) {
             start = 0 - offset;
             end = upperSize - 1 - offset;
-        }
-        else
-        {
+        } else {
             start = upperSize + (slice-1)*lowerSize - offset;
             end = start + lowerSize - 1;
         }
 
-        if (start < 0)
+        if (start < 0) {
             start = 0;
-        if (end < 0)
+        }
+        if (end < 0) {
            return ZERO;
+        }
 
         sliceSize = (end-start) + 1;
 
-        if (sliceSize <= 0)
+        if (sliceSize <= 0) {
             return ZERO;
+        }
 
         // While performing Toom-Cook, all slices are positive and
         // the sign is adjusted when the final number is composed.
-        if (start==0 && sliceSize >= len)
+        if (start == 0 && sliceSize >= len) {
             return this.abs();
+        }
 
         int intSlice[] = new int[sliceSize];
         System.arraycopy(mag, start, intSlice, 0, sliceSize);
@@ -1692,20 +1700,19 @@
      * undefined.  Note that this is expected to be called with positive
      * arguments only.
      */
-    private BigInteger exactDivideBy3()
-    {
+    private BigInteger exactDivideBy3() {
         int len = mag.length;
         int[] result = new int[len];
         long x, w, q, borrow;
         borrow = 0L;
-        for (int i=len-1; i>=0; i--)
-        {
+        for (int i=len-1; i >= 0; i--) {
             x = (mag[i] & LONG_MASK);
             w = x - borrow;
-            if (borrow > x)       // Did we make the number go negative?
+            if (borrow > x) {      // Did we make the number go negative?
                 borrow = 1L;
-            else
+            } else {
                 borrow = 0L;
+            }
 
             // 0xAAAAAAAB is the modular inverse of 3 (mod 2^32).  Thus,
             // the effect of this is to divide by 3 (mod 2^32).
@@ -1715,8 +1722,7 @@
 
             // Now check the borrow. The second check can of course be
             // eliminated if the first fails.
-            if (q >= 0x55555556L)
-            {
+            if (q >= 0x55555556L) {
                 borrow++;
                 if (q >= 0xAAAAAAABL)
                     borrow++;
@@ -1733,8 +1739,9 @@
     private BigInteger getLower(int n) {
         int len = mag.length;
 
-        if (len <= n)
+        if (len <= n) {
             return this;
+        }
 
         int lowerInts[] = new int[n];
         System.arraycopy(mag, len-n, lowerInts, 0, n);
@@ -1750,8 +1757,9 @@
     private BigInteger getUpper(int n) {
         int len = mag.length;
 
-        if (len <= n)
+        if (len <= n) {
             return ZERO;
+        }
 
         int upperLen = len - n;
         int upperInts[] = new int[upperLen];
@@ -1768,20 +1776,21 @@
      * @return {@code this<sup>2</sup>}
      */
     private BigInteger square() {
-        if (signum == 0)
+        if (signum == 0) {
             return ZERO;
+        }
         int len = mag.length;
 
-        if (len < KARATSUBA_SQUARE_THRESHOLD)
-        {
+        if (len < KARATSUBA_SQUARE_THRESHOLD) {
             int[] z = squareToLen(mag, len, null);
             return new BigInteger(trustedStripLeadingZeroInts(z), 1);
+        } else {
+            if (len < TOOM_COOK_SQUARE_THRESHOLD) {
+                return squareKaratsuba();
+            } else {
+                return squareToomCook3();
+            }
         }
-        else
-            if (len < TOOM_COOK_SQUARE_THRESHOLD)
-                return squareKaratsuba();
-            else
-               return squareToomCook3();
     }
 
     /**
@@ -1829,7 +1838,7 @@
 
         // Store the squares, right shifted one bit (i.e., divided by 2)
         int lastProductLowWord = 0;
-        for (int j=0, i=0; j<len; j++) {
+        for (int j=0, i=0; j < len; j++) {
             long piece = (x[j] & LONG_MASK);
             long product = piece * piece;
             z[i++] = (lastProductLowWord << 31) | (int)(product >>> 33);
@@ -1838,7 +1847,7 @@
         }
 
         // Add in off-diagonal sums
-        for (int i=len, offset=1; i>0; i--, offset+=2) {
+        for (int i=len, offset=1; i > 0; i--, offset+=2) {
             int t = x[i-1];
             t = mulAdd(z, x, offset, i-1, t);
             addOne(z, offset-1, i, t);
@@ -1858,8 +1867,7 @@
      * has better asymptotic performance than the algorithm used in
      * squareToLen.
      */
-    private BigInteger squareKaratsuba()
-    {
+    private BigInteger squareKaratsuba() {
         int half = (mag.length+1) / 2;
 
         BigInteger xl = getLower(half);
@@ -1879,8 +1887,7 @@
      * that has better asymptotic performance than the algorithm used in
      * squareToLen or squareKaratsuba.
      */
-    private BigInteger squareToomCook3()
-    {
+    private BigInteger squareToomCook3() {
         int len = mag.length;
 
         // k is the size (in ints) of the lower-order slices.
@@ -1905,13 +1912,12 @@
         vinf = a2.square();
         v2 = da1.add(a2).shiftLeft(1).subtract(a0).square();
 
-        /* The algorithm requires two divisions by 2 and one by 3.
-           All divisions are known to be exact, that is, they do not produce
-           remainders, and all results are positive.  The divisions by 2 are
-           implemented as right shifts which are relatively efficient, leaving
-           only a division by 3.
-           The division by 3 is done by an optimized algorithm for this case.
-        */
+        // The algorithm requires two divisions by 2 and one by 3.
+        // All divisions are known to be exact, that is, they do not produce
+        // remainders, and all results are positive.  The divisions by 2 are
+        // implemented as right shifts which are relatively efficient, leaving
+        // only a division by 3.
+        // The division by 3 is done by an optimized algorithm for this case.
         t2 = v2.subtract(vm1).exactDivideBy3();
         tm1 = v1.subtract(vm1).shiftRight(1);
         t1 = v1.subtract(v0);
@@ -1936,11 +1942,28 @@
      * @throws ArithmeticException if {@code val} is zero.
      */
     public BigInteger divide(BigInteger val) {
+        if (mag.length < BURNIKEL_ZIEGLER_THRESHOLD ||
+                val.mag.length < BURNIKEL_ZIEGLER_THRESHOLD) {
+            return divideKnuth(val);
+        } else {
+            return divideBurnikelZiegler(val);
+        }
+    }
+
+    /**
+     * Returns a BigInteger whose value is {@code (this / val)} using an O(n^2) algorithm from Knuth.
+     *
+     * @param  val value by which this BigInteger is to be divided.
+     * @return {@code this / val}
+     * @throws ArithmeticException if {@code val} is zero.
+     * @see MutableBigInteger#divideKnuth(MutableBigInteger, MutableBigInteger, boolean)
+     */
+    private BigInteger divideKnuth(BigInteger val) {
         MutableBigInteger q = new MutableBigInteger(),
                           a = new MutableBigInteger(this.mag),
                           b = new MutableBigInteger(val.mag);
 
-        a.divide(b, q, false);
+        a.divideKnuth(b, q, false);
         return q.toBigInteger(this.signum * val.signum);
     }
 
@@ -1956,11 +1979,21 @@
      * @throws ArithmeticException if {@code val} is zero.
      */
     public BigInteger[] divideAndRemainder(BigInteger val) {
+        if (mag.length < BURNIKEL_ZIEGLER_THRESHOLD ||
+                val.mag.length < BURNIKEL_ZIEGLER_THRESHOLD) {
+            return divideAndRemainderKnuth(val);
+        } else {
+            return divideAndRemainderBurnikelZiegler(val);
+        }
+    }
+
+    /** Long division */
+    private BigInteger[] divideAndRemainderKnuth(BigInteger val) {
         BigInteger[] result = new BigInteger[2];
         MutableBigInteger q = new MutableBigInteger(),
                           a = new MutableBigInteger(this.mag),
                           b = new MutableBigInteger(val.mag);
-        MutableBigInteger r = a.divide(b, q);
+        MutableBigInteger r = a.divideKnuth(b, q);
         result[0] = q.toBigInteger(this.signum == val.signum ? 1 : -1);
         result[1] = r.toBigInteger(this.signum);
         return result;
@@ -1975,11 +2008,53 @@
      * @throws ArithmeticException if {@code val} is zero.
      */
     public BigInteger remainder(BigInteger val) {
+        if (mag.length < BURNIKEL_ZIEGLER_THRESHOLD ||
+                val.mag.length < BURNIKEL_ZIEGLER_THRESHOLD) {
+            return remainderKnuth(val);
+        } else {
+            return remainderBurnikelZiegler(val);
+        }
+    }
+
+    /** Long division */
+    private BigInteger remainderKnuth(BigInteger val) {
         MutableBigInteger q = new MutableBigInteger(),
                           a = new MutableBigInteger(this.mag),
                           b = new MutableBigInteger(val.mag);
 
-        return a.divide(b, q).toBigInteger(this.signum);
+        return a.divideKnuth(b, q).toBigInteger(this.signum);
+    }
+
+    /**
+     * Calculates {@code this / val} using the Burnikel-Ziegler algorithm.
+     * @param  val the divisor
+     * @return {@code this / val}
+     */
+    private BigInteger divideBurnikelZiegler(BigInteger val) {
+        return divideAndRemainderBurnikelZiegler(val)[0];
+    }
+
+    /**
+     * Calculates {@code this % val} using the Burnikel-Ziegler algorithm.
+     * @param val the divisor
+     * @return {@code this % val}
+     */
+    private BigInteger remainderBurnikelZiegler(BigInteger val) {
+        return divideAndRemainderBurnikelZiegler(val)[1];
+    }
+
+    /**
+     * Computes {@code this / val} and {@code this % val} using the
+     * Burnikel-Ziegler algorithm.
+     * @param val the divisor
+     * @return an array containing the quotient and remainder
+     */
+    private BigInteger[] divideAndRemainderBurnikelZiegler(BigInteger val) {
+        MutableBigInteger q = new MutableBigInteger();
+        MutableBigInteger r = new MutableBigInteger(this).divideAndRemainderBurnikelZiegler(new MutableBigInteger(val), q);
+        BigInteger qBigInt = q.isZero() ? ZERO : q.toBigInteger(signum*val.signum);
+        BigInteger rBigInt = r.isZero() ? ZERO : r.toBigInteger(signum);
+        return new BigInteger[] {qBigInt, rBigInt};
     }
 
     /**
@@ -1992,10 +2067,12 @@
      *         cause the operation to yield a non-integer value.)
      */
     public BigInteger pow(int exponent) {
-        if (exponent < 0)
+        if (exponent < 0) {
             throw new ArithmeticException("Negative exponent");
-        if (signum==0)
-            return (exponent==0 ? ONE : this);
+        }
+        if (signum == 0) {
+            return (exponent == 0 ? ONE : this);
+        }
 
         BigInteger partToSquare = this.abs();
 
@@ -2008,24 +2085,25 @@
         int remainingBits;
 
         // Factor the powers of two out quickly by shifting right, if needed.
-        if (powersOfTwo > 0)
-        {
+        if (powersOfTwo > 0) {
             partToSquare = partToSquare.shiftRight(powersOfTwo);
             remainingBits = partToSquare.bitLength();
-            if (remainingBits == 1)  // Nothing left but +/- 1?
-                if (signum<0 && (exponent&1)==1)
+            if (remainingBits == 1) {  // Nothing left but +/- 1?
+                if (signum < 0 && (exponent&1) == 1) {
                     return NEGATIVE_ONE.shiftLeft(powersOfTwo*exponent);
-                else
+                } else {
                     return ONE.shiftLeft(powersOfTwo*exponent);
-        }
-        else
-        {
+                }
+            }
+        } else {
             remainingBits = partToSquare.bitLength();
-            if (remainingBits == 1)  // Nothing left but +/- 1?
-                if (signum<0 && (exponent&1)==1)
+            if (remainingBits == 1) { // Nothing left but +/- 1?
+                if (signum < 0  && (exponent&1) == 1) {
                     return NEGATIVE_ONE;
-                else
+                } else {
                     return ONE;
+                }
+            }
         }
 
         // This is a quick way to approximate the size of the result,
@@ -2035,10 +2113,9 @@
 
         // Use slightly different algorithms for small and large operands.
         // See if the result will safely fit into a long. (Largest 2^63-1)
-        if (partToSquare.mag.length==1 && scaleFactor <= 62)
-        {
+        if (partToSquare.mag.length == 1 && scaleFactor <= 62) {
             // Small number algorithm.  Everything fits into a long.
-            int newSign = (signum<0 && (exponent&1)==1 ? -1 : 1);
+            int newSign = (signum <0  && (exponent&1) == 1 ? -1 : 1);
             long result = 1;
             long baseToPow2 = partToSquare.mag[0] & LONG_MASK;
 
@@ -2046,27 +2123,28 @@
 
             // Perform exponentiation using repeated squaring trick
             while (workingExponent != 0) {
-                if ((workingExponent & 1)==1)
+                if ((workingExponent & 1) == 1) {
                     result = result * baseToPow2;
-
-                if ((workingExponent >>>= 1) != 0)
+                }
+
+                if ((workingExponent >>>= 1) != 0) {
                     baseToPow2 = baseToPow2 * baseToPow2;
+                }
             }
 
             // Multiply back the powers of two (quickly, by shifting left)
-            if (powersOfTwo > 0)
-            {
+            if (powersOfTwo > 0) {
                 int bitsToShift = powersOfTwo*exponent;
-                if (bitsToShift + scaleFactor <= 62) // Fits in long?
+                if (bitsToShift + scaleFactor <= 62) { // Fits in long?
                     return valueOf((result << bitsToShift) * newSign);
-                else
+                } else {
                     return valueOf(result*newSign).shiftLeft(bitsToShift);
+                }
             }
-            else
+            else {
                 return valueOf(result*newSign);
-        }
-        else
-        {
+            }
+        } else {
             // Large number algorithm.  This is basically identical to
             // the algorithm above, but calls multiply() and square()
             // which may use more efficient algorithms for large numbers.
@@ -2075,28 +2153,32 @@
             int workingExponent = exponent;
             // Perform exponentiation using repeated squaring trick
             while (workingExponent != 0) {
-                if ((workingExponent & 1)==1)
+                if ((workingExponent & 1) == 1) {
                     answer = answer.multiply(partToSquare);
-
-                if ((workingExponent >>>= 1) != 0)
+                }
+
+                if ((workingExponent >>>= 1) != 0) {
                     partToSquare = partToSquare.square();
+                }
             }
             // Multiply back the (exponentiated) powers of two (quickly,
             // by shifting left)
-            if (powersOfTwo > 0)
+            if (powersOfTwo > 0) {
                 answer = answer.shiftLeft(powersOfTwo*exponent);
-
-            if (signum<0 && (exponent&1)==1)
+            }
+
+            if (signum < 0 && (exponent&1) == 1) {
                 return answer.negate();
-            else
+            } else {
                 return answer;
+            }
         }
     }
 
     /**
      * Returns a BigInteger whose value is the greatest common divisor of
      * {@code abs(this)} and {@code abs(val)}.  Returns 0 if
-     * {@code this==0 && val==0}.
+     * {@code this == 0 && val == 0}.
      *
      * @param  val value with which the GCD is to be computed.
      * @return {@code GCD(abs(this), abs(val))}
@@ -2153,7 +2235,7 @@
     // shifts a up to len right n bits assumes no leading zeros, 0<n<32
     static void primitiveRightShift(int[] a, int len, int n) {
         int n2 = 32 - n;
-        for (int i=len-1, c=a[i]; i>0; i--) {
+        for (int i=len-1, c=a[i]; i > 0; i--) {
             int b = c;
             c = a[i-1];
             a[i] = (c << n2) | (b >>> n);
@@ -2167,7 +2249,7 @@
             return;
 
         int n2 = 32 - n;
-        for (int i=0, c=a[i], m=i+len-1; i<m; i++) {
+        for (int i=0, c=a[i], m=i+len-1; i < m; i++) {
             int b = c;
             c = a[i+1];
             a[i] = (b << n) | (c >>> n2);
@@ -2378,7 +2460,7 @@
             return this;
 
         // Special case for base of zero
-        if (signum==0)
+        if (signum == 0)
             return ZERO;
 
         int[] base = mag.clone();
@@ -2401,7 +2483,7 @@
 
         // Allocate table for precomputed odd powers of base in Montgomery form
         int[][] table = new int[tblmask][];
-        for (int i=0; i<tblmask; i++)
+        for (int i=0; i < tblmask; i++)
             table[i] = new int[modLen];
 
         // Compute the modular inverse
@@ -2421,7 +2503,7 @@
         if (table[0].length < modLen) {
            int offset = modLen - table[0].length;
            int[] t2 = new int[modLen];
-           for (int i=0; i<table[0].length; i++)
+           for (int i=0; i < table[0].length; i++)
                t2[i+offset] = table[0][i];
            table[0] = t2;
         }
@@ -2434,7 +2516,7 @@
         int[] t = Arrays.copyOf(b, modLen);
 
         // Fill in the table with odd powers of the base
-        for (int i=1; i<tblmask; i++) {
+        for (int i=1; i < tblmask; i++) {
             int[] prod = multiplyToLen(t, modLen, table[i-1], modLen, null);
             table[i] = montReduce(prod, mod, modLen, inv);
         }
@@ -2474,7 +2556,7 @@
             isone = false;
 
         // The main loop
-        while(true) {
+        while (true) {
             ebits--;
             // Advance the window
             buf <<= 1;
@@ -2551,9 +2633,9 @@
             int carry = mulAdd(n, mod, offset, mlen, inv * nEnd);
             c += addOne(n, offset, mlen, carry);
             offset++;
-        } while(--len > 0);
-
-        while(c>0)
+        } while (--len > 0);
+
+        while (c > 0)
             c += subN(n, mod, mlen);
 
         while (intArrayCmpToLen(n, mod, mlen) >= 0)
@@ -2568,7 +2650,7 @@
      * equal to, or greater than arg2 up to length len.
      */
     private static int intArrayCmpToLen(int[] arg1, int[] arg2, int len) {
-        for (int i=0; i<len; i++) {
+        for (int i=0; i < len; i++) {
             long b1 = arg1[i] & LONG_MASK;
             long b2 = arg2[i] & LONG_MASK;
             if (b1 < b2)
@@ -2585,7 +2667,7 @@
     private static int subN(int[] a, int[] b, int len) {
         long sum = 0;
 
-        while(--len >= 0) {
+        while (--len >= 0) {
             sum = (a[len] & LONG_MASK) -
                  (b[len] & LONG_MASK) + (sum >> 32);
             a[len] = (int)sum;
@@ -2679,7 +2761,7 @@
         int excessBits = (numInts << 5) - p;
         mag[0] &= (1L << (32-excessBits)) - 1;
 
-        return (mag[0]==0 ? new BigInteger(1, mag) : new BigInteger(mag, 1));
+        return (mag[0] == 0 ? new BigInteger(1, mag) : new BigInteger(mag, 1));
     }
 
     /**
@@ -2730,9 +2812,9 @@
     public BigInteger shiftLeft(int n) {
         if (signum == 0)
             return ZERO;
-        if (n==0)
+        if (n == 0)
             return this;
-        if (n<0) {
+        if (n < 0) {
             if (n == Integer.MIN_VALUE) {
                 throw new ArithmeticException("Shift distance of Integer.MIN_VALUE not supported.");
             } else {
@@ -2784,9 +2866,9 @@
      * @see #shiftLeft
      */
     public BigInteger shiftRight(int n) {
-        if (n==0)
+        if (n == 0)
             return this;
-        if (n<0) {
+        if (n < 0) {
             if (n == Integer.MIN_VALUE) {
                 throw new ArithmeticException("Shift distance of Integer.MIN_VALUE not supported.");
             } else {
@@ -2825,7 +2907,7 @@
         if (signum < 0) {
             // Find out whether any one-bits were shifted off the end.
             boolean onesLost = false;
-            for (int i=magLen-1, j=magLen-nInts; i>=j && !onesLost; i--)
+            for (int i=magLen-1, j=magLen-nInts; i >= j && !onesLost; i--)
                 onesLost = (mag[i] != 0);
             if (!onesLost && nBits != 0)
                 onesLost = (mag[magLen - nInts - 1] << (32 - nBits) != 0);
@@ -2860,7 +2942,7 @@
      */
     public BigInteger and(BigInteger val) {
         int[] result = new int[Math.max(intLength(), val.intLength())];
-        for (int i=0; i<result.length; i++)
+        for (int i=0; i < result.length; i++)
             result[i] = (getInt(result.length-i-1)
                          & val.getInt(result.length-i-1));
 
@@ -2877,7 +2959,7 @@
      */
     public BigInteger or(BigInteger val) {
         int[] result = new int[Math.max(intLength(), val.intLength())];
-        for (int i=0; i<result.length; i++)
+        for (int i=0; i < result.length; i++)
             result[i] = (getInt(result.length-i-1)
                          | val.getInt(result.length-i-1));
 
@@ -2894,7 +2976,7 @@
      */
     public BigInteger xor(BigInteger val) {
         int[] result = new int[Math.max(intLength(), val.intLength())];
-        for (int i=0; i<result.length; i++)
+        for (int i=0; i < result.length; i++)
             result[i] = (getInt(result.length-i-1)
                          ^ val.getInt(result.length-i-1));
 
@@ -2910,7 +2992,7 @@
      */
     public BigInteger not() {
         int[] result = new int[intLength()];
-        for (int i=0; i<result.length; i++)
+        for (int i=0; i < result.length; i++)
             result[i] = ~getInt(result.length-i-1);
 
         return valueOf(result);
@@ -2928,7 +3010,7 @@
      */
     public BigInteger andNot(BigInteger val) {
         int[] result = new int[Math.max(intLength(), val.intLength())];
-        for (int i=0; i<result.length; i++)
+        for (int i=0; i < result.length; i++)
             result[i] = (getInt(result.length-i-1)
                          & ~val.getInt(result.length-i-1));
 
@@ -2947,7 +3029,7 @@
      * @throws ArithmeticException {@code n} is negative.
      */
     public boolean testBit(int n) {
-        if (n<0)
+        if (n < 0)
             throw new ArithmeticException("Negative bit address");
 
         return (getInt(n >>> 5) & (1 << (n & 31))) != 0;
@@ -2962,13 +3044,13 @@
      * @throws ArithmeticException {@code n} is negative.
      */
     public BigInteger setBit(int n) {
-        if (n<0)
+        if (n < 0)
             throw new ArithmeticException("Negative bit address");
 
         int intNum = n >>> 5;
         int[] result = new int[Math.max(intLength(), intNum+2)];
 
-        for (int i=0; i<result.length; i++)
+        for (int i=0; i < result.length; i++)
             result[result.length-i-1] = getInt(i);
 
         result[result.length-intNum-1] |= (1 << (n & 31));
@@ -2986,13 +3068,13 @@
      * @throws ArithmeticException {@code n} is negative.
      */
     public BigInteger clearBit(int n) {
-        if (n<0)
+        if (n < 0)
             throw new ArithmeticException("Negative bit address");
 
         int intNum = n >>> 5;
         int[] result = new int[Math.max(intLength(), ((n + 1) >>> 5) + 1)];
 
-        for (int i=0; i<result.length; i++)
+        for (int i=0; i < result.length; i++)
             result[result.length-i-1] = getInt(i);
 
         result[result.length-intNum-1] &= ~(1 << (n & 31));
@@ -3010,13 +3092,13 @@
      * @throws ArithmeticException {@code n} is negative.
      */
     public BigInteger flipBit(int n) {
-        if (n<0)
+        if (n < 0)
             throw new ArithmeticException("Negative bit address");
 
         int intNum = n >>> 5;
         int[] result = new int[Math.max(intLength(), intNum+2)];
 
-        for (int i=0; i<result.length; i++)
+        for (int i=0; i < result.length; i++)
             result[result.length-i-1] = getInt(i);
 
         result[result.length-intNum-1] ^= (1 << (n & 31));
@@ -3028,7 +3110,7 @@
      * Returns the index of the rightmost (lowest-order) one bit in this
      * BigInteger (the number of zero bits to the right of the rightmost
      * one bit).  Returns -1 if this BigInteger contains no one bits.
-     * (Computes {@code (this==0? -1 : log2(this & -this))}.)
+     * (Computes {@code (this == 0? -1 : log2(this & -this))}.)
      *
      * @return index of the rightmost one bit in this BigInteger.
      */
@@ -3041,7 +3123,7 @@
             } else {
                 // Search for lowest order nonzero int
                 int i,b;
-                for (i=0; (b = getInt(i))==0; i++)
+                for (i=0; (b = getInt(i)) == 0; i++)
                     ;
                 lsb += (i << 5) + Integer.numberOfTrailingZeros(b);
             }
@@ -3102,12 +3184,12 @@
         if (bc == -1) {  // bitCount not initialized yet
             bc = 0;      // offset by one to initialize
             // Count the bits in the magnitude
-            for (int i=0; i<mag.length; i++)
+            for (int i=0; i < mag.length; i++)
                 bc += Integer.bitCount(mag[i]);
             if (signum < 0) {
                 // Count the trailing zeros in the magnitude
                 int magTrailingZeroCount = 0, j;
-                for (j=mag.length-1; mag[j]==0; j--)
+                for (j=mag.length-1; mag[j] == 0; j--)
                     magTrailingZeroCount += 32;
                 magTrailingZeroCount += Integer.numberOfTrailingZeros(mag[j]);
                 bc += magTrailingZeroCount - 1;
@@ -3208,14 +3290,14 @@
         assert val != Long.MIN_VALUE;
         int[] m1 = mag;
         int len = m1.length;
-        if(len > 2) {
+        if (len > 2) {
             return 1;
         }
         if (val < 0) {
             val = -val;
         }
         int highWord = (int)(val >>> 32);
-        if (highWord==0) {
+        if (highWord == 0) {
             if (len < 1)
                 return -1;
             if (len > 1)
@@ -3283,7 +3365,7 @@
      *         {@code val}.  If they are equal, either may be returned.
      */
     public BigInteger min(BigInteger val) {
-        return (compareTo(val)<0 ? this : val);
+        return (compareTo(val) < 0 ? this : val);
     }
 
     /**
@@ -3294,7 +3376,7 @@
      *         {@code val}.  If they are equal, either may be returned.
      */
     public BigInteger max(BigInteger val) {
-        return (compareTo(val)>0 ? this : val);
+        return (compareTo(val) > 0 ? this : val);
     }
 
 
@@ -3308,7 +3390,7 @@
     public int hashCode() {
         int hashCode = 0;
 
-        for (int i=0; i<mag.length; i++)
+        for (int i=0; i < mag.length; i++)
             hashCode = (int)(31*hashCode + (mag[i] & LONG_MASK));
 
         return hashCode * signum;
@@ -3356,8 +3438,9 @@
 
     /** This method is used to perform toString when arguments are small. */
     private String smallToString(int radix) {
-        if (signum == 0)
+        if (signum == 0) {
             return "0";
+        }
 
         // Compute upper bound on number of digit groups and allocate space
         int maxNumDigitGroups = (4*mag.length + 6)/7;
@@ -3382,16 +3465,18 @@
 
         // Put sign (if any) and first digit group into result buffer
         StringBuilder buf = new StringBuilder(numGroups*digitsPerLong[radix]+1);
-        if (signum<0)
+        if (signum < 0) {
             buf.append('-');
+        }
         buf.append(digitGroup[numGroups-1]);
 
         // Append remaining digit groups padded with leading zeros
-        for (int i=numGroups-2; i>=0; i--) {
+        for (int i=numGroups-2; i >= 0; i--) {
             // Prepend (any) leading zeros for this digit group
             int numLeadingZeros = digitsPerLong[radix]-digitGroup[i].length();
-            if (numLeadingZeros != 0)
+            if (numLeadingZeros != 0) {
                 buf.append(zeros[numLeadingZeros]);
+            }
             buf.append(digitGroup[i]);
         }
         return buf.toString();
@@ -3399,7 +3484,7 @@
 
     /**
      * Converts the specified BigInteger to a string and appends to
-     * <code>sb</code>.  This implements the recursive Schoenhage algorithm
+     * {@code sb}.  This implements the recursive Schoenhage algorithm
      * for base conversions.
      * <p/>
      * See Knuth, Donald,  _The Art of Computer Programming_, Vol. 2,
@@ -3419,9 +3504,11 @@
 
             // Pad with internal zeros if necessary.
             // Don't pad if we're at the beginning of the string.
-            if ((s.length() < digits) && (sb.length() > 0))
-                for (int i=s.length(); i<digits; i++) // May be a faster way to
+            if ((s.length() < digits) && (sb.length() > 0)) {
+                for (int i=s.length(); i < digits; i++) { // May be a faster way to
                     sb.append('0');                    // do this?
+                }
+            }
 
             sb.append(s);
             return;
@@ -3450,7 +3537,7 @@
      * If this value doesn't already exist in the cache, it is added.
      * <p/>
      * This could be changed to a more complicated caching method using
-     * <code>Future</code>.
+     * {@code Future}.
      */
     private static BigInteger getRadixConversionCache(int radix, int exponent) {
         BigInteger[] cacheLine = powerCache[radix]; // volatile read
@@ -3478,7 +3565,7 @@
     static {
         zeros[63] =
             "000000000000000000000000000000000000000000000000000000000000000";
-        for (int i=0; i<63; i++)
+        for (int i=0; i < 63; i++)
             zeros[i] = zeros[63].substring(0, i);
     }
 
@@ -3516,7 +3603,7 @@
         int byteLen = bitLength()/8 + 1;
         byte[] byteArray = new byte[byteLen];
 
-        for (int i=byteLen-1, bytesCopied=4, nextInt=0, intIndex=0; i>=0; i--) {
+        for (int i=byteLen-1, bytesCopied=4, nextInt=0, intIndex=0; i >= 0; i--) {
             if (bytesCopied == 4) {
                 nextInt = getInt(intIndex++);
                 bytesCopied = 1;
@@ -3568,7 +3655,7 @@
     public long longValue() {
         long result = 0;
 
-        for (int i=1; i>=0; i--)
+        for (int i=1; i >= 0; i--)
             result = (result << 32) + (getInt(i) & LONG_MASK);
         return result;
     }
@@ -3784,7 +3871,7 @@
         int keep;
 
         // Find first nonzero byte
-        for (keep = 0; keep < byteLength && a[keep]==0; keep++)
+        for (keep = 0; keep < byteLength && a[keep] == 0; keep++)
             ;
 
         // Allocate new array and copy relevant part of input array
@@ -3810,16 +3897,16 @@
         int byteLength = a.length;
 
         // Find first non-sign (0xff) byte of input
-        for (keep=0; keep<byteLength && a[keep]==-1; keep++)
+        for (keep=0; keep < byteLength && a[keep] == -1; keep++)
             ;
 
 
         /* Allocate output array.  If all non-sign bytes are 0x00, we must
          * allocate space for one extra output byte. */
-        for (k=keep; k<byteLength && a[k]==0; k++)
+        for (k=keep; k < byteLength && a[k] == 0; k++)
             ;
 
-        int extraByte = (k==byteLength) ? 1 : 0;
+        int extraByte = (k == byteLength) ? 1 : 0;
         int intLength = ((byteLength - keep + extraByte) + 3)/4;
         int result[] = new int[intLength];
 
@@ -3840,7 +3927,7 @@
         }
 
         // Add one to one's complement to generate two's complement
-        for (int i=result.length-1; i>=0; i--) {
+        for (int i=result.length-1; i >= 0; i--) {
             result[i] = (int)((result[i] & LONG_MASK) + 1);
             if (result[i] != 0)
                 break;
@@ -3857,23 +3944,23 @@
         int keep, j;
 
         // Find first non-sign (0xffffffff) int of input
-        for (keep=0; keep<a.length && a[keep]==-1; keep++)
+        for (keep=0; keep < a.length && a[keep] == -1; keep++)
             ;
 
         /* Allocate output array.  If all non-sign ints are 0x00, we must
          * allocate space for one extra output int. */
-        for (j=keep; j<a.length && a[j]==0; j++)
+        for (j=keep; j < a.length && a[j] == 0; j++)
             ;
-        int extraInt = (j==a.length ? 1 : 0);
+        int extraInt = (j == a.length ? 1 : 0);
         int result[] = new int[a.length - keep + extraInt];
 
         /* Copy one's complement of input into output, leaving extra
          * int (if it exists) == 0x00 */
-        for (int i = keep; i<a.length; i++)
+        for (int i = keep; i < a.length; i++)
             result[i - keep + extraInt] = ~a[i];
 
         // Add one to one's complement to generate two's complement
-        for (int i=result.length-1; ++result[i]==0; i--)
+        for (int i=result.length-1; ++result[i] == 0; i--)
             ;
 
         return result;
@@ -4131,7 +4218,7 @@
         byte[] result = new byte[byteLen];
 
         for (int i = byteLen - 1, bytesCopied = 4, intIndex = len - 1, nextInt = 0;
-             i>=0; i--) {
+             i >= 0; i--) {
             if (bytesCopied == 4) {
                 nextInt = mag[intIndex--];
                 bytesCopied = 1;
--- a/src/share/classes/java/math/MutableBigInteger.java	Tue Aug 06 17:12:37 2013 -0700
+++ b/src/share/classes/java/math/MutableBigInteger.java	Tue Aug 06 22:47:14 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
+ * 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
@@ -38,14 +38,14 @@
  *
  * @see     BigInteger
  * @author  Michael McCloskey
+ * @author  Timothy Buktu
  * @since   1.3
  */
 
+import static java.math.BigDecimal.INFLATED;
+import static java.math.BigInteger.LONG_MASK;
 import java.util.Arrays;
 
-import static java.math.BigInteger.LONG_MASK;
-import static java.math.BigDecimal.INFLATED;
-
 class MutableBigInteger {
     /**
      * Holds the magnitude of this MutableBigInteger in big endian order.
@@ -75,6 +75,24 @@
      */
     static final MutableBigInteger ONE = new MutableBigInteger(1);
 
+    /**
+     * The minimum {@code intLen} for cancelling powers of two before
+     * dividing.
+     * If the number of ints is less than this threshold,
+     * {@code divideKnuth} does not eliminate common powers of two from
+     * the dividend and divisor.
+     */
+    static final int KNUTH_POW2_THRESH_LEN = 6;
+
+    /**
+     * The minimum number of trailing zero ints for cancelling powers of two
+     * before dividing.
+     * If the dividend and divisor don't share at least this many zero ints
+     * at the end, {@code divideKnuth} does not eliminate common powers
+     * of two from the dividend and divisor.
+     */
+    static final int KNUTH_POW2_THRESH_ZEROS = 3;
+
     // Constructors
 
     /**
@@ -124,6 +142,20 @@
     }
 
     /**
+     * Makes this number an {@code n}-int number all of whose bits are ones.
+     * Used by Burnikel-Ziegler division.
+     * @param n number of ints in the {@code value} array
+     * @return a number equal to {@code ((1<<(32*n)))-1}
+     */
+    private void ones(int n) {
+        if (n > value.length)
+            value = new int[n];
+        Arrays.fill(value, -1);
+        offset = 0;
+        intLen = n;
+    }
+
+    /**
      * Internal helper method to return the magnitude array. The caller is not
      * supposed to modify the returned array.
      */
@@ -155,6 +187,14 @@
     }
 
     /**
+     * Converts this number to a nonnegative {@code BigInteger}.
+     */
+    BigInteger toBigInteger() {
+        normalize();
+        return toBigInteger(isZero() ? 0 : 1);
+    }
+
+    /**
      * Convert this MutableBigInteger to BigDecimal object with the specified sign
      * and scale.
      */
@@ -238,6 +278,32 @@
     }
 
     /**
+     * Returns a value equal to what {@code b.leftShift(32*ints); return compare(b);}
+     * would return, but doesn't change the value of {@code b}.
+     */
+    private int compareShifted(MutableBigInteger b, int ints) {
+        int blen = b.intLen;
+        int alen = intLen - ints;
+        if (alen < blen)
+            return -1;
+        if (alen > blen)
+           return 1;
+
+        // Add Integer.MIN_VALUE to make the comparison act as unsigned integer
+        // comparison.
+        int[] bval = b.value;
+        for (int i = offset, j = b.offset; i < alen + offset; i++, j++) {
+            int b1 = value[i] + 0x80000000;
+            int b2 = bval[j]  + 0x80000000;
+            if (b1 < b2)
+                return -1;
+            if (b1 > b2)
+                return 1;
+        }
+        return 0;
+    }
+
+    /**
      * Compare this against half of a MutableBigInteger object (Needed for
      * remainder tests).
      * Assumes no leading unnecessary zeros, which holds for results
@@ -247,7 +313,7 @@
         int blen = b.intLen;
         int len = intLen;
         if (len <= 0)
-            return blen <=0 ? 0 : -1;
+            return blen <= 0 ? 0 : -1;
         if (len > blen)
             return 1;
         if (len < blen - 1)
@@ -274,7 +340,7 @@
                 return v < hb ? -1 : 1;
             carry = (bv & 1) << 31; // carray will be either 0x80000000 or 0
         }
-        return carry == 0? 0 : -1;
+        return carry == 0 ? 0 : -1;
     }
 
     /**
@@ -285,10 +351,10 @@
         if (intLen == 0)
             return -1;
         int j, b;
-        for (j=intLen-1; (j>0) && (value[j+offset]==0); j--)
+        for (j=intLen-1; (j > 0) && (value[j+offset] == 0); j--)
             ;
         b = value[j+offset];
-        if (b==0)
+        if (b == 0)
             return -1;
         return ((intLen-1-j)<<5) + Integer.numberOfTrailingZeros(b);
     }
@@ -329,11 +395,11 @@
         int indexBound = index+intLen;
         do {
             index++;
-        } while(index < indexBound && value[index]==0);
+        } while(index < indexBound && value[index] == 0);
 
         int numZeros = index - offset;
         intLen -= numZeros;
-        offset = (intLen==0 ?  0 : offset+numZeros);
+        offset = (intLen == 0 ?  0 : offset+numZeros);
     }
 
     /**
@@ -354,7 +420,7 @@
      */
     int[] toIntArray() {
         int[] result = new int[intLen];
-        for(int i=0; i<intLen; i++)
+        for(int i=0; i < intLen; i++)
             result[i] = value[offset+i];
         return result;
     }
@@ -440,7 +506,7 @@
     boolean isNormal() {
         if (intLen + offset > value.length)
             return false;
-        if (intLen ==0)
+        if (intLen == 0)
             return true;
         return (value[offset] != 0);
     }
@@ -454,6 +520,17 @@
     }
 
     /**
+     * Like {@link #rightShift(int)} but {@code n} can be greater than the length of the number.
+     */
+    void safeRightShift(int n) {
+        if (n/32 >= intLen) {
+            reset();
+        } else {
+            rightShift(n);
+        }
+    }
+
+    /**
      * Right shift this MutableBigInteger n bits. The MutableBigInteger is left
      * in normal form.
      */
@@ -475,6 +552,15 @@
     }
 
     /**
+     * Like {@link #leftShift(int)} but {@code n} can be zero.
+     */
+    void safeLeftShift(int n) {
+        if (n > 0) {
+            leftShift(n);
+        }
+    }
+
+    /**
      * Left shift this MutableBigInteger n bits.
      */
     void leftShift(int n) {
@@ -502,18 +588,18 @@
         if (value.length < newLen) {
             // The array must grow
             int[] result = new int[newLen];
-            for (int i=0; i<intLen; i++)
+            for (int i=0; i < intLen; i++)
                 result[i] = value[offset+i];
             setValue(result, newLen);
         } else if (value.length - offset >= newLen) {
             // Use space on right
-            for(int i=0; i<newLen - intLen; i++)
+            for(int i=0; i < newLen - intLen; i++)
                 value[offset+intLen+i] = 0;
         } else {
             // Must use space on left
-            for (int i=0; i<intLen; i++)
+            for (int i=0; i < intLen; i++)
                 value[i] = value[offset+i];
-            for (int i=intLen; i<newLen; i++)
+            for (int i=intLen; i < newLen; i++)
                 value[i] = 0;
             offset = 0;
         }
@@ -590,7 +676,7 @@
     private final void primitiveRightShift(int n) {
         int[] val = value;
         int n2 = 32 - n;
-        for (int i=offset+intLen-1, c=val[i]; i>offset; i--) {
+        for (int i=offset+intLen-1, c=val[i]; i > offset; i--) {
             int b = c;
             c = val[i-1];
             val[i] = (c << n2) | (b >>> n);
@@ -606,7 +692,7 @@
     private final void primitiveLeftShift(int n) {
         int[] val = value;
         int n2 = 32 - n;
-        for (int i=offset, c=val[i], m=i+intLen-1; i<m; i++) {
+        for (int i=offset, c=val[i], m=i+intLen-1; i < m; i++) {
             int b = c;
             c = val[i+1];
             val[i] = (b << n) | (c >>> n2);
@@ -615,6 +701,35 @@
     }
 
     /**
+     * Returns a {@code BigInteger} equal to the {@code n}
+     * low ints of this number.
+     */
+    private BigInteger getLower(int n) {
+        if (isZero()) {
+            return BigInteger.ZERO;
+        } else if (intLen < n) {
+            return toBigInteger(1);
+        } else {
+            // strip zeros
+            int len = n;
+            while (len > 0 && value[offset+intLen-len] == 0)
+                len--;
+            int sign = len > 0 ? 1 : 0;
+            return new BigInteger(Arrays.copyOfRange(value, offset+intLen-len, offset+intLen), sign);
+        }
+    }
+
+    /**
+     * Discards all ints whose index is greater than {@code n}.
+     */
+    private void keepLower(int n) {
+        if (intLen >= n) {
+            offset += intLen - n;
+            intLen = n;
+        }
+    }
+
+    /**
      * Adds the contents of two MutableBigInteger objects.The result
      * is placed within this MutableBigInteger.
      * The contents of the addend are not changed.
@@ -630,7 +745,7 @@
         long carry = 0;
 
         // Add common parts of both numbers
-        while(x>0 && y>0) {
+        while(x > 0 && y > 0) {
             x--; y--;
             sum = (value[x+offset] & LONG_MASK) +
                 (addend.value[y+addend.offset] & LONG_MASK) + carry;
@@ -639,7 +754,7 @@
         }
 
         // Add remainder of the longer number
-        while(x>0) {
+        while(x > 0) {
             x--;
             if (carry == 0 && result == value && rstart == (x + offset))
                 return;
@@ -647,7 +762,7 @@
             result[rstart--] = (int)sum;
             carry = sum >>> 32;
         }
-        while(y>0) {
+        while(y > 0) {
             y--;
             sum = (addend.value[y+addend.offset] & LONG_MASK) + carry;
             result[rstart--] = (int)sum;
@@ -673,6 +788,123 @@
         offset = result.length - resultLen;
     }
 
+    /**
+     * Adds the value of {@code addend} shifted {@code n} ints to the left.
+     * Has the same effect as {@code addend.leftShift(32*ints); add(addend);}
+     * but doesn't change the value of {@code addend}.
+     */
+    void addShifted(MutableBigInteger addend, int n) {
+        if (addend.isZero()) {
+            return;
+        }
+
+        int x = intLen;
+        int y = addend.intLen + n;
+        int resultLen = (intLen > y ? intLen : y);
+        int[] result = (value.length < resultLen ? new int[resultLen] : value);
+
+        int rstart = result.length-1;
+        long sum;
+        long carry = 0;
+
+        // Add common parts of both numbers
+        while (x > 0 && y > 0) {
+            x--; y--;
+            int bval = y+addend.offset < addend.value.length ? addend.value[y+addend.offset] : 0;
+            sum = (value[x+offset] & LONG_MASK) +
+                (bval & LONG_MASK) + carry;
+            result[rstart--] = (int)sum;
+            carry = sum >>> 32;
+        }
+
+        // Add remainder of the longer number
+        while (x > 0) {
+            x--;
+            if (carry == 0 && result == value && rstart == (x + offset)) {
+                return;
+            }
+            sum = (value[x+offset] & LONG_MASK) + carry;
+            result[rstart--] = (int)sum;
+            carry = sum >>> 32;
+        }
+        while (y > 0) {
+            y--;
+            int bval = y+addend.offset < addend.value.length ? addend.value[y+addend.offset] : 0;
+            sum = (bval & LONG_MASK) + carry;
+            result[rstart--] = (int)sum;
+            carry = sum >>> 32;
+        }
+
+        if (carry > 0) { // Result must grow in length
+            resultLen++;
+            if (result.length < resultLen) {
+                int temp[] = new int[resultLen];
+                // Result one word longer from carry-out; copy low-order
+                // bits into new result.
+                System.arraycopy(result, 0, temp, 1, result.length);
+                temp[0] = 1;
+                result = temp;
+            } else {
+                result[rstart--] = 1;
+            }
+        }
+
+        value = result;
+        intLen = resultLen;
+        offset = result.length - resultLen;
+    }
+
+    /**
+     * Like {@link #addShifted(MutableBigInteger, int)} but {@code this.intLen} must
+     * not be greater than {@code n}. In other words, concatenates {@code this}
+     * and {@code addend}.
+     */
+    void addDisjoint(MutableBigInteger addend, int n) {
+        if (addend.isZero())
+            return;
+
+        int x = intLen;
+        int y = addend.intLen + n;
+        int resultLen = (intLen > y ? intLen : y);
+        int[] result;
+        if (value.length < resultLen)
+            result = new int[resultLen];
+        else {
+            result = value;
+            Arrays.fill(value, offset+intLen, value.length, 0);
+        }
+
+        int rstart = result.length-1;
+
+        // copy from this if needed
+        System.arraycopy(value, offset, result, rstart+1-x, x);
+        y -= x;
+        rstart -= x;
+
+        int len = Math.min(y, addend.value.length-addend.offset);
+        System.arraycopy(addend.value, addend.offset, result, rstart+1-y, len);
+
+        // zero the gap
+        for (int i=rstart+1-y+len; i < rstart+1; i++)
+            result[i] = 0;
+
+        value = result;
+        intLen = resultLen;
+        offset = result.length - resultLen;
+    }
+
+    /**
+     * Adds the low {@code n} ints of {@code addend}.
+     */
+    void addLower(MutableBigInteger addend, int n) {
+        MutableBigInteger a = new MutableBigInteger(addend);
+        if (a.offset + a.intLen >= n) {
+            a.offset = a.offset + a.intLen - n;
+            a.intLen = n;
+        }
+        a.normalize();
+        add(a);
+    }
 
     /**
      * Subtracts the smaller of this and b from the larger and places the
@@ -704,7 +936,7 @@
         int rstart = result.length - 1;
 
         // Subtract common parts of both numbers
-        while (y>0) {
+        while (y > 0) {
             x--; y--;
 
             diff = (a.value[x+a.offset] & LONG_MASK) -
@@ -712,7 +944,7 @@
             result[rstart--] = (int)diff;
         }
         // Subtract remainder of longer number
-        while (x>0) {
+        while (x > 0) {
             x--;
             diff = (a.value[x+a.offset] & LONG_MASK) - ((int)-(diff>>32));
             result[rstart--] = (int)diff;
@@ -733,7 +965,7 @@
     private int difference(MutableBigInteger b) {
         MutableBigInteger a = this;
         int sign = a.compare(b);
-        if (sign ==0)
+        if (sign == 0)
             return 0;
         if (sign < 0) {
             MutableBigInteger tmp = a;
@@ -746,14 +978,14 @@
         int y = b.intLen;
 
         // Subtract common parts of both numbers
-        while (y>0) {
+        while (y > 0) {
             x--; y--;
             diff = (a.value[a.offset+ x] & LONG_MASK) -
                 (b.value[b.offset+ y] & LONG_MASK) - ((int)-(diff>>32));
             a.value[a.offset+x] = (int)diff;
         }
         // Subtract remainder of longer number
-        while (x>0) {
+        while (x > 0) {
             x--;
             diff = (a.value[a.offset+ x] & LONG_MASK) - ((int)-(diff>>32));
             a.value[a.offset+x] = (int)diff;
@@ -822,7 +1054,7 @@
 
         // Perform the multiplication word by word
         long ylong = y & LONG_MASK;
-        int[] zval = (z.value.length<intLen+1 ? new int[intLen + 1]
+        int[] zval = (z.value.length < intLen+1 ? new int[intLen + 1]
                                               : z.value);
         long carry = 0;
         for (int i = intLen-1; i >= 0; i--) {
@@ -910,6 +1142,31 @@
      * Calculates the quotient of this div b and places the quotient in the
      * provided MutableBigInteger objects and the remainder object is returned.
      *
+     */
+    MutableBigInteger divide(MutableBigInteger b, MutableBigInteger quotient) {
+        return divide(b,quotient,true);
+    }
+
+    MutableBigInteger divide(MutableBigInteger b, MutableBigInteger quotient, boolean needRemainder) {
+        if (intLen < BigInteger.BURNIKEL_ZIEGLER_THRESHOLD ||
+                b.intLen < BigInteger.BURNIKEL_ZIEGLER_THRESHOLD) {
+            return divideKnuth(b, quotient, needRemainder);
+        } else {
+            return divideAndRemainderBurnikelZiegler(b, quotient);
+        }
+    }
+
+    /**
+     * @see #divideKnuth(MutableBigInteger, MutableBigInteger, boolean)
+     */
+    MutableBigInteger divideKnuth(MutableBigInteger b, MutableBigInteger quotient) {
+        return divideKnuth(b,quotient,true);
+    }
+
+    /**
+     * Calculates the quotient of this div b and places the quotient in the
+     * provided MutableBigInteger objects and the remainder object is returned.
+     *
      * Uses Algorithm D in Knuth section 4.3.1.
      * Many optimizations to that algorithm have been adapted from the Colin
      * Plumb C library.
@@ -917,38 +1174,34 @@
      * changed.
      *
      */
-    MutableBigInteger divide(MutableBigInteger b, MutableBigInteger quotient) {
-        return divide(b,quotient,true);
-    }
-
-    MutableBigInteger divide(MutableBigInteger b, MutableBigInteger quotient, boolean needReminder) {
+    MutableBigInteger divideKnuth(MutableBigInteger b, MutableBigInteger quotient, boolean needRemainder) {
         if (b.intLen == 0)
             throw new ArithmeticException("BigInteger divide by zero");
 
         // Dividend is zero
         if (intLen == 0) {
-            quotient.intLen = quotient.offset;
-            return needReminder ? new MutableBigInteger() : null;
+            quotient.intLen = quotient.offset = 0;
+            return needRemainder ? new MutableBigInteger() : null;
         }
 
         int cmp = compare(b);
         // Dividend less than divisor
         if (cmp < 0) {
             quotient.intLen = quotient.offset = 0;
-            return needReminder ? new MutableBigInteger(this) : null;
+            return needRemainder ? new MutableBigInteger(this) : null;
         }
         // Dividend equal to divisor
         if (cmp == 0) {
             quotient.value[0] = quotient.intLen = 1;
             quotient.offset = 0;
-            return needReminder ? new MutableBigInteger() : null;
+            return needRemainder ? new MutableBigInteger() : null;
         }
 
         quotient.clear();
         // Special case one word divisor
         if (b.intLen == 1) {
             int r = divideOneWord(b.value[b.offset], quotient);
-            if(needReminder) {
+            if(needRemainder) {
                 if (r == 0)
                     return new MutableBigInteger();
                 return new MutableBigInteger(r);
@@ -956,7 +1209,220 @@
                 return null;
             }
         }
-        return divideMagnitude(b, quotient, needReminder);
+
+        // Cancel common powers of two if we're above the KNUTH_POW2_* thresholds
+        if (intLen >= KNUTH_POW2_THRESH_LEN) {
+            int trailingZeroBits = Math.min(getLowestSetBit(), b.getLowestSetBit());
+            if (trailingZeroBits >= KNUTH_POW2_THRESH_ZEROS*32) {
+                MutableBigInteger a = new MutableBigInteger(this);
+                b = new MutableBigInteger(b);
+                a.rightShift(trailingZeroBits);
+                b.rightShift(trailingZeroBits);
+                MutableBigInteger r = a.divideKnuth(b, quotient);
+                r.leftShift(trailingZeroBits);
+                return r;
+            }
+        }
+
+        return divideMagnitude(b, quotient, needRemainder);
+    }
+
+    /**
+     * Computes {@code this/b} and {@code this%b} using the
+     * <a href="http://cr.yp.to/bib/1998/burnikel.ps"> Burnikel-Ziegler algorithm</a>.
+     * This method implements algorithm 3 from pg. 9 of the Burnikel-Ziegler paper.
+     * The parameter beta was chosen to b 2<sup>32</sup> so almost all shifts are
+     * multiples of 32 bits.<br/>
+     * {@code this} and {@code b} must be nonnegative.
+     * @param b the divisor
+     * @param quotient output parameter for {@code this/b}
+     * @return the remainder
+     */
+    MutableBigInteger divideAndRemainderBurnikelZiegler(MutableBigInteger b, MutableBigInteger quotient) {
+        int r = intLen;
+        int s = b.intLen;
+
+        if (r < s) {
+            return this;
+        } else {
+            // Unlike Knuth division, we don't check for common powers of two here because
+            // BZ already runs faster if both numbers contain powers of two and cancelling them has no
+            // additional benefit.
+
+            // step 1: let m = min{2^k | (2^k)*BURNIKEL_ZIEGLER_THRESHOLD > s}
+            int m = 1 << (32-Integer.numberOfLeadingZeros(s/BigInteger.BURNIKEL_ZIEGLER_THRESHOLD));
+
+            int j = (s+m-1) / m;      // step 2a: j = ceil(s/m)
+            int n = j * m;            // step 2b: block length in 32-bit units
+            int n32 = 32 * n;         // block length in bits
+            int sigma = Math.max(0, n32 - b.bitLength());   // step 3: sigma = max{T | (2^T)*B < beta^n}
+            MutableBigInteger bShifted = new MutableBigInteger(b);
+            bShifted.safeLeftShift(sigma);   // step 4a: shift b so its length is a multiple of n
+            safeLeftShift(sigma);     // step 4b: shift this by the same amount
+
+            // step 5: t is the number of blocks needed to accommodate this plus one additional bit
+            int t = (bitLength()+n32) / n32;
+            if (t < 2) {
+                t = 2;
+            }
+
+            // step 6: conceptually split this into blocks a[t-1], ..., a[0]
+            MutableBigInteger a1 = getBlock(t-1, t, n);   // the most significant block of this
+
+            // step 7: z[t-2] = [a[t-1], a[t-2]]
+            MutableBigInteger z = getBlock(t-2, t, n);    // the second to most significant block
+            z.addDisjoint(a1, n);   // z[t-2]
+
+            // do schoolbook division on blocks, dividing 2-block numbers by 1-block numbers
+            MutableBigInteger qi = new MutableBigInteger();
+            MutableBigInteger ri;
+            quotient.offset = quotient.intLen = 0;
+            for (int i=t-2; i > 0; i--) {
+                // step 8a: compute (qi,ri) such that z=b*qi+ri
+                ri = z.divide2n1n(bShifted, qi);
+
+                // step 8b: z = [ri, a[i-1]]
+                z = getBlock(i-1, t, n);   // a[i-1]
+                z.addDisjoint(ri, n);
+                quotient.addShifted(qi, i*n);   // update q (part of step 9)
+            }
+            // final iteration of step 8: do the loop one more time for i=0 but leave z unchanged
+            ri = z.divide2n1n(bShifted, qi);
+            quotient.add(qi);
+
+            ri.rightShift(sigma);   // step 9: this and b were shifted, so shift back
+            return ri;
+        }
+    }
+
+    /**
+     * This method implements algorithm 1 from pg. 4 of the Burnikel-Ziegler paper.
+     * It divides a 2n-digit number by a n-digit number.<br/>
+     * The parameter beta is 2<sup>32</sup> so all shifts are multiples of 32 bits.
+     * <br/>
+     * {@code this} must be a nonnegative number such that {@code this.bitLength() <= 2*b.bitLength()}
+     * @param b a positive number such that {@code b.bitLength()} is even
+     * @param quotient output parameter for {@code this/b}
+     * @return {@code this%b}
+     */
+    private MutableBigInteger divide2n1n(MutableBigInteger b, MutableBigInteger quotient) {
+        int n = b.intLen;
+
+        // step 1: base case
+        if (n%2 != 0 || n < BigInteger.BURNIKEL_ZIEGLER_THRESHOLD) {
+            return divideKnuth(b, quotient);
+        }
+
+        // step 2: view this as [a1,a2,a3,a4] where each ai is n/2 ints or less
+        MutableBigInteger aUpper = new MutableBigInteger(this);
+        aUpper.safeRightShift(32*(n/2));   // aUpper = [a1,a2,a3]
+        keepLower(n/2);   // this = a4
+
+        // step 3: q1=aUpper/b, r1=aUpper%b
+        MutableBigInteger q1 = new MutableBigInteger();
+        MutableBigInteger r1 = aUpper.divide3n2n(b, q1);
+
+        // step 4: quotient=[r1,this]/b, r2=[r1,this]%b
+        addDisjoint(r1, n/2);   // this = [r1,this]
+        MutableBigInteger r2 = divide3n2n(b, quotient);
+
+        // step 5: let quotient=[q1,quotient] and return r2
+        quotient.addDisjoint(q1, n/2);
+        return r2;
+    }
+
+    /**
+     * This method implements algorithm 2 from pg. 5 of the Burnikel-Ziegler paper.
+     * It divides a 3n-digit number by a 2n-digit number.<br/>
+     * The parameter beta is 2<sup>32</sup> so all shifts are multiples of 32 bits.<br/>
+     * <br/>
+     * {@code this} must be a nonnegative number such that {@code 2*this.bitLength() <= 3*b.bitLength()}
+     * @param quotient output parameter for {@code this/b}
+     * @return {@code this%b}
+     */
+    private MutableBigInteger divide3n2n(MutableBigInteger b, MutableBigInteger quotient) {
+        int n = b.intLen / 2;   // half the length of b in ints
+
+        // step 1: view this as [a1,a2,a3] where each ai is n ints or less; let a12=[a1,a2]
+        MutableBigInteger a12 = new MutableBigInteger(this);
+        a12.safeRightShift(32*n);
+
+        // step 2: view b as [b1,b2] where each bi is n ints or less
+        MutableBigInteger b1 = new MutableBigInteger(b);
+        b1.safeRightShift(n * 32);
+        BigInteger b2 = b.getLower(n);
+
+        MutableBigInteger r;
+        MutableBigInteger d;
+        if (compareShifted(b, n) < 0) {
+            // step 3a: if a1<b1, let quotient=a12/b1 and r=a12%b1
+            r = a12.divide2n1n(b1, quotient);
+
+            // step 4: d=quotient*b2
+            d = new MutableBigInteger(quotient.toBigInteger().multiply(b2));
+        } else {
+            // step 3b: if a1>=b1, let quotient=beta^n-1 and r=a12-b1*2^n+b1
+            quotient.ones(n);
+            a12.add(b1);
+            b1.leftShift(32*n);
+            a12.subtract(b1);
+            r = a12;
+
+            // step 4: d=quotient*b2=(b2 << 32*n) - b2
+            d = new MutableBigInteger(b2);
+            d.leftShift(32 * n);
+            d.subtract(new MutableBigInteger(b2));
+        }
+
+        // step 5: r = r*beta^n + a3 - d (paper says a4)
+        // However, don't subtract d until after the while loop so r doesn't become negative
+        r.leftShift(32 * n);
+        r.addLower(this, n);
+
+        // step 6: add b until r>=d
+        while (r.compare(d) < 0) {
+            r.add(b);
+            quotient.subtract(MutableBigInteger.ONE);
+        }
+        r.subtract(d);
+
+        return r;
+    }
+
+    /**
+     * Returns a {@code MutableBigInteger} containing {@code blockLength} ints from
+     * {@code this} number, starting at {@code index*blockLength}.<br/>
+     * Used by Burnikel-Ziegler division.
+     * @param index the block index
+     * @param numBlocks the total number of blocks in {@code this} number
+     * @param blockLength length of one block in units of 32 bits
+     * @return
+     */
+    private MutableBigInteger getBlock(int index, int numBlocks, int blockLength) {
+        int blockStart = index * blockLength;
+        if (blockStart >= intLen) {
+            return new MutableBigInteger();
+        }
+
+        int blockEnd;
+        if (index == numBlocks-1) {
+            blockEnd = intLen;
+        } else {
+            blockEnd = (index+1) * blockLength;
+        }
+        if (blockEnd > intLen) {
+            return new MutableBigInteger();
+        }
+
+        int[] newVal = Arrays.copyOfRange(value, offset+intLen-blockEnd, offset+intLen-blockStart);
+        return new MutableBigInteger(newVal);
+    }
+
+    /** @see BigInteger#bitLength() */
+    int bitLength() {
+        if (intLen == 0)
+            return 0;
+        return intLen*32 - Integer.numberOfLeadingZeros(value[offset]);
     }
 
     /**
@@ -1006,7 +1472,7 @@
      */
     private MutableBigInteger divideMagnitude(MutableBigInteger div,
                                               MutableBigInteger quotient,
-                                              boolean needReminder ) {
+                                              boolean needRemainder ) {
         // assert div.intLen > 1
         // D1 normalize the divisor
         int shift = Integer.numberOfLeadingZeros(div.value[div.offset]);
@@ -1017,7 +1483,7 @@
         if (shift > 0) {
             divisor = new int[dlen];
             copyAndShift(div.value,div.offset,dlen,divisor,0,shift);
-            if(Integer.numberOfLeadingZeros(value[offset])>=shift) {
+            if (Integer.numberOfLeadingZeros(value[offset]) >= shift) {
                 int[] remarr = new int[intLen + 1];
                 rem = new MutableBigInteger(remarr);
                 rem.intLen = intLen;
@@ -1070,7 +1536,7 @@
         int dl = divisor[1];
 
         // D2 Initialize j
-        for(int j=0; j<limit-1; j++) {
+        for (int j=0; j < limit-1; j++) {
             // D3 Calculate qhat
             // estimate qhat
             int qhat = 0;
@@ -1176,7 +1642,7 @@
             // D4 Multiply and subtract
             int borrow;
             rem.value[limit - 1 + rem.offset] = 0;
-            if(needReminder)
+            if(needRemainder)
                 borrow = mulsub(rem.value, divisor, qhat, dlen, limit - 1 + rem.offset);
             else
                 borrow = mulsubBorrow(rem.value, divisor, qhat, dlen, limit - 1 + rem.offset);
@@ -1184,7 +1650,7 @@
             // D5 Test remainder
             if (borrow + 0x80000000 > nh2) {
                 // D6 Add back
-                if(needReminder)
+                if(needRemainder)
                     divadd(divisor, rem.value, limit - 1 + 1 + rem.offset);
                 qhat--;
             }
@@ -1194,14 +1660,14 @@
         }
 
 
-        if(needReminder) {
+        if (needRemainder) {
             // D8 Unnormalize
             if (shift > 0)
                 rem.rightShift(shift);
             rem.normalize();
         }
         quotient.normalize();
-        return needReminder ? rem : null;
+        return needRemainder ? rem : null;
     }
 
     /**
@@ -1367,7 +1833,7 @@
      * This method divides a long quantity by an int to estimate
      * qhat for two multi precision numbers. It is used when
      * the signed value of n is less than zero.
-     * Returns long value where high 32 bits contain reminder value and
+     * Returns long value where high 32 bits contain remainder value and
      * low 32 bits contain quotient value.
      */
     static long divWord(long n, int d) {
@@ -1436,7 +1902,7 @@
         }
 
         // step B2
-        boolean uOdd = (k==s1);
+        boolean uOdd = (k == s1);
         MutableBigInteger t = uOdd ? v: u;
         int tsign = uOdd ? -1 : 1;
 
@@ -1478,9 +1944,9 @@
      * Calculate GCD of a and b interpreted as unsigned integers.
      */
     static int binaryGcd(int a, int b) {
-        if (b==0)
+        if (b == 0)
             return a;
-        if (a==0)
+        if (a == 0)
             return b;
 
         // Right shift a & b till their last bits equal to 1.
@@ -1582,7 +2048,7 @@
         return result;
     }
 
-    /*
+    /**
      * Returns the multiplicative inverse of val mod 2^32.  Assumes val is odd.
      */
     static int inverseMod32(int val) {
@@ -1595,7 +2061,7 @@
         return t;
     }
 
-    /*
+    /**
      * Calculate the multiplicative inverse of 2^k mod mod, where mod is odd.
      */
     static MutableBigInteger modInverseBP2(MutableBigInteger mod, int k) {
@@ -1631,7 +2097,7 @@
         }
 
         // The Almost Inverse Algorithm
-        while(!f.isOne()) {
+        while (!f.isOne()) {
             // If gcd(f, g) != 1, number is not invertible modulo mod
             if (f.isZero())
                 throw new ArithmeticException("BigInteger not invertible.");
@@ -1665,7 +2131,7 @@
         return fixup(c, p, k);
     }
 
-    /*
+    /**
      * The Fixup Algorithm
      * Calculates X such that X = C * 2^(-k) (mod P)
      * Assumes C<P and P is odd.
@@ -1676,7 +2142,7 @@
         // Set r to the multiplicative inverse of p mod 2^32
         int r = -inverseMod32(p.value[p.offset+p.intLen-1]);
 
-        for(int i=0, numWords = k >> 5; i<numWords; i++) {
+        for (int i=0, numWords = k >> 5; i < numWords; i++) {
             // V = R * c (mod 2^j)
             int  v = r * c.value[c.offset + c.intLen-1];
             // c = c + (v * p)
--- a/src/share/classes/java/net/Authenticator.java	Tue Aug 06 17:12:37 2013 -0700
+++ b/src/share/classes/java/net/Authenticator.java	Tue Aug 06 22:47:14 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2004, 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
@@ -103,17 +103,17 @@
      * Sets the authenticator that will be used by the networking code
      * when a proxy or an HTTP server asks for authentication.
      * <p>
-     * First, if there is a security manager, its <code>checkPermission</code>
+     * First, if there is a security manager, its {@code checkPermission}
      * method is called with a
-     * <code>NetPermission("setDefaultAuthenticator")</code> permission.
+     * {@code NetPermission("setDefaultAuthenticator")} permission.
      * This may result in a java.lang.SecurityException.
      *
-     * @param   a       The authenticator to be set. If a is <code>null</code> then
+     * @param   a       The authenticator to be set. If a is {@code null} then
      *                  any previously set authenticator is removed.
      *
      * @throws SecurityException
      *        if a security manager exists and its
-     *        <code>checkPermission</code> method doesn't allow
+     *        {@code checkPermission} method doesn't allow
      *        setting the default authenticator.
      *
      * @see SecurityManager#checkPermission
@@ -134,9 +134,9 @@
      * Ask the authenticator that has been registered with the system
      * for a password.
      * <p>
-     * First, if there is a security manager, its <code>checkPermission</code>
+     * First, if there is a security manager, its {@code checkPermission}
      * method is called with a
-     * <code>NetPermission("requestPasswordAuthentication")</code> permission.
+     * {@code NetPermission("requestPasswordAuthentication")} permission.
      * This may result in a java.lang.SecurityException.
      *
      * @param addr The InetAddress of the site requesting authorization,
@@ -151,7 +151,7 @@
      *
      * @throws SecurityException
      *        if a security manager exists and its
-     *        <code>checkPermission</code> method doesn't allow
+     *        {@code checkPermission} method doesn't allow
      *        the password authentication request.
      *
      * @see SecurityManager#checkPermission
@@ -193,9 +193,9 @@
      * because the hostname can be provided in cases where the InetAddress
      * is not available.
      * <p>
-     * First, if there is a security manager, its <code>checkPermission</code>
+     * First, if there is a security manager, its {@code checkPermission}
      * method is called with a
-     * <code>NetPermission("requestPasswordAuthentication")</code> permission.
+     * {@code NetPermission("requestPasswordAuthentication")} permission.
      * This may result in a java.lang.SecurityException.
      *
      * @param host The hostname of the site requesting authentication.
@@ -211,7 +211,7 @@
      *
      * @throws SecurityException
      *        if a security manager exists and its
-     *        <code>checkPermission</code> method doesn't allow
+     *        {@code checkPermission} method doesn't allow
      *        the password authentication request.
      *
      * @see SecurityManager#checkPermission
@@ -254,9 +254,9 @@
      * Ask the authenticator that has been registered with the system
      * for a password.
      * <p>
-     * First, if there is a security manager, its <code>checkPermission</code>
+     * First, if there is a security manager, its {@code checkPermission}
      * method is called with a
-     * <code>NetPermission("requestPasswordAuthentication")</code> permission.
+     * {@code NetPermission("requestPasswordAuthentication")} permission.
      * This may result in a java.lang.SecurityException.
      *
      * @param host The hostname of the site requesting authentication.
@@ -275,7 +275,7 @@
      *
      * @throws SecurityException
      *        if a security manager exists and its
-     *        <code>checkPermission</code> method doesn't allow
+     *        {@code checkPermission} method doesn't allow
      *        the password authentication request.
      *
      * @see SecurityManager#checkPermission
@@ -320,8 +320,8 @@
     }
 
     /**
-     * Gets the <code>hostname</code> of the
-     * site or proxy requesting authentication, or <code>null</code>
+     * Gets the {@code hostname} of the
+     * site or proxy requesting authentication, or {@code null}
      * if not available.
      *
      * @return the hostname of the connection requiring authentication, or null
@@ -333,8 +333,8 @@
     }
 
     /**
-     * Gets the <code>InetAddress</code> of the
-     * site requesting authorization, or <code>null</code>
+     * Gets the {@code InetAddress} of the
+     * site requesting authorization, or {@code null}
      * if not available.
      *
      * @return the InetAddress of the site requesting authorization, or null
@@ -346,7 +346,7 @@
 
     /**
      * Gets the port number for the requested connection.
-     * @return an <code>int</code> indicating the
+     * @return an {@code int} indicating the
      * port for the requested connection.
      */
     protected final int getRequestingPort() {
--- a/src/share/classes/java/net/ContentHandler.java	Tue Aug 06 17:12:37 2013 -0700
+++ b/src/share/classes/java/net/ContentHandler.java	Tue Aug 06 22:47:14 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1995, 2012, 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
@@ -28,21 +28,21 @@
 import java.io.IOException;
 
 /**
- * The abstract class <code>ContentHandler</code> is the superclass
- * of all classes that read an <code>Object</code> from a
- * <code>URLConnection</code>.
+ * The abstract class {@code ContentHandler} is the superclass
+ * of all classes that read an {@code Object} from a
+ * {@code URLConnection}.
  * <p>
  * An application does not generally call the
- * <code>getContent</code> method in this class directly. Instead, an
- * application calls the <code>getContent</code> method in class
- * <code>URL</code> or in <code>URLConnection</code>.
+ * {@code getContent} method in this class directly. Instead, an
+ * application calls the {@code getContent} method in class
+ * {@code URL} or in {@code URLConnection}.
  * The application's content handler factory (an instance of a class that
- * implements the interface <code>ContentHandlerFactory</code> set
- * up by a call to <code>setContentHandler</code>) is
- * called with a <code>String</code> giving the MIME type of the
+ * implements the interface {@code ContentHandlerFactory} set
+ * up by a call to {@code setContentHandler}) is
+ * called with a {@code String} giving the MIME type of the
  * object being received on the socket. The factory returns an
- * instance of a subclass of <code>ContentHandler</code>, and its
- * <code>getContent</code> method is called to create the object.
+ * instance of a subclass of {@code ContentHandler}, and its
+ * {@code getContent} method is called to create the object.
  * <p>
  * If no content handler could be found, URLConnection will
  * look for a content handler in a user-defineable set of places.
@@ -75,7 +75,7 @@
      * creates an object from it.
      *
      * @param      urlc   a URL connection.
-     * @return     the object read by the <code>ContentHandler</code>.
+     * @return     the object read by the {@code ContentHandler}.
      * @exception  IOException  if an I/O error occurs while reading the object.
      */
     abstract public Object getContent(URLConnection urlc) throws IOException;
@@ -90,7 +90,7 @@
      *
      * @param      urlc   a URL connection.
      * @param      classes      an array of types requested
-     * @return     the object read by the <code>ContentHandler</code> that is
+     * @return     the object read by the {@code ContentHandler} that is
      *                 the first match of the suggested types.
      *                 null if none of the requested  are supported.
      * @exception  IOException  if an I/O error occurs while reading the object.
--- a/src/share/classes/java/net/ContentHandlerFactory.java	Tue Aug 06 17:12:37 2013 -0700
+++ b/src/share/classes/java/net/ContentHandlerFactory.java	Tue Aug 06 22:47:14 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1995, 1997, 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
@@ -28,10 +28,10 @@
 /**
  * This interface defines a factory for content handlers. An
  * implementation of this interface should map a MIME type into an
- * instance of <code>ContentHandler</code>.
+ * instance of {@code ContentHandler}.
  * <p>
- * This interface is used by the <code>URLStreamHandler</code> class
- * to create a <code>ContentHandler</code> for a MIME type.
+ * This interface is used by the {@code URLStreamHandler} class
+ * to create a {@code ContentHandler} for a MIME type.
  *
  * @author  James Gosling
  * @see     java.net.ContentHandler
@@ -40,13 +40,13 @@
  */
 public interface ContentHandlerFactory {
     /**
-     * Creates a new <code>ContentHandler</code> to read an object from
-     * a <code>URLStreamHandler</code>.
+     * Creates a new {@code ContentHandler} to read an object from
+     * a {@code URLStreamHandler}.
      *
      * @param   mimetype   the MIME type for which a content handler is desired.
 
-     * @return  a new <code>ContentHandler</code> to read an object from a
-     *          <code>URLStreamHandler</code>.
+     * @return  a new {@code ContentHandler} to read an object from a
+     *          {@code URLStreamHandler}.
      * @see     java.net.ContentHandler
      * @see     java.net.URLStreamHandler
      */
--- a/src/share/classes/java/net/CookieHandler.java	Tue Aug 06 17:12:37 2013 -0700
+++ b/src/share/classes/java/net/CookieHandler.java	Tue Aug 06 22:47:14 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -66,7 +66,7 @@
      *        there is no system-wide cookie handler currently set.
      * @throws SecurityException
      *       If a security manager has been installed and it denies
-     * {@link NetPermission}<tt>("getCookieHandler")</tt>
+     * {@link NetPermission}{@code ("getCookieHandler")}
      * @see #setDefault(CookieHandler)
      */
     public synchronized static CookieHandler getDefault() {
@@ -83,10 +83,10 @@
      * Note: non-standard http protocol handlers may ignore this setting.
      *
      * @param cHandler The HTTP cookie handler, or
-     *       <code>null</code> to unset.
+     *       {@code null} to unset.
      * @throws SecurityException
      *       If a security manager has been installed and it denies
-     * {@link NetPermission}<tt>("setCookieHandler")</tt>
+     * {@link NetPermission}{@code ("setCookieHandler")}
      * @see #getDefault()
      */
     public synchronized static void setDefault(CookieHandler cHandler) {
@@ -114,7 +114,7 @@
      * called after all request headers related to choosing cookies
      * are added, and before the request is sent.</P>
      *
-     * @param uri a <code>URI</code> representing the intended use for the
+     * @param uri a {@code URI} representing the intended use for the
      *            cookies
      * @param requestHeaders - a Map from request header
      *            field names to lists of field values representing
@@ -136,7 +136,7 @@
      * fields that are named Set-Cookie2, present in the response
      * headers into a cookie cache.
      *
-     * @param uri a <code>URI</code> where the cookies come from
+     * @param uri a {@code URI} where the cookies come from
      * @param responseHeaders an immutable map from field names to
      *            lists of field values representing the response
      *            header fields returned
--- a/src/share/classes/java/net/CookieManager.java	Tue Aug 06 17:12:37 2013 -0700
+++ b/src/share/classes/java/net/CookieManager.java	Tue Aug 06 22:47:14 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 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
@@ -131,7 +131,7 @@
      *
      * <p>This constructor will create new cookie manager with default
      * cookie store and accept policy. The effect is same as
-     * <tt>CookieManager(null, null)</tt>.
+     * {@code CookieManager(null, null)}.
      */
     public CookieManager() {
         this(null, null);
@@ -141,12 +141,12 @@
     /**
      * Create a new cookie manager with specified cookie store and cookie policy.
      *
-     * @param store     a <tt>CookieStore</tt> to be used by cookie manager.
-     *                  if <tt>null</tt>, cookie manager will use a default one,
+     * @param store     a {@code CookieStore} to be used by cookie manager.
+     *                  if {@code null}, cookie manager will use a default one,
      *                  which is an in-memory CookieStore implmentation.
-     * @param cookiePolicy      a <tt>CookiePolicy</tt> instance
+     * @param cookiePolicy      a {@code CookiePolicy} instance
      *                          to be used by cookie manager as policy callback.
-     *                          if <tt>null</tt>, ACCEPT_ORIGINAL_SERVER will
+     *                          if {@code null}, ACCEPT_ORIGINAL_SERVER will
      *                          be used.
      */
     public CookieManager(CookieStore store,
@@ -170,11 +170,11 @@
     /**
      * To set the cookie policy of this cookie manager.
      *
-     * <p> A instance of <tt>CookieManager</tt> will have
+     * <p> A instance of {@code CookieManager} will have
      * cookie policy ACCEPT_ORIGINAL_SERVER by default. Users always
      * can call this method to set another cookie policy.
      *
-     * @param cookiePolicy      the cookie policy. Can be <tt>null</tt>, which
+     * @param cookiePolicy      the cookie policy. Can be {@code null}, which
      *                          has no effects on current cookie policy.
      */
     public void setCookiePolicy(CookiePolicy cookiePolicy) {
--- a/src/share/classes/java/net/CookiePolicy.java	Tue Aug 06 17:12:37 2013 -0700
+++ b/src/share/classes/java/net/CookiePolicy.java	Tue Aug 06 22:47:14 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 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
@@ -71,8 +71,8 @@
      *
      * @param uri       the URI to consult accept policy with
      * @param cookie    the HttpCookie object in question
-     * @return          <tt>true</tt> if this cookie should be accepted;
-     *                  otherwise, <tt>false</tt>
+     * @return          {@code true} if this cookie should be accepted;
+     *                  otherwise, {@code false}
      */
     public boolean shouldAccept(URI uri, HttpCookie cookie);
 }
--- a/src/share/classes/java/net/CookieStore.java	Tue Aug 06 17:12:37 2013 -0700
+++ b/src/share/classes/java/net/CookieStore.java	Tue Aug 06 22:47:14 2013 -0700
@@ -32,8 +32,8 @@
  * A CookieStore object represents a storage for cookie. Can store and retrieve
  * cookies.
  *
- * <p>{@link CookieManager} will call <tt>CookieStore.add</tt> to save cookies
- * for every incoming HTTP response, and call <tt>CookieStore.get</tt> to
+ * <p>{@link CookieManager} will call {@code CookieStore.add} to save cookies
+ * for every incoming HTTP response, and call {@code CookieStore.get} to
  * retrieve cookie for every outgoing HTTP request. A CookieStore
  * is responsible for removing HttpCookie instances which have expired.
  *
@@ -55,11 +55,11 @@
      * then it is replaced with the new one.
      *
      * @param uri       the uri this cookie associated with.
-     *                  if <tt>null</tt>, this cookie will not be associated
+     *                  if {@code null}, this cookie will not be associated
      *                  with an URI
      * @param cookie    the cookie to store
      *
-     * @throws NullPointerException if <tt>cookie</tt> is <tt>null</tt>
+     * @throws NullPointerException if {@code cookie} is {@code null}
      *
      * @see #get
      *
@@ -77,7 +77,7 @@
      *
      * @param uri       the uri associated with the cookies to be returned
      *
-     * @throws NullPointerException if <tt>uri</tt> is <tt>null</tt>
+     * @throws NullPointerException if {@code uri} is {@code null}
      *
      * @see #add
      *
@@ -108,14 +108,14 @@
      * Remove a cookie from store.
      *
      * @param uri       the uri this cookie associated with.
-     *                  if <tt>null</tt>, the cookie to be removed is not associated
-     *                  with an URI when added; if not <tt>null</tt>, the cookie
+     *                  if {@code null}, the cookie to be removed is not associated
+     *                  with an URI when added; if not {@code null}, the cookie
      *                  to be removed is associated with the given URI when added.
      * @param cookie    the cookie to remove
      *
-     * @return          <tt>true</tt> if this store contained the specified cookie
+     * @return          {@code true} if this store contained the specified cookie
      *
-     * @throws NullPointerException if <tt>cookie</tt> is <tt>null</tt>
+     * @throws NullPointerException if {@code cookie} is {@code null}
      */
     public boolean remove(URI uri, HttpCookie cookie);
 
@@ -123,7 +123,7 @@
     /**
      * Remove all cookies in this cookie store.
      *
-     * @return          <tt>true</tt> if this store changed as a result of the call
+     * @return          {@code true} if this store changed as a result of the call
      */
     public boolean removeAll();
 }
--- a/src/share/classes/java/net/DatagramPacket.java	Tue Aug 06 17:12:37 2013 -0700
+++ b/src/share/classes/java/net/DatagramPacket.java	Tue Aug 06 22:47:14 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1995, 2012, 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
@@ -68,11 +68,11 @@
     int port;
 
     /**
-     * Constructs a <code>DatagramPacket</code> for receiving packets of
-     * length <code>length</code>, specifying an offset into the buffer.
+     * Constructs a {@code DatagramPacket} for receiving packets of
+     * length {@code length}, specifying an offset into the buffer.
      * <p>
-     * The <code>length</code> argument must be less than or equal to
-     * <code>buf.length</code>.
+     * The {@code length} argument must be less than or equal to
+     * {@code buf.length}.
      *
      * @param   buf      buffer for holding the incoming datagram.
      * @param   offset   the offset for the buffer
@@ -87,11 +87,11 @@
     }
 
     /**
-     * Constructs a <code>DatagramPacket</code> for receiving packets of
-     * length <code>length</code>.
+     * Constructs a {@code DatagramPacket} for receiving packets of
+     * length {@code length}.
      * <p>
-     * The <code>length</code> argument must be less than or equal to
-     * <code>buf.length</code>.
+     * The {@code length} argument must be less than or equal to
+     * {@code buf.length}.
      *
      * @param   buf      buffer for holding the incoming datagram.
      * @param   length   the number of bytes to read.
@@ -102,10 +102,10 @@
 
     /**
      * Constructs a datagram packet for sending packets of length
-     * <code>length</code> with offset <code>ioffset</code>to the
+     * {@code length} with offset {@code ioffset}to the
      * specified port number on the specified host. The
-     * <code>length</code> argument must be less than or equal to
-     * <code>buf.length</code>.
+     * {@code length} argument must be less than or equal to
+     * {@code buf.length}.
      *
      * @param   buf      the packet data.
      * @param   offset   the packet data offset.
@@ -125,10 +125,10 @@
 
     /**
      * Constructs a datagram packet for sending packets of length
-     * <code>length</code> with offset <code>ioffset</code>to the
+     * {@code length} with offset {@code ioffset}to the
      * specified port number on the specified host. The
-     * <code>length</code> argument must be less than or equal to
-     * <code>buf.length</code>.
+     * {@code length} argument must be less than or equal to
+     * {@code buf.length}.
      *
      * @param   buf      the packet data.
      * @param   offset   the packet data offset.
@@ -147,9 +147,9 @@
 
     /**
      * Constructs a datagram packet for sending packets of length
-     * <code>length</code> to the specified port number on the specified
-     * host. The <code>length</code> argument must be less than or equal
-     * to <code>buf.length</code>.
+     * {@code length} to the specified port number on the specified
+     * host. The {@code length} argument must be less than or equal
+     * to {@code buf.length}.
      *
      * @param   buf      the packet data.
      * @param   length   the packet length.
@@ -164,9 +164,9 @@
 
     /**
      * Constructs a datagram packet for sending packets of length
-     * <code>length</code> to the specified port number on the specified
-     * host. The <code>length</code> argument must be less than or equal
-     * to <code>buf.length</code>.
+     * {@code length} to the specified port number on the specified
+     * host. The {@code length} argument must be less than or equal
+     * to {@code buf.length}.
      *
      * @param   buf      the packet data.
      * @param   length   the packet length.
@@ -207,8 +207,8 @@
 
     /**
      * Returns the data buffer. The data received or the data to be sent
-     * starts from the <code>offset</code> in the buffer,
-     * and runs for <code>length</code> long.
+     * starts from the {@code offset} in the buffer,
+     * and runs for {@code length} long.
      *
      * @return  the buffer used to receive or  send data
      * @see #setData(byte[], int, int)
@@ -277,7 +277,7 @@
     /**
      * Sets the IP address of the machine to which this datagram
      * is being sent.
-     * @param iaddr the <code>InetAddress</code>
+     * @param iaddr the {@code InetAddress}
      * @since   JDK1.1
      * @see #getAddress()
      */
@@ -303,7 +303,7 @@
      * Sets the SocketAddress (usually IP address + port number) of the remote
      * host to which this datagram is being sent.
      *
-     * @param address the <code>SocketAddress</code>
+     * @param address the {@code SocketAddress}
      * @throws  IllegalArgumentException if address is null or is a
      *          SocketAddress subclass not supported by this socket
      *
@@ -324,7 +324,7 @@
      * Gets the SocketAddress (usually IP address + port number) of the remote
      * host that this packet is being sent to or is coming from.
      *
-     * @return the <code>SocketAddress</code>
+     * @return the {@code SocketAddress}
      * @since 1.4
      * @see #setSocketAddress
      */
@@ -335,7 +335,7 @@
     /**
      * Set the data buffer for this packet. With the offset of
      * this DatagramPacket set to 0, and the length set to
-     * the length of <code>buf</code>.
+     * the length of {@code buf}.
      *
      * @param buf the buffer to set for this packet.
      *
--- a/src/share/classes/java/net/DatagramSocket.java	Tue Aug 06 17:12:37 2013 -0700
+++ b/src/share/classes/java/net/DatagramSocket.java	Tue Aug 06 22:47:14 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1995, 2012, 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
@@ -47,14 +47,14 @@
  * a DatagramSocket is bound to a more specific address.
  * <p>
  * Example:
- * <code>
+ * {@code
  *              DatagramSocket s = new DatagramSocket(null);
  *              s.bind(new InetSocketAddress(8888));
- * </code>
+ * }
  * Which is equivalent to:
- * <code>
+ * {@code
  *              DatagramSocket s = new DatagramSocket(8888);
- * </code>
+ * }
  * Both cases will create a DatagramSocket able to receive broadcasts on
  * UDP port 8888.
  *
@@ -161,14 +161,14 @@
      * an IP address chosen by the kernel.
      *
      * <p>If there is a security manager,
-     * its <code>checkListen</code> method is first called
+     * its {@code checkListen} method is first called
      * with 0 as its argument to ensure the operation is allowed.
      * This could result in a SecurityException.
      *
      * @exception  SocketException  if the socket could not be opened,
      *               or the socket could not bind to the specified local port.
      * @exception  SecurityException  if a security manager exists and its
-     *             <code>checkListen</code> method doesn't allow the operation.
+     *             {@code checkListen} method doesn't allow the operation.
      *
      * @see SecurityManager#checkListen
      */
@@ -195,21 +195,21 @@
      * Creates a datagram socket, bound to the specified local
      * socket address.
      * <p>
-     * If, if the address is <code>null</code>, creates an unbound socket.
+     * If, if the address is {@code null}, creates an unbound socket.
      * <p>
      * <p>If there is a security manager,
-     * its <code>checkListen</code> method is first called
+     * its {@code checkListen} method is first called
      * with the port from the socket address
      * as its argument to ensure the operation is allowed.
      * This could result in a SecurityException.
      *
-     * @param bindaddr local socket address to bind, or <code>null</code>
+     * @param bindaddr local socket address to bind, or {@code null}
      *                 for an unbound socket.
      *
      * @exception  SocketException  if the socket could not be opened,
      *               or the socket could not bind to the specified local port.
      * @exception  SecurityException  if a security manager exists and its
-     *             <code>checkListen</code> method doesn't allow the operation.
+     *             {@code checkListen} method doesn't allow the operation.
      *
      * @see SecurityManager#checkListen
      * @since   1.4
@@ -234,8 +234,8 @@
      * an IP address chosen by the kernel.
      *
      * <p>If there is a security manager,
-     * its <code>checkListen</code> method is first called
-     * with the <code>port</code> argument
+     * its {@code checkListen} method is first called
+     * with the {@code port} argument
      * as its argument to ensure the operation is allowed.
      * This could result in a SecurityException.
      *
@@ -243,7 +243,7 @@
      * @exception  SocketException  if the socket could not be opened,
      *               or the socket could not bind to the specified local port.
      * @exception  SecurityException  if a security manager exists and its
-     *             <code>checkListen</code> method doesn't allow the operation.
+     *             {@code checkListen} method doesn't allow the operation.
      *
      * @see SecurityManager#checkListen
      */
@@ -259,8 +259,8 @@
      * an IP address chosen by the kernel.
      *
      * <p>If there is a security manager,
-     * its <code>checkListen</code> method is first called
-     * with the <code>port</code> argument
+     * its {@code checkListen} method is first called
+     * with the {@code port} argument
      * as its argument to ensure the operation is allowed.
      * This could result in a SecurityException.
      *
@@ -270,7 +270,7 @@
      * @exception  SocketException  if the socket could not be opened,
      *               or the socket could not bind to the specified local port.
      * @exception  SecurityException  if a security manager exists and its
-     *             <code>checkListen</code> method doesn't allow the operation.
+     *             {@code checkListen} method doesn't allow the operation.
      *
      * @see SecurityManager#checkListen
      * @since   JDK1.1
@@ -319,10 +319,10 @@
     }
 
     /**
-     * Get the <code>DatagramSocketImpl</code> attached to this socket,
+     * Get the {@code DatagramSocketImpl} attached to this socket,
      * creating it if necessary.
      *
-     * @return  the <code>DatagramSocketImpl</code> attached to that
+     * @return  the {@code DatagramSocketImpl} attached to that
      *          DatagramSocket
      * @throws SocketException if creation fails.
      * @since 1.4
@@ -336,14 +336,14 @@
     /**
      * Binds this DatagramSocket to a specific address and port.
      * <p>
-     * If the address is <code>null</code>, then the system will pick up
+     * If the address is {@code null}, then the system will pick up
      * an ephemeral port and a valid local address to bind the socket.
      *<p>
      * @param   addr The address and port to bind to.
      * @throws  SocketException if any error happens during the bind, or if the
      *          socket is already bound.
      * @throws  SecurityException  if a security manager exists and its
-     *             <code>checkListen</code> method doesn't allow the operation.
+     *             {@code checkListen} method doesn't allow the operation.
      * @throws IllegalArgumentException if addr is a SocketAddress subclass
      *         not supported by this socket.
      * @since 1.4
@@ -496,7 +496,7 @@
      * Returns the binding state of the socket.
      * <p>
      * If the socket was bound prior to being {@link #close closed},
-     * then this method will continue to return <code>true</code>
+     * then this method will continue to return {@code true}
      * after the socket is closed.
      *
      * @return true if the socket successfully bound to an address
@@ -510,7 +510,7 @@
      * Returns the connection state of the socket.
      * <p>
      * If the socket was connected prior to being {@link #close closed},
-     * then this method will continue to return <code>true</code>
+     * then this method will continue to return {@code true}
      * after the socket is closed.
      *
      * @return true if the socket successfully connected to a server
@@ -522,7 +522,7 @@
 
     /**
      * Returns the address to which this socket is connected. Returns
-     * <code>null</code> if the socket is not connected.
+     * {@code null} if the socket is not connected.
      * <p>
      * If the socket was connected prior to being {@link #close closed},
      * then this method will continue to return the connected address
@@ -536,7 +536,7 @@
 
     /**
      * Returns the port number to which this socket is connected.
-     * Returns <code>-1</code> if the socket is not connected.
+     * Returns {@code -1} if the socket is not connected.
      * <p>
      * If the socket was connected prior to being {@link #close closed},
      * then this method will continue to return the connected port number
@@ -550,14 +550,14 @@
 
     /**
      * Returns the address of the endpoint this socket is connected to, or
-     * <code>null</code> if it is unconnected.
+     * {@code null} if it is unconnected.
      * <p>
      * If the socket was connected prior to being {@link #close closed},
      * then this method will continue to return the connected address
      * after the socket is closed.
      *
-     * @return a <code>SocketAddress</code> representing the remote
-     *         endpoint of this socket, or <code>null</code> if it is
+     * @return a {@code SocketAddress} representing the remote
+     *         endpoint of this socket, or {@code null} if it is
      *         not connected yet.
      * @see #getInetAddress()
      * @see #getPort()
@@ -573,8 +573,8 @@
     /**
      * Returns the address of the endpoint this socket is bound to.
      *
-     * @return a <code>SocketAddress</code> representing the local endpoint of this
-     *         socket, or <code>null</code> if it is closed or not bound yet.
+     * @return a {@code SocketAddress} representing the local endpoint of this
+     *         socket, or {@code null} if it is closed or not bound yet.
      * @see #getLocalAddress()
      * @see #getLocalPort()
      * @see #bind(SocketAddress)
@@ -591,28 +591,28 @@
 
     /**
      * Sends a datagram packet from this socket. The
-     * <code>DatagramPacket</code> includes information indicating the
+     * {@code DatagramPacket} includes information indicating the
      * data to be sent, its length, the IP address of the remote host,
      * and the port number on the remote host.
      *
      * <p>If there is a security manager, and the socket is not currently
      * connected to a remote address, this method first performs some
-     * security checks. First, if <code>p.getAddress().isMulticastAddress()</code>
+     * security checks. First, if {@code p.getAddress().isMulticastAddress()}
      * is true, this method calls the
-     * security manager's <code>checkMulticast</code> method
-     * with <code>p.getAddress()</code> as its argument.
+     * security manager's {@code checkMulticast} method
+     * with {@code p.getAddress()} as its argument.
      * If the evaluation of that expression is false,
      * this method instead calls the security manager's
-     * <code>checkConnect</code> method with arguments
-     * <code>p.getAddress().getHostAddress()</code> and
-     * <code>p.getPort()</code>. Each call to a security manager method
+     * {@code checkConnect} method with arguments
+     * {@code p.getAddress().getHostAddress()} and
+     * {@code p.getPort()}. Each call to a security manager method
      * could result in a SecurityException if the operation is not allowed.
      *
-     * @param      p   the <code>DatagramPacket</code> to be sent.
+     * @param      p   the {@code DatagramPacket} to be sent.
      *
      * @exception  IOException  if an I/O error occurs.
      * @exception  SecurityException  if a security manager exists and its
-     *             <code>checkMulticast</code> or <code>checkConnect</code>
+     *             {@code checkMulticast} or {@code checkConnect}
      *             method doesn't allow the send.
      * @exception  PortUnreachableException may be thrown if the socket is connected
      *             to a currently unreachable destination. Note, there is no
@@ -674,20 +674,20 @@
 
     /**
      * Receives a datagram packet from this socket. When this method
-     * returns, the <code>DatagramPacket</code>'s buffer is filled with
+     * returns, the {@code DatagramPacket}'s buffer is filled with
      * the data received. The datagram packet also contains the sender's
      * IP address, and the port number on the sender's machine.
      * <p>
      * This method blocks until a datagram is received. The
-     * <code>length</code> field of the datagram packet object contains
+     * {@code length} field of the datagram packet object contains
      * the length of the received message. If the message is longer than
      * the packet's length, the message is truncated.
      * <p>
      * If there is a security manager, a packet cannot be received if the
-     * security manager's <code>checkAccept</code> method
+     * security manager's {@code checkAccept} method
      * does not allow it.
      *
-     * @param      p   the <code>DatagramPacket</code> into which to place
+     * @param      p   the {@code DatagramPacket} into which to place
      *                 the incoming data.
      * @exception  IOException  if an I/O error occurs.
      * @exception  SocketTimeoutException  if setSoTimeout was previously called
@@ -786,17 +786,17 @@
      * Gets the local address to which the socket is bound.
      *
      * <p>If there is a security manager, its
-     * <code>checkConnect</code> method is first called
-     * with the host address and <code>-1</code>
+     * {@code checkConnect} method is first called
+     * with the host address and {@code -1}
      * as its arguments to see if the operation is allowed.
      *
      * @see SecurityManager#checkConnect
      * @return  the local address to which the socket is bound,
-     *          <code>null</code> if the socket is closed, or
-     *          an <code>InetAddress</code> representing
+     *          {@code null} if the socket is closed, or
+     *          an {@code InetAddress} representing
      *          {@link InetAddress#isAnyLocalAddress wildcard}
      *          address if either the socket is not bound, or
-     *          the security manager <code>checkConnect</code>
+     *          the security manager {@code checkConnect}
      *          method does not allow the operation
      * @since   1.1
      */
@@ -824,8 +824,8 @@
      * is bound.
      *
      * @return  the port number on the local host to which this socket is bound,
-                <code>-1</code> if the socket is closed, or
-                <code>0</code> if it is not bound yet.
+                {@code -1} if the socket is closed, or
+                {@code 0} if it is not bound yet.
      */
     public int getLocalPort() {
         if (isClosed())
@@ -883,7 +883,7 @@
 
     /**
      * Sets the SO_SNDBUF option to the specified value for this
-     * <tt>DatagramSocket</tt>. The SO_SNDBUF option is used by the
+     * {@code DatagramSocket}. The SO_SNDBUF option is used by the
      * network implementation as a hint to size the underlying
      * network I/O buffers. The SO_SNDBUF setting may also be used
      * by the network implementation to determine the maximum size
@@ -897,7 +897,7 @@
      * is high.
      * <p>
      * Note: If {@link #send(DatagramPacket)} is used to send a
-     * <code>DatagramPacket</code> that is larger than the setting
+     * {@code DatagramPacket} that is larger than the setting
      * of SO_SNDBUF then it is implementation specific if the
      * packet is sent or discarded.
      *
@@ -921,10 +921,10 @@
     }
 
     /**
-     * Get value of the SO_SNDBUF option for this <tt>DatagramSocket</tt>, that is the
-     * buffer size used by the platform for output on this <tt>DatagramSocket</tt>.
+     * Get value of the SO_SNDBUF option for this {@code DatagramSocket}, that is the
+     * buffer size used by the platform for output on this {@code DatagramSocket}.
      *
-     * @return the value of the SO_SNDBUF option for this <tt>DatagramSocket</tt>
+     * @return the value of the SO_SNDBUF option for this {@code DatagramSocket}
      * @exception SocketException if there is an error in
      * the underlying protocol, such as an UDP error.
      * @see #setSendBufferSize
@@ -942,7 +942,7 @@
 
     /**
      * Sets the SO_RCVBUF option to the specified value for this
-     * <tt>DatagramSocket</tt>. The SO_RCVBUF option is used by the
+     * {@code DatagramSocket}. The SO_RCVBUF option is used by the
      * the network implementation as a hint to size the underlying
      * network I/O buffers. The SO_RCVBUF setting may also be used
      * by the network implementation to determine the maximum size
@@ -979,10 +979,10 @@
     }
 
     /**
-     * Get value of the SO_RCVBUF option for this <tt>DatagramSocket</tt>, that is the
-     * buffer size used by the platform for input on this <tt>DatagramSocket</tt>.
+     * Get value of the SO_RCVBUF option for this {@code DatagramSocket}, that is the
+     * buffer size used by the platform for input on this {@code DatagramSocket}.
      *
-     * @return the value of the SO_RCVBUF option for this <tt>DatagramSocket</tt>
+     * @return the value of the SO_RCVBUF option for this {@code DatagramSocket}
      * @exception SocketException if there is an error in the underlying protocol, such as an UDP error.
      * @see #setReceiveBufferSize(int)
      */
@@ -1005,26 +1005,26 @@
      * socket to the same socket address. This is typically for the
      * purpose of receiving multicast packets
      * (See {@link java.net.MulticastSocket}). The
-     * <tt>SO_REUSEADDR</tt> socket option allows multiple
+     * {@code SO_REUSEADDR} socket option allows multiple
      * sockets to be bound to the same socket address if the
-     * <tt>SO_REUSEADDR</tt> socket option is enabled prior
+     * {@code SO_REUSEADDR} socket option is enabled prior
      * to binding the socket using {@link #bind(SocketAddress)}.
      * <p>
      * Note: This functionality is not supported by all existing platforms,
      * so it is implementation specific whether this option will be ignored
      * or not. However, if it is not supported then
-     * {@link #getReuseAddress()} will always return <code>false</code>.
+     * {@link #getReuseAddress()} will always return {@code false}.
      * <p>
-     * When a <tt>DatagramSocket</tt> is created the initial setting
-     * of <tt>SO_REUSEADDR</tt> is disabled.
+     * When a {@code DatagramSocket} is created the initial setting
+     * of {@code SO_REUSEADDR} is disabled.
      * <p>
-     * The behaviour when <tt>SO_REUSEADDR</tt> is enabled or
+     * The behaviour when {@code SO_REUSEADDR} is enabled or
      * disabled after a socket is bound (See {@link #isBound()})
      * is not defined.
      *
      * @param on  whether to enable or disable the
      * @exception SocketException if an error occurs enabling or
-     *            disabling the <tt>SO_RESUEADDR</tt> socket option,
+     *            disabling the {@code SO_RESUEADDR} socket option,
      *            or the socket is closed.
      * @since 1.4
      * @see #getReuseAddress()
@@ -1045,7 +1045,7 @@
     /**
      * Tests if SO_REUSEADDR is enabled.
      *
-     * @return a <code>boolean</code> indicating whether or not SO_REUSEADDR is enabled.
+     * @return a {@code boolean} indicating whether or not SO_REUSEADDR is enabled.
      * @exception SocketException if there is an error
      * in the underlying protocol, such as an UDP error.
      * @since   1.4
@@ -1083,7 +1083,7 @@
 
     /**
      * Tests if SO_BROADCAST is enabled.
-     * @return a <code>boolean</code> indicating whether or not SO_BROADCAST is enabled.
+     * @return a {@code boolean} indicating whether or not SO_BROADCAST is enabled.
      * @exception SocketException if there is an error
      * in the underlying protocol, such as an UDP error.
      * @since 1.4
@@ -1105,7 +1105,7 @@
      * 255} or an IllegalArgumentException will be thrown.
      * <p>Notes:
      * <p>For Internet Protocol v4 the value consists of an
-     * <code>integer</code>, the least significant 8 bits of which
+     * {@code integer}, the least significant 8 bits of which
      * represent the value of the TOS octet in IP packets sent by
      * the socket.
      * RFC 1349 defines the TOS values as follows:
@@ -1123,10 +1123,10 @@
      * SocketException indicating that the operation is not
      * permitted.
      * <p>
-     * for Internet Protocol v6 <code>tc</code> is the value that
+     * for Internet Protocol v6 {@code tc} is the value that
      * would be placed into the sin6_flowinfo field of the IP header.
      *
-     * @param tc        an <code>int</code> value for the bitset.
+     * @param tc        an {@code int} value for the bitset.
      * @throws SocketException if there is an error setting the
      * traffic class or type-of-service
      * @since 1.4
@@ -1205,7 +1205,7 @@
      * DatagramChannel.open} method.
      *
      * @return  the datagram channel associated with this datagram socket,
-     *          or <tt>null</tt> if this socket was not created for a channel
+     *          or {@code null} if this socket was not created for a channel
      *
      * @since 1.4
      * @spec JSR-51
@@ -1224,14 +1224,14 @@
      * application. The factory can be specified only once.
      * <p>
      * When an application creates a new datagram socket, the socket
-     * implementation factory's <code>createDatagramSocketImpl</code> method is
+     * implementation factory's {@code createDatagramSocketImpl} method is
      * called to create the actual datagram socket implementation.
      * <p>
-     * Passing <code>null</code> to the method is a no-op unless the factory
+     * Passing {@code null} to the method is a no-op unless the factory
      * was already set.
      *
      * <p>If there is a security manager, this method first calls
-     * the security manager's <code>checkSetFactory</code> method
+     * the security manager's {@code checkSetFactory} method
      * to ensure the operation is allowed.
      * This could result in a SecurityException.
      *
@@ -1240,7 +1240,7 @@
      *              datagram socket factory.
      * @exception  SocketException  if the factory is already defined.
      * @exception  SecurityException  if a security manager exists and its
-     *             <code>checkSetFactory</code> method doesn't allow the
+     *             {@code checkSetFactory} method doesn't allow the
      operation.
      * @see
      java.net.DatagramSocketImplFactory#createDatagramSocketImpl()
--- a/src/share/classes/java/net/DatagramSocketImpl.java	Tue Aug 06 17:12:37 2013 -0700
+++ b/src/share/classes/java/net/DatagramSocketImpl.java	Tue Aug 06 22:47:14 2013 -0700
@@ -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
@@ -101,7 +101,7 @@
     protected void disconnect() {}
 
     /**
-     * Peek at the packet to see who it is from. Updates the specified <code>InetAddress</code>
+     * Peek at the packet to see who it is from. Updates the specified {@code InetAddress}
      * to the address which the packet came from.
      * @param i an InetAddress object
      * @return the port number which the packet came from.
@@ -114,7 +114,7 @@
 
     /**
      * Peek at the packet to see who it is from. The data is copied into the specified
-     * <code>DatagramPacket</code>. The data is returned,
+     * {@code DatagramPacket}. The data is returned,
      * but not consumed, so that a subsequent peekData/receive operation
      * will see the same data.
      * @param p the Packet Received.
@@ -163,7 +163,7 @@
 
     /**
      * Set the TTL (time-to-live) option.
-     * @param ttl an <tt>int</tt> specifying the time-to-live value
+     * @param ttl an {@code int} specifying the time-to-live value
      * @exception IOException if an I/O exception occurs
      * while setting the time-to-live option.
      * @see #getTimeToLive()
@@ -174,7 +174,7 @@
      * Retrieve the TTL (time-to-live) option.
      * @exception IOException if an I/O exception occurs
      * while retrieving the time-to-live option
-     * @return an <tt>int</tt> representing the time-to-live value
+     * @return an {@code int} representing the time-to-live value
      * @see #setTimeToLive(int)
      */
     protected abstract int getTimeToLive() throws IOException;
@@ -227,7 +227,7 @@
 
     /**
      * Gets the local port.
-     * @return an <tt>int</tt> representing the local port value
+     * @return an {@code int} representing the local port value
      */
     protected int getLocalPort() {
         return localPort;
@@ -235,7 +235,7 @@
 
     /**
      * Gets the datagram socket file descriptor.
-     * @return a <tt>FileDescriptor</tt> object representing the datagram socket
+     * @return a {@code FileDescriptor} object representing the datagram socket
      * file descriptor
      */
     protected FileDescriptor getFileDescriptor() {
--- a/src/share/classes/java/net/DatagramSocketImplFactory.java	Tue Aug 06 17:12:37 2013 -0700
+++ b/src/share/classes/java/net/DatagramSocketImplFactory.java	Tue Aug 06 22:47:14 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2002, Oracle and/or its affiliates. All rights reserved.
+ * 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
@@ -27,7 +27,7 @@
 
 /**
  * This interface defines a factory for datagram socket implementations. It
- * is used by the classes <code>DatagramSocket</code> to create actual socket
+ * is used by the classes {@code DatagramSocket} to create actual socket
  * implementations.
  *
  * @author  Yingxian Wang
@@ -37,9 +37,9 @@
 public
 interface DatagramSocketImplFactory {
     /**
-     * Creates a new <code>DatagramSocketImpl</code> instance.
+     * Creates a new {@code DatagramSocketImpl} instance.
      *
-     * @return  a new instance of <code>DatagramSocketImpl</code>.
+     * @return  a new instance of {@code DatagramSocketImpl}.
      * @see     java.net.DatagramSocketImpl
      */
     DatagramSocketImpl createDatagramSocketImpl();
--- a/src/share/classes/java/net/FileNameMap.java	Tue Aug 06 17:12:37 2013 -0700
+++ b/src/share/classes/java/net/FileNameMap.java	Tue Aug 06 22:47:14 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 1999, 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
@@ -37,7 +37,7 @@
     /**
      * Gets the MIME type for the specified file name.
      * @param fileName the specified file name
-     * @return a <code>String</code> indicating the MIME
+     * @return a {@code String} indicating the MIME
      * type for the specified file name.
      */
     public String getContentTypeFor(String fileName);
--- a/src/share/classes/java/net/HttpCookie.java	Tue Aug 06 17:12:37 2013 -0700
+++ b/src/share/classes/java/net/HttpCookie.java	Tue Aug 06 22:47:14 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 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
@@ -470,7 +470,7 @@
      * protocol.
      *
      * @return  {@code false} if the cookie can be sent over any standard
-     *          protocol; otherwise, <code>true</code>
+     *          protocol; otherwise, {@code true}
      *
      * @see  #setSecure
      */
--- a/src/share/classes/java/net/HttpRetryException.java	Tue Aug 06 17:12:37 2013 -0700
+++ b/src/share/classes/java/net/HttpRetryException.java	Tue Aug 06 22:47:14 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2004, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 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
@@ -43,7 +43,7 @@
     private String location;
 
     /**
-     * Constructs a new <code>HttpRetryException</code> from the
+     * Constructs a new {@code HttpRetryException} from the
      * specified response code and exception detail message
      *
      * @param   detail   the detail message.
@@ -55,7 +55,7 @@
     }
 
     /**
-     * Constructs a new <code>HttpRetryException</code> with detail message
+     * Constructs a new {@code HttpRetryException} with detail message
      * responseCode and the contents of the Location response header field.
      *
      * @param   detail   the detail message.
--- a/src/share/classes/java/net/HttpURLConnection.java	Tue Aug 06 17:12:37 2013 -0700
+++ b/src/share/classes/java/net/HttpURLConnection.java	Tue Aug 06 22:47:14 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -76,14 +76,14 @@
 
     /**
      * The chunk-length when using chunked encoding streaming mode for output.
-     * A value of <code>-1</code> means chunked encoding is disabled for output.
+     * A value of {@code -1} means chunked encoding is disabled for output.
      * @since 1.5
      */
     protected int chunkLength = -1;
 
     /**
      * The fixed content-length when using fixed-length streaming mode.
-     * A value of <code>-1</code> means fixed-length streaming mode is disabled
+     * A value of {@code -1} means fixed-length streaming mode is disabled
      * for output.
      *
      * <P> <B>NOTE:</B> {@link #fixedContentLengthLong} is recommended instead
@@ -103,15 +103,15 @@
     protected long fixedContentLengthLong = -1;
 
     /**
-     * Returns the key for the <code>n</code><sup>th</sup> header field.
-     * Some implementations may treat the <code>0</code><sup>th</sup>
+     * Returns the key for the {@code n}<sup>th</sup> header field.
+     * Some implementations may treat the {@code 0}<sup>th</sup>
      * header field as special, i.e. as the status line returned by the HTTP
      * server. In this case, {@link #getHeaderField(int) getHeaderField(0)} returns the status
-     * line, but <code>getHeaderFieldKey(0)</code> returns null.
+     * line, but {@code getHeaderFieldKey(0)} returns null.
      *
      * @param   n   an index, where {@code n >=0}.
-     * @return  the key for the <code>n</code><sup>th</sup> header field,
-     *          or <code>null</code> if the key does not exist.
+     * @return  the key for the {@code n}<sup>th</sup> header field,
+     *          or {@code null} if the key does not exist.
      */
     public String getHeaderFieldKey (int n) {
         return null;
@@ -251,8 +251,8 @@
     }
 
     /**
-     * Returns the value for the <code>n</code><sup>th</sup> header field.
-     * Some implementations may treat the <code>0</code><sup>th</sup>
+     * Returns the value for the {@code n}<sup>th</sup> header field.
+     * Some implementations may treat the {@code 0}<sup>th</sup>
      * header field as special, i.e. as the status line returned by the HTTP
      * server.
      * <p>
@@ -261,8 +261,8 @@
      * the headers in the message.
      *
      * @param   n   an index, where {@code n>=0}.
-     * @return  the value of the <code>n</code><sup>th</sup> header field,
-     *          or <code>null</code> if the value does not exist.
+     * @return  the value of the {@code n}<sup>th</sup> header field,
+     *          or {@code null} if the value does not exist.
      * @see     java.net.HttpURLConnection#getHeaderFieldKey(int)
      */
     public String getHeaderField(int n) {
@@ -270,7 +270,7 @@
     }
 
     /**
-     * An <code>int</code> representing the three digit HTTP Status-Code.
+     * An {@code int} representing the three digit HTTP Status-Code.
      * <ul>
      * <li> 1xx: Informational
      * <li> 2xx: Success
@@ -292,12 +292,12 @@
     private static boolean followRedirects = true;
 
     /**
-     * If <code>true</code>, the protocol will automatically follow redirects.
-     * If <code>false</code>, the protocol will not automatically follow
+     * If {@code true}, the protocol will automatically follow redirects.
+     * If {@code false}, the protocol will not automatically follow
      * redirects.
      * <p>
-     * This field is set by the <code>setInstanceFollowRedirects</code>
-     * method. Its value is returned by the <code>getInstanceFollowRedirects</code>
+     * This field is set by the {@code setInstanceFollowRedirects}
+     * method. Its value is returned by the {@code getInstanceFollowRedirects}
      * method.
      * <p>
      * Its default value is based on the value of the static followRedirects
@@ -328,14 +328,14 @@
      * cannot change this variable.
      * <p>
      * If there is a security manager, this method first calls
-     * the security manager's <code>checkSetFactory</code> method
+     * the security manager's {@code checkSetFactory} method
      * to ensure the operation is allowed.
      * This could result in a SecurityException.
      *
-     * @param set a <code>boolean</code> indicating whether or not
+     * @param set a {@code boolean} indicating whether or not
      * to follow HTTP redirects.
      * @exception  SecurityException  if a security manager exists and its
-     *             <code>checkSetFactory</code> method doesn't
+     *             {@code checkSetFactory} method doesn't
      *             allow the operation.
      * @see        SecurityManager#checkSetFactory
      * @see #getFollowRedirects()
@@ -350,12 +350,12 @@
     }
 
     /**
-     * Returns a <code>boolean</code> indicating
+     * Returns a {@code boolean} indicating
      * whether or not HTTP redirects (3xx) should
      * be automatically followed.
      *
-     * @return <code>true</code> if HTTP redirects should
-     * be automatically followed, <tt>false</tt> if not.
+     * @return {@code true} if HTTP redirects should
+     * be automatically followed, {@code false} if not.
      * @see #setFollowRedirects(boolean)
      */
     public static boolean getFollowRedirects() {
@@ -364,13 +364,13 @@
 
     /**
      * Sets whether HTTP redirects (requests with response code 3xx) should
-     * be automatically followed by this <code>HttpURLConnection</code>
+     * be automatically followed by this {@code HttpURLConnection}
      * instance.
      * <p>
      * The default value comes from followRedirects, which defaults to
      * true.
      *
-     * @param followRedirects a <code>boolean</code> indicating
+     * @param followRedirects a {@code boolean} indicating
      * whether or not to follow HTTP redirects.
      *
      * @see    java.net.HttpURLConnection#instanceFollowRedirects
@@ -382,11 +382,11 @@
      }
 
      /**
-     * Returns the value of this <code>HttpURLConnection</code>'s
-     * <code>instanceFollowRedirects</code> field.
+     * Returns the value of this {@code HttpURLConnection}'s
+     * {@code instanceFollowRedirects} field.
      *
-     * @return  the value of this <code>HttpURLConnection</code>'s
-     *          <code>instanceFollowRedirects</code> field.
+     * @return  the value of this {@code HttpURLConnection}'s
+     *          {@code instanceFollowRedirects} field.
      * @see     java.net.HttpURLConnection#instanceFollowRedirects
      * @see #setInstanceFollowRedirects(boolean)
      * @since 1.3
@@ -540,7 +540,7 @@
      * Returns null if none could be discerned from the responses
      * (the result was not valid HTTP).
      * @throws IOException if an error occurred connecting to the server.
-     * @return the HTTP response message, or <code>null</code>
+     * @return the HTTP response message, or {@code null}
      */
     public String getResponseMessage() throws IOException {
         getResponseCode();
@@ -583,7 +583,7 @@
      * @exception IOException if an error occurs while computing
      *            the permission.
      *
-     * @return a <code>SocketPermission</code> object representing the
+     * @return a {@code SocketPermission} object representing the
      *         permission necessary to connect to the destination
      *         host and port.
      */
--- a/src/share/classes/java/net/IDN.java	Tue Aug 06 17:12:37 2013 -0700
+++ b/src/share/classes/java/net/IDN.java	Tue Aug 06 22:47:14 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 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
@@ -104,7 +104,7 @@
      * @param input     the string to be processed
      * @param flag      process flag; can be 0 or any logical OR of possible flags
      *
-     * @return          the translated <tt>String</tt>
+     * @return          the translated {@code String}
      *
      * @throws IllegalArgumentException   if the input string doesn't conform to RFC 3490 specification
      */
@@ -130,13 +130,13 @@
      *
      * <p> This convenience method works as if by invoking the
      * two-argument counterpart as follows:
-     * <blockquote><tt>
+     * <blockquote>
      * {@link #toASCII(String, int) toASCII}(input,&nbsp;0);
-     * </tt></blockquote>
+     * </blockquote>
      *
      * @param input     the string to be processed
      *
-     * @return          the translated <tt>String</tt>
+     * @return          the translated {@code String}
      *
      * @throws IllegalArgumentException   if the input string doesn't conform to RFC 3490 specification
      */
@@ -161,7 +161,7 @@
      * @param input     the string to be processed
      * @param flag      process flag; can be 0 or any logical OR of possible flags
      *
-     * @return          the translated <tt>String</tt>
+     * @return          the translated {@code String}
      */
     public static String toUnicode(String input, int flag) {
         int p = 0, q = 0;
@@ -184,13 +184,13 @@
      *
      * <p> This convenience method works as if by invoking the
      * two-argument counterpart as follows:
-     * <blockquote><tt>
+     * <blockquote>
      * {@link #toUnicode(String, int) toUnicode}(input,&nbsp;0);
-     * </tt></blockquote>
+     * </blockquote>
      *
      * @param input     the string to be processed
      *
-     * @return          the translated <tt>String</tt>
+     * @return          the translated {@code String}
      */
     public static String toUnicode(String input) {
         return toUnicode(input, 0);
--- a/src/share/classes/java/net/Inet4Address.java	Tue Aug 06 17:12:37 2013 -0700
+++ b/src/share/classes/java/net/Inet4Address.java	Tue Aug 06 22:47:14 2013 -0700
@@ -42,10 +42,10 @@
  * takes one of the following forms:
  *
  * <blockquote><table cellpadding=0 cellspacing=0 summary="layout">
- * <tr><td><tt>d.d.d.d</tt></td></tr>
- * <tr><td><tt>d.d.d</tt></td></tr>
- * <tr><td><tt>d.d</tt></td></tr>
- * <tr><td><tt>d</tt></td></tr>
+ * <tr><td>{@code d.d.d.d}</td></tr>
+ * <tr><td>{@code d.d.d}</td></tr>
+ * <tr><td>{@code d.d}</td></tr>
+ * <tr><td>{@code d}</td></tr>
  * </table></blockquote>
  *
  * <p> When four parts are specified, each is interpreted as a byte of
@@ -153,7 +153,7 @@
      * Utility routine to check if the InetAddress is an
      * IP multicast address. IP multicast address is a Class D
      * address i.e first four bits of the address are 1110.
-     * @return a <code>boolean</code> indicating if the InetAddress is
+     * @return a {@code boolean} indicating if the InetAddress is
      * an IP multicast address
      * @since   JDK1.1
      */
@@ -163,7 +163,7 @@
 
     /**
      * Utility routine to check if the InetAddress in a wildcard address.
-     * @return a <code>boolean</code> indicating if the Inetaddress is
+     * @return a {@code boolean} indicating if the Inetaddress is
      *         a wildcard address.
      * @since 1.4
      */
@@ -174,7 +174,7 @@
     /**
      * Utility routine to check if the InetAddress is a loopback address.
      *
-     * @return a <code>boolean</code> indicating if the InetAddress is
+     * @return a {@code boolean} indicating if the InetAddress is
      * a loopback address; or false otherwise.
      * @since 1.4
      */
@@ -187,7 +187,7 @@
     /**
      * Utility routine to check if the InetAddress is an link local address.
      *
-     * @return a <code>boolean</code> indicating if the InetAddress is
+     * @return a {@code boolean} indicating if the InetAddress is
      * a link local address; or false if address is not a link local unicast address.
      * @since 1.4
      */
@@ -204,7 +204,7 @@
     /**
      * Utility routine to check if the InetAddress is a site local address.
      *
-     * @return a <code>boolean</code> indicating if the InetAddress is
+     * @return a {@code boolean} indicating if the InetAddress is
      * a site local address; or false if address is not a site local unicast address.
      * @since 1.4
      */
@@ -224,7 +224,7 @@
     /**
      * Utility routine to check if the multicast address has global scope.
      *
-     * @return a <code>boolean</code> indicating if the address has
+     * @return a {@code boolean} indicating if the address has
      *         is a multicast address of global scope, false if it is not
      *         of global scope or it is not a multicast address
      * @since 1.4
@@ -240,7 +240,7 @@
     /**
      * Utility routine to check if the multicast address has node scope.
      *
-     * @return a <code>boolean</code> indicating if the address has
+     * @return a {@code boolean} indicating if the address has
      *         is a multicast address of node-local scope, false if it is not
      *         of node-local scope or it is not a multicast address
      * @since 1.4
@@ -253,7 +253,7 @@
     /**
      * Utility routine to check if the multicast address has link scope.
      *
-     * @return a <code>boolean</code> indicating if the address has
+     * @return a {@code boolean} indicating if the address has
      *         is a multicast address of link-local scope, false if it is not
      *         of link-local scope or it is not a multicast address
      * @since 1.4
@@ -269,7 +269,7 @@
     /**
      * Utility routine to check if the multicast address has site scope.
      *
-     * @return a <code>boolean</code> indicating if the address has
+     * @return a {@code boolean} indicating if the address has
      *         is a multicast address of site-local scope, false if it is not
      *         of site-local scope or it is not a multicast address
      * @since 1.4
@@ -284,7 +284,7 @@
     /**
      * Utility routine to check if the multicast address has organization scope.
      *
-     * @return a <code>boolean</code> indicating if the address has
+     * @return a {@code boolean} indicating if the address has
      *         is a multicast address of organization-local scope,
      *         false if it is not of organization-local scope
      *         or it is not a multicast address
@@ -299,9 +299,9 @@
     }
 
     /**
-     * Returns the raw IP address of this <code>InetAddress</code>
+     * Returns the raw IP address of this {@code InetAddress}
      * object. The result is in network byte order: the highest order
-     * byte of the address is in <code>getAddress()[0]</code>.
+     * byte of the address is in {@code getAddress()[0]}.
      *
      * @return  the raw IP address of this object.
      */
@@ -337,18 +337,18 @@
 
     /**
      * Compares this object against the specified object.
-     * The result is <code>true</code> if and only if the argument is
-     * not <code>null</code> and it represents the same IP address as
+     * The result is {@code true} if and only if the argument is
+     * not {@code null} and it represents the same IP address as
      * this object.
      * <p>
-     * Two instances of <code>InetAddress</code> represent the same IP
+     * Two instances of {@code InetAddress} represent the same IP
      * address if the length of the byte arrays returned by
-     * <code>getAddress</code> is the same for both, and each of the
+     * {@code getAddress} is the same for both, and each of the
      * array components is the same for the byte arrays.
      *
      * @param   obj   the object to compare against.
-     * @return  <code>true</code> if the objects are the same;
-     *          <code>false</code> otherwise.
+     * @return  {@code true} if the objects are the same;
+     *          {@code false} otherwise.
      * @see     java.net.InetAddress#getAddress()
      */
     public boolean equals(Object obj) {
--- a/src/share/classes/java/net/Inet6Address.java	Tue Aug 06 17:12:37 2013 -0700
+++ b/src/share/classes/java/net/Inet6Address.java	Tue Aug 06 22:47:14 2013 -0700
@@ -47,7 +47,7 @@
  *   address. This is the full form.  For example,
  *
  *   <blockquote><table cellpadding=0 cellspacing=0 summary="layout">
- *   <tr><td><tt>1080:0:0:0:8:800:200C:417A</tt><td></tr>
+ *   <tr><td>{@code 1080:0:0:0:8:800:200C:417A}<td></tr>
  *   </table></blockquote>
  *
  *   <p> Note that it is not necessary to write the leading zeros in
@@ -64,7 +64,7 @@
  *   zeros in an address. For example,
  *
  *   <blockquote><table cellpadding=0 cellspacing=0 summary="layout">
- *   <tr><td><tt>1080::8:800:200C:417A</tt><td></tr>
+ *   <tr><td>{@code 1080::8:800:200C:417A}<td></tr>
  *   </table></blockquote>
  *
  *   <li><p> An alternative form that is sometimes more convenient
@@ -75,8 +75,8 @@
  *   standard IPv4 representation address, for example,
  *
  *   <blockquote><table cellpadding=0 cellspacing=0 summary="layout">
- *   <tr><td><tt>::FFFF:129.144.52.38</tt><td></tr>
- *   <tr><td><tt>::129.144.52.38</tt><td></tr>
+ *   <tr><td>{@code ::FFFF:129.144.52.38}<td></tr>
+ *   <tr><td>{@code ::129.144.52.38}<td></tr>
  *   </table></blockquote>
  *
  *   <p> where "::FFFF:d.d.d.d" and "::d.d.d.d" are, respectively, the
@@ -85,23 +85,23 @@
  *   in the "d.d.d.d" form. The following forms are invalid:
  *
  *   <blockquote><table cellpadding=0 cellspacing=0 summary="layout">
- *   <tr><td><tt>::FFFF:d.d.d</tt><td></tr>
- *   <tr><td><tt>::FFFF:d.d</tt><td></tr>
- *   <tr><td><tt>::d.d.d</tt><td></tr>
- *   <tr><td><tt>::d.d</tt><td></tr>
+ *   <tr><td>{@code ::FFFF:d.d.d}<td></tr>
+ *   <tr><td>{@code ::FFFF:d.d}<td></tr>
+ *   <tr><td>{@code ::d.d.d}<td></tr>
+ *   <tr><td>{@code ::d.d}<td></tr>
  *   </table></blockquote>
  *
  *   <p> The following form:
  *
  *   <blockquote><table cellpadding=0 cellspacing=0 summary="layout">
- *   <tr><td><tt>::FFFF:d</tt><td></tr>
+ *   <tr><td>{@code ::FFFF:d}<td></tr>
  *   </table></blockquote>
  *
  *   <p> is valid, however it is an unconventional representation of
  *   the IPv4-compatible IPv6 address,
  *
  *   <blockquote><table cellpadding=0 cellspacing=0 summary="layout">
- *   <tr><td><tt>::255.255.0.d</tt><td></tr>
+ *   <tr><td>{@code ::255.255.0.d}<td></tr>
  *   </table></blockquote>
  *
  *   <p> while "::d" corresponds to the general IPv6 address
@@ -258,7 +258,7 @@
      * Create an Inet6Address in the exact manner of {@link
      * InetAddress#getByAddress(String,byte[])} except that the IPv6 scope_id is
      * set to the value corresponding to the given interface for the address
-     * type specified in <code>addr</code>. The call will fail with an
+     * type specified in {@code addr}. The call will fail with an
      * UnknownHostException if the given interface does not have a numeric
      * scope_id assigned for the given address type (eg. link-local or site-local).
      * See <a href="Inet6Address.html#scoped">here</a> for a description of IPv6
--- a/src/share/classes/java/net/InetAddress.java	Tue Aug 06 17:12:37 2013 -0700
+++ b/src/share/classes/java/net/InetAddress.java	Tue Aug 06 22:47:14 2013 -0700
@@ -296,7 +296,7 @@
     /**
      * Utility routine to check if the InetAddress is an
      * IP multicast address.
-     * @return a <code>boolean</code> indicating if the InetAddress is
+     * @return a {@code boolean} indicating if the InetAddress is
      * an IP multicast address
      * @since   JDK1.1
      */
@@ -306,7 +306,7 @@
 
     /**
      * Utility routine to check if the InetAddress in a wildcard address.
-     * @return a <code>boolean</code> indicating if the Inetaddress is
+     * @return a {@code boolean} indicating if the Inetaddress is
      *         a wildcard address.
      * @since 1.4
      */
@@ -317,7 +317,7 @@
     /**
      * Utility routine to check if the InetAddress is a loopback address.
      *
-     * @return a <code>boolean</code> indicating if the InetAddress is
+     * @return a {@code boolean} indicating if the InetAddress is
      * a loopback address; or false otherwise.
      * @since 1.4
      */
@@ -328,7 +328,7 @@
     /**
      * Utility routine to check if the InetAddress is an link local address.
      *
-     * @return a <code>boolean</code> indicating if the InetAddress is
+     * @return a {@code boolean} indicating if the InetAddress is
      * a link local address; or false if address is not a link local unicast address.
      * @since 1.4
      */
@@ -339,7 +339,7 @@
     /**
      * Utility routine to check if the InetAddress is a site local address.
      *
-     * @return a <code>boolean</code> indicating if the InetAddress is
+     * @return a {@code boolean} indicating if the InetAddress is
      * a site local address; or false if address is not a site local unicast address.
      * @since 1.4
      */
@@ -350,7 +350,7 @@
     /**
      * Utility routine to check if the multicast address has global scope.
      *
-     * @return a <code>boolean</code> indicating if the address has
+     * @return a {@code boolean} indicating if the address has
      *         is a multicast address of global scope, false if it is not
      *         of global scope or it is not a multicast address
      * @since 1.4
@@ -362,7 +362,7 @@
     /**
      * Utility routine to check if the multicast address has node scope.
      *
-     * @return a <code>boolean</code> indicating if the address has
+     * @return a {@code boolean} indicating if the address has
      *         is a multicast address of node-local scope, false if it is not
      *         of node-local scope or it is not a multicast address
      * @since 1.4
@@ -374,7 +374,7 @@
     /**
      * Utility routine to check if the multicast address has link scope.
      *
-     * @return a <code>boolean</code> indicating if the address has
+     * @return a {@code boolean} indicating if the address has
      *         is a multicast address of link-local scope, false if it is not
      *         of link-local scope or it is not a multicast address
      * @since 1.4
@@ -386,7 +386,7 @@
     /**
      * Utility routine to check if the multicast address has site scope.
      *
-     * @return a <code>boolean</code> indicating if the address has
+     * @return a {@code boolean} indicating if the address has
      *         is a multicast address of site-local scope, false if it is not
      *         of site-local scope or it is not a multicast address
      * @since 1.4
@@ -398,7 +398,7 @@
     /**
      * Utility routine to check if the multicast address has organization scope.
      *
-     * @return a <code>boolean</code> indicating if the address has
+     * @return a {@code boolean} indicating if the address has
      *         is a multicast address of organization-local scope,
      *         false if it is not of organization-local scope
      *         or it is not a multicast address
@@ -424,9 +424,9 @@
      * in an IllegalArgumentException being thrown.
      *
      * @param   timeout the time, in milliseconds, before the call aborts
-     * @return a <code>boolean</code> indicating if the address is reachable.
+     * @return a {@code boolean} indicating if the address is reachable.
      * @throws IOException if a network error occurs
-     * @throws  IllegalArgumentException if <code>timeout</code> is negative.
+     * @throws  IllegalArgumentException if {@code timeout} is negative.
      * @since 1.5
      */
     public boolean isReachable(int timeout) throws IOException {
@@ -442,10 +442,10 @@
      * privilege can be obtained, otherwise it will try to establish
      * a TCP connection on port 7 (Echo) of the destination host.
      * <p>
-     * The <code>network interface</code> and <code>ttl</code> parameters
+     * The {@code network interface} and {@code ttl} parameters
      * let the caller specify which network interface the test will go through
      * and the maximum number of hops the packets should go through.
-     * A negative value for the <code>ttl</code> will result in an
+     * A negative value for the {@code ttl} will result in an
      * IllegalArgumentException being thrown.
      * <p>
      * The timeout value, in milliseconds, indicates the maximum amount of time
@@ -458,9 +458,9 @@
      * @param   ttl     the maximum numbers of hops to try or 0 for the
      *                  default
      * @param   timeout the time, in milliseconds, before the call aborts
-     * @throws  IllegalArgumentException if either <code>timeout</code>
-     *                          or <code>ttl</code> are negative.
-     * @return a <code>boolean</code>indicating if the address is reachable.
+     * @throws  IllegalArgumentException if either {@code timeout}
+     *                          or {@code ttl} are negative.
+     * @return a {@code boolean}indicating if the address is reachable.
      * @throws IOException if a network error occurs
      * @since 1.5
      */
@@ -486,8 +486,8 @@
      * {@link #getCanonicalHostName() getCanonicalHostName}.
      *
      * <p>If there is a security manager, its
-     * <code>checkConnect</code> method is first called
-     * with the hostname and <code>-1</code>
+     * {@code checkConnect} method is first called
+     * with the hostname and {@code -1}
      * as its arguments to see if the operation is allowed.
      * If the operation is not allowed, it will return
      * the textual representation of the IP address.
@@ -511,8 +511,8 @@
      * here without a security check.
      *
      * <p>If there is a security manager, this method first
-     * calls its <code>checkConnect</code> method
-     * with the hostname and <code>-1</code>
+     * calls its {@code checkConnect} method
+     * with the hostname and {@code -1}
      * as its arguments to see if the calling code is allowed to know
      * the hostname for this IP address, i.e., to connect to the host.
      * If the operation is not allowed, it will return
@@ -539,8 +539,8 @@
      * the FQDN depending on the underlying system configuration.
      *
      * <p>If there is a security manager, this method first
-     * calls its <code>checkConnect</code> method
-     * with the hostname and <code>-1</code>
+     * calls its {@code checkConnect} method
+     * with the hostname and {@code -1}
      * as its arguments to see if the calling code is allowed to know
      * the hostname for this IP address, i.e., to connect to the host.
      * If the operation is not allowed, it will return
@@ -566,8 +566,8 @@
      * Returns the hostname for this address.
      *
      * <p>If there is a security manager, this method first
-     * calls its <code>checkConnect</code> method
-     * with the hostname and <code>-1</code>
+     * calls its {@code checkConnect} method
+     * with the hostname and {@code -1}
      * as its arguments to see if the calling code is allowed to know
      * the hostname for this IP address, i.e., to connect to the host.
      * If the operation is not allowed, it will return
@@ -633,9 +633,9 @@
     }
 
     /**
-     * Returns the raw IP address of this <code>InetAddress</code>
+     * Returns the raw IP address of this {@code InetAddress}
      * object. The result is in network byte order: the highest order
-     * byte of the address is in <code>getAddress()[0]</code>.
+     * byte of the address is in {@code getAddress()[0]}.
      *
      * @return  the raw IP address of this object.
      */
@@ -664,18 +664,18 @@
 
     /**
      * Compares this object against the specified object.
-     * The result is <code>true</code> if and only if the argument is
-     * not <code>null</code> and it represents the same IP address as
+     * The result is {@code true} if and only if the argument is
+     * not {@code null} and it represents the same IP address as
      * this object.
      * <p>
-     * Two instances of <code>InetAddress</code> represent the same IP
+     * Two instances of {@code InetAddress} represent the same IP
      * address if the length of the byte arrays returned by
-     * <code>getAddress</code> is the same for both, and each of the
+     * {@code getAddress} is the same for both, and each of the
      * array components is the same for the byte arrays.
      *
      * @param   obj   the object to compare against.
-     * @return  <code>true</code> if the objects are the same;
-     *          <code>false</code> otherwise.
+     * @return  {@code true} if the objects are the same;
+     *          {@code false} otherwise.
      * @see     java.net.InetAddress#getAddress()
      */
     public boolean equals(Object obj) {
@@ -683,7 +683,7 @@
     }
 
     /**
-     * Converts this IP address to a <code>String</code>. The
+     * Converts this IP address to a {@code String}. The
      * string returned is of the form: hostname / literal IP
      * address.
      *
@@ -974,7 +974,7 @@
      * No name service is checked for the validity of the address.
      *
      * <p> The host name can either be a machine name, such as
-     * "<code>java.sun.com</code>", or a textual representation of its IP
+     * "{@code java.sun.com}", or a textual representation of its IP
      * address.
      * <p> No validity checking is done on the host name either.
      *
@@ -1019,26 +1019,26 @@
      * Determines the IP address of a host, given the host's name.
      *
      * <p> The host name can either be a machine name, such as
-     * "<code>java.sun.com</code>", or a textual representation of its
+     * "{@code java.sun.com}", or a textual representation of its
      * IP address. If a literal IP address is supplied, only the
      * validity of the address format is checked.
      *
-     * <p> For <code>host</code> specified in literal IPv6 address,
+     * <p> For {@code host} specified in literal IPv6 address,
      * either the form defined in RFC 2732 or the literal IPv6 address
      * format defined in RFC 2373 is accepted. IPv6 scoped addresses are also
      * supported. See <a href="Inet6Address.html#scoped">here</a> for a description of IPv6
      * scoped addresses.
      *
-     * <p> If the host is <tt>null</tt> then an <tt>InetAddress</tt>
+     * <p> If the host is {@code null} then an {@code InetAddress}
      * representing an address of the loopback interface is returned.
      * See <a href="http://www.ietf.org/rfc/rfc3330.txt">RFC&nbsp;3330</a>
      * section&nbsp;2 and <a href="http://www.ietf.org/rfc/rfc2373.txt">RFC&nbsp;2373</a>
      * section&nbsp;2.5.3. </p>
      *
-     * @param      host   the specified host, or <code>null</code>.
+     * @param      host   the specified host, or {@code null}.
      * @return     an IP address for the given host name.
      * @exception  UnknownHostException  if no IP address for the
-     *               <code>host</code> could be found, or if a scope_id was specified
+     *               {@code host} could be found, or if a scope_id was specified
      *               for a global IPv6 address.
      * @exception  SecurityException if a security manager exists
      *             and its checkConnect method doesn't allow the operation
@@ -1059,37 +1059,37 @@
      * based on the configured name service on the system.
      *
      * <p> The host name can either be a machine name, such as
-     * "<code>java.sun.com</code>", or a textual representation of its IP
+     * "{@code java.sun.com}", or a textual representation of its IP
      * address. If a literal IP address is supplied, only the
      * validity of the address format is checked.
      *
-     * <p> For <code>host</code> specified in <i>literal IPv6 address</i>,
+     * <p> For {@code host} specified in <i>literal IPv6 address</i>,
      * either the form defined in RFC 2732 or the literal IPv6 address
      * format defined in RFC 2373 is accepted. A literal IPv6 address may
      * also be qualified by appending a scoped zone identifier or scope_id.
      * The syntax and usage of scope_ids is described
      * <a href="Inet6Address.html#scoped">here</a>.
-     * <p> If the host is <tt>null</tt> then an <tt>InetAddress</tt>
+     * <p> If the host is {@code null} then an {@code InetAddress}
      * representing an address of the loopback interface is returned.
      * See <a href="http://www.ietf.org/rfc/rfc3330.txt">RFC&nbsp;3330</a>
      * section&nbsp;2 and <a href="http://www.ietf.org/rfc/rfc2373.txt">RFC&nbsp;2373</a>
      * section&nbsp;2.5.3. </p>
      *
-     * <p> If there is a security manager and <code>host</code> is not
-     * null and <code>host.length() </code> is not equal to zero, the
+     * <p> If there is a security manager and {@code host} is not
+     * null and {@code host.length() } is not equal to zero, the
      * security manager's
-     * <code>checkConnect</code> method is called
-     * with the hostname and <code>-1</code>
+     * {@code checkConnect} method is called
+     * with the hostname and {@code -1}
      * as its arguments to see if the operation is allowed.
      *
-     * @param      host   the name of the host, or <code>null</code>.
+     * @param      host   the name of the host, or {@code null}.
      * @return     an array of all the IP addresses for a given host name.
      *
      * @exception  UnknownHostException  if no IP address for the
-     *               <code>host</code> could be found, or if a scope_id was specified
+     *               {@code host} could be found, or if a scope_id was specified
      *               for a global IPv6 address.
      * @exception  SecurityException  if a security manager exists and its
-     *               <code>checkConnect</code> method doesn't allow the operation.
+     *               {@code checkConnect} method doesn't allow the operation.
      *
      * @see SecurityManager#checkConnect
      */
@@ -1389,9 +1389,9 @@
     }
 
     /**
-     * Returns an <code>InetAddress</code> object given the raw IP address .
+     * Returns an {@code InetAddress} object given the raw IP address .
      * The argument is in network byte order: the highest order
-     * byte of the address is in <code>getAddress()[0]</code>.
+     * byte of the address is in {@code getAddress()[0]}.
      *
      * <p> This method doesn't block, i.e. no reverse name service lookup
      * is performed.
@@ -1417,14 +1417,14 @@
     /**
      * Returns the address of the local host. This is achieved by retrieving
      * the name of the host from the system, then resolving that name into
-     * an <code>InetAddress</code>.
+     * an {@code InetAddress}.
      *
      * <P>Note: The resolved address may be cached for a short period of time.
      * </P>
      *
      * <p>If there is a security manager, its
-     * <code>checkConnect</code> method is called
-     * with the local host name and <code>-1</code>
+     * {@code checkConnect} method is called
+     * with the local host name and {@code -1}
      * as its arguments to see if the operation is allowed.
      * If the operation is not allowed, an InetAddress representing
      * the loopback address is returned.
--- a/src/share/classes/java/net/InetSocketAddress.java	Tue Aug 06 17:12:37 2013 -0700
+++ b/src/share/classes/java/net/InetSocketAddress.java	Tue Aug 06 22:47:14 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -43,7 +43,7 @@
  * as returned values.
  * <p>
  * The <i>wildcard</i> is a special local IP address. It usually means "any"
- * and can only be used for <code>bind</code> operations.
+ * and can only be used for {@code bind} operations.
  *
  * @see java.net.Socket
  * @see java.net.ServerSocket
@@ -155,8 +155,8 @@
      * and the port number a specified value.
      * <p>
      * A valid port value is between 0 and 65535.
-     * A port number of <code>zero</code> will let the system pick up an
-     * ephemeral port in a <code>bind</code> operation.
+     * A port number of {@code zero} will let the system pick up an
+     * ephemeral port in a {@code bind} operation.
      * <p>
      * @param   port    The port number
      * @throws IllegalArgumentException if the port parameter is outside the specified
@@ -171,10 +171,10 @@
      * Creates a socket address from an IP address and a port number.
      * <p>
      * A valid port value is between 0 and 65535.
-     * A port number of <code>zero</code> will let the system pick up an
-     * ephemeral port in a <code>bind</code> operation.
+     * A port number of {@code zero} will let the system pick up an
+     * ephemeral port in a {@code bind} operation.
      * <P>
-     * A <code>null</code> address will assign the <i>wildcard</i> address.
+     * A {@code null} address will assign the <i>wildcard</i> address.
      * <p>
      * @param   addr    The IP address
      * @param   port    The port number
@@ -195,13 +195,13 @@
      * An attempt will be made to resolve the hostname into an InetAddress.
      * If that attempt fails, the address will be flagged as <I>unresolved</I>.
      * <p>
-     * If there is a security manager, its <code>checkConnect</code> method
+     * If there is a security manager, its {@code checkConnect} method
      * is called with the host name as its argument to check the permissiom
      * to resolve it. This could result in a SecurityException.
      * <P>
      * A valid port value is between 0 and 65535.
-     * A port number of <code>zero</code> will let the system pick up an
-     * ephemeral port in a <code>bind</code> operation.
+     * A port number of {@code zero} will let the system pick up an
+     * ephemeral port in a {@code bind} operation.
      * <P>
      * @param   hostname the Host name
      * @param   port    The port number
@@ -237,8 +237,8 @@
      * The address will be flagged as <I>unresolved</I>.
      * <p>
      * A valid port value is between 0 and 65535.
-     * A port number of <code>zero</code> will let the system pick up an
-     * ephemeral port in a <code>bind</code> operation.
+     * A port number of {@code zero} will let the system pick up an
+     * ephemeral port in a {@code bind} operation.
      * <P>
      * @param   host    the Host name
      * @param   port    The port number
@@ -246,7 +246,7 @@
      *                  the range of valid port values, or if the hostname
      *                  parameter is <TT>null</TT>.
      * @see     #isUnresolved()
-     * @return  a <code>InetSocketAddress</code> representing the unresolved
+     * @return  a {@code InetSocketAddress} representing the unresolved
      *          socket address
      * @since 1.5
      */
@@ -326,16 +326,16 @@
 
     /**
      *
-     * Gets the <code>InetAddress</code>.
+     * Gets the {@code InetAddress}.
      *
-     * @return the InetAdress or <code>null</code> if it is unresolved.
+     * @return the InetAdress or {@code null} if it is unresolved.
      */
     public final InetAddress getAddress() {
         return holder.getAddress();
     }
 
     /**
-     * Gets the <code>hostname</code>.
+     * Gets the {@code hostname}.
      * Note: This method may trigger a name service reverse lookup if the
      * address was created with a literal IP address.
      *
@@ -360,8 +360,8 @@
     /**
      * Checks whether the address has been resolved or not.
      *
-     * @return <code>true</code> if the hostname couldn't be resolved into
-     *          an <code>InetAddress</code>.
+     * @return {@code true} if the hostname couldn't be resolved into
+     *          an {@code InetAddress}.
      */
     public final boolean isUnresolved() {
         return holder.isUnresolved();
@@ -382,11 +382,11 @@
 
     /**
      * Compares this object against the specified object.
-     * The result is <code>true</code> if and only if the argument is
-     * not <code>null</code> and it represents the same address as
+     * The result is {@code true} if and only if the argument is
+     * not {@code null} and it represents the same address as
      * this object.
      * <p>
-     * Two instances of <code>InetSocketAddress</code> represent the same
+     * Two instances of {@code InetSocketAddress} represent the same
      * address if both the InetAddresses (or hostnames if it is unresolved) and port
      * numbers are equal.
      * If both addresses are unresolved, then the hostname and the port number
@@ -396,8 +396,8 @@
      * considered equal.
      *
      * @param   obj   the object to compare against.
-     * @return  <code>true</code> if the objects are the same;
-     *          <code>false</code> otherwise.
+     * @return  {@code true} if the objects are the same;
+     *          {@code false} otherwise.
      * @see java.net.InetAddress#equals(java.lang.Object)
      */
     @Override
--- a/src/share/classes/java/net/InterfaceAddress.java	Tue Aug 06 17:12:37 2013 -0700
+++ b/src/share/classes/java/net/InterfaceAddress.java	Tue Aug 06 22:47:14 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 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
@@ -47,23 +47,23 @@
     }
 
     /**
-     * Returns an <code>InetAddress</code> for this address.
+     * Returns an {@code InetAddress} for this address.
      *
-     * @return the <code>InetAddress</code> for this address.
+     * @return the {@code InetAddress} for this address.
      */
     public InetAddress getAddress() {
         return address;
     }
 
     /**
-     * Returns an <code>InetAddress</code> for the brodcast address
+     * Returns an {@code InetAddress} for the brodcast address
      * for this InterfaceAddress.
      * <p>
      * Only IPv4 networks have broadcast address therefore, in the case
-     * of an IPv6 network, <code>null</code> will be returned.
+     * of an IPv6 network, {@code null} will be returned.
      *
-     * @return the <code>InetAddress</code> representing the broadcast
-     *         address or <code>null</code> if there is no broadcast address.
+     * @return the {@code InetAddress} representing the broadcast
+     *         address or {@code null} if there is no broadcast address.
      */
     public InetAddress getBroadcast() {
         return broadcast;
@@ -76,7 +76,7 @@
      * or 24 (255.255.255.0). <p>
      * Typical IPv6 values would be 128 (::1/128) or 10 (fe80::203:baff:fe27:1243/10)
      *
-     * @return a <code>short</code> representing the prefix length for the
+     * @return a {@code short} representing the prefix length for the
      *         subnet of that address.
      */
      public short getNetworkPrefixLength() {
@@ -85,17 +85,17 @@
 
     /**
      * Compares this object against the specified object.
-     * The result is <code>true</code> if and only if the argument is
-     * not <code>null</code> and it represents the same interface address as
+     * The result is {@code true} if and only if the argument is
+     * not {@code null} and it represents the same interface address as
      * this object.
      * <p>
-     * Two instances of <code>InterfaceAddress</code> represent the same
+     * Two instances of {@code InterfaceAddress} represent the same
      * address if the InetAddress, the prefix length and the broadcast are
      * the same for both.
      *
      * @param   obj   the object to compare against.
-     * @return  <code>true</code> if the objects are the same;
-     *          <code>false</code> otherwise.
+     * @return  {@code true} if the objects are the same;
+     *          {@code false} otherwise.
      * @see     java.net.InterfaceAddress#hashCode()
      */
     public boolean equals(Object obj) {
@@ -122,7 +122,7 @@
     }
 
     /**
-     * Converts this Interface address to a <code>String</code>. The
+     * Converts this Interface address to a {@code String}. The
      * string returned is of the form: InetAddress / prefix length [ broadcast address ].
      *
      * @return  a string representation of this Interface address.
--- a/src/share/classes/java/net/JarURLConnection.java	Tue Aug 06 17:12:37 2013 -0700
+++ b/src/share/classes/java/net/JarURLConnection.java	Tue Aug 06 22:47:14 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2006, 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
@@ -45,18 +45,14 @@
  *
  * <p>for example:
  *
- * <p><code>
- * jar:http://www.foo.com/bar/baz.jar!/COM/foo/Quux.class<br>
- * </code>
+ * <p>{@code jar:http://www.foo.com/bar/baz.jar!/COM/foo/Quux.class}
  *
  * <p>Jar URLs should be used to refer to a JAR file or entries in
  * a JAR file. The example above is a JAR URL which refers to a JAR
  * entry. If the entry name is omitted, the URL refers to the whole
  * JAR file:
  *
- * <code>
- * jar:http://www.foo.com/bar/baz.jar!/
- * </code>
+ * {@code jar:http://www.foo.com/bar/baz.jar!/}
  *
  * <p>Users should cast the generic URLConnection to a
  * JarURLConnection when they know that the URL they created is a JAR
@@ -76,19 +72,19 @@
  * <dl>
  *
  * <dt>A Jar entry
- * <dd><code>jar:http://www.foo.com/bar/baz.jar!/COM/foo/Quux.class</code>
+ * <dd>{@code jar:http://www.foo.com/bar/baz.jar!/COM/foo/Quux.class}
  *
  * <dt>A Jar file
- * <dd><code>jar:http://www.foo.com/bar/baz.jar!/</code>
+ * <dd>{@code jar:http://www.foo.com/bar/baz.jar!/}
  *
  * <dt>A Jar directory
- * <dd><code>jar:http://www.foo.com/bar/baz.jar!/COM/foo/</code>
+ * <dd>{@code jar:http://www.foo.com/bar/baz.jar!/COM/foo/}
  *
  * </dl>
  *
- * <p><code>!/</code> is refered to as the <em>separator</em>.
+ * <p>{@code !/} is refered to as the <em>separator</em>.
  *
- * <p>When constructing a JAR url via <code>new URL(context, spec)</code>,
+ * <p>When constructing a JAR url via {@code new URL(context, spec)},
  * the following rules apply:
  *
  * <ul>
@@ -294,7 +290,7 @@
      * can only be called once
      * the connection has been completely verified by reading
      * from the input stream until the end of the stream has been
-     * reached. Otherwise, this method will return <code>null</code>
+     * reached. Otherwise, this method will return {@code null}
      *
      * @return the Certificate object for this connection if the URL
      * for it points to a JAR file entry, null otherwise.
--- a/src/share/classes/java/net/MalformedURLException.java	Tue Aug 06 17:12:37 2013 -0700
+++ b/src/share/classes/java/net/MalformedURLException.java	Tue Aug 06 22:47:14 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1995, 2008, 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
@@ -39,13 +39,13 @@
     private static final long serialVersionUID = -182787522200415866L;
 
     /**
-     * Constructs a <code>MalformedURLException</code> with no detail message.
+     * Constructs a {@code MalformedURLException} with no detail message.
      */
     public MalformedURLException() {
     }
 
     /**
-     * Constructs a <code>MalformedURLException</code> with the
+     * Constructs a {@code MalformedURLException} with the
      * specified detail message.
      *
      * @param   msg   the detail message.
--- a/src/share/classes/java/net/MulticastSocket.java	Tue Aug 06 17:12:37 2013 -0700
+++ b/src/share/classes/java/net/MulticastSocket.java	Tue Aug 06 22:47:14 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1995, 2012, 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
@@ -92,7 +92,7 @@
      * Create a multicast socket.
      *
      * <p>If there is a security manager,
-     * its <code>checkListen</code> method is first called
+     * its {@code checkListen} method is first called
      * with 0 as its argument to ensure the operation is allowed.
      * This could result in a SecurityException.
      * <p>
@@ -103,7 +103,7 @@
      * @exception IOException if an I/O exception occurs
      * while creating the MulticastSocket
      * @exception  SecurityException  if a security manager exists and its
-     *             <code>checkListen</code> method doesn't allow the operation.
+     *             {@code checkListen} method doesn't allow the operation.
      * @see SecurityManager#checkListen
      * @see java.net.DatagramSocket#setReuseAddress(boolean)
      */
@@ -115,8 +115,8 @@
      * Create a multicast socket and bind it to a specific port.
      *
      * <p>If there is a security manager,
-     * its <code>checkListen</code> method is first called
-     * with the <code>port</code> argument
+     * its {@code checkListen} method is first called
+     * with the {@code port} argument
      * as its argument to ensure the operation is allowed.
      * This could result in a SecurityException.
      * <p>
@@ -128,7 +128,7 @@
      * @exception IOException if an I/O exception occurs
      * while creating the MulticastSocket
      * @exception  SecurityException  if a security manager exists and its
-     *             <code>checkListen</code> method doesn't allow the operation.
+     *             {@code checkListen} method doesn't allow the operation.
      * @see SecurityManager#checkListen
      * @see java.net.DatagramSocket#setReuseAddress(boolean)
      */
@@ -139,10 +139,10 @@
     /**
      * Create a MulticastSocket bound to the specified socket address.
      * <p>
-     * Or, if the address is <code>null</code>, create an unbound socket.
+     * Or, if the address is {@code null}, create an unbound socket.
      * <p>
      * <p>If there is a security manager,
-     * its <code>checkListen</code> method is first called
+     * its {@code checkListen} method is first called
      * with the SocketAddress port as its argument to ensure the operation is allowed.
      * This could result in a SecurityException.
      * <p>
@@ -150,12 +150,12 @@
      * {@link DatagramSocket#setReuseAddress(boolean)} method is
      * called to enable the SO_REUSEADDR socket option.
      *
-     * @param bindaddr Socket address to bind to, or <code>null</code> for
+     * @param bindaddr Socket address to bind to, or {@code null} for
      *                 an unbound socket.
      * @exception IOException if an I/O exception occurs
      * while creating the MulticastSocket
      * @exception  SecurityException  if a security manager exists and its
-     *             <code>checkListen</code> method doesn't allow the operation.
+     *             {@code checkListen} method doesn't allow the operation.
      * @see SecurityManager#checkListen
      * @see java.net.DatagramSocket#setReuseAddress(boolean)
      *
@@ -197,7 +197,7 @@
 
     /**
      * Set the default time-to-live for multicast packets sent out
-     * on this <code>MulticastSocket</code> in order to control the
+     * on this {@code MulticastSocket} in order to control the
      * scope of the multicasts.
      *
      * <p>The ttl is an <b>unsigned</b> 8-bit quantity, and so <B>must</B> be
@@ -279,11 +279,11 @@
 
     /**
      * Joins a multicast group. Its behavior may be affected by
-     * <code>setInterface</code> or <code>setNetworkInterface</code>.
+     * {@code setInterface} or {@code setNetworkInterface}.
      *
      * <p>If there is a security manager, this method first
-     * calls its <code>checkMulticast</code> method
-     * with the <code>mcastaddr</code> argument
+     * calls its {@code checkMulticast} method
+     * with the {@code mcastaddr} argument
      * as its argument.
      *
      * @param mcastaddr is the multicast address to join
@@ -291,7 +291,7 @@
      * @exception IOException if there is an error joining
      * or when the address is not a multicast address.
      * @exception  SecurityException  if a security manager exists and its
-     * <code>checkMulticast</code> method doesn't allow the join.
+     * {@code checkMulticast} method doesn't allow the join.
      *
      * @see SecurityManager#checkMulticast(InetAddress)
      */
@@ -325,18 +325,18 @@
 
     /**
      * Leave a multicast group. Its behavior may be affected by
-     * <code>setInterface</code> or <code>setNetworkInterface</code>.
+     * {@code setInterface} or {@code setNetworkInterface}.
      *
      * <p>If there is a security manager, this method first
-     * calls its <code>checkMulticast</code> method
-     * with the <code>mcastaddr</code> argument
+     * calls its {@code checkMulticast} method
+     * with the {@code mcastaddr} argument
      * as its argument.
      *
      * @param mcastaddr is the multicast address to leave
      * @exception IOException if there is an error leaving
      * or when the address is not a multicast address.
      * @exception  SecurityException  if a security manager exists and its
-     * <code>checkMulticast</code> method doesn't allow the operation.
+     * {@code checkMulticast} method doesn't allow the operation.
      *
      * @see SecurityManager#checkMulticast(InetAddress)
      */
@@ -362,8 +362,8 @@
      * Joins the specified multicast group at the specified interface.
      *
      * <p>If there is a security manager, this method first
-     * calls its <code>checkMulticast</code> method
-     * with the <code>mcastaddr</code> argument
+     * calls its {@code checkMulticast} method
+     * with the {@code mcastaddr} argument
      * as its argument.
      *
      * @param mcastaddr is the multicast address to join
@@ -375,7 +375,7 @@
      * @exception IOException if there is an error joining
      * or when the address is not a multicast address.
      * @exception  SecurityException  if a security manager exists and its
-     * <code>checkMulticast</code> method doesn't allow the join.
+     * {@code checkMulticast} method doesn't allow the join.
      * @throws  IllegalArgumentException if mcastaddr is null or is a
      *          SocketAddress subclass not supported by this socket
      *
@@ -410,8 +410,8 @@
      * Leave a multicast group on a specified local interface.
      *
      * <p>If there is a security manager, this method first
-     * calls its <code>checkMulticast</code> method
-     * with the <code>mcastaddr</code> argument
+     * calls its {@code checkMulticast} method
+     * with the {@code mcastaddr} argument
      * as its argument.
      *
      * @param mcastaddr is the multicast address to leave
@@ -422,7 +422,7 @@
      * @exception IOException if there is an error leaving
      * or when the address is not a multicast address.
      * @exception  SecurityException  if a security manager exists and its
-     * <code>checkMulticast</code> method doesn't allow the operation.
+     * {@code checkMulticast} method doesn't allow the operation.
      * @throws  IllegalArgumentException if mcastaddr is null or is a
      *          SocketAddress subclass not supported by this socket
      *
@@ -478,7 +478,7 @@
      * Retrieve the address of the network interface used for
      * multicast packets.
      *
-     * @return An <code>InetAddress</code> representing
+     * @return An {@code InetAddress} representing
      *  the address of the network interface used for
      *  multicast packets.
      *
@@ -562,7 +562,7 @@
      *
      * @exception SocketException if there is an error in
      * the underlying protocol, such as a TCP error.
-     * @return the multicast <code>NetworkInterface</code> currently set
+     * @return the multicast {@code NetworkInterface} currently set
      * @see #setNetworkInterface(NetworkInterface)
      * @since 1.4
      */
@@ -587,7 +587,7 @@
      * <p>Because this option is a hint, applications that want to
      * verify what loopback mode is set to should call
      * {@link #getLoopbackMode()}
-     * @param disable <code>true</code> to disable the LoopbackMode
+     * @param disable {@code true} to disable the LoopbackMode
      * @throws SocketException if an error occurs while setting the value
      * @since 1.4
      * @see #getLoopbackMode
@@ -615,18 +615,18 @@
      * otherwise it is preferable to set a TTL once on the socket, and
      * use that default TTL for all packets.  This method does <B>not
      * </B> alter the default TTL for the socket. Its behavior may be
-     * affected by <code>setInterface</code>.
+     * affected by {@code setInterface}.
      *
      * <p>If there is a security manager, this method first performs some
-     * security checks. First, if <code>p.getAddress().isMulticastAddress()</code>
+     * security checks. First, if {@code p.getAddress().isMulticastAddress()}
      * is true, this method calls the
-     * security manager's <code>checkMulticast</code> method
-     * with <code>p.getAddress()</code> and <code>ttl</code> as its arguments.
+     * security manager's {@code checkMulticast} method
+     * with {@code p.getAddress()} and {@code ttl} as its arguments.
      * If the evaluation of that expression is false,
      * this method instead calls the security manager's
-     * <code>checkConnect</code> method with arguments
-     * <code>p.getAddress().getHostAddress()</code> and
-     * <code>p.getPort()</code>. Each call to a security manager method
+     * {@code checkConnect} method with arguments
+     * {@code p.getAddress().getHostAddress()} and
+     * {@code p.getPort()}. Each call to a security manager method
      * could result in a SecurityException if the operation is not allowed.
      *
      * @param p is the packet to be sent. The packet should contain
@@ -639,7 +639,7 @@
      * @exception IOException is raised if an error occurs i.e
      * error while setting ttl.
      * @exception  SecurityException  if a security manager exists and its
-     *             <code>checkMulticast</code> or <code>checkConnect</code>
+     *             {@code checkMulticast} or {@code checkConnect}
      *             method doesn't allow the send.
      *
      * @deprecated Use the following code or its equivalent instead:
--- a/src/share/classes/java/net/NetPermission.java	Tue Aug 06 17:12:37 2013 -0700
+++ b/src/share/classes/java/net/NetPermission.java	Tue Aug 06 22:47:14 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2012, 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
@@ -177,8 +177,8 @@
      *
      * @param name the name of the NetPermission.
      *
-     * @throws NullPointerException if <code>name</code> is <code>null</code>.
-     * @throws IllegalArgumentException if <code>name</code> is empty.
+     * @throws NullPointerException if {@code name} is {@code null}.
+     * @throws IllegalArgumentException if {@code name} is empty.
      */
 
     public NetPermission(String name)
@@ -194,8 +194,8 @@
      * @param name the name of the NetPermission.
      * @param actions should be null.
      *
-     * @throws NullPointerException if <code>name</code> is <code>null</code>.
-     * @throws IllegalArgumentException if <code>name</code> is empty.
+     * @throws NullPointerException if {@code name} is {@code null}.
+     * @throws IllegalArgumentException if {@code name} is empty.
      */
 
     public NetPermission(String name, String actions)
--- a/src/share/classes/java/net/NetworkInterface.java	Tue Aug 06 17:12:37 2013 -0700
+++ b/src/share/classes/java/net/NetworkInterface.java	Tue Aug 06 22:47:14 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -98,9 +98,9 @@
      * Convenience method to return an Enumeration with all or a
      * subset of the InetAddresses bound to this network interface.
      * <p>
-     * If there is a security manager, its <code>checkConnect</code>
+     * If there is a security manager, its {@code checkConnect}
      * method is called for each InetAddress. Only InetAddresses where
-     * the <code>checkConnect</code> doesn't throw a SecurityException
+     * the {@code checkConnect} doesn't throw a SecurityException
      * will be returned in the Enumeration. However, if the caller has the
      * {@link NetPermission}("getNetworkInformation") permission, then all
      * InetAddresses are returned.
@@ -154,15 +154,15 @@
     }
 
     /**
-     * Get a List of all or a subset of the <code>InterfaceAddresses</code>
+     * Get a List of all or a subset of the {@code InterfaceAddresses}
      * of this network interface.
      * <p>
-     * If there is a security manager, its <code>checkConnect</code>
+     * If there is a security manager, its {@code checkConnect}
      * method is called with the InetAddress for each InterfaceAddress.
-     * Only InterfaceAddresses where the <code>checkConnect</code> doesn't throw
+     * Only InterfaceAddresses where the {@code checkConnect} doesn't throw
      * a SecurityException will be returned in the List.
      *
-     * @return a <code>List</code> object with all or a subset of the
+     * @return a {@code List} object with all or a subset of the
      *         InterfaceAddresss of this network interface
      * @since 1.6
      */
@@ -216,10 +216,10 @@
 
     /**
      * Returns the parent NetworkInterface of this interface if this is
-     * a subinterface, or <code>null</code> if it is a physical
+     * a subinterface, or {@code null} if it is a physical
      * (non virtual) interface or has no parent.
      *
-     * @return The <code>NetworkInterface</code> this interface is attached to.
+     * @return The {@code NetworkInterface} this interface is attached to.
      * @since 1.6
      */
     public NetworkInterface getParent() {
@@ -260,15 +260,15 @@
      * @param   name
      *          The name of the network interface.
      *
-     * @return  A <tt>NetworkInterface</tt> with the specified name,
-     *          or <tt>null</tt> if there is no network interface
+     * @return  A {@code NetworkInterface} with the specified name,
+     *          or {@code null} if there is no network interface
      *          with the specified name.
      *
      * @throws  SocketException
      *          If an I/O error occurs.
      *
      * @throws  NullPointerException
-     *          If the specified name is <tt>null</tt>.
+     *          If the specified name is {@code null}.
      */
     public static NetworkInterface getByName(String name) throws SocketException {
         if (name == null)
@@ -303,17 +303,17 @@
      * returned.
      *
      * @param   addr
-     *          The <tt>InetAddress</tt> to search with.
+     *          The {@code InetAddress} to search with.
      *
-     * @return  A <tt>NetworkInterface</tt>
-     *          or <tt>null</tt> if there is no network interface
+     * @return  A {@code NetworkInterface}
+     *          or {@code null} if there is no network interface
      *          with the specified IP address.
      *
      * @throws  SocketException
      *          If an I/O error occurs.
      *
      * @throws  NullPointerException
-     *          If the specified address is <tt>null</tt>.
+     *          If the specified address is {@code null}.
      */
     public static NetworkInterface getByInetAddress(InetAddress addr) throws SocketException {
         if (addr == null) {
@@ -378,7 +378,7 @@
     /**
      * Returns whether a network interface is up and running.
      *
-     * @return  <code>true</code> if the interface is up and running.
+     * @return  {@code true} if the interface is up and running.
      * @exception       SocketException if an I/O error occurs.
      * @since 1.6
      */
@@ -390,7 +390,7 @@
     /**
      * Returns whether a network interface is a loopback interface.
      *
-     * @return  <code>true</code> if the interface is a loopback interface.
+     * @return  {@code true} if the interface is a loopback interface.
      * @exception       SocketException if an I/O error occurs.
      * @since 1.6
      */
@@ -404,7 +404,7 @@
      * A typical point to point interface would be a PPP connection through
      * a modem.
      *
-     * @return  <code>true</code> if the interface is a point to point
+     * @return  {@code true} if the interface is a point to point
      *          interface.
      * @exception       SocketException if an I/O error occurs.
      * @since 1.6
@@ -417,7 +417,7 @@
     /**
      * Returns whether a network interface supports multicasting or not.
      *
-     * @return  <code>true</code> if the interface supports Multicasting.
+     * @return  {@code true} if the interface supports Multicasting.
      * @exception       SocketException if an I/O error occurs.
      * @since 1.6
      */
@@ -432,7 +432,7 @@
      * If a security manager is set, then the caller must have
      * the permission {@link NetPermission}("getNetworkInformation").
      *
-     * @return  a byte array containing the address, or <code>null</code> if
+     * @return  a byte array containing the address, or {@code null} if
      *          the address doesn't exist, is not accessible or a security
      *          manager is set and the caller does not have the permission
      *          NetPermission("getNetworkInformation")
@@ -481,7 +481,7 @@
      * can be several virtual interfaces attached to a single physical
      * interface.
      *
-     * @return <code>true</code> if this interface is a virtual interface.
+     * @return {@code true} if this interface is a virtual interface.
      * @since 1.6
      */
     public boolean isVirtual() {
@@ -497,16 +497,16 @@
 
     /**
      * Compares this object against the specified object.
-     * The result is <code>true</code> if and only if the argument is
-     * not <code>null</code> and it represents the same NetworkInterface
+     * The result is {@code true} if and only if the argument is
+     * not {@code null} and it represents the same NetworkInterface
      * as this object.
      * <p>
-     * Two instances of <code>NetworkInterface</code> represent the same
+     * Two instances of {@code NetworkInterface} represent the same
      * NetworkInterface if both name and addrs are the same for both.
      *
      * @param   obj   the object to compare against.
-     * @return  <code>true</code> if the objects are the same;
-     *          <code>false</code> otherwise.
+     * @return  {@code true} if the objects are the same;
+     *          {@code false} otherwise.
      * @see     java.net.InetAddress#getAddress()
      */
     public boolean equals(Object obj) {
--- a/src/share/classes/java/net/PasswordAuthentication.java	Tue Aug 06 17:12:37 2013 -0700
+++ b/src/share/classes/java/net/PasswordAuthentication.java	Tue Aug 06 22:47:14 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2001, 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
@@ -43,11 +43,11 @@
     private char[] password;
 
     /**
-     * Creates a new <code>PasswordAuthentication</code> object from the given
+     * Creates a new {@code PasswordAuthentication} object from the given
      * user name and password.
      *
      * <p> Note that the given user password is cloned before it is stored in
-     * the new <code>PasswordAuthentication</code> object.
+     * the new {@code PasswordAuthentication} object.
      *
      * @param userName the user name
      * @param password the user's password
--- a/src/share/classes/java/net/PortUnreachableException.java	Tue Aug 06 17:12:37 2013 -0700
+++ b/src/share/classes/java/net/PortUnreachableException.java	Tue Aug 06 22:47:14 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -36,7 +36,7 @@
     private static final long serialVersionUID = 8462541992376507323L;
 
     /**
-     * Constructs a new <code>PortUnreachableException</code> with a
+     * Constructs a new {@code PortUnreachableException} with a
      * detail message.
      * @param msg the detail message
      */
@@ -45,7 +45,7 @@
     }
 
     /**
-     * Construct a new <code>PortUnreachableException</code> with no
+     * Construct a new {@code PortUnreachableException} with no
      * detailed message.
      */
     public PortUnreachableException() {}
--- a/src/share/classes/java/net/ProtocolException.java	Tue Aug 06 17:12:37 2013 -0700
+++ b/src/share/classes/java/net/ProtocolException.java	Tue Aug 06 22:47:14 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1995, 2008, 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
@@ -39,7 +39,7 @@
     private static final long serialVersionUID = -6098449442062388080L;
 
     /**
-     * Constructs a new <code>ProtocolException</code> with the
+     * Constructs a new {@code ProtocolException} with the
      * specified detail message.
      *
      * @param   host   the detail message.
@@ -49,7 +49,7 @@
     }
 
     /**
-     * Constructs a new <code>ProtocolException</code> with no detail message.
+     * Constructs a new {@code ProtocolException} with no detail message.
      */
     public ProtocolException() {
     }
--- a/src/share/classes/java/net/Proxy.java	Tue Aug 06 17:12:37 2013 -0700
+++ b/src/share/classes/java/net/Proxy.java	Tue Aug 06 22:47:14 2013 -0700
@@ -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
@@ -28,7 +28,7 @@
 /**
  * This class represents a proxy setting, typically a type (http, socks) and
  * a socket address.
- * A <code>Proxy</code> is an immutable object.
+ * A {@code Proxy} is an immutable object.
  *
  * @see     java.net.ProxySelector
  * @author Yingxian Wang
@@ -61,17 +61,17 @@
     private SocketAddress sa;
 
     /**
-     * A proxy setting that represents a <code>DIRECT</code> connection,
+     * A proxy setting that represents a {@code DIRECT} connection,
      * basically telling the protocol handler not to use any proxying.
      * Used, for instance, to create sockets bypassing any other global
      * proxy settings (like SOCKS):
      * <P>
-     * <code>Socket s = new Socket(Proxy.NO_PROXY);</code><br>
+     * {@code Socket s = new Socket(Proxy.NO_PROXY);}<br>
      * <P>
      */
     public final static Proxy NO_PROXY = new Proxy();
 
-    // Creates the proxy that represents a <code>DIRECT</code> connection.
+    // Creates the proxy that represents a {@code DIRECT} connection.
     private Proxy() {
         type = Type.DIRECT;
         sa = null;
@@ -82,11 +82,11 @@
      * Certain combinations are illegal. For instance, for types Http, and
      * Socks, a SocketAddress <b>must</b> be provided.
      * <P>
-     * Use the <code>Proxy.NO_PROXY</code> constant
+     * Use the {@code Proxy.NO_PROXY} constant
      * for representing a direct connection.
      *
-     * @param type the <code>Type</code> of the proxy
-     * @param sa the <code>SocketAddress</code> for that proxy
+     * @param type the {@code Type} of the proxy
+     * @param sa the {@code SocketAddress} for that proxy
      * @throws IllegalArgumentException when the type and the address are
      * incompatible
      */
@@ -108,9 +108,9 @@
 
     /**
      * Returns the socket address of the proxy, or
-     * <code>null</code> if its a direct connection.
+     * {@code null} if its a direct connection.
      *
-     * @return a <code>SocketAddress</code> representing the socket end
+     * @return a {@code SocketAddress} representing the socket end
      *         point of the proxy
      */
     public SocketAddress address() {
@@ -121,7 +121,7 @@
      * Constructs a string representation of this Proxy.
      * This String is constructed by calling toString() on its type
      * and concatenating " @ " and the toString() result from its address
-     * if its type is not <code>DIRECT</code>.
+     * if its type is not {@code DIRECT}.
      *
      * @return  a string representation of this object.
      */
@@ -133,16 +133,16 @@
 
         /**
      * Compares this object against the specified object.
-     * The result is <code>true</code> if and only if the argument is
-     * not <code>null</code> and it represents the same proxy as
+     * The result is {@code true} if and only if the argument is
+     * not {@code null} and it represents the same proxy as
      * this object.
      * <p>
-     * Two instances of <code>Proxy</code> represent the same
+     * Two instances of {@code Proxy} represent the same
      * address if both the SocketAddresses and type are equal.
      *
      * @param   obj   the object to compare against.
-     * @return  <code>true</code> if the objects are the same;
-     *          <code>false</code> otherwise.
+     * @return  {@code true} if the objects are the same;
+     *          {@code false} otherwise.
      * @see java.net.InetSocketAddress#equals(java.lang.Object)
      */
     public final boolean equals(Object obj) {
--- a/src/share/classes/java/net/ProxySelector.java	Tue Aug 06 17:12:37 2013 -0700
+++ b/src/share/classes/java/net/ProxySelector.java	Tue Aug 06 22:47:14 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2012, 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
@@ -83,9 +83,9 @@
      *
      * @throws  SecurityException
      *          If a security manager has been installed and it denies
-     * {@link NetPermission}<tt>("getProxySelector")</tt>
+     * {@link NetPermission}{@code ("getProxySelector")}
      * @see #setDefault(ProxySelector)
-     * @return the system-wide <code>ProxySelector</code>
+     * @return the system-wide {@code ProxySelector}
      * @since 1.5
      */
     public static ProxySelector getDefault() {
@@ -102,11 +102,11 @@
      * Note: non-standard protocol handlers may ignore this setting.
      *
      * @param ps The HTTP proxy selector, or
-     *          <code>null</code> to unset the proxy selector.
+     *          {@code null} to unset the proxy selector.
      *
      * @throws  SecurityException
      *          If a security manager has been installed and it denies
-     * {@link NetPermission}<tt>("setProxySelector")</tt>
+     * {@link NetPermission}{@code ("setProxySelector")}
      *
      * @see #getDefault()
      * @since 1.5
@@ -127,7 +127,7 @@
      * <UL>
      * <LI>http URI for http connections</LI>
      * <LI>https URI for https connections
-     * <LI><code>socket://host:port</code><br>
+     * <LI>{@code socket://host:port}<br>
      *     for tcp client sockets connections</LI>
      * </UL>
      *
--- a/src/share/classes/java/net/ResponseCache.java	Tue Aug 06 17:12:37 2013 -0700
+++ b/src/share/classes/java/net/ResponseCache.java	Tue Aug 06 22:47:14 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -74,10 +74,10 @@
      *
      * @throws  SecurityException
      *          If a security manager has been installed and it denies
-     * {@link NetPermission}<tt>("getResponseCache")</tt>
+     * {@link NetPermission}{@code ("getResponseCache")}
      *
      * @see #setDefault(ResponseCache)
-     * @return the system-wide <code>ResponseCache</code>
+     * @return the system-wide {@code ResponseCache}
      * @since 1.5
      */
     public synchronized  static ResponseCache getDefault() {
@@ -94,11 +94,11 @@
      * Note: non-standard procotol handlers may ignore this setting.
      *
      * @param responseCache The response cache, or
-     *          <code>null</code> to unset the cache.
+     *          {@code null} to unset the cache.
      *
      * @throws  SecurityException
      *          If a security manager has been installed and it denies
-     * {@link NetPermission}<tt>("setResponseCache")</tt>
+     * {@link NetPermission}{@code ("setResponseCache")}
      *
      * @see #getDefault()
      * @since 1.5
@@ -118,14 +118,14 @@
      * to get the network resource. If a cached response is returned,
      * that resource is used instead.
      *
-     * @param uri a <code>URI</code> used to reference the requested
+     * @param uri a {@code URI} used to reference the requested
      *            network resource
-     * @param rqstMethod a <code>String</code> representing the request
+     * @param rqstMethod a {@code String} representing the request
      *            method
      * @param rqstHeaders - a Map from request header
      *            field names to lists of field values representing
      *            the current request headers
-     * @return a <code>CacheResponse</code> instance if available
+     * @return a {@code CacheResponse} instance if available
      *          from cache, or null otherwise
      * @throws  IOException if an I/O error occurs
      * @throws  IllegalArgumentException if any one of the arguments is null
@@ -148,11 +148,11 @@
      * use to write the resource into the cache. If the resource is
      * not to be cached, then put must return null.
      *
-     * @param uri a <code>URI</code> used to reference the requested
+     * @param uri a {@code URI} used to reference the requested
      *            network resource
      * @param conn - a URLConnection instance that is used to fetch
      *            the response to be cached
-     * @return a <code>CacheRequest</code> for recording the
+     * @return a {@code CacheRequest} for recording the
      *            response to be cached. Null return indicates that
      *            the caller does not intend to cache the response.
      * @throws IOException if an I/O error occurs
--- a/src/share/classes/java/net/ServerSocket.java	Tue Aug 06 17:12:37 2013 -0700
+++ b/src/share/classes/java/net/ServerSocket.java	Tue Aug 06 22:47:14 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1995, 2011, 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
@@ -37,7 +37,7 @@
  * based on that request, and then possibly returns a result to the requester.
  * <p>
  * The actual work of the server socket is performed by an instance
- * of the <code>SocketImpl</code> class. An application can
+ * of the {@code SocketImpl} class. An application can
  * change the socket factory that creates the socket
  * implementation to configure itself to create sockets
  * appropriate to the local firewall.
@@ -89,31 +89,31 @@
 
     /**
      * Creates a server socket, bound to the specified port. A port number
-     * of <code>0</code> means that the port number is automatically
+     * of {@code 0} means that the port number is automatically
      * allocated, typically from an ephemeral port range. This port
      * number can then be retrieved by calling {@link #getLocalPort getLocalPort}.
      * <p>
      * The maximum queue length for incoming connection indications (a
-     * request to connect) is set to <code>50</code>. If a connection
+     * request to connect) is set to {@code 50}. If a connection
      * indication arrives when the queue is full, the connection is refused.
      * <p>
      * If the application has specified a server socket factory, that
-     * factory's <code>createSocketImpl</code> method is called to create
+     * factory's {@code createSocketImpl} method is called to create
      * the actual socket implementation. Otherwise a "plain" socket is created.
      * <p>
      * If there is a security manager,
-     * its <code>checkListen</code> method is called
-     * with the <code>port</code> argument
+     * its {@code checkListen} method is called
+     * with the {@code port} argument
      * as its argument to ensure the operation is allowed.
      * This could result in a SecurityException.
      *
      *
-     * @param      port  the port number, or <code>0</code> to use a port
+     * @param      port  the port number, or {@code 0} to use a port
      *                   number that is automatically allocated.
      *
      * @exception  IOException  if an I/O error occurs when opening the socket.
      * @exception  SecurityException
-     * if a security manager exists and its <code>checkListen</code>
+     * if a security manager exists and its {@code checkListen}
      * method doesn't allow the operation.
      * @exception  IllegalArgumentException if the port parameter is outside
      *             the specified range of valid port values, which is between
@@ -131,42 +131,42 @@
     /**
      * Creates a server socket and binds it to the specified local port
      * number, with the specified backlog.
-     * A port number of <code>0</code> means that the port number is
+     * A port number of {@code 0} means that the port number is
      * automatically allocated, typically from an ephemeral port range.
      * This port number can then be retrieved by calling
      * {@link #getLocalPort getLocalPort}.
      * <p>
      * The maximum queue length for incoming connection indications (a
-     * request to connect) is set to the <code>backlog</code> parameter. If
+     * request to connect) is set to the {@code backlog} parameter. If
      * a connection indication arrives when the queue is full, the
      * connection is refused.
      * <p>
      * If the application has specified a server socket factory, that
-     * factory's <code>createSocketImpl</code> method is called to create
+     * factory's {@code createSocketImpl} method is called to create
      * the actual socket implementation. Otherwise a "plain" socket is created.
      * <p>
      * If there is a security manager,
-     * its <code>checkListen</code> method is called
-     * with the <code>port</code> argument
+     * its {@code checkListen} method is called
+     * with the {@code port} argument
      * as its argument to ensure the operation is allowed.
      * This could result in a SecurityException.
      *
-     * The <code>backlog</code> argument is the requested maximum number of
+     * The {@code backlog} argument is the requested maximum number of
      * pending connections on the socket. Its exact semantics are implementation
      * specific. In particular, an implementation may impose a maximum length
      * or may choose to ignore the parameter altogther. The value provided
-     * should be greater than <code>0</code>. If it is less than or equal to
-     * <code>0</code>, then an implementation specific default will be used.
+     * should be greater than {@code 0}. If it is less than or equal to
+     * {@code 0}, then an implementation specific default will be used.
      * <P>
      *
-     * @param      port     the port number, or <code>0</code> to use a port
+     * @param      port     the port number, or {@code 0} to use a port
      *                      number that is automatically allocated.
      * @param      backlog  requested maximum length of the queue of incoming
      *                      connections.
      *
      * @exception  IOException  if an I/O error occurs when opening the socket.
      * @exception  SecurityException
-     * if a security manager exists and its <code>checkListen</code>
+     * if a security manager exists and its {@code checkListen}
      * method doesn't allow the operation.
      * @exception  IllegalArgumentException if the port parameter is outside
      *             the specified range of valid port values, which is between
@@ -189,32 +189,32 @@
      * If <i>bindAddr</i> is null, it will default accepting
      * connections on any/all local addresses.
      * The port must be between 0 and 65535, inclusive.
-     * A port number of <code>0</code> means that the port number is
+     * A port number of {@code 0} means that the port number is
      * automatically allocated, typically from an ephemeral port range.
      * This port number can then be retrieved by calling
      * {@link #getLocalPort getLocalPort}.
      *
      * <P>If there is a security manager, this method
-     * calls its <code>checkListen</code> method
-     * with the <code>port</code> argument
+     * calls its {@code checkListen} method
+     * with the {@code port} argument
      * as its argument to ensure the operation is allowed.
      * This could result in a SecurityException.
      *
-     * The <code>backlog</code> argument is the requested maximum number of
+     * The {@code backlog} argument is the requested maximum number of
      * pending connections on the socket. Its exact semantics are implementation
      * specific. In particular, an implementation may impose a maximum length
      * or may choose to ignore the parameter altogther. The value provided
-     * should be greater than <code>0</code>. If it is less than or equal to
-     * <code>0</code>, then an implementation specific default will be used.
+     * should be greater than {@code 0}. If it is less than or equal to
+     * {@code 0}, then an implementation specific default will be used.
      * <P>
-     * @param port  the port number, or <code>0</code> to use a port
+     * @param port  the port number, or {@code 0} to use a port
      *              number that is automatically allocated.
      * @param backlog requested maximum length of the queue of incoming
      *                connections.
      * @param bindAddr the local InetAddress the server will bind to
      *
      * @throws  SecurityException if a security manager exists and
-     * its <code>checkListen</code> method doesn't allow the operation.
+     * its {@code checkListen} method doesn't allow the operation.
      *
      * @throws  IOException if an I/O error occurs when opening the socket.
      * @exception  IllegalArgumentException if the port parameter is outside
@@ -245,10 +245,10 @@
     }
 
     /**
-     * Get the <code>SocketImpl</code> attached to this socket, creating
+     * Get the {@code SocketImpl} attached to this socket, creating
      * it if necessary.
      *
-     * @return  the <code>SocketImpl</code> attached to that ServerSocket.
+     * @return  the {@code SocketImpl} attached to that ServerSocket.
      * @throws SocketException if creation fails.
      * @since 1.4
      */
@@ -310,17 +310,17 @@
 
     /**
      *
-     * Binds the <code>ServerSocket</code> to a specific address
+     * Binds the {@code ServerSocket} to a specific address
      * (IP address and port number).
      * <p>
-     * If the address is <code>null</code>, then the system will pick up
+     * If the address is {@code null}, then the system will pick up
      * an ephemeral port and a valid local address to bind the socket.
      * <p>
      * @param   endpoint        The IP address and port number to bind to.
      * @throws  IOException if the bind operation fails, or if the socket
      *                     is already bound.
-     * @throws  SecurityException       if a <code>SecurityManager</code> is present and
-     * its <code>checkListen</code> method doesn't allow the operation.
+     * @throws  SecurityException       if a {@code SecurityManager} is present and
+     * its {@code checkListen} method doesn't allow the operation.
      * @throws  IllegalArgumentException if endpoint is a
      *          SocketAddress subclass not supported by this socket
      * @since 1.4
@@ -331,25 +331,25 @@
 
     /**
      *
-     * Binds the <code>ServerSocket</code> to a specific address
+     * Binds the {@code ServerSocket} to a specific address
      * (IP address and port number).
      * <p>
-     * If the address is <code>null</code>, then the system will pick up
+     * If the address is {@code null}, then the system will pick up
      * an ephemeral port and a valid local address to bind the socket.
      * <P>
-     * The <code>backlog</code> argument is the requested maximum number of
+     * The {@code backlog} argument is the requested maximum number of
      * pending connections on the socket. Its exact semantics are implementation
      * specific. In particular, an implementation may impose a maximum length
      * or may choose to ignore the parameter altogther. The value provided
-     * should be greater than <code>0</code>. If it is less than or equal to
-     * <code>0</code>, then an implementation specific default will be used.
+     * should be greater than {@code 0}. If it is less than or equal to
+     * {@code 0}, then an implementation specific default will be used.
      * @param   endpoint        The IP address and port number to bind to.
      * @param   backlog         requested maximum length of the queue of
      *                          incoming connections.
      * @throws  IOException if the bind operation fails, or if the socket
      *                     is already bound.
-     * @throws  SecurityException       if a <code>SecurityManager</code> is present and
-     * its <code>checkListen</code> method doesn't allow the operation.
+     * @throws  SecurityException       if a {@code SecurityManager} is present and
+     * its {@code checkListen} method doesn't allow the operation.
      * @throws  IllegalArgumentException if endpoint is a
      *          SocketAddress subclass not supported by this socket
      * @since 1.4
@@ -480,18 +480,18 @@
      * Listens for a connection to be made to this socket and accepts
      * it. The method blocks until a connection is made.
      *
-     * <p>A new Socket <code>s</code> is created and, if there
+     * <p>A new Socket {@code s} is created and, if there
      * is a security manager,
-     * the security manager's <code>checkAccept</code> method is called
-     * with <code>s.getInetAddress().getHostAddress()</code> and
-     * <code>s.getPort()</code>
+     * the security manager's {@code checkAccept} method is called
+     * with {@code s.getInetAddress().getHostAddress()} and
+     * {@code s.getPort()}
      * as its arguments to ensure the operation is allowed.
      * This could result in a SecurityException.
      *
      * @exception  IOException  if an I/O error occurs when waiting for a
      *               connection.
      * @exception  SecurityException  if a security manager exists and its
-     *             <code>checkAccept</code> method doesn't allow the operation.
+     *             {@code checkAccept} method doesn't allow the operation.
      * @exception  SocketTimeoutException if a timeout was previously set with setSoTimeout and
      *             the timeout has been reached.
      * @exception  java.nio.channels.IllegalBlockingModeException
@@ -597,7 +597,7 @@
      * method.
      *
      * @return  the server-socket channel associated with this socket,
-     *          or <tt>null</tt> if this socket was not created
+     *          or {@code null} if this socket was not created
      *          for a channel
      *
      * @since 1.4
@@ -678,18 +678,18 @@
      * <p>
      * When a TCP connection is closed the connection may remain
      * in a timeout state for a period of time after the connection
-     * is closed (typically known as the <tt>TIME_WAIT</tt> state
-     * or <tt>2MSL</tt> wait state).
+     * is closed (typically known as the {@code TIME_WAIT} state
+     * or {@code 2MSL} wait state).
      * For applications using a well known socket address or port
      * it may not be possible to bind a socket to the required
-     * <tt>SocketAddress</tt> if there is a connection in the
+     * {@code SocketAddress} if there is a connection in the
      * timeout state involving the socket address or port.
      * <p>
      * Enabling {@link SocketOptions#SO_REUSEADDR SO_REUSEADDR} prior to
      * binding the socket using {@link #bind(SocketAddress)} allows the socket
      * to be bound even though a previous connection is in a timeout state.
      * <p>
-     * When a <tt>ServerSocket</tt> is created the initial setting
+     * When a {@code ServerSocket} is created the initial setting
      * of {@link SocketOptions#SO_REUSEADDR SO_REUSEADDR} is not defined.
      * Applications can use {@link #getReuseAddress()} to determine the initial
      * setting of {@link SocketOptions#SO_REUSEADDR SO_REUSEADDR}.
@@ -717,7 +717,7 @@
     /**
      * Tests if {@link SocketOptions#SO_REUSEADDR SO_REUSEADDR} is enabled.
      *
-     * @return a <code>boolean</code> indicating whether or not
+     * @return a {@code boolean} indicating whether or not
      *         {@link SocketOptions#SO_REUSEADDR SO_REUSEADDR} is enabled.
      * @exception SocketException if there is an error
      * in the underlying protocol, such as a TCP error.
@@ -732,7 +732,7 @@
 
     /**
      * Returns the implementation address and implementation port of
-     * this socket as a <code>String</code>.
+     * this socket as a {@code String}.
      * <p>
      * If there is a security manager set, its {@code checkConnect} method is
      * called with the local address and {@code -1} as its arguments to see
@@ -773,14 +773,14 @@
      * application. The factory can be specified only once.
      * <p>
      * When an application creates a new server socket, the socket
-     * implementation factory's <code>createSocketImpl</code> method is
+     * implementation factory's {@code createSocketImpl} method is
      * called to create the actual socket implementation.
      * <p>
-     * Passing <code>null</code> to the method is a no-op unless the factory
+     * Passing {@code null} to the method is a no-op unless the factory
      * was already set.
      * <p>
      * If there is a security manager, this method first calls
-     * the security manager's <code>checkSetFactory</code> method
+     * the security manager's {@code checkSetFactory} method
      * to ensure the operation is allowed.
      * This could result in a SecurityException.
      *
@@ -789,7 +789,7 @@
      *               socket factory.
      * @exception  SocketException  if the factory has already been defined.
      * @exception  SecurityException  if a security manager exists and its
-     *             <code>checkSetFactory</code> method doesn't allow the operation.
+     *             {@code checkSetFactory} method doesn't allow the operation.
      * @see        java.net.SocketImplFactory#createSocketImpl()
      * @see        SecurityManager#checkSetFactory
      */
@@ -807,7 +807,7 @@
     /**
      * Sets a default proposed value for the
      * {@link SocketOptions#SO_RCVBUF SO_RCVBUF} option for sockets
-     * accepted from this <tt>ServerSocket</tt>. The value actually set
+     * accepted from this {@code ServerSocket}. The value actually set
      * in the accepted socket must be determined by calling
      * {@link Socket#getReceiveBufferSize()} after the socket
      * is returned by {@link #accept()}.
@@ -851,13 +851,13 @@
 
     /**
      * Gets the value of the {@link SocketOptions#SO_RCVBUF SO_RCVBUF} option
-     * for this <tt>ServerSocket</tt>, that is the proposed buffer size that
-     * will be used for Sockets accepted from this <tt>ServerSocket</tt>.
+     * for this {@code ServerSocket}, that is the proposed buffer size that
+     * will be used for Sockets accepted from this {@code ServerSocket}.
      *
      * <p>Note, the value actually set in the accepted socket is determined by
      * calling {@link Socket#getReceiveBufferSize()}.
      * @return the value of the {@link SocketOptions#SO_RCVBUF SO_RCVBUF}
-     *         option for this <tt>Socket</tt>.
+     *         option for this {@code Socket}.
      * @exception SocketException if there is an error
      *            in the underlying protocol, such as a TCP error.
      * @see #setReceiveBufferSize(int)
@@ -891,24 +891,24 @@
      * compared, with larger values indicating stronger preferences.  If the
      * application prefers short connection time over both low latency and high
      * bandwidth, for example, then it could invoke this method with the values
-     * <tt>(1, 0, 0)</tt>.  If the application prefers high bandwidth above low
+     * {@code (1, 0, 0)}.  If the application prefers high bandwidth above low
      * latency, and low latency above short connection time, then it could
-     * invoke this method with the values <tt>(0, 1, 2)</tt>.
+     * invoke this method with the values {@code (0, 1, 2)}.
      *
      * <p> Invoking this method after this socket has been bound
      * will have no effect. This implies that in order to use this capability
      * requires the socket to be created with the no-argument constructor.
      *
      * @param  connectionTime
-     *         An <tt>int</tt> expressing the relative importance of a short
+     *         An {@code int} expressing the relative importance of a short
      *         connection time
      *
      * @param  latency
-     *         An <tt>int</tt> expressing the relative importance of low
+     *         An {@code int} expressing the relative importance of low
      *         latency
      *
      * @param  bandwidth
-     *         An <tt>int</tt> expressing the relative importance of high
+     *         An {@code int} expressing the relative importance of high
      *         bandwidth
      *
      * @since 1.5
--- a/src/share/classes/java/net/Socket.java	Tue Aug 06 17:12:37 2013 -0700
+++ b/src/share/classes/java/net/Socket.java	Tue Aug 06 22:47:14 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1995, 2011, 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
@@ -39,7 +39,7 @@
  * between two machines.
  * <p>
  * The actual work of the socket is performed by an instance of the
- * <code>SocketImpl</code> class. An application, by changing
+ * {@code SocketImpl} class. An application, by changing
  * the socket factory that creates the socket implementation,
  * can configure itself to create sockets appropriate to the local
  * firewall.
@@ -88,14 +88,14 @@
      * Creates an unconnected socket, specifying the type of proxy, if any,
      * that should be used regardless of any other settings.
      * <P>
-     * If there is a security manager, its <code>checkConnect</code> method
+     * If there is a security manager, its {@code checkConnect} method
      * is called with the proxy host address and port number
      * as its arguments. This could result in a SecurityException.
      * <P>
      * Examples:
-     * <UL> <LI><code>Socket s = new Socket(Proxy.NO_PROXY);</code> will create
+     * <UL> <LI>{@code Socket s = new Socket(Proxy.NO_PROXY);} will create
      * a plain socket ignoring any other proxy configuration.</LI>
-     * <LI><code>Socket s = new Socket(new Proxy(Proxy.Type.SOCKS, new InetSocketAddress("socks.mydom.com", 1080)));</code>
+     * <LI>{@code Socket s = new Socket(new Proxy(Proxy.Type.SOCKS, new InetSocketAddress("socks.mydom.com", 1080)));}
      * will create a socket connecting through the specified SOCKS proxy
      * server.</LI>
      * </UL>
@@ -103,7 +103,7 @@
      * @param proxy a {@link java.net.Proxy Proxy} object specifying what kind
      *              of proxying should be used.
      * @throws IllegalArgumentException if the proxy is of an invalid type
-     *          or <code>null</code>.
+     *          or {@code null}.
      * @throws SecurityException if a security manager is present and
      *                           permission to connect to the proxy is
      *                           denied.
@@ -173,21 +173,22 @@
      * Creates a stream socket and connects it to the specified port
      * number on the named host.
      * <p>
-     * If the specified host is <tt>null</tt> it is the equivalent of
-     * specifying the address as <tt>{@link java.net.InetAddress#getByName InetAddress.getByName}(null)</tt>.
+     * If the specified host is {@code null} it is the equivalent of
+     * specifying the address as
+     * {@link java.net.InetAddress#getByName InetAddress.getByName}{@code (null)}.
      * In other words, it is equivalent to specifying an address of the
      * loopback interface. </p>
      * <p>
      * If the application has specified a server socket factory, that
-     * factory's <code>createSocketImpl</code> method is called to create
+     * factory's {@code createSocketImpl} method is called to create
      * the actual socket implementation. Otherwise a "plain" socket is created.
      * <p>
      * If there is a security manager, its
-     * <code>checkConnect</code> method is called
-     * with the host address and <code>port</code>
+     * {@code checkConnect} method is called
+     * with the host address and {@code port}
      * as its arguments. This could result in a SecurityException.
      *
-     * @param      host   the host name, or <code>null</code> for the loopback address.
+     * @param      host   the host name, or {@code null} for the loopback address.
      * @param      port   the port number.
      *
      * @exception  UnknownHostException if the IP address of
@@ -195,7 +196,7 @@
      *
      * @exception  IOException  if an I/O error occurs when creating the socket.
      * @exception  SecurityException  if a security manager exists and its
-     *             <code>checkConnect</code> method doesn't allow the operation.
+     *             {@code checkConnect} method doesn't allow the operation.
      * @exception  IllegalArgumentException if the port parameter is outside
      *             the specified range of valid port values, which is between
      *             0 and 65535, inclusive.
@@ -217,23 +218,23 @@
      * number at the specified IP address.
      * <p>
      * If the application has specified a socket factory, that factory's
-     * <code>createSocketImpl</code> method is called to create the
+     * {@code createSocketImpl} method is called to create the
      * actual socket implementation. Otherwise a "plain" socket is created.
      * <p>
      * If there is a security manager, its
-     * <code>checkConnect</code> method is called
-     * with the host address and <code>port</code>
+     * {@code checkConnect} method is called
+     * with the host address and {@code port}
      * as its arguments. This could result in a SecurityException.
      *
      * @param      address   the IP address.
      * @param      port      the port number.
      * @exception  IOException  if an I/O error occurs when creating the socket.
      * @exception  SecurityException  if a security manager exists and its
-     *             <code>checkConnect</code> method doesn't allow the operation.
+     *             {@code checkConnect} method doesn't allow the operation.
      * @exception  IllegalArgumentException if the port parameter is outside
      *             the specified range of valid port values, which is between
      *             0 and 65535, inclusive.
-     * @exception  NullPointerException if <code>address</code> is null.
+     * @exception  NullPointerException if {@code address} is null.
      * @see        java.net.Socket#setSocketImplFactory(java.net.SocketImplFactory)
      * @see        java.net.SocketImpl
      * @see        java.net.SocketImplFactory#createSocketImpl()
@@ -249,28 +250,29 @@
      * the specified remote port. The Socket will also bind() to the local
      * address and port supplied.
      * <p>
-     * If the specified host is <tt>null</tt> it is the equivalent of
-     * specifying the address as <tt>{@link java.net.InetAddress#getByName InetAddress.getByName}(null)</tt>.
+     * If the specified host is {@code null} it is the equivalent of
+     * specifying the address as
+     * {@link java.net.InetAddress#getByName InetAddress.getByName}{@code (null)}.
      * In other words, it is equivalent to specifying an address of the
      * loopback interface. </p>
      * <p>
-     * A local port number of <code>zero</code> will let the system pick up a
-     * free port in the <code>bind</code> operation.</p>
+     * A local port number of {@code zero} will let the system pick up a
+     * free port in the {@code bind} operation.</p>
      * <p>
      * If there is a security manager, its
-     * <code>checkConnect</code> method is called
-     * with the host address and <code>port</code>
+     * {@code checkConnect} method is called
+     * with the host address and {@code port}
      * as its arguments. This could result in a SecurityException.
      *
-     * @param host the name of the remote host, or <code>null</code> for the loopback address.
+     * @param host the name of the remote host, or {@code null} for the loopback address.
      * @param port the remote port
      * @param localAddr the local address the socket is bound to, or
-     *        <code>null</code> for the <code>anyLocal</code> address.
+     *        {@code null} for the {@code anyLocal} address.
      * @param localPort the local port the socket is bound to, or
-     *        <code>zero</code> for a system selected free port.
+     *        {@code zero} for a system selected free port.
      * @exception  IOException  if an I/O error occurs when creating the socket.
      * @exception  SecurityException  if a security manager exists and its
-     *             <code>checkConnect</code> method doesn't allow the operation.
+     *             {@code checkConnect} method doesn't allow the operation.
      * @exception  IllegalArgumentException if the port parameter or localPort
      *             parameter is outside the specified range of valid port values,
      *             which is between 0 and 65535, inclusive.
@@ -289,30 +291,31 @@
      * the specified remote port. The Socket will also bind() to the local
      * address and port supplied.
      * <p>
-     * If the specified local address is <tt>null</tt> it is the equivalent of
-     * specifying the address as the AnyLocal address (see <tt>{@link java.net.InetAddress#isAnyLocalAddress InetAddress.isAnyLocalAddress}()</tt>).
+     * If the specified local address is {@code null} it is the equivalent of
+     * specifying the address as the AnyLocal address
+     * (see {@link java.net.InetAddress#isAnyLocalAddress InetAddress.isAnyLocalAddress}{@code ()}).
      * <p>
-     * A local port number of <code>zero</code> will let the system pick up a
-     * free port in the <code>bind</code> operation.</p>
+     * A local port number of {@code zero} will let the system pick up a
+     * free port in the {@code bind} operation.</p>
      * <p>
      * If there is a security manager, its
-     * <code>checkConnect</code> method is called
-     * with the host address and <code>port</code>
+     * {@code checkConnect} method is called
+     * with the host address and {@code port}
      * as its arguments. This could result in a SecurityException.
      *
      * @param address the remote address
      * @param port the remote port
      * @param localAddr the local address the socket is bound to, or
-     *        <code>null</code> for the <code>anyLocal</code> address.
+     *        {@code null} for the {@code anyLocal} address.
      * @param localPort the local port the socket is bound to or
-     *        <code>zero</code> for a system selected free port.
+     *        {@code zero} for a system selected free port.
      * @exception  IOException  if an I/O error occurs when creating the socket.
      * @exception  SecurityException  if a security manager exists and its
-     *             <code>checkConnect</code> method doesn't allow the operation.
+     *             {@code checkConnect} method doesn't allow the operation.
      * @exception  IllegalArgumentException if the port parameter or localPort
      *             parameter is outside the specified range of valid port values,
      *             which is between 0 and 65535, inclusive.
-     * @exception  NullPointerException if <code>address</code> is null.
+     * @exception  NullPointerException if {@code address} is null.
      * @see        SecurityManager#checkConnect
      * @since   JDK1.1
      */
@@ -326,33 +329,34 @@
      * Creates a stream socket and connects it to the specified port
      * number on the named host.
      * <p>
-     * If the specified host is <tt>null</tt> it is the equivalent of
-     * specifying the address as <tt>{@link java.net.InetAddress#getByName InetAddress.getByName}(null)</tt>.
+     * If the specified host is {@code null} it is the equivalent of
+     * specifying the address as
+     * {@link java.net.InetAddress#getByName InetAddress.getByName}{@code (null)}.
      * In other words, it is equivalent to specifying an address of the
      * loopback interface. </p>
      * <p>
-     * If the stream argument is <code>true</code>, this creates a
-     * stream socket. If the stream argument is <code>false</code>, it
+     * If the stream argument is {@code true}, this creates a
+     * stream socket. If the stream argument is {@code false}, it
      * creates a datagram socket.
      * <p>
      * If the application has specified a server socket factory, that
-     * factory's <code>createSocketImpl</code> method is called to create
+     * factory's {@code createSocketImpl} method is called to create
      * the actual socket implementation. Otherwise a "plain" socket is created.
      * <p>
      * If there is a security manager, its
-     * <code>checkConnect</code> method is called
-     * with the host address and <code>port</code>
+     * {@code checkConnect} method is called
+     * with the host address and {@code port}
      * as its arguments. This could result in a SecurityException.
      * <p>
      * If a UDP socket is used, TCP/IP related socket options will not apply.
      *
-     * @param      host     the host name, or <code>null</code> for the loopback address.
+     * @param      host     the host name, or {@code null} for the loopback address.
      * @param      port     the port number.
-     * @param      stream   a <code>boolean</code> indicating whether this is
+     * @param      stream   a {@code boolean} indicating whether this is
      *                      a stream socket or a datagram socket.
      * @exception  IOException  if an I/O error occurs when creating the socket.
      * @exception  SecurityException  if a security manager exists and its
-     *             <code>checkConnect</code> method doesn't allow the operation.
+     *             {@code checkConnect} method doesn't allow the operation.
      * @exception  IllegalArgumentException if the port parameter is outside
      *             the specified range of valid port values, which is between
      *             0 and 65535, inclusive.
@@ -373,32 +377,32 @@
      * Creates a socket and connects it to the specified port number at
      * the specified IP address.
      * <p>
-     * If the stream argument is <code>true</code>, this creates a
-     * stream socket. If the stream argument is <code>false</code>, it
+     * If the stream argument is {@code true}, this creates a
+     * stream socket. If the stream argument is {@code false}, it
      * creates a datagram socket.
      * <p>
      * If the application has specified a server socket factory, that
-     * factory's <code>createSocketImpl</code> method is called to create
+     * factory's {@code createSocketImpl} method is called to create
      * the actual socket implementation. Otherwise a "plain" socket is created.
      *
      * <p>If there is a security manager, its
-     * <code>checkConnect</code> method is called
-     * with <code>host.getHostAddress()</code> and <code>port</code>
+     * {@code checkConnect} method is called
+     * with {@code host.getHostAddress()} and {@code port}
      * as its arguments. This could result in a SecurityException.
      * <p>
      * If UDP socket is used, TCP/IP related socket options will not apply.
      *
      * @param      host     the IP address.
      * @param      port      the port number.
-     * @param      stream    if <code>true</code>, create a stream socket;
+     * @param      stream    if {@code true}, create a stream socket;
      *                       otherwise, create a datagram socket.
      * @exception  IOException  if an I/O error occurs when creating the socket.
      * @exception  SecurityException  if a security manager exists and its
-     *             <code>checkConnect</code> method doesn't allow the operation.
+     *             {@code checkConnect} method doesn't allow the operation.
      * @exception  IllegalArgumentException if the port parameter is outside
      *             the specified range of valid port values, which is between
      *             0 and 65535, inclusive.
-     * @exception  NullPointerException if <code>host</code> is null.
+     * @exception  NullPointerException if {@code host} is null.
      * @see        java.net.Socket#setSocketImplFactory(java.net.SocketImplFactory)
      * @see        java.net.SocketImpl
      * @see        java.net.SocketImplFactory#createSocketImpl()
@@ -437,8 +441,8 @@
     /**
      * Creates the socket implementation.
      *
-     * @param stream a <code>boolean</code> value : <code>true</code> for a TCP socket,
-     *               <code>false</code> for UDP.
+     * @param stream a {@code boolean} value : {@code true} for a TCP socket,
+     *               {@code false} for UDP.
      * @throws IOException if creation fails
      * @since 1.4
      */
@@ -500,10 +504,10 @@
 
 
     /**
-     * Get the <code>SocketImpl</code> attached to this socket, creating
+     * Get the {@code SocketImpl} attached to this socket, creating
      * it if necessary.
      *
-     * @return  the <code>SocketImpl</code> attached to that ServerSocket.
+     * @return  the {@code SocketImpl} attached to that ServerSocket.
      * @throws SocketException if creation fails
      * @since 1.4
      */
@@ -516,7 +520,7 @@
     /**
      * Connects this socket to the server.
      *
-     * @param   endpoint the <code>SocketAddress</code>
+     * @param   endpoint the {@code SocketAddress}
      * @throws  IOException if an error occurs during the connection
      * @throws  java.nio.channels.IllegalBlockingModeException
      *          if this socket has an associated channel,
@@ -535,7 +539,7 @@
      * A timeout of zero is interpreted as an infinite timeout. The connection
      * will then block until established or an error occurs.
      *
-     * @param   endpoint the <code>SocketAddress</code>
+     * @param   endpoint the {@code SocketAddress}
      * @param   timeout  the timeout value to be used in milliseconds.
      * @throws  IOException if an error occurs during the connection
      * @throws  SocketTimeoutException if timeout expires before connecting
@@ -597,10 +601,10 @@
     /**
      * Binds the socket to a local address.
      * <P>
-     * If the address is <code>null</code>, then the system will pick up
+     * If the address is {@code null}, then the system will pick up
      * an ephemeral port and a valid local address to bind the socket.
      *
-     * @param   bindpoint the <code>SocketAddress</code> to bind to
+     * @param   bindpoint the {@code SocketAddress} to bind to
      * @throws  IOException if the bind operation fails, or if the socket
      *                     is already bound.
      * @throws  IllegalArgumentException if bindpoint is a
@@ -668,7 +672,7 @@
      * after the socket is closed.
      *
      * @return  the remote IP address to which this socket is connected,
-     *          or <code>null</code> if the socket is not connected.
+     *          or {@code null} if the socket is not connected.
      */
     public InetAddress getInetAddress() {
         if (!isConnected())
@@ -760,15 +764,15 @@
 
     /**
      * Returns the address of the endpoint this socket is connected to, or
-     * <code>null</code> if it is unconnected.
+     * {@code null} if it is unconnected.
      * <p>
      * If the socket was connected prior to being {@link #close closed},
      * then this method will continue to return the connected address
      * after the socket is closed.
      *
 
-     * @return a <code>SocketAddress</code> representing the remote endpoint of this
-     *         socket, or <code>null</code> if it is not connected yet.
+     * @return a {@code SocketAddress} representing the remote endpoint of this
+     *         socket, or {@code null} if it is not connected yet.
      * @see #getInetAddress()
      * @see #getPort()
      * @see #connect(SocketAddress, int)
@@ -785,10 +789,10 @@
      * Returns the address of the endpoint this socket is bound to.
      * <p>
      * If a socket bound to an endpoint represented by an
-     * <code>InetSocketAddress </code> is {@link #close closed},
-     * then this method will continue to return an <code>InetSocketAddress</code>
+     * {@code InetSocketAddress } is {@link #close closed},
+     * then this method will continue to return an {@code InetSocketAddress}
      * after the socket is closed. In that case the returned
-     * <code>InetSocketAddress</code>'s address is the
+     * {@code InetSocketAddress}'s address is the
      * {@link InetAddress#isAnyLocalAddress wildcard} address
      * and its port is the local port that it was bound to.
      * <p>
@@ -828,7 +832,7 @@
      * methods.
      *
      * @return  the socket channel associated with this socket,
-     *          or <tt>null</tt> if this socket was not created
+     *          or {@code null} if this socket was not created
      *          for a channel
      *
      * @since 1.4
@@ -843,7 +847,7 @@
      *
      * <p> If this socket has an associated channel then the resulting input
      * stream delegates all of its operations to the channel.  If the channel
-     * is in non-blocking mode then the input stream's <tt>read</tt> operations
+     * is in non-blocking mode then the input stream's {@code read} operations
      * will throw an {@link java.nio.channels.IllegalBlockingModeException}.
      *
      * <p>Under abnormal conditions the underlying connection may be
@@ -867,7 +871,7 @@
      *   <li><p>If there are no bytes buffered on the socket, and the
      *   socket has not been closed using {@link #close close}, then
      *   {@link java.io.InputStream#available available} will
-     *   return <code>0</code>.
+     *   return {@code 0}.
      *
      * </ul>
      *
@@ -910,7 +914,7 @@
      *
      * <p> If this socket has an associated channel then the resulting output
      * stream delegates all of its operations to the channel.  If the channel
-     * is in non-blocking mode then the output stream's <tt>write</tt>
+     * is in non-blocking mode then the output stream's {@code write}
      * operations will throw an {@link
      * java.nio.channels.IllegalBlockingModeException}.
      *
@@ -949,8 +953,8 @@
      * Enable/disable {@link SocketOptions#TCP_NODELAY TCP_NODELAY}
      * (disable/enable Nagle's algorithm).
      *
-     * @param on <code>true</code> to enable TCP_NODELAY,
-     * <code>false</code> to disable.
+     * @param on {@code true} to enable TCP_NODELAY,
+     * {@code false} to disable.
      *
      * @exception SocketException if there is an error
      * in the underlying protocol, such as a TCP error.
@@ -968,7 +972,7 @@
     /**
      * Tests if {@link SocketOptions#TCP_NODELAY TCP_NODELAY} is enabled.
      *
-     * @return a <code>boolean</code> indicating whether or not
+     * @return a {@code boolean} indicating whether or not
      *         {@link SocketOptions#TCP_NODELAY TCP_NODELAY} is enabled.
      * @exception SocketException if there is an error
      * in the underlying protocol, such as a TCP error.
@@ -1066,9 +1070,9 @@
      * and there is no capability to distinguish between normal data and urgent
      * data unless provided by a higher level protocol.
      *
-     * @param on <code>true</code> to enable
+     * @param on {@code true} to enable
      *           {@link SocketOptions#SO_OOBINLINE SO_OOBINLINE},
-     *           <code>false</code> to disable.
+     *           {@code false} to disable.
      *
      * @exception SocketException if there is an error
      * in the underlying protocol, such as a TCP error.
@@ -1086,7 +1090,7 @@
     /**
      * Tests if {@link SocketOptions#SO_OOBINLINE SO_OOBINLINE} is enabled.
      *
-     * @return a <code>boolean</code> indicating whether or not
+     * @return a {@code boolean} indicating whether or not
      *         {@link SocketOptions#SO_OOBINLINE SO_OOBINLINE}is enabled.
      *
      * @exception SocketException if there is an error
@@ -1151,7 +1155,7 @@
 
     /**
      * Sets the {@link SocketOptions#SO_SNDBUF SO_SNDBUF} option to the
-     * specified value for this <tt>Socket</tt>.
+     * specified value for this {@code Socket}.
      * The {@link SocketOptions#SO_SNDBUF SO_SNDBUF} option is used by the
      * platform's networking code as a hint for the size to set the underlying
      * network I/O buffers.
@@ -1184,10 +1188,10 @@
 
     /**
      * Get value of the {@link SocketOptions#SO_SNDBUF SO_SNDBUF} option
-     * for this <tt>Socket</tt>, that is the buffer size used by the platform
-     * for output on this <tt>Socket</tt>.
+     * for this {@code Socket}, that is the buffer size used by the platform
+     * for output on this {@code Socket}.
      * @return the value of the {@link SocketOptions#SO_SNDBUF SO_SNDBUF}
-     *         option for this <tt>Socket</tt>.
+     *         option for this {@code Socket}.
      *
      * @exception SocketException if there is an error
      * in the underlying protocol, such as a TCP error.
@@ -1208,7 +1212,7 @@
 
     /**
      * Sets the {@link SocketOptions#SO_RCVBUF SO_RCVBUF} option to the
-     * specified value for this <tt>Socket</tt>. The
+     * specified value for this {@code Socket}. The
      * {@link SocketOptions#SO_RCVBUF SO_RCVBUF} option is
      * used by the platform's networking code as a hint for the size to set
      * the underlying network I/O buffers.
@@ -1258,11 +1262,11 @@
 
     /**
      * Gets the value of the {@link SocketOptions#SO_RCVBUF SO_RCVBUF} option
-     * for this <tt>Socket</tt>, that is the buffer size used by the platform
-     * for input on this <tt>Socket</tt>.
+     * for this {@code Socket}, that is the buffer size used by the platform
+     * for input on this {@code Socket}.
      *
      * @return the value of the {@link SocketOptions#SO_RCVBUF SO_RCVBUF}
-     *         option for this <tt>Socket</tt>.
+     *         option for this {@code Socket}.
      * @exception SocketException if there is an error
      * in the underlying protocol, such as a TCP error.
      * @see #setReceiveBufferSize(int)
@@ -1298,7 +1302,7 @@
     /**
      * Tests if {@link SocketOptions#SO_KEEPALIVE SO_KEEPALIVE} is enabled.
      *
-     * @return a <code>boolean</code> indicating whether or not
+     * @return a {@code boolean} indicating whether or not
      *         {@link SocketOptions#SO_KEEPALIVE SO_KEEPALIVE} is enabled.
      * @exception SocketException if there is an error
      * in the underlying protocol, such as a TCP error.
@@ -1321,7 +1325,7 @@
      * 255} or an IllegalArgumentException will be thrown.
      * <p>Notes:
      * <p>For Internet Protocol v4 the value consists of an
-     * <code>integer</code>, the least significant 8 bits of which
+     * {@code integer}, the least significant 8 bits of which
      * represent the value of the TOS octet in IP packets sent by
      * the socket.
      * RFC 1349 defines the TOS values as follows:
@@ -1347,10 +1351,10 @@
      * in the underlying platform. Applications should not assume that
      * they can change the TOS field after the connection.
      * <p>
-     * For Internet Protocol v6 <code>tc</code> is the value that
+     * For Internet Protocol v6 {@code tc} is the value that
      * would be placed into the sin6_flowinfo field of the IP header.
      *
-     * @param tc        an <code>int</code> value for the bitset.
+     * @param tc        an {@code int} value for the bitset.
      * @throws SocketException if there is an error setting the
      * traffic class or type-of-service
      * @since 1.4
@@ -1392,11 +1396,11 @@
      * <p>
      * When a TCP connection is closed the connection may remain
      * in a timeout state for a period of time after the connection
-     * is closed (typically known as the <tt>TIME_WAIT</tt> state
-     * or <tt>2MSL</tt> wait state).
+     * is closed (typically known as the {@code TIME_WAIT} state
+     * or {@code 2MSL} wait state).
      * For applications using a well known socket address or port
      * it may not be possible to bind a socket to the required
-     * <tt>SocketAddress</tt> if there is a connection in the
+     * {@code SocketAddress} if there is a connection in the
      * timeout state involving the socket address or port.
      * <p>
      * Enabling {@link SocketOptions#SO_REUSEADDR SO_REUSEADDR}
@@ -1404,7 +1408,7 @@
      * the socket to be bound even though a previous connection is in a timeout
      * state.
      * <p>
-     * When a <tt>Socket</tt> is created the initial setting
+     * When a {@code Socket} is created the initial setting
      * of {@link SocketOptions#SO_REUSEADDR SO_REUSEADDR} is disabled.
      * <p>
      * The behaviour when {@link SocketOptions#SO_REUSEADDR SO_REUSEADDR} is
@@ -1430,7 +1434,7 @@
     /**
      * Tests if {@link SocketOptions#SO_REUSEADDR SO_REUSEADDR} is enabled.
      *
-     * @return a <code>boolean</code> indicating whether or not
+     * @return a {@code boolean} indicating whether or not
      *         {@link SocketOptions#SO_REUSEADDR SO_REUSEADDR} is enabled.
      * @exception SocketException if there is an error
      * in the underlying protocol, such as a TCP error.
@@ -1536,7 +1540,7 @@
     }
 
     /**
-     * Converts this socket to a <code>String</code>.
+     * Converts this socket to a {@code String}.
      *
      * @return  a string representation of this socket.
      */
@@ -1555,7 +1559,7 @@
      * Returns the connection state of the socket.
      * <p>
      * Note: Closing a socket doesn't clear its connection state, which means
-     * this method will return <code>true</code> for a closed socket
+     * this method will return {@code true} for a closed socket
      * (see {@link #isClosed()}) if it was successfuly connected prior
      * to being closed.
      *
@@ -1571,7 +1575,7 @@
      * Returns the binding state of the socket.
      * <p>
      * Note: Closing a socket doesn't clear its binding state, which means
-     * this method will return <code>true</code> for a closed socket
+     * this method will return {@code true} for a closed socket
      * (see {@link #isClosed()}) if it was successfuly bound prior
      * to being closed.
      *
@@ -1629,13 +1633,13 @@
      * application. The factory can be specified only once.
      * <p>
      * When an application creates a new client socket, the socket
-     * implementation factory's <code>createSocketImpl</code> method is
+     * implementation factory's {@code createSocketImpl} method is
      * called to create the actual socket implementation.
      * <p>
-     * Passing <code>null</code> to the method is a no-op unless the factory
+     * Passing {@code null} to the method is a no-op unless the factory
      * was already set.
      * <p>If there is a security manager, this method first calls
-     * the security manager's <code>checkSetFactory</code> method
+     * the security manager's {@code checkSetFactory} method
      * to ensure the operation is allowed.
      * This could result in a SecurityException.
      *
@@ -1644,7 +1648,7 @@
      *               socket factory.
      * @exception  SocketException  if the factory is already defined.
      * @exception  SecurityException  if a security manager exists and its
-     *             <code>checkSetFactory</code> method doesn't allow the operation.
+     *             {@code checkSetFactory} method doesn't allow the operation.
      * @see        java.net.SocketImplFactory#createSocketImpl()
      * @see        SecurityManager#checkSetFactory
      */
@@ -1678,23 +1682,23 @@
      * values represent a lower priority than positive values. If the
      * application prefers short connection time over both low latency and high
      * bandwidth, for example, then it could invoke this method with the values
-     * <tt>(1, 0, 0)</tt>.  If the application prefers high bandwidth above low
+     * {@code (1, 0, 0)}.  If the application prefers high bandwidth above low
      * latency, and low latency above short connection time, then it could
-     * invoke this method with the values <tt>(0, 1, 2)</tt>.
+     * invoke this method with the values {@code (0, 1, 2)}.
      *
      * <p> Invoking this method after this socket has been connected
      * will have no effect.
      *
      * @param  connectionTime
-     *         An <tt>int</tt> expressing the relative importance of a short
+     *         An {@code int} expressing the relative importance of a short
      *         connection time
      *
      * @param  latency
-     *         An <tt>int</tt> expressing the relative importance of low
+     *         An {@code int} expressing the relative importance of low
      *         latency
      *
      * @param  bandwidth
-     *         An <tt>int</tt> expressing the relative importance of high
+     *         An {@code int} expressing the relative importance of high
      *         bandwidth
      *
      * @since 1.5
--- a/src/share/classes/java/net/SocketException.java	Tue Aug 06 17:12:37 2013 -0700
+++ b/src/share/classes/java/net/SocketException.java	Tue Aug 06 22:47:14 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1995, 2008, 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
@@ -38,7 +38,7 @@
     private static final long serialVersionUID = -5935874303556886934L;
 
     /**
-     * Constructs a new <code>SocketException</code> with the
+     * Constructs a new {@code SocketException} with the
      * specified detail message.
      *
      * @param msg the detail message.
@@ -48,7 +48,7 @@
     }
 
     /**
-     * Constructs a new <code>SocketException</code> with no detail message.
+     * Constructs a new {@code SocketException} with no detail message.
      */
     public SocketException() {
     }
--- a/src/share/classes/java/net/SocketImpl.java	Tue Aug 06 17:12:37 2013 -0700
+++ b/src/share/classes/java/net/SocketImpl.java	Tue Aug 06 22:47:14 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1995, 2011, 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
@@ -31,7 +31,7 @@
 import java.io.FileDescriptor;
 
 /**
- * The abstract class <code>SocketImpl</code> is a common superclass
+ * The abstract class {@code SocketImpl} is a common superclass
  * of all classes that actually implement sockets. It is used to
  * create both client and server sockets.
  * <p>
@@ -71,7 +71,7 @@
     /**
      * Creates either a stream or a datagram socket.
      *
-     * @param      stream   if <code>true</code>, create a stream socket;
+     * @param      stream   if {@code true}, create a stream socket;
      *                      otherwise, create a datagram socket.
      * @exception  IOException  if an I/O error occurs while creating the
      *               socket.
@@ -122,7 +122,7 @@
 
     /**
      * Sets the maximum queue length for incoming connection indications
-     * (a request to connect) to the <code>count</code> argument. If a
+     * (a request to connect) to the {@code count} argument. If a
      * connection indication arrives when the queue is full, the
      * connection is refused.
      *
@@ -217,9 +217,9 @@
     }
 
     /**
-     * Returns the value of this socket's <code>fd</code> field.
+     * Returns the value of this socket's {@code fd} field.
      *
-     * @return  the value of this socket's <code>fd</code> field.
+     * @return  the value of this socket's {@code fd} field.
      * @see     java.net.SocketImpl#fd
      */
     protected FileDescriptor getFileDescriptor() {
@@ -227,9 +227,9 @@
     }
 
     /**
-     * Returns the value of this socket's <code>address</code> field.
+     * Returns the value of this socket's {@code address} field.
      *
-     * @return  the value of this socket's <code>address</code> field.
+     * @return  the value of this socket's {@code address} field.
      * @see     java.net.SocketImpl#address
      */
     protected InetAddress getInetAddress() {
@@ -237,9 +237,9 @@
     }
 
     /**
-     * Returns the value of this socket's <code>port</code> field.
+     * Returns the value of this socket's {@code port} field.
      *
-     * @return  the value of this socket's <code>port</code> field.
+     * @return  the value of this socket's {@code port} field.
      * @see     java.net.SocketImpl#port
      */
     protected int getPort() {
@@ -270,9 +270,9 @@
     protected abstract void sendUrgentData (int data) throws IOException;
 
     /**
-     * Returns the value of this socket's <code>localport</code> field.
+     * Returns the value of this socket's {@code localport} field.
      *
-     * @return  the value of this socket's <code>localport</code> field.
+     * @return  the value of this socket's {@code localport} field.
      * @see     java.net.SocketImpl#localport
      */
     protected int getLocalPort() {
@@ -296,7 +296,7 @@
     }
 
     /**
-     * Returns the address and port of this socket as a <code>String</code>.
+     * Returns the address and port of this socket as a {@code String}.
      *
      * @return  a string representation of this socket.
      */
@@ -328,23 +328,23 @@
      * values represent a lower priority than positive values. If the
      * application prefers short connection time over both low latency and high
      * bandwidth, for example, then it could invoke this method with the values
-     * <tt>(1, 0, 0)</tt>.  If the application prefers high bandwidth above low
+     * {@code (1, 0, 0)}.  If the application prefers high bandwidth above low
      * latency, and low latency above short connection time, then it could
-     * invoke this method with the values <tt>(0, 1, 2)</tt>.
+     * invoke this method with the values {@code (0, 1, 2)}.
      *
      * By default, this method does nothing, unless it is overridden in a
      * a sub-class.
      *
      * @param  connectionTime
-     *         An <tt>int</tt> expressing the relative importance of a short
+     *         An {@code int} expressing the relative importance of a short
      *         connection time
      *
      * @param  latency
-     *         An <tt>int</tt> expressing the relative importance of low
+     *         An {@code int} expressing the relative importance of low
      *         latency
      *
      * @param  bandwidth
-     *         An <tt>int</tt> expressing the relative importance of high
+     *         An {@code int} expressing the relative importance of high
      *         bandwidth
      *
      * @since 1.5
--- a/src/share/classes/java/net/SocketImplFactory.java	Tue Aug 06 17:12:37 2013 -0700
+++ b/src/share/classes/java/net/SocketImplFactory.java	Tue Aug 06 22:47:14 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1995, 1999, 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
@@ -27,8 +27,8 @@
 
 /**
  * This interface defines a factory for socket implementations. It
- * is used by the classes <code>Socket</code> and
- * <code>ServerSocket</code> to create actual socket
+ * is used by the classes {@code Socket} and
+ * {@code ServerSocket} to create actual socket
  * implementations.
  *
  * @author  Arthur van Hoff
@@ -39,9 +39,9 @@
 public
 interface SocketImplFactory {
     /**
-     * Creates a new <code>SocketImpl</code> instance.
+     * Creates a new {@code SocketImpl} instance.
      *
-     * @return  a new instance of <code>SocketImpl</code>.
+     * @return  a new instance of {@code SocketImpl}.
      * @see     java.net.SocketImpl
      */
     SocketImpl createSocketImpl();
--- a/src/share/classes/java/net/SocketInputStream.java	Tue Aug 06 17:12:37 2013 -0700
+++ b/src/share/classes/java/net/SocketInputStream.java	Tue Aug 06 22:47:14 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1995, 2012, 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
@@ -67,8 +67,8 @@
      * Returns the unique {@link java.nio.channels.FileChannel FileChannel}
      * object associated with this file input stream.</p>
      *
-     * The <code>getChannel</code> method of <code>SocketInputStream</code>
-     * returns <code>null</code> since it is a socket based stream.</p>
+     * The {@code getChannel} method of {@code SocketInputStream}
+     * returns {@code null} since it is a socket based stream.</p>
      *
      * @return  the file channel associated with this file input stream
      *
--- a/src/share/classes/java/net/SocketOptions.java	Tue Aug 06 17:12:37 2013 -0700
+++ b/src/share/classes/java/net/SocketOptions.java	Tue Aug 06 22:47:14 2013 -0700
@@ -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
@@ -115,7 +115,7 @@
      * }
      * </PRE>
      *
-     * @param optID an <code>int</code> identifying the option to fetch
+     * @param optID an {@code int} identifying the option to fetch
      * @return the value of the option
      * @throws SocketException if the socket is closed
      * @throws SocketException if <I>optID</I> is unknown along the
--- a/src/share/classes/java/net/SocketOutputStream.java	Tue Aug 06 17:12:37 2013 -0700
+++ b/src/share/classes/java/net/SocketOutputStream.java	Tue Aug 06 22:47:14 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1995, 2007, 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
@@ -64,8 +64,8 @@
      * Returns the unique {@link java.nio.channels.FileChannel FileChannel}
      * object associated with this file output stream. </p>
      *
-     * The <code>getChannel</code> method of <code>SocketOutputStream</code>
-     * returns <code>null</code> since it is a socket based stream.</p>
+     * The {@code getChannel} method of {@code SocketOutputStream}
+     * returns {@code null} since it is a socket based stream.</p>
      *
      * @return  the file channel associated with this file output stream
      *
--- a/src/share/classes/java/net/SocketPermission.java	Tue Aug 06 17:12:37 2013 -0700
+++ b/src/share/classes/java/net/SocketPermission.java	Tue Aug 06 22:47:14 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2012, 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
@@ -110,7 +110,7 @@
  * </pre>
  *
  * is granted to some code, it allows that code to connect to port 7777 on
- * <code>puffin.eng.sun.com</code>, and to accept connections on that port.
+ * {@code puffin.eng.sun.com}, and to accept connections on that port.
  *
  * <p>Similarly, if the following permission:
  *
@@ -788,7 +788,7 @@
      * port range is ignored when p only contains the action, 'resolve'.<p>
      * </ul>
      *
-     * Then <code>implies</code> checks each of the following, in order,
+     * Then {@code implies} checks each of the following, in order,
      * and for each returns true if the stated condition is true:<p>
      * <ul>
      * <li> If this object was initialized with a single IP address and one of <i>p</i>'s
@@ -802,7 +802,7 @@
      * <li>If this canonical name equals <i>p</i>'s canonical name.<p>
      * </ul>
      *
-     * If none of the above are true, <code>implies</code> returns false.
+     * If none of the above are true, {@code implies} returns false.
      * @param p the permission to check against.
      *
      * @return true if the specified permission is implied by this object,
@@ -1131,7 +1131,7 @@
      * <p>
      * SocketPermission objects must be stored in a manner that allows them
      * to be inserted into the collection in any order, but that also enables the
-     * PermissionCollection <code>implies</code>
+     * PermissionCollection {@code implies}
      * method to be implemented in an efficient (and consistent) manner.
      *
      * @return a new PermissionCollection object suitable for storing SocketPermissions.
--- a/src/share/classes/java/net/SocksSocketImpl.java	Tue Aug 06 17:12:37 2013 -0700
+++ b/src/share/classes/java/net/SocksSocketImpl.java	Tue Aug 06 22:47:14 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -315,7 +315,7 @@
      * grants the connections, then the connect is successful and all
      * further traffic will go to the "real" endpoint.
      *
-     * @param   endpoint        the <code>SocketAddress</code> to connect to.
+     * @param   endpoint        the {@code SocketAddress} to connect to.
      * @param   timeout         the timeout value in milliseconds
      * @throws  IOException     if the connection can't be established.
      * @throws  SecurityException if there is a security manager and it
@@ -1032,9 +1032,9 @@
 
 
     /**
-     * Returns the value of this socket's <code>address</code> field.
+     * Returns the value of this socket's {@code address} field.
      *
-     * @return  the value of this socket's <code>address</code> field.
+     * @return  the value of this socket's {@code address} field.
      * @see     java.net.SocketImpl#address
      */
     @Override
@@ -1046,9 +1046,9 @@
     }
 
     /**
-     * Returns the value of this socket's <code>port</code> field.
+     * Returns the value of this socket's {@code port} field.
      *
-     * @return  the value of this socket's <code>port</code> field.
+     * @return  the value of this socket's {@code port} field.
      * @see     java.net.SocketImpl#port
      */
     @Override
--- a/src/share/classes/java/net/URI.java	Tue Aug 06 17:12:37 2013 -0700
+++ b/src/share/classes/java/net/URI.java	Tue Aug 06 22:47:14 2013 -0700
@@ -67,24 +67,24 @@
  * form has the syntax
  *
  * <blockquote>
- * [<i>scheme</i><tt><b>:</b></tt>]<i>scheme-specific-part</i>[<tt><b>#</b></tt><i>fragment</i>]
+ * [<i>scheme</i><b>{@code :}</b>]<i>scheme-specific-part</i>[<b>{@code #}</b><i>fragment</i>]
  * </blockquote>
  *
  * where square brackets [...] delineate optional components and the characters
- * <tt><b>:</b></tt> and <tt><b>#</b></tt> stand for themselves.
+ * <b>{@code :}</b> and <b>{@code #}</b> stand for themselves.
  *
  * <p> An <i>absolute</i> URI specifies a scheme; a URI that is not absolute is
  * said to be <i>relative</i>.  URIs are also classified according to whether
  * they are <i>opaque</i> or <i>hierarchical</i>.
  *
  * <p> An <i>opaque</i> URI is an absolute URI whose scheme-specific part does
- * not begin with a slash character (<tt>'/'</tt>).  Opaque URIs are not
+ * not begin with a slash character ({@code '/'}).  Opaque URIs are not
  * subject to further parsing.  Some examples of opaque URIs are:
  *
  * <blockquote><table cellpadding=0 cellspacing=0 summary="layout">
- * <tr><td><tt>mailto:java-net@java.sun.com</tt><td></tr>
- * <tr><td><tt>news:comp.lang.java</tt><td></tr>
- * <tr><td><tt>urn:isbn:096139210x</tt></td></tr>
+ * <tr><td>{@code mailto:java-net@java.sun.com}<td></tr>
+ * <tr><td>{@code news:comp.lang.java}<td></tr>
+ * <tr><td>{@code urn:isbn:096139210x}</td></tr>
  * </table></blockquote>
  *
  * <p> A <i>hierarchical</i> URI is either an absolute URI whose
@@ -93,20 +93,20 @@
  * URIs are:
  *
  * <blockquote>
- * <tt>http://java.sun.com/j2se/1.3/</tt><br>
- * <tt>docs/guide/collections/designfaq.html#28</tt><br>
- * <tt>../../../demo/jfc/SwingSet2/src/SwingSet2.java</tt><br>
- * <tt>file:///~/calendar</tt>
+ * {@code http://java.sun.com/j2se/1.3/}<br>
+ * {@code docs/guide/collections/designfaq.html#28}<br>
+ * {@code ../../../demo/jfc/SwingSet2/src/SwingSet2.java}<br>
+ * {@code file:///~/calendar}
  * </blockquote>
  *
  * <p> A hierarchical URI is subject to further parsing according to the syntax
  *
  * <blockquote>
- * [<i>scheme</i><tt><b>:</b></tt>][<tt><b>//</b></tt><i>authority</i>][<i>path</i>][<tt><b>?</b></tt><i>query</i>][<tt><b>#</b></tt><i>fragment</i>]
+ * [<i>scheme</i><b>{@code :}</b>][<b>{@code //}</b><i>authority</i>][<i>path</i>][<b>{@code ?}</b><i>query</i>][<b>{@code #}</b><i>fragment</i>]
  * </blockquote>
  *
- * where the characters <tt><b>:</b></tt>, <tt><b>/</b></tt>,
- * <tt><b>?</b></tt>, and <tt><b>#</b></tt> stand for themselves.  The
+ * where the characters <b>{@code :}</b>, <b>{@code /}</b>,
+ * <b>{@code ?}</b>, and <b>{@code #}</b> stand for themselves.  The
  * scheme-specific part of a hierarchical URI consists of the characters
  * between the scheme and fragment components.
  *
@@ -115,16 +115,16 @@
  * parses according to the familiar syntax
  *
  * <blockquote>
- * [<i>user-info</i><tt><b>@</b></tt>]<i>host</i>[<tt><b>:</b></tt><i>port</i>]
+ * [<i>user-info</i><b>{@code @}</b>]<i>host</i>[<b>{@code :}</b><i>port</i>]
  * </blockquote>
  *
- * where the characters <tt><b>@</b></tt> and <tt><b>:</b></tt> stand for
+ * where the characters <b>{@code @}</b> and <b>{@code :}</b> stand for
  * themselves.  Nearly all URI schemes currently in use are server-based.  An
  * authority component that does not parse in this way is considered to be
  * registry-based.
  *
  * <p> The path component of a hierarchical URI is itself said to be absolute
- * if it begins with a slash character (<tt>'/'</tt>); otherwise it is
+ * if it begins with a slash character ({@code '/'}); otherwise it is
  * relative.  The path of a hierarchical URI that is either absolute or
  * specifies an authority is always absolute.
  *
@@ -132,21 +132,21 @@
  *
  * <blockquote><table summary="Describes the components of a URI:scheme,scheme-specific-part,authority,user-info,host,port,path,query,fragment">
  * <tr><th><i>Component</i></th><th><i>Type</i></th></tr>
- * <tr><td>scheme</td><td><tt>String</tt></td></tr>
- * <tr><td>scheme-specific-part&nbsp;&nbsp;&nbsp;&nbsp;</td><td><tt>String</tt></td></tr>
- * <tr><td>authority</td><td><tt>String</tt></td></tr>
- * <tr><td>user-info</td><td><tt>String</tt></td></tr>
- * <tr><td>host</td><td><tt>String</tt></td></tr>
- * <tr><td>port</td><td><tt>int</tt></td></tr>
- * <tr><td>path</td><td><tt>String</tt></td></tr>
- * <tr><td>query</td><td><tt>String</tt></td></tr>
- * <tr><td>fragment</td><td><tt>String</tt></td></tr>
+ * <tr><td>scheme</td><td>{@code String}</td></tr>
+ * <tr><td>scheme-specific-part&nbsp;&nbsp;&nbsp;&nbsp;</td><td>{@code String}</td></tr>
+ * <tr><td>authority</td><td>{@code String}</td></tr>
+ * <tr><td>user-info</td><td>{@code String}</td></tr>
+ * <tr><td>host</td><td>{@code String}</td></tr>
+ * <tr><td>port</td><td>{@code int}</td></tr>
+ * <tr><td>path</td><td>{@code String}</td></tr>
+ * <tr><td>query</td><td>{@code String}</td></tr>
+ * <tr><td>fragment</td><td>{@code String}</td></tr>
  * </table></blockquote>
  *
  * In a given instance any particular component is either <i>undefined</i> or
  * <i>defined</i> with a distinct value.  Undefined string components are
- * represented by <tt>null</tt>, while undefined integer components are
- * represented by <tt>-1</tt>.  A string component may be defined to have the
+ * represented by {@code null}, while undefined integer components are
+ * represented by {@code -1}.  A string component may be defined to have the
  * empty string as its value; this is not equivalent to that component being
  * undefined.
  *
@@ -165,10 +165,10 @@
  * The key operations supported by this class are those of
  * <i>normalization</i>, <i>resolution</i>, and <i>relativization</i>.
  *
- * <p> <i>Normalization</i> is the process of removing unnecessary <tt>"."</tt>
- * and <tt>".."</tt> segments from the path component of a hierarchical URI.
- * Each <tt>"."</tt> segment is simply removed.  A <tt>".."</tt> segment is
- * removed only if it is preceded by a non-<tt>".."</tt> segment.
+ * <p> <i>Normalization</i> is the process of removing unnecessary {@code "."}
+ * and {@code ".."} segments from the path component of a hierarchical URI.
+ * Each {@code "."} segment is simply removed.  A {@code ".."} segment is
+ * removed only if it is preceded by a non-{@code ".."} segment.
  * Normalization has no effect upon opaque URIs.
  *
  * <p> <i>Resolution</i> is the process of resolving one URI against another,
@@ -179,45 +179,47 @@
  * normalized.  The result, for example, of resolving
  *
  * <blockquote>
- * <tt>docs/guide/collections/designfaq.html#28&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt>(1)
+ * {@code docs/guide/collections/designfaq.html#28}
+ * &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+ * &nbsp;&nbsp;&nbsp;&nbsp;(1)
  * </blockquote>
  *
- * against the base URI <tt>http://java.sun.com/j2se/1.3/</tt> is the result
+ * against the base URI {@code http://java.sun.com/j2se/1.3/} is the result
  * URI
  *
  * <blockquote>
- * <tt>http://java.sun.com/j2se/1.3/docs/guide/collections/designfaq.html#28</tt>
+ * {@code http://java.sun.com/j2se/1.3/docs/guide/collections/designfaq.html#28}
  * </blockquote>
  *
  * Resolving the relative URI
  *
  * <blockquote>
- * <tt>../../../demo/jfc/SwingSet2/src/SwingSet2.java&nbsp;&nbsp;&nbsp;&nbsp;</tt>(2)
+ * {@code ../../../demo/jfc/SwingSet2/src/SwingSet2.java}&nbsp;&nbsp;&nbsp;&nbsp;(2)
  * </blockquote>
  *
  * against this result yields, in turn,
  *
  * <blockquote>
- * <tt>http://java.sun.com/j2se/1.3/demo/jfc/SwingSet2/src/SwingSet2.java</tt>
+ * {@code http://java.sun.com/j2se/1.3/demo/jfc/SwingSet2/src/SwingSet2.java}
  * </blockquote>
  *
  * Resolution of both absolute and relative URIs, and of both absolute and
  * relative paths in the case of hierarchical URIs, is supported.  Resolving
- * the URI <tt>file:///~calendar</tt> against any other URI simply yields the
+ * the URI {@code file:///~calendar} against any other URI simply yields the
  * original URI, since it is absolute.  Resolving the relative URI (2) above
  * against the relative base URI (1) yields the normalized, but still relative,
  * URI
  *
  * <blockquote>
- * <tt>demo/jfc/SwingSet2/src/SwingSet2.java</tt>
+ * {@code demo/jfc/SwingSet2/src/SwingSet2.java}
  * </blockquote>
  *
  * <p> <i>Relativization</i>, finally, is the inverse of resolution: For any
  * two normalized URIs <i>u</i> and&nbsp;<i>v</i>,
  *
  * <blockquote>
- *   <i>u</i><tt>.relativize(</tt><i>u</i><tt>.resolve(</tt><i>v</i><tt>)).equals(</tt><i>v</i><tt>)</tt>&nbsp;&nbsp;and<br>
- *   <i>u</i><tt>.resolve(</tt><i>u</i><tt>.relativize(</tt><i>v</i><tt>)).equals(</tt><i>v</i><tt>)</tt>&nbsp;&nbsp;.<br>
+ *   <i>u</i>{@code .relativize(}<i>u</i>{@code .resolve(}<i>v</i>{@code )).equals(}<i>v</i>{@code )}&nbsp;&nbsp;and<br>
+ *   <i>u</i>{@code .resolve(}<i>u</i>{@code .relativize(}<i>v</i>{@code )).equals(}<i>v</i>{@code )}&nbsp;&nbsp;.<br>
  * </blockquote>
  *
  * This operation is often useful when constructing a document containing URIs
@@ -225,16 +227,16 @@
  * possible.  For example, relativizing the URI
  *
  * <blockquote>
- * <tt>http://java.sun.com/j2se/1.3/docs/guide/index.html</tt>
+ * {@code http://java.sun.com/j2se/1.3/docs/guide/index.html}
  * </blockquote>
  *
  * against the base URI
  *
  * <blockquote>
- * <tt>http://java.sun.com/j2se/1.3</tt>
+ * {@code http://java.sun.com/j2se/1.3}
  * </blockquote>
  *
- * yields the relative URI <tt>docs/guide/index.html</tt>.
+ * yields the relative URI {@code docs/guide/index.html}.
  *
  *
  * <h4> Character categories </h4>
@@ -247,26 +249,26 @@
  * <blockquote><table cellspacing=2 summary="Describes categories alpha,digit,alphanum,unreserved,punct,reserved,escaped,and other">
  *   <tr><th valign=top><i>alpha</i></th>
  *       <td>The US-ASCII alphabetic characters,
- *        <tt>'A'</tt>&nbsp;through&nbsp;<tt>'Z'</tt>
- *        and <tt>'a'</tt>&nbsp;through&nbsp;<tt>'z'</tt></td></tr>
+ *        {@code 'A'}&nbsp;through&nbsp;{@code 'Z'}
+ *        and {@code 'a'}&nbsp;through&nbsp;{@code 'z'}</td></tr>
  *   <tr><th valign=top><i>digit</i></th>
  *       <td>The US-ASCII decimal digit characters,
- *       <tt>'0'</tt>&nbsp;through&nbsp;<tt>'9'</tt></td></tr>
+ *       {@code '0'}&nbsp;through&nbsp;{@code '9'}</td></tr>
  *   <tr><th valign=top><i>alphanum</i></th>
  *       <td>All <i>alpha</i> and <i>digit</i> characters</td></tr>
  *   <tr><th valign=top><i>unreserved</i>&nbsp;&nbsp;&nbsp;&nbsp;</th>
  *       <td>All <i>alphanum</i> characters together with those in the string
- *        <tt>"_-!.~'()*"</tt></td></tr>
+ *        {@code "_-!.~'()*"}</td></tr>
  *   <tr><th valign=top><i>punct</i></th>
- *       <td>The characters in the string <tt>",;:$&amp;+="</tt></td></tr>
+ *       <td>The characters in the string {@code ",;:$&+="}</td></tr>
  *   <tr><th valign=top><i>reserved</i></th>
  *       <td>All <i>punct</i> characters together with those in the string
- *        <tt>"?/[]@"</tt></td></tr>
+ *        {@code "?/[]@"}</td></tr>
  *   <tr><th valign=top><i>escaped</i></th>
  *       <td>Escaped octets, that is, triplets consisting of the percent
- *           character (<tt>'%'</tt>) followed by two hexadecimal digits
- *           (<tt>'0'</tt>-<tt>'9'</tt>, <tt>'A'</tt>-<tt>'F'</tt>, and
- *           <tt>'a'</tt>-<tt>'f'</tt>)</td></tr>
+ *           character ({@code '%'}) followed by two hexadecimal digits
+ *           ({@code '0'}-{@code '9'}, {@code 'A'}-{@code 'F'}, and
+ *           {@code 'a'}-{@code 'f'})</td></tr>
  *   <tr><th valign=top><i>other</i></th>
  *       <td>The Unicode characters that are not in the US-ASCII character set,
  *           are not control characters (according to the {@link
@@ -306,14 +308,14 @@
  *
  *   <li><p><a name="encode"></a> A character is <i>encoded</i> by replacing it
  *   with the sequence of escaped octets that represent that character in the
- *   UTF-8 character set.  The Euro currency symbol (<tt>'&#92;u20AC'</tt>),
- *   for example, is encoded as <tt>"%E2%82%AC"</tt>.  <i>(<b>Deviation from
+ *   UTF-8 character set.  The Euro currency symbol ({@code '\u005Cu20AC'}),
+ *   for example, is encoded as {@code "%E2%82%AC"}.  <i>(<b>Deviation from
  *   RFC&nbsp;2396</b>, which does not specify any particular character
  *   set.)</i> </p></li>
  *
  *   <li><p><a name="quote"></a> An illegal character is <i>quoted</i> simply by
  *   encoding it.  The space character, for example, is quoted by replacing it
- *   with <tt>"%20"</tt>.  UTF-8 contains US-ASCII, hence for US-ASCII
+ *   with {@code "%20"}.  UTF-8 contains US-ASCII, hence for US-ASCII
  *   characters this transformation has exactly the effect required by
  *   RFC&nbsp;2396. </p></li>
  *
@@ -325,7 +327,7 @@
  *   decoding any encoded non-US-ASCII characters.  If a <a
  *   href="../nio/charset/CharsetDecoder.html#ce">decoding error</a> occurs
  *   when decoding the escaped octets then the erroneous octets are replaced by
- *   <tt>'&#92;uFFFD'</tt>, the Unicode replacement character.  </p></li>
+ *   {@code '\u005CuFFFD'}, the Unicode replacement character.  </p></li>
  *
  * </ul>
  *
@@ -343,7 +345,7 @@
  *   #URI(java.lang.String,java.lang.String,java.lang.String,int,java.lang.String,java.lang.String,java.lang.String)
  *   multi-argument constructors} quote illegal characters as
  *   required by the components in which they appear.  The percent character
- *   (<tt>'%'</tt>) is always quoted by these constructors.  Any <i>other</i>
+ *   ({@code '%'}) is always quoted by these constructors.  Any <i>other</i>
  *   characters are preserved.  </p></li>
  *
  *   <li><p> The {@link #getRawUserInfo() getRawUserInfo}, {@link #getRawPath()
@@ -379,42 +381,33 @@
  * For any URI <i>u</i>, it is always the case that
  *
  * <blockquote>
- * <tt>new URI(</tt><i>u</i><tt>.toString()).equals(</tt><i>u</i><tt>)</tt>&nbsp;.
+ * {@code new URI(}<i>u</i>{@code .toString()).equals(}<i>u</i>{@code )}&nbsp;.
  * </blockquote>
  *
  * For any URI <i>u</i> that does not contain redundant syntax such as two
- * slashes before an empty authority (as in <tt>file:///tmp/</tt>&nbsp;) or a
+ * slashes before an empty authority (as in {@code file:///tmp/}&nbsp;) or a
  * colon following a host name but no port (as in
- * <tt>http://java.sun.com:</tt>&nbsp;), and that does not encode characters
+ * {@code http://java.sun.com:}&nbsp;), and that does not encode characters
  * except those that must be quoted, the following identities also hold:
- *
- * <blockquote>
- * <tt>new URI(</tt><i>u</i><tt>.getScheme(),<br>
- * &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt><i>u</i><tt>.getSchemeSpecificPart(),<br>
- * &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt><i>u</i><tt>.getFragment())<br>
- * .equals(</tt><i>u</i><tt>)</tt>
- * </blockquote>
- *
+ * <p><pre>
+ *     new URI(<i>u</i>.getScheme(),
+ *             <i>u</i>.getSchemeSpecificPart(),
+ *             <i>u</i>.getFragment())
+ *     .equals(<i>u</i>)</pre>
  * in all cases,
- *
- * <blockquote>
- * <tt>new URI(</tt><i>u</i><tt>.getScheme(),<br>
- * &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt><i>u</i><tt>.getUserInfo(),&nbsp;</tt><i>u</i><tt>.getAuthority(),<br>
- * &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt><i>u</i><tt>.getPath(),&nbsp;</tt><i>u</i><tt>.getQuery(),<br>
- * &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt><i>u</i><tt>.getFragment())<br>
- * .equals(</tt><i>u</i><tt>)</tt>
- * </blockquote>
- *
+ * <p><pre>
+ *     new URI(<i>u</i>.getScheme(),
+ *             <i>u</i>.getUserInfo(), <i>u</i>.getAuthority(),
+ *             <i>u</i>.getPath(), <i>u</i>.getQuery(),
+ *             <i>u</i>.getFragment())
+ *     .equals(<i>u</i>)</pre>
  * if <i>u</i> is hierarchical, and
- *
- * <blockquote>
- * <tt>new URI(</tt><i>u</i><tt>.getScheme(),<br>
- * &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt><i>u</i><tt>.getUserInfo(),&nbsp;</tt><i>u</i><tt>.getHost(),&nbsp;</tt><i>u</i><tt>.getPort(),<br>
- * &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt><i>u</i><tt>.getPath(),&nbsp;</tt><i>u</i><tt>.getQuery(),<br>
- * &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt><i>u</i><tt>.getFragment())<br>
- * .equals(</tt><i>u</i><tt>)</tt>
- * </blockquote>
- *
+ * <p><pre>
+ *     new URI(<i>u</i>.getScheme(),
+ *             <i>u</i>.getUserInfo(), <i>u</i>.getHost(), <i>u</i>.getPort(),
+ *             <i>u</i>.getPath(), <i>u</i>.getQuery(),
+ *             <i>u</i>.getFragment())
+ *     .equals(<i>u</i>)</pre>
  * if <i>u</i> is hierarchical and has either no authority or a server-based
  * authority.
  *
@@ -425,8 +418,8 @@
  * resource <i>locator</i>.  Hence every URL is a URI, abstractly speaking, but
  * not every URI is a URL.  This is because there is another subcategory of
  * URIs, uniform resource <i>names</i> (URNs), which name resources but do not
- * specify how to locate them.  The <tt>mailto</tt>, <tt>news</tt>, and
- * <tt>isbn</tt> URIs shown above are examples of URNs.
+ * specify how to locate them.  The {@code mailto}, {@code news}, and
+ * {@code isbn} URIs shown above are examples of URNs.
  *
  * <p> The conceptual distinction between URIs and URLs is reflected in the
  * differences between this class and the {@link URL} class.
@@ -530,12 +523,12 @@
      * href="http://www.ietf.org/rfc/rfc2396.txt">RFC&nbsp;2396</a>,
      * Appendix&nbsp;A, <b><i>except for the following deviations:</i></b> </p>
      *
-     * <ul type=disc>
+     * <ul>
      *
      *   <li><p> An empty authority component is permitted as long as it is
      *   followed by a non-empty path, a query component, or a fragment
      *   component.  This allows the parsing of URIs such as
-     *   <tt>"file:///foo/bar"</tt>, which seems to be the intent of
+     *   {@code "file:///foo/bar"}, which seems to be the intent of
      *   RFC&nbsp;2396 although the grammar does not permit it.  If the
      *   authority component is empty then the user-information, host, and port
      *   components are undefined. </p></li>
@@ -543,7 +536,7 @@
      *   <li><p> Empty relative paths are permitted; this seems to be the
      *   intent of RFC&nbsp;2396 although the grammar does not permit it.  The
      *   primary consequence of this deviation is that a standalone fragment
-     *   such as <tt>"#foo"</tt> parses as a relative URI with an empty path
+     *   such as {@code "#foo"} parses as a relative URI with an empty path
      *   and the given fragment, and can be usefully <a
      *   href="#resolve-frag">resolved</a> against a base URI.
      *
@@ -560,12 +553,12 @@
      *   href="http://www.ietf.org/rfc/rfc2396.txt">RFC&nbsp;2396</a>
      *   section&nbsp;3.2.2 although the grammar does not permit it. The
      *   consequence of this deviation is that the authority component of a
-     *   hierarchical URI such as <tt>s://123</tt>, will parse as a server-based
+     *   hierarchical URI such as {@code s://123}, will parse as a server-based
      *   authority. </p></li>
      *
      *   <li><p> IPv6 addresses are permitted for the host component.  An IPv6
-     *   address must be enclosed in square brackets (<tt>'['</tt> and
-     *   <tt>']'</tt>) as specified by <a
+     *   address must be enclosed in square brackets ({@code '['} and
+     *   {@code ']'}) as specified by <a
      *   href="http://www.ietf.org/rfc/rfc2732.txt">RFC&nbsp;2732</a>.  The
      *   IPv6 address itself must parse according to <a
      *   href="http://www.ietf.org/rfc/rfc2373.txt">RFC&nbsp;2373</a>.  IPv6
@@ -585,7 +578,7 @@
      * @param  str   The string to be parsed into a URI
      *
      * @throws  NullPointerException
-     *          If <tt>str</tt> is <tt>null</tt>
+     *          If {@code str} is {@code null}
      *
      * @throws  URISyntaxException
      *          If the given string violates RFC&nbsp;2396, as augmented
@@ -599,10 +592,10 @@
      * Constructs a hierarchical URI from the given components.
      *
      * <p> If a scheme is given then the path, if also given, must either be
-     * empty or begin with a slash character (<tt>'/'</tt>).  Otherwise a
-     * component of the new URI may be left undefined by passing <tt>null</tt>
-     * for the corresponding parameter or, in the case of the <tt>port</tt>
-     * parameter, by passing <tt>-1</tt>.
+     * empty or begin with a slash character ({@code '/'}).  Otherwise a
+     * component of the new URI may be left undefined by passing {@code null}
+     * for the corresponding parameter or, in the case of the {@code port}
+     * parameter, by passing {@code -1}.
      *
      * <p> This constructor first builds a URI string from the given components
      * according to the rules specified in <a
@@ -614,37 +607,37 @@
      *   <li><p> Initially, the result string is empty. </p></li>
      *
      *   <li><p> If a scheme is given then it is appended to the result,
-     *   followed by a colon character (<tt>':'</tt>).  </p></li>
+     *   followed by a colon character ({@code ':'}).  </p></li>
      *
      *   <li><p> If user information, a host, or a port are given then the
-     *   string <tt>"//"</tt> is appended.  </p></li>
+     *   string {@code "//"} is appended.  </p></li>
      *
      *   <li><p> If user information is given then it is appended, followed by
-     *   a commercial-at character (<tt>'@'</tt>).  Any character not in the
+     *   a commercial-at character ({@code '@'}).  Any character not in the
      *   <i>unreserved</i>, <i>punct</i>, <i>escaped</i>, or <i>other</i>
      *   categories is <a href="#quote">quoted</a>.  </p></li>
      *
      *   <li><p> If a host is given then it is appended.  If the host is a
      *   literal IPv6 address but is not enclosed in square brackets
-     *   (<tt>'['</tt> and <tt>']'</tt>) then the square brackets are added.
+     *   ({@code '['} and {@code ']'}) then the square brackets are added.
      *   </p></li>
      *
      *   <li><p> If a port number is given then a colon character
-     *   (<tt>':'</tt>) is appended, followed by the port number in decimal.
+     *   ({@code ':'}) is appended, followed by the port number in decimal.
      *   </p></li>
      *
      *   <li><p> If a path is given then it is appended.  Any character not in
      *   the <i>unreserved</i>, <i>punct</i>, <i>escaped</i>, or <i>other</i>
-     *   categories, and not equal to the slash character (<tt>'/'</tt>) or the
-     *   commercial-at character (<tt>'@'</tt>), is quoted.  </p></li>
+     *   categories, and not equal to the slash character ({@code '/'}) or the
+     *   commercial-at character ({@code '@'}), is quoted.  </p></li>
      *
      *   <li><p> If a query is given then a question-mark character
-     *   (<tt>'?'</tt>) is appended, followed by the query.  Any character that
+     *   ({@code '?'}) is appended, followed by the query.  Any character that
      *   is not a <a href="#legal-chars">legal URI character</a> is quoted.
      *   </p></li>
      *
      *   <li><p> Finally, if a fragment is given then a hash character
-     *   (<tt>'#'</tt>) is appended, followed by the fragment.  Any character
+     *   ({@code '#'}) is appended, followed by the fragment.  Any character
      *   that is not a legal URI character is quoted.  </p></li>
      *
      * </ol>
@@ -684,8 +677,8 @@
      * Constructs a hierarchical URI from the given components.
      *
      * <p> If a scheme is given then the path, if also given, must either be
-     * empty or begin with a slash character (<tt>'/'</tt>).  Otherwise a
-     * component of the new URI may be left undefined by passing <tt>null</tt>
+     * empty or begin with a slash character ({@code '/'}).  Otherwise a
+     * component of the new URI may be left undefined by passing {@code null}
      * for the corresponding parameter.
      *
      * <p> This constructor first builds a URI string from the given components
@@ -698,28 +691,28 @@
      *   <li><p> Initially, the result string is empty.  </p></li>
      *
      *   <li><p> If a scheme is given then it is appended to the result,
-     *   followed by a colon character (<tt>':'</tt>).  </p></li>
+     *   followed by a colon character ({@code ':'}).  </p></li>
      *
-     *   <li><p> If an authority is given then the string <tt>"//"</tt> is
+     *   <li><p> If an authority is given then the string {@code "//"} is
      *   appended, followed by the authority.  If the authority contains a
      *   literal IPv6 address then the address must be enclosed in square
-     *   brackets (<tt>'['</tt> and <tt>']'</tt>).  Any character not in the
+     *   brackets ({@code '['} and {@code ']'}).  Any character not in the
      *   <i>unreserved</i>, <i>punct</i>, <i>escaped</i>, or <i>other</i>
      *   categories, and not equal to the commercial-at character
-     *   (<tt>'@'</tt>), is <a href="#quote">quoted</a>.  </p></li>
+     *   ({@code '@'}), is <a href="#quote">quoted</a>.  </p></li>
      *
      *   <li><p> If a path is given then it is appended.  Any character not in
      *   the <i>unreserved</i>, <i>punct</i>, <i>escaped</i>, or <i>other</i>
-     *   categories, and not equal to the slash character (<tt>'/'</tt>) or the
-     *   commercial-at character (<tt>'@'</tt>), is quoted.  </p></li>
+     *   categories, and not equal to the slash character ({@code '/'}) or the
+     *   commercial-at character ({@code '@'}), is quoted.  </p></li>
      *
      *   <li><p> If a query is given then a question-mark character
-     *   (<tt>'?'</tt>) is appended, followed by the query.  Any character that
+     *   ({@code '?'}) is appended, followed by the query.  Any character that
      *   is not a <a href="#legal-chars">legal URI character</a> is quoted.
      *   </p></li>
      *
      *   <li><p> Finally, if a fragment is given then a hash character
-     *   (<tt>'#'</tt>) is appended, followed by the fragment.  Any character
+     *   ({@code '#'}) is appended, followed by the fragment.  Any character
      *   that is not a legal URI character is quoted.  </p></li>
      *
      * </ol>
@@ -756,15 +749,15 @@
     /**
      * Constructs a hierarchical URI from the given components.
      *
-     * <p> A component may be left undefined by passing <tt>null</tt>.
+     * <p> A component may be left undefined by passing {@code null}.
      *
      * <p> This convenience constructor works as if by invoking the
      * seven-argument constructor as follows:
      *
-     * <blockquote><tt>
-     * new&nbsp;{@link #URI(String, String, String, int, String, String, String)
-     * URI}(scheme,&nbsp;null,&nbsp;host,&nbsp;-1,&nbsp;path,&nbsp;null,&nbsp;fragment);
-     * </tt></blockquote>
+     * <blockquote>
+     * {@code new} {@link #URI(String, String, String, int, String, String, String)
+     * URI}{@code (scheme, null, host, -1, path, null, fragment);}
+     * </blockquote>
      *
      * @param   scheme    Scheme name
      * @param   host      Host name
@@ -784,7 +777,7 @@
     /**
      * Constructs a URI from the given components.
      *
-     * <p> A component may be left undefined by passing <tt>null</tt>.
+     * <p> A component may be left undefined by passing {@code null}.
      *
      * <p> This constructor first builds a URI in string form using the given
      * components as follows:  </p>
@@ -794,14 +787,14 @@
      *   <li><p> Initially, the result string is empty.  </p></li>
      *
      *   <li><p> If a scheme is given then it is appended to the result,
-     *   followed by a colon character (<tt>':'</tt>).  </p></li>
+     *   followed by a colon character ({@code ':'}).  </p></li>
      *
      *   <li><p> If a scheme-specific part is given then it is appended.  Any
      *   character that is not a <a href="#legal-chars">legal URI character</a>
      *   is <a href="#quote">quoted</a>.  </p></li>
      *
      *   <li><p> Finally, if a fragment is given then a hash character
-     *   (<tt>'#'</tt>) is appended to the string, followed by the fragment.
+     *   ({@code '#'}) is appended to the string, followed by the fragment.
      *   Any character that is not a legal URI character is quoted.  </p></li>
      *
      * </ol>
@@ -847,7 +840,7 @@
      * @return The new URI
      *
      * @throws  NullPointerException
-     *          If <tt>str</tt> is <tt>null</tt>
+     *          If {@code str} is {@code null}
      *
      * @throws  IllegalArgumentException
      *          If the given string violates RFC&nbsp;2396
@@ -882,7 +875,7 @@
      * cannot always distinguish a malformed server-based authority from a
      * legitimate registry-based authority.  It must therefore treat some
      * instances of the former as instances of the latter.  The authority
-     * component in the URI string <tt>"//foo:bar"</tt>, for example, is not a
+     * component in the URI string {@code "//foo:bar"}, for example, is not a
      * legal server-based authority but it is legal as a registry-based
      * authority.
      *
@@ -892,7 +885,7 @@
      * treated as an error.  In these cases a statement such as
      *
      * <blockquote>
-     * <tt>URI </tt><i>u</i><tt> = new URI(str).parseServerAuthority();</tt>
+     * {@code URI }<i>u</i>{@code  = new URI(str).parseServerAuthority();}
      * </blockquote>
      *
      * <p> can be used to ensure that <i>u</i> always refers to a URI that, if
@@ -936,26 +929,26 @@
      *
      * <ol>
      *
-     *   <li><p> All <tt>"."</tt> segments are removed. </p></li>
+     *   <li><p> All {@code "."} segments are removed. </p></li>
      *
-     *   <li><p> If a <tt>".."</tt> segment is preceded by a non-<tt>".."</tt>
+     *   <li><p> If a {@code ".."} segment is preceded by a non-{@code ".."}
      *   segment then both of these segments are removed.  This step is
      *   repeated until it is no longer applicable. </p></li>
      *
      *   <li><p> If the path is relative, and if its first segment contains a
-     *   colon character (<tt>':'</tt>), then a <tt>"."</tt> segment is
+     *   colon character ({@code ':'}), then a {@code "."} segment is
      *   prepended.  This prevents a relative URI with a path such as
-     *   <tt>"a:b/c/d"</tt> from later being re-parsed as an opaque URI with a
-     *   scheme of <tt>"a"</tt> and a scheme-specific part of <tt>"b/c/d"</tt>.
+     *   {@code "a:b/c/d"} from later being re-parsed as an opaque URI with a
+     *   scheme of {@code "a"} and a scheme-specific part of {@code "b/c/d"}.
      *   <b><i>(Deviation from RFC&nbsp;2396)</i></b> </p></li>
      *
      * </ol>
      *
-     * <p> A normalized path will begin with one or more <tt>".."</tt> segments
-     * if there were insufficient non-<tt>".."</tt> segments preceding them to
-     * allow their removal.  A normalized path will begin with a <tt>"."</tt>
+     * <p> A normalized path will begin with one or more {@code ".."} segments
+     * if there were insufficient non-{@code ".."} segments preceding them to
+     * allow their removal.  A normalized path will begin with a {@code "."}
      * segment if one was inserted by step 3 above.  Otherwise, a normalized
-     * path will not contain any <tt>"."</tt> or <tt>".."</tt> segments. </p>
+     * path will not contain any {@code "."} or {@code ".."} segments. </p>
      *
      * @return  A URI equivalent to this URI,
      *          but whose path is in normal form
@@ -975,7 +968,7 @@
      * query components are undefined, then a URI with the given fragment but
      * with all other components equal to those of this URI is returned.  This
      * allows a URI representing a standalone fragment reference, such as
-     * <tt>"#foo"</tt>, to be usefully resolved against a base URI.
+     * {@code "#foo"}, to be usefully resolved against a base URI.
      *
      * <p> Otherwise this method constructs a new hierarchical URI in a manner
      * consistent with <a
@@ -993,7 +986,7 @@
      *   <li><p> Otherwise the new URI's authority component is copied from
      *   this URI, and its path is computed as follows: </p>
      *
-     *   <ol type=a>
+     *   <ol>
      *
      *     <li><p> If the given URI's path is absolute then the new URI's path
      *     is taken from the given URI. </p></li>
@@ -1016,7 +1009,7 @@
      * @return The resulting URI
      *
      * @throws  NullPointerException
-     *          If <tt>uri</tt> is <tt>null</tt>
+     *          If {@code uri} is {@code null}
      */
     public URI resolve(URI uri) {
         return resolve(this, uri);
@@ -1027,14 +1020,14 @@
      * against this URI.
      *
      * <p> This convenience method works as if invoking it were equivalent to
-     * evaluating the expression <tt>{@link #resolve(java.net.URI)
-     * resolve}(URI.{@link #create(String) create}(str))</tt>. </p>
+     * evaluating the expression {@link #resolve(java.net.URI)
+     * resolve}{@code (URI.}{@link #create(String) create}{@code (str))}. </p>
      *
      * @param  str   The string to be parsed into a URI
      * @return The resulting URI
      *
      * @throws  NullPointerException
-     *          If <tt>str</tt> is <tt>null</tt>
+     *          If {@code str} is {@code null}
      *
      * @throws  IllegalArgumentException
      *          If the given string violates RFC&nbsp;2396
@@ -1067,7 +1060,7 @@
      * @return The resulting URI
      *
      * @throws  NullPointerException
-     *          If <tt>uri</tt> is <tt>null</tt>
+     *          If {@code uri} is {@code null}
      */
     public URI relativize(URI uri) {
         return relativize(this, uri);
@@ -1077,7 +1070,7 @@
      * Constructs a URL from this URI.
      *
      * <p> This convenience method works as if invoking it were equivalent to
-     * evaluating the expression <tt>new&nbsp;URL(this.toString())</tt> after
+     * evaluating the expression {@code new URL(this.toString())} after
      * first checking that this URI is absolute. </p>
      *
      * @return  A URL constructed from this URI
@@ -1102,14 +1095,14 @@
      * Returns the scheme component of this URI.
      *
      * <p> The scheme component of a URI, if defined, only contains characters
-     * in the <i>alphanum</i> category and in the string <tt>"-.+"</tt>.  A
+     * in the <i>alphanum</i> category and in the string {@code "-.+"}.  A
      * scheme always starts with an <i>alpha</i> character. <p>
      *
      * The scheme component of a URI cannot contain escaped octets, hence this
      * method does not perform any decoding.
      *
      * @return  The scheme component of this URI,
-     *          or <tt>null</tt> if the scheme is undefined
+     *          or {@code null} if the scheme is undefined
      */
     public String getScheme() {
         return scheme;
@@ -1120,7 +1113,7 @@
      *
      * <p> A URI is absolute if, and only if, it has a scheme component. </p>
      *
-     * @return  <tt>true</tt> if, and only if, this URI is absolute
+     * @return  {@code true} if, and only if, this URI is absolute
      */
     public boolean isAbsolute() {
         return scheme != null;
@@ -1134,7 +1127,7 @@
      * An opaque URI has a scheme, a scheme-specific part, and possibly
      * a fragment; all other components are undefined. </p>
      *
-     * @return  <tt>true</tt> if, and only if, this URI is opaque
+     * @return  {@code true} if, and only if, this URI is opaque
      */
     public boolean isOpaque() {
         return path == null;
@@ -1148,7 +1141,7 @@
      * characters. </p>
      *
      * @return  The raw scheme-specific part of this URI
-     *          (never <tt>null</tt>)
+     *          (never {@code null})
      */
     public String getRawSchemeSpecificPart() {
         defineSchemeSpecificPart();
@@ -1164,7 +1157,7 @@
      * href="#decode">decoded</a>.  </p>
      *
      * @return  The decoded scheme-specific part of this URI
-     *          (never <tt>null</tt>)
+     *          (never {@code null})
      */
     public String getSchemeSpecificPart() {
         if (decodedSchemeSpecificPart == null)
@@ -1176,14 +1169,14 @@
      * Returns the raw authority component of this URI.
      *
      * <p> The authority component of a URI, if defined, only contains the
-     * commercial-at character (<tt>'@'</tt>) and characters in the
+     * commercial-at character ({@code '@'}) and characters in the
      * <i>unreserved</i>, <i>punct</i>, <i>escaped</i>, and <i>other</i>
      * categories.  If the authority is server-based then it is further
      * constrained to have valid user-information, host, and port
      * components. </p>
      *
      * @return  The raw authority component of this URI,
-     *          or <tt>null</tt> if the authority is undefined
+     *          or {@code null} if the authority is undefined
      */
     public String getRawAuthority() {
         return authority;
@@ -1197,7 +1190,7 @@
      * sequences of escaped octets are <a href="#decode">decoded</a>.  </p>
      *
      * @return  The decoded authority component of this URI,
-     *          or <tt>null</tt> if the authority is undefined
+     *          or {@code null} if the authority is undefined
      */
     public String getAuthority() {
         if (decodedAuthority == null)
@@ -1213,7 +1206,7 @@
      * <i>other</i> categories. </p>
      *
      * @return  The raw user-information component of this URI,
-     *          or <tt>null</tt> if the user information is undefined
+     *          or {@code null} if the user information is undefined
      */
     public String getRawUserInfo() {
         return userInfo;
@@ -1227,7 +1220,7 @@
      * sequences of escaped octets are <a href="#decode">decoded</a>.  </p>
      *
      * @return  The decoded user-information component of this URI,
-     *          or <tt>null</tt> if the user information is undefined
+     *          or {@code null} if the user information is undefined
      */
     public String getUserInfo() {
         if ((decodedUserInfo == null) && (userInfo != null))
@@ -1241,24 +1234,24 @@
      * <p> The host component of a URI, if defined, will have one of the
      * following forms: </p>
      *
-     * <ul type=disc>
+     * <ul>
      *
      *   <li><p> A domain name consisting of one or more <i>labels</i>
-     *   separated by period characters (<tt>'.'</tt>), optionally followed by
+     *   separated by period characters ({@code '.'}), optionally followed by
      *   a period character.  Each label consists of <i>alphanum</i> characters
-     *   as well as hyphen characters (<tt>'-'</tt>), though hyphens never
+     *   as well as hyphen characters ({@code '-'}), though hyphens never
      *   occur as the first or last characters in a label. The rightmost
      *   label of a domain name consisting of two or more labels, begins
      *   with an <i>alpha</i> character. </li>
      *
      *   <li><p> A dotted-quad IPv4 address of the form
-     *   <i>digit</i><tt>+.</tt><i>digit</i><tt>+.</tt><i>digit</i><tt>+.</tt><i>digit</i><tt>+</tt>,
+     *   <i>digit</i>{@code +.}<i>digit</i>{@code +.}<i>digit</i>{@code +.}<i>digit</i>{@code +},
      *   where no <i>digit</i> sequence is longer than three characters and no
      *   sequence has a value larger than 255. </p></li>
      *
-     *   <li><p> An IPv6 address enclosed in square brackets (<tt>'['</tt> and
-     *   <tt>']'</tt>) and consisting of hexadecimal digits, colon characters
-     *   (<tt>':'</tt>), and possibly an embedded IPv4 address.  The full
+     *   <li><p> An IPv6 address enclosed in square brackets ({@code '['} and
+     *   {@code ']'}) and consisting of hexadecimal digits, colon characters
+     *   ({@code ':'}), and possibly an embedded IPv4 address.  The full
      *   syntax of IPv6 addresses is specified in <a
      *   href="http://www.ietf.org/rfc/rfc2373.txt"><i>RFC&nbsp;2373: IPv6
      *   Addressing Architecture</i></a>.  </p></li>
@@ -1269,7 +1262,7 @@
      * method does not perform any decoding.
      *
      * @return  The host component of this URI,
-     *          or <tt>null</tt> if the host is undefined
+     *          or {@code null} if the host is undefined
      */
     public String getHost() {
         return host;
@@ -1282,7 +1275,7 @@
      * integer. </p>
      *
      * @return  The port component of this URI,
-     *          or <tt>-1</tt> if the port is undefined
+     *          or {@code -1} if the port is undefined
      */
     public int getPort() {
         return port;
@@ -1292,12 +1285,12 @@
      * Returns the raw path component of this URI.
      *
      * <p> The path component of a URI, if defined, only contains the slash
-     * character (<tt>'/'</tt>), the commercial-at character (<tt>'@'</tt>),
+     * character ({@code '/'}), the commercial-at character ({@code '@'}),
      * and characters in the <i>unreserved</i>, <i>punct</i>, <i>escaped</i>,
      * and <i>other</i> categories. </p>
      *
      * @return  The path component of this URI,
-     *          or <tt>null</tt> if the path is undefined
+     *          or {@code null} if the path is undefined
      */
     public String getRawPath() {
         return path;
@@ -1311,7 +1304,7 @@
      * escaped octets are <a href="#decode">decoded</a>.  </p>
      *
      * @return  The decoded path component of this URI,
-     *          or <tt>null</tt> if the path is undefined
+     *          or {@code null} if the path is undefined
      */
     public String getPath() {
         if ((decodedPath == null) && (path != null))
@@ -1326,7 +1319,7 @@
      * characters. </p>
      *
      * @return  The raw query component of this URI,
-     *          or <tt>null</tt> if the query is undefined
+     *          or {@code null} if the query is undefined
      */
     public String getRawQuery() {
         return query;
@@ -1340,7 +1333,7 @@
      * escaped octets are <a href="#decode">decoded</a>.  </p>
      *
      * @return  The decoded query component of this URI,
-     *          or <tt>null</tt> if the query is undefined
+     *          or {@code null} if the query is undefined
      */
     public String getQuery() {
         if ((decodedQuery == null) && (query != null))
@@ -1355,7 +1348,7 @@
      * characters. </p>
      *
      * @return  The raw fragment component of this URI,
-     *          or <tt>null</tt> if the fragment is undefined
+     *          or {@code null} if the fragment is undefined
      */
     public String getRawFragment() {
         return fragment;
@@ -1369,7 +1362,7 @@
      * sequences of escaped octets are <a href="#decode">decoded</a>.  </p>
      *
      * @return  The decoded fragment component of this URI,
-     *          or <tt>null</tt> if the fragment is undefined
+     *          or {@code null} if the fragment is undefined
      */
     public String getFragment() {
         if ((decodedFragment == null) && (fragment != null))
@@ -1384,7 +1377,7 @@
      * Tests this URI for equality with another object.
      *
      * <p> If the given object is not a URI then this method immediately
-     * returns <tt>false</tt>.
+     * returns {@code false}.
      *
      * <p> For two URIs to be considered equal requires that either both are
      * opaque or both are hierarchical.  Their schemes must either both be
@@ -1414,7 +1407,7 @@
      *
      * @param   ob   The object to which this object is to be compared
      *
-     * @return  <tt>true</tt> if, and only if, the given object is a URI that
+     * @return  {@code true} if, and only if, the given object is a URI that
      *          is identical to this URI
      */
     public boolean equals(Object ob) {
@@ -1495,7 +1488,7 @@
      *
      * <p> The ordering of URIs is defined as follows: </p>
      *
-     * <ul type=disc>
+     * <ul>
      *
      *   <li><p> Two URIs with different schemes are ordered according the
      *   ordering of their schemes, without regard to case. </p></li>
@@ -1513,7 +1506,7 @@
      *   <li><p> Two hierarchical URIs with identical schemes are ordered
      *   according to the ordering of their authority components: </p>
      *
-     *   <ul type=disc>
+     *   <ul>
      *
      *     <li><p> If both authority components are server-based then the URIs
      *     are ordered according to their user-information components; if these
@@ -1635,7 +1628,7 @@
     /**
      * Saves the content of this URI to the given serial stream.
      *
-     * <p> The only serializable field of a URI instance is its <tt>string</tt>
+     * <p> The only serializable field of a URI instance is its {@code string}
      * field.  That field is given a value, if it does not have one already,
      * and then the {@link java.io.ObjectOutputStream#defaultWriteObject()}
      * method of the given object-output stream is invoked. </p>
@@ -1654,7 +1647,7 @@
      * Reconstitutes a URI from the given serial stream.
      *
      * <p> The {@link java.io.ObjectInputStream#defaultReadObject()} method is
-     * invoked to read the value of the <tt>string</tt> field.  The result is
+     * invoked to read the value of the {@code string} field.  The result is
      * then parsed in the usual way.
      *
      * @param  is  The object-input stream from which this object
--- a/src/share/classes/java/net/URISyntaxException.java	Tue Aug 06 17:12:37 2013 -0700
+++ b/src/share/classes/java/net/URISyntaxException.java	Tue Aug 06 22:47:14 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -50,13 +50,13 @@
      * @param  input   The input string
      * @param  reason  A string explaining why the input could not be parsed
      * @param  index   The index at which the parse error occurred,
-     *                 or <tt>-1</tt> if the index is not known
+     *                 or {@code -1} if the index is not known
      *
      * @throws  NullPointerException
-     *          If either the input or reason strings are <tt>null</tt>
+     *          If either the input or reason strings are {@code null}
      *
      * @throws  IllegalArgumentException
-     *          If the error index is less than <tt>-1</tt>
+     *          If the error index is less than {@code -1}
      */
     public URISyntaxException(String input, String reason, int index) {
         super(reason);
@@ -70,13 +70,13 @@
 
     /**
      * Constructs an instance from the given input string and reason.  The
-     * resulting object will have an error index of <tt>-1</tt>.
+     * resulting object will have an error index of {@code -1}.
      *
      * @param  input   The input string
      * @param  reason  A string explaining why the input could not be parsed
      *
      * @throws  NullPointerException
-     *          If either the input or reason strings are <tt>null</tt>
+     *          If either the input or reason strings are {@code null}
      */
     public URISyntaxException(String input, String reason) {
         this(input, reason, -1);
@@ -102,7 +102,7 @@
 
     /**
      * Returns an index into the input string of the position at which the
-     * parse error occurred, or <tt>-1</tt> if this position is not known.
+     * parse error occurred, or {@code -1} if this position is not known.
      *
      * @return  The error index
      */
@@ -113,8 +113,8 @@
     /**
      * Returns a string describing the parse error.  The resulting string
      * consists of the reason string followed by a colon character
-     * (<tt>':'</tt>), a space, and the input string.  If the error index is
-     * defined then the string <tt>" at index "</tt> followed by the index, in
+     * ({@code ':'}), a space, and the input string.  If the error index is
+     * defined then the string {@code " at index "} followed by the index, in
      * decimal, is inserted after the reason string and before the colon
      * character.
      *
--- a/src/share/classes/java/net/URL.java	Tue Aug 06 17:12:37 2013 -0700
+++ b/src/share/classes/java/net/URL.java	Tue Aug 06 22:47:14 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1995, 2012, 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
@@ -32,7 +32,7 @@
 import sun.security.util.SecurityConstants;
 
 /**
- * Class <code>URL</code> represents a Uniform Resource
+ * Class {@code URL} represents a Uniform Resource
  * Locator, a pointer to a "resource" on the World
  * Wide Web. A resource can be something as simple as a file or a
  * directory, or it can be a reference to a more complicated object,
@@ -49,10 +49,10 @@
  * </pre></blockquote>
  * <p>
  * The URL above indicates that the protocol to use is
- * <code>http</code> (HyperText Transfer Protocol) and that the
+ * {@code http} (HyperText Transfer Protocol) and that the
  * information resides on a host machine named
- * <code>www.example.com</code>. The information on that host
- * machine is named <code>/docs/resource1.html</code>. The exact
+ * {@code www.example.com}. The information on that host
+ * machine is named {@code /docs/resource1.html}. The exact
  * meaning of this name on the host machine is both protocol
  * dependent and host dependent. The information normally resides in
  * a file, but it could be generated on the fly. This component of
@@ -62,13 +62,13 @@
  * port number to which the TCP connection is made on the remote host
  * machine. If the port is not specified, the default port for
  * the protocol is used instead. For example, the default port for
- * <code>http</code> is <code>80</code>. An alternative port could be
+ * {@code http} is {@code 80}. An alternative port could be
  * specified as:
  * <blockquote><pre>
  *     http://www.example.com:1080/docs/resource1.html
  * </pre></blockquote>
  * <p>
- * The syntax of <code>URL</code> is defined by  <a
+ * The syntax of {@code URL} is defined by  <a
  * href="http://www.ietf.org/rfc/rfc2396.txt"><i>RFC&nbsp;2396: Uniform
  * Resource Identifiers (URI): Generic Syntax</i></a>, amended by <a
  * href="http://www.ietf.org/rfc/rfc2732.txt"><i>RFC&nbsp;2732: Format for
@@ -86,7 +86,7 @@
  * This fragment is not technically part of the URL. Rather, it
  * indicates that after the specified resource is retrieved, the
  * application is specifically interested in that part of the
- * document that has the tag <code>chapter1</code> attached to it. The
+ * document that has the tag {@code chapter1} attached to it. The
  * meaning of a tag is resource specific.
  * <p>
  * An application can also specify a "relative URL",
@@ -170,8 +170,8 @@
     private int port = -1;
 
     /**
-     * The specified file name on that host. <code>file</code> is
-     * defined as <code>path[?query]</code>
+     * The specified file name on that host. {@code file} is
+     * defined as {@code path[?query]}
      * @serial
      */
     private String file;
@@ -220,42 +220,42 @@
     private int hashCode = -1;
 
     /**
-     * Creates a <code>URL</code> object from the specified
-     * <code>protocol</code>, <code>host</code>, <code>port</code>
-     * number, and <code>file</code>.<p>
+     * Creates a {@code URL} object from the specified
+     * {@code protocol}, {@code host}, {@code port}
+     * number, and {@code file}.<p>
      *
-     * <code>host</code> can be expressed as a host name or a literal
+     * {@code host} can be expressed as a host name or a literal
      * IP address. If IPv6 literal address is used, it should be
-     * enclosed in square brackets (<tt>'['</tt> and <tt>']'</tt>), as
+     * enclosed in square brackets ({@code '['} and {@code ']'}), as
      * specified by <a
      * href="http://www.ietf.org/rfc/rfc2732.txt">RFC&nbsp;2732</a>;
      * However, the literal IPv6 address format defined in <a
      * href="http://www.ietf.org/rfc/rfc2373.txt"><i>RFC&nbsp;2373: IP
      * Version 6 Addressing Architecture</i></a> is also accepted.<p>
      *
-     * Specifying a <code>port</code> number of <code>-1</code>
+     * Specifying a {@code port} number of {@code -1}
      * indicates that the URL should use the default port for the
      * protocol.<p>
      *
      * If this is the first URL object being created with the specified
      * protocol, a <i>stream protocol handler</i> object, an instance of
-     * class <code>URLStreamHandler</code>, is created for that protocol:
+     * class {@code URLStreamHandler}, is created for that protocol:
      * <ol>
      * <li>If the application has previously set up an instance of
-     *     <code>URLStreamHandlerFactory</code> as the stream handler factory,
-     *     then the <code>createURLStreamHandler</code> method of that instance
+     *     {@code URLStreamHandlerFactory} as the stream handler factory,
+     *     then the {@code createURLStreamHandler} method of that instance
      *     is called with the protocol string as an argument to create the
      *     stream protocol handler.
-     * <li>If no <code>URLStreamHandlerFactory</code> has yet been set up,
-     *     or if the factory's <code>createURLStreamHandler</code> method
-     *     returns <code>null</code>, then the constructor finds the
+     * <li>If no {@code URLStreamHandlerFactory} has yet been set up,
+     *     or if the factory's {@code createURLStreamHandler} method
+     *     returns {@code null}, then the constructor finds the
      *     value of the system property:
      *     <blockquote><pre>
      *         java.protocol.handler.pkgs
      *     </pre></blockquote>
-     *     If the value of that system property is not <code>null</code>,
+     *     If the value of that system property is not {@code null},
      *     it is interpreted as a list of packages separated by a vertical
-     *     slash character '<code>|</code>'. The constructor tries to load
+     *     slash character '{@code |}'. The constructor tries to load
      *     the class named:
      *     <blockquote><pre>
      *         &lt;<i>package</i>&gt;.&lt;<i>protocol</i>&gt;.Handler
@@ -263,7 +263,7 @@
      *     where &lt;<i>package</i>&gt; is replaced by the name of the package
      *     and &lt;<i>protocol</i>&gt; is replaced by the name of the protocol.
      *     If this class does not exist, or if the class exists but it is not
-     *     a subclass of <code>URLStreamHandler</code>, then the next package
+     *     a subclass of {@code URLStreamHandler}, then the next package
      *     in the list is tried.
      * <li>If the previous step fails to find a protocol handler, then the
      *     constructor tries to load from a system default package.
@@ -271,8 +271,8 @@
      *         &lt;<i>system default package</i>&gt;.&lt;<i>protocol</i>&gt;.Handler
      *     </pre></blockquote>
      *     If this class does not exist, or if the class exists but it is not a
-     *     subclass of <code>URLStreamHandler</code>, then a
-     *     <code>MalformedURLException</code> is thrown.
+     *     subclass of {@code URLStreamHandler}, then a
+     *     {@code MalformedURLException} is thrown.
      * </ol>
      *
      * <p>Protocol handlers for the following protocols are guaranteed
@@ -304,13 +304,13 @@
     }
 
     /**
-     * Creates a URL from the specified <code>protocol</code>
-     * name, <code>host</code> name, and <code>file</code> name. The
+     * Creates a URL from the specified {@code protocol}
+     * name, {@code host} name, and {@code file} name. The
      * default port for the specified protocol is used.
      * <p>
      * This method is equivalent to calling the four-argument
-     * constructor with the arguments being <code>protocol</code>,
-     * <code>host</code>, <code>-1</code>, and <code>file</code>.
+     * constructor with the arguments being {@code protocol},
+     * {@code host}, {@code -1}, and {@code file}.
      *
      * No validation of the inputs is performed by this constructor.
      *
@@ -327,21 +327,21 @@
     }
 
     /**
-     * Creates a <code>URL</code> object from the specified
-     * <code>protocol</code>, <code>host</code>, <code>port</code>
-     * number, <code>file</code>, and <code>handler</code>. Specifying
-     * a <code>port</code> number of <code>-1</code> indicates that
+     * Creates a {@code URL} object from the specified
+     * {@code protocol}, {@code host}, {@code port}
+     * number, {@code file}, and {@code handler}. Specifying
+     * a {@code port} number of {@code -1} indicates that
      * the URL should use the default port for the protocol. Specifying
-     * a <code>handler</code> of <code>null</code> indicates that the URL
+     * a {@code handler} of {@code null} indicates that the URL
      * should use a default stream handler for the protocol, as outlined
      * for:
      *     java.net.URL#URL(java.lang.String, java.lang.String, int,
      *                      java.lang.String)
      *
      * <p>If the handler is not null and there is a security manager,
-     * the security manager's <code>checkPermission</code>
+     * the security manager's {@code checkPermission}
      * method is called with a
-     * <code>NetPermission("specifyStreamHandler")</code> permission.
+     * {@code NetPermission("specifyStreamHandler")} permission.
      * This may result in a SecurityException.
      *
      * No validation of the inputs is performed by this constructor.
@@ -354,7 +354,7 @@
      * @exception  MalformedURLException  if an unknown protocol is specified.
      * @exception  SecurityException
      *        if a security manager exists and its
-     *        <code>checkPermission</code> method doesn't allow
+     *        {@code checkPermission} method doesn't allow
      *        specifying a stream handler explicitly.
      * @see        java.lang.System#getProperty(java.lang.String)
      * @see        java.net.URL#setURLStream