提交 d059d247 编写于 作者: L lana

Merge

...@@ -222,3 +222,4 @@ a2a2a91075ad85becbe10a39d7fd04ef9bea8df5 jdk8-b92 ...@@ -222,3 +222,4 @@ a2a2a91075ad85becbe10a39d7fd04ef9bea8df5 jdk8-b92
c4908732fef5235f1b98cafe0ce507771ef7892c jdk8-b98 c4908732fef5235f1b98cafe0ce507771ef7892c jdk8-b98
6a099a36589bd933957272ba63e5263bede29971 jdk8-b99 6a099a36589bd933957272ba63e5263bede29971 jdk8-b99
5be9c5bfcfe9b2a40412b4fb364377d49de014eb jdk8-b100 5be9c5bfcfe9b2a40412b4fb364377d49de014eb jdk8-b100
6901612328239fbd471d20823113c1cf3fdaebee jdk8-b101
...@@ -31,6 +31,7 @@ import java.awt.peer.MenuComponentPeer; ...@@ -31,6 +31,7 @@ import java.awt.peer.MenuComponentPeer;
import javax.swing.*; import javax.swing.*;
import javax.swing.plaf.MenuBarUI; import javax.swing.plaf.MenuBarUI;
import com.apple.laf.ScreenMenuBar;
import sun.lwawt.macosx.CMenuBar; import sun.lwawt.macosx.CMenuBar;
import com.apple.laf.AquaMenuBarUI; import com.apple.laf.AquaMenuBarUI;
...@@ -72,12 +73,15 @@ class _AppMenuBarHandler { ...@@ -72,12 +73,15 @@ class _AppMenuBarHandler {
// scan the current frames, and see if any are foreground // scan the current frames, and see if any are foreground
final Frame[] frames = Frame.getFrames(); final Frame[] frames = Frame.getFrames();
for (final Frame frame : frames) { 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 // if we have no foreground frames, then we have to "kick" the menubar
final JFrame pingFrame = new JFrame(); final JFrame pingFrame = new JFrame();
pingFrame.getRootPane().putClientProperty("Window.alpha", new Float(0.0f)); pingFrame.getRootPane().putClientProperty("Window.alpha", new Float(0.0f));
pingFrame.setUndecorated(true);
pingFrame.setVisible(true); pingFrame.setVisible(true);
pingFrame.toFront(); pingFrame.toFront();
pingFrame.setVisible(false); pingFrame.setVisible(false);
...@@ -101,7 +105,6 @@ class _AppMenuBarHandler { ...@@ -101,7 +105,6 @@ class _AppMenuBarHandler {
// Aqua was not installed // Aqua was not installed
throw new IllegalStateException("Application.setDefaultMenuBar() only works with the Aqua Look and Feel"); 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 AquaMenuBarUI aquaUI = (AquaMenuBarUI)ui;
final ScreenMenuBar screenMenuBar = aquaUI.getScreenMenuBar(); final ScreenMenuBar screenMenuBar = aquaUI.getScreenMenuBar();
...@@ -118,8 +121,7 @@ class _AppMenuBarHandler { ...@@ -118,8 +121,7 @@ class _AppMenuBarHandler {
} }
// grab the pointer to the CMenuBar, and retain it in native // grab the pointer to the CMenuBar, and retain it in native
nativeSetDefaultMenuBar(((CMenuBar)peer).getNativeMenuBarPeer()); nativeSetDefaultMenuBar(((CMenuBar)peer).getModel());
*/
} }
void setAboutMenuItemVisible(final boolean present) { void setAboutMenuItemVisible(final boolean present) {
......
...@@ -182,7 +182,11 @@ public class CDataTransferer extends DataTransferer { ...@@ -182,7 +182,11 @@ public class CDataTransferer extends DataTransferer {
Long format = predefinedClipboardNameMap.get(str); Long format = predefinedClipboardNameMap.get(str);
if (format == null) { 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); predefinedClipboardNameMap.put(str, format);
predefinedClipboardFormatMap.put(format, str); predefinedClipboardFormatMap.put(format, str);
} }
......
...@@ -43,7 +43,7 @@ public abstract class CMenuComponent implements MenuComponentPeer { ...@@ -43,7 +43,7 @@ public abstract class CMenuComponent implements MenuComponentPeer {
return target; return target;
} }
long getModel() { public long getModel() {
return modelPtr; return modelPtr;
} }
......
...@@ -47,7 +47,7 @@ import com.apple.laf.ClientPropertyApplicator.Property; ...@@ -47,7 +47,7 @@ import com.apple.laf.ClientPropertyApplicator.Property;
import com.sun.awt.AWTUtilities; import com.sun.awt.AWTUtilities;
public class CPlatformWindow extends CFRetainedResource implements PlatformWindow { 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 nativeSetNSWindowStyleBits(long nsWindowPtr, int mask, int data);
private static native void nativeSetNSWindowMenuBar(long nsWindowPtr, long menuBarPtr); private static native void nativeSetNSWindowMenuBar(long nsWindowPtr, long menuBarPtr);
private static native Insets nativeGetNSWindowInsets(long nsWindowPtr); private static native Insets nativeGetNSWindowInsets(long nsWindowPtr);
...@@ -230,7 +230,8 @@ public class CPlatformWindow extends CFRetainedResource implements PlatformWindo ...@@ -230,7 +230,8 @@ public class CPlatformWindow extends CFRetainedResource implements PlatformWindo
contentView = createContentView(); contentView = createContentView();
contentView.initialize(peer, responder); 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); setPtr(nativeWindowPtr);
if (target instanceof javax.swing.RootPaneContainer) { if (target instanceof javax.swing.RootPaneContainer) {
......
...@@ -44,6 +44,7 @@ ...@@ -44,6 +44,7 @@
jint styleBits; jint styleBits;
BOOL isEnabled; BOOL isEnabled;
NSWindow *nsWindow; NSWindow *nsWindow;
AWTWindow *ownerWindow;
} }
// An instance of either AWTWindow_Normal or AWTWindow_Panel // An instance of either AWTWindow_Normal or AWTWindow_Panel
...@@ -51,12 +52,15 @@ ...@@ -51,12 +52,15 @@
@property (nonatomic, retain) JNFWeakJObjectWrapper *javaPlatformWindow; @property (nonatomic, retain) JNFWeakJObjectWrapper *javaPlatformWindow;
@property (nonatomic, retain) CMenuBar *javaMenuBar; @property (nonatomic, retain) CMenuBar *javaMenuBar;
@property (nonatomic, retain) AWTWindow *ownerWindow;
@property (nonatomic) NSSize javaMinSize; @property (nonatomic) NSSize javaMinSize;
@property (nonatomic) NSSize javaMaxSize; @property (nonatomic) NSSize javaMaxSize;
@property (nonatomic) jint styleBits; @property (nonatomic) jint styleBits;
@property (nonatomic) BOOL isEnabled; @property (nonatomic) BOOL isEnabled;
- (id) initWithPlatformWindow:(JNFWeakJObjectWrapper *)javaPlatformWindow - (id) initWithPlatformWindow:(JNFWeakJObjectWrapper *)javaPlatformWindow
ownerWindow:owner
styleBits:(jint)styleBits styleBits:(jint)styleBits
frameRect:(NSRect)frameRect frameRect:(NSRect)frameRect
contentView:(NSView *)contentView; contentView:(NSView *)contentView;
......
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
#import "sun_lwawt_macosx_CPlatformWindow.h" #import "sun_lwawt_macosx_CPlatformWindow.h"
#import "com_apple_eawt_event_GestureHandler.h" #import "com_apple_eawt_event_GestureHandler.h"
#import "com_apple_eawt_FullScreenHandler.h" #import "com_apple_eawt_FullScreenHandler.h"
#import "ApplicationDelegate.h"
#import "AWTWindow.h" #import "AWTWindow.h"
#import "AWTView.h" #import "AWTView.h"
...@@ -55,7 +56,7 @@ static JNF_CLASS_CACHE(jc_CPlatformWindow, "sun/lwawt/macosx/CPlatformWindow"); ...@@ -55,7 +56,7 @@ static JNF_CLASS_CACHE(jc_CPlatformWindow, "sun/lwawt/macosx/CPlatformWindow");
// doesn't provide information about "opposite" window, so we // doesn't provide information about "opposite" window, so we
// have to do a bit of tracking. This variable points to a window // 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 // 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. // window or the app currently has no key window.
static AWTWindow* lastKeyWindow = nil; static AWTWindow* lastKeyWindow = nil;
...@@ -120,6 +121,7 @@ AWT_NS_WINDOW_IMPLEMENTATION ...@@ -120,6 +121,7 @@ AWT_NS_WINDOW_IMPLEMENTATION
@synthesize javaMaxSize; @synthesize javaMaxSize;
@synthesize styleBits; @synthesize styleBits;
@synthesize isEnabled; @synthesize isEnabled;
@synthesize ownerWindow;
- (void) updateMinMaxSize:(BOOL)resizable { - (void) updateMinMaxSize:(BOOL)resizable {
if (resizable) { if (resizable) {
...@@ -201,6 +203,7 @@ AWT_NS_WINDOW_IMPLEMENTATION ...@@ -201,6 +203,7 @@ AWT_NS_WINDOW_IMPLEMENTATION
} }
- (id) initWithPlatformWindow:(JNFWeakJObjectWrapper *)platformWindow - (id) initWithPlatformWindow:(JNFWeakJObjectWrapper *)platformWindow
ownerWindow:owner
styleBits:(jint)bits styleBits:(jint)bits
frameRect:(NSRect)rect frameRect:(NSRect)rect
contentView:(NSView *)view contentView:(NSView *)view
...@@ -245,6 +248,7 @@ AWT_ASSERT_APPKIT_THREAD; ...@@ -245,6 +248,7 @@ AWT_ASSERT_APPKIT_THREAD;
self.isEnabled = YES; self.isEnabled = YES;
self.javaPlatformWindow = platformWindow; self.javaPlatformWindow = platformWindow;
self.styleBits = bits; self.styleBits = bits;
self.ownerWindow = owner;
[self setPropertiesForStyleBits:styleBits mask:MASK(_METHOD_PROP_BITMASK)]; [self setPropertiesForStyleBits:styleBits mask:MASK(_METHOD_PROP_BITMASK)];
return self; return self;
...@@ -350,7 +354,7 @@ AWT_ASSERT_APPKIT_THREAD; ...@@ -350,7 +354,7 @@ AWT_ASSERT_APPKIT_THREAD;
[self.javaPlatformWindow setJObject:nil withEnv:env]; [self.javaPlatformWindow setJObject:nil withEnv:env];
self.nsWindow = nil; self.nsWindow = nil;
self.ownerWindow = nil;
[super dealloc]; [super dealloc];
} }
...@@ -539,11 +543,27 @@ AWT_ASSERT_APPKIT_THREAD; ...@@ -539,11 +543,27 @@ AWT_ASSERT_APPKIT_THREAD;
AWT_ASSERT_APPKIT_THREAD; AWT_ASSERT_APPKIT_THREAD;
[AWTToolkit eventCountPlusPlus]; [AWTToolkit eventCountPlusPlus];
AWTWindow *opposite = [AWTWindow lastKeyWindow]; AWTWindow *opposite = [AWTWindow lastKeyWindow];
if (!IS(self.styleBits, IS_DIALOG)) {
[CMenuBar activate:self.javaMenuBar modallyDisabled:NO]; // Finds appropriate menubar in our hierarchy,
} else if ((opposite != NULL) && IS(self.styleBits, IS_MODAL)) { AWTWindow *awtWindow = self;
[CMenuBar activate:opposite->javaMenuBar modallyDisabled:YES]; 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]; [AWTWindow setLastKeyWindow:nil];
[self _deliverWindowFocusEvent:YES oppositeWindow: opposite]; [self _deliverWindowFocusEvent:YES oppositeWindow: opposite];
...@@ -555,6 +575,14 @@ AWT_ASSERT_APPKIT_THREAD; ...@@ -555,6 +575,14 @@ AWT_ASSERT_APPKIT_THREAD;
[AWTToolkit eventCountPlusPlus]; [AWTToolkit eventCountPlusPlus];
[self.javaMenuBar deactivate]; [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 // the new key window
NSWindow *keyWindow = [NSApp keyWindow]; NSWindow *keyWindow = [NSApp keyWindow];
AWTWindow *opposite = nil; AWTWindow *opposite = nil;
...@@ -741,7 +769,7 @@ AWT_ASSERT_APPKIT_THREAD; ...@@ -741,7 +769,7 @@ AWT_ASSERT_APPKIT_THREAD;
* Signature: (JJIIII)J * Signature: (JJIIII)J
*/ */
JNIEXPORT jlong JNICALL Java_sun_lwawt_macosx_CPlatformWindow_nativeCreateNSWindow 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; __block AWTWindow *window = nil;
...@@ -750,13 +778,14 @@ JNF_COCOA_ENTER(env); ...@@ -750,13 +778,14 @@ JNF_COCOA_ENTER(env);
JNFWeakJObjectWrapper *platformWindow = [JNFWeakJObjectWrapper wrapperWithJObject:obj withEnv:env]; JNFWeakJObjectWrapper *platformWindow = [JNFWeakJObjectWrapper wrapperWithJObject:obj withEnv:env];
NSView *contentView = OBJC(contentViewPtr); NSView *contentView = OBJC(contentViewPtr);
NSRect frameRect = NSMakeRect(x, y, w, h); NSRect frameRect = NSMakeRect(x, y, w, h);
AWTWindow *owner = [OBJC(ownerPtr) delegate];
[ThreadUtilities performOnMainThreadWaiting:YES block:^(){ [ThreadUtilities performOnMainThreadWaiting:YES block:^(){
window = [[AWTWindow alloc] initWithPlatformWindow:platformWindow window = [[AWTWindow alloc] initWithPlatformWindow:platformWindow
styleBits:styleBits ownerWindow:owner
frameRect:frameRect styleBits:styleBits
contentView:contentView]; frameRect:frameRect
contentView:contentView];
// the window is released is CPlatformWindow.nativeDispose() // the window is released is CPlatformWindow.nativeDispose()
if (window) CFRetain(window.nsWindow); if (window) CFRetain(window.nsWindow);
...@@ -818,11 +847,19 @@ JNF_COCOA_ENTER(env); ...@@ -818,11 +847,19 @@ JNF_COCOA_ENTER(env);
AWTWindow *window = (AWTWindow*)[nsWindow delegate]; AWTWindow *window = (AWTWindow*)[nsWindow delegate];
if ([nsWindow isKeyWindow]) [window.javaMenuBar deactivate]; if ([nsWindow isKeyWindow]) {
[window.javaMenuBar deactivate];
}
window.javaMenuBar = menuBar; window.javaMenuBar = menuBar;
CMenuBar* actualMenuBar = menuBar;
if (actualMenuBar == nil) {
actualMenuBar = [[ApplicationDelegate sharedDelegate] defaultMenuBar];
}
if ([nsWindow isKeyWindow]) { if ([nsWindow isKeyWindow]) {
[CMenuBar activate:window.javaMenuBar modallyDisabled:NO]; [CMenuBar activate:actualMenuBar modallyDisabled:NO];
} }
}]; }];
......
...@@ -63,7 +63,7 @@ static BOOL sSetupHelpMenu = NO; ...@@ -63,7 +63,7 @@ static BOOL sSetupHelpMenu = NO;
if (excludingAppleMenu && ![currMenu isJavaMenu]) { if (excludingAppleMenu && ![currMenu isJavaMenu]) {
continue; continue;
} }
[currItem setSubmenu:nil];
[theMainMenu removeItemAtIndex:index]; [theMainMenu removeItemAtIndex:index];
} }
...@@ -154,7 +154,10 @@ static BOOL sSetupHelpMenu = NO; ...@@ -154,7 +154,10 @@ static BOOL sSetupHelpMenu = NO;
// Clean up extra items // Clean up extra items
NSUInteger removedIndex, removedCount = [removedMenuArray count]; NSUInteger removedIndex, removedCount = [removedMenuArray count];
for (removedIndex=removedCount; removedIndex > 0; removedIndex--) { 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; i = cmenuIndex;
......
...@@ -70,9 +70,15 @@ AWT_ASSERT_APPKIT_THREAD; ...@@ -70,9 +70,15 @@ AWT_ASSERT_APPKIT_THREAD;
JNIEnv *env = [ThreadUtilities getJNIEnv]; JNIEnv *env = [ThreadUtilities getJNIEnv];
JNF_COCOA_ENTER(env); 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 // 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]; NSEvent *currEvent = [[NSApplication sharedApplication] currentEvent];
if ([currEvent type] == NSKeyDown) { if ([currEvent type] == NSKeyDown) {
NSString *menuKey = [sender keyEquivalent]; NSString *menuKey = [sender keyEquivalent];
...@@ -91,7 +97,8 @@ JNF_COCOA_ENTER(env); ...@@ -91,7 +97,8 @@ JNF_COCOA_ENTER(env);
eventKey = [NSString stringWithCharacters: &newChar length: 1]; eventKey = [NSString stringWithCharacters: &newChar length: 1];
} }
if ([menuKey isEqualToString:eventKey]) { NSWindow *keyWindow = [NSApp keyWindow];
if ([menuKey isEqualToString:eventKey] && keyWindow != nil) {
return; return;
} }
} }
......
# Refer to the note in basic.properties for a description as to what # Refer to the note in basic.properties for a description as to what
# the mnemonics correspond to and how to calculate them. # the mnemonics correspond to and how to calculate them.
# GTK specific properties # GTK specific properties
# GTK color chooser properties: # GTK color chooser properties:
GTKColorChooserPanel.textAndMnemonic=&GTK Color Chooser GTKColorChooserPanel.textAndMnemonic=&GTK Color Chooser
# mnemonic as a VK_ constant # mnemonic as a VK_ constant
GTKColorChooserPanel.hue.textAndMnemonic=&Hue: GTKColorChooserPanel.hue.textAndMnemonic=&Hue:
GTKColorChooserPanel.red.textAndMnemonic=R&ed: GTKColorChooserPanel.red.textAndMnemonic=R&ed:
GTKColorChooserPanel.saturation.textAndMnemonic=&Saturation: GTKColorChooserPanel.saturation.textAndMnemonic=&Saturation:
GTKColorChooserPanel.green.textAndMnemonic=&Green: GTKColorChooserPanel.green.textAndMnemonic=&Green:
GTKColorChooserPanel.value.textAndMnemonic=&Value: GTKColorChooserPanel.value.textAndMnemonic=&Value:
GTKColorChooserPanel.blue.textAndMnemonic=&Blue: GTKColorChooserPanel.blue.textAndMnemonic=&Blue:
GTKColorChooserPanel.color.textAndMnemonic=Color &Name: GTKColorChooserPanel.color.textAndMnemonic=Color &Name:
############ FILE CHOOSER STRINGS ############# ############ FILE CHOOSER STRINGS #############
FileChooser.acceptAllFileFilter.textAndMnemonic=All Files FileChooser.acceptAllFileFilter.textAndMnemonic=All Files
FileChooser.newFolderButton.textAndMnemonic=&New Folder FileChooser.newFolderButton.textAndMnemonic=&New Folder
FileChooser.newFolderDialog.textAndMnemonic=Folder name: FileChooser.newFolderDialog.textAndMnemonic=Folder name:
FileChooser.newFolderNoDirectoryErrorTitle.textAndMnemonic=Error FileChooser.newFolderNoDirectoryErrorTitle.textAndMnemonic=Error
FileChooser.newFolderNoDirectoryError.textAndMnemonic=Error creating directory "{0}": No such file or directory FileChooser.newFolderNoDirectoryError.textAndMnemonic=Error creating directory "{0}": No such file or directory
FileChooser.deleteFileButton.textAndMnemonic=De&lete File FileChooser.deleteFileButton.textAndMnemonic=De&lete File
FileChooser.renameFileButton.textAndMnemonic=&Rename File FileChooser.renameFileButton.textAndMnemonic=&Rename File
FileChooser.cancelButton.textAndMnemonic=&Cancel FileChooser.cancelButton.textAndMnemonic=&Cancel
FileChooser.saveButton.textAndMnemonic=&OK FileChooser.saveButton.textAndMnemonic=&OK
FileChooser.openButton.textAndMnemonic=&OK FileChooser.openButton.textAndMnemonic=&OK
FileChooser.saveDialogTitle.textAndMnemonic=Save FileChooser.saveDialogTitle.textAndMnemonic=Save
FileChooser.openDialogTitle.textAndMnemonic=Open FileChooser.openDialogTitle.textAndMnemonic=Open
FileChooser.pathLabel.textAndMnemonic=&Selection: FileChooser.pathLabel.textAndMnemonic=&Selection:
FileChooser.filterLabel.textAndMnemonic=Filter: FileChooser.filterLabel.textAndMnemonic=Filter:
FileChooser.foldersLabel.textAndMnemonic=Fol&ders FileChooser.foldersLabel.textAndMnemonic=Fol&ders
FileChooser.filesLabel.textAndMnemonic=&Files FileChooser.filesLabel.textAndMnemonic=&Files
FileChooser.cancelButtonToolTip.textAndMnemonic=Abort file chooser dialog. FileChooser.cancelButtonToolTip.textAndMnemonic=Abort file chooser dialog.
FileChooser.saveButtonToolTip.textAndMnemonic=Save selected file. FileChooser.saveButtonToolTip.textAndMnemonic=Save selected file.
FileChooser.openButtonToolTip.textAndMnemonic=Open selected file. FileChooser.openButtonToolTip.textAndMnemonic=Open selected file.
FileChooser.renameFileDialog.textAndMnemonic=Rename file "{0}" to FileChooser.renameFileDialog.textAndMnemonic=Rename file "{0}" to
FileChooser.renameFileError.titleAndMnemonic=Error FileChooser.renameFileError.titleAndMnemonic=Error
FileChooser.renameFileError.textAndMnemonic=Error renaming file "{0}" to "{1}" FileChooser.renameFileError.textAndMnemonic=Error renaming file "{0}" to "{1}"
...@@ -499,7 +499,8 @@ public class WindowsComboBoxUI extends BasicComboBoxUI { ...@@ -499,7 +499,8 @@ public class WindowsComboBoxUI extends BasicComboBoxUI {
public void setItem(Object item) { public void setItem(Object item) {
super.setItem(item); super.setItem(item);
if (editor.hasFocus()) { Object focus = KeyboardFocusManager.getCurrentKeyboardFocusManager().getFocusOwner();
if ((focus == editor) || (focus == editor.getParent())) {
editor.selectAll(); editor.selectAll();
} }
} }
......
# This properties file is used to create a PropertyResourceBundle # This properties file is used to create a PropertyResourceBundle
# It contains Locale specific strings used be the Synth Look and Feel. # It contains Locale specific strings used be the Synth Look and Feel.
# Currently, the following components need this for support: # Currently, the following components need this for support:
# #
# FileChooser # FileChooser
# #
# When this file is read in, the strings are put into the # When this file is read in, the strings are put into the
# defaults table. This is an implementation detail of the current # defaults table. This is an implementation detail of the current
# workings of Swing. DO NOT DEPEND ON THIS. # workings of Swing. DO NOT DEPEND ON THIS.
# This may change in future versions of Swing as we improve localization # This may change in future versions of Swing as we improve localization
# support. # support.
# #
# Refer to the note in basic.properties for a description as to what # Refer to the note in basic.properties for a description as to what
# the mnemonics correspond to and how to calculate them. # the mnemonics correspond to and how to calculate them.
# #
# @author Steve Wilson # @author Steve Wilson
############ FILE CHOOSER STRINGS ############# ############ FILE CHOOSER STRINGS #############
FileChooser.lookInLabel.textAndMnemonic=Look &In: FileChooser.lookInLabel.textAndMnemonic=Look &In:
FileChooser.saveInLabel.textAndMnemonic=Save In: FileChooser.saveInLabel.textAndMnemonic=Save In:
FileChooser.fileNameLabel.textAndMnemonic=File &Name: FileChooser.fileNameLabel.textAndMnemonic=File &Name:
FileChooser.folderNameLabel.textAndMnemonic=Folder &Name: FileChooser.folderNameLabel.textAndMnemonic=Folder &Name:
FileChooser.filesOfTypeLabel.textAndMnemonic=Files of &Type: FileChooser.filesOfTypeLabel.textAndMnemonic=Files of &Type:
FileChooser.upFolderToolTip.textAndMnemonic=Up One Level FileChooser.upFolderToolTip.textAndMnemonic=Up One Level
FileChooser.upFolderAccessibleName=Up FileChooser.upFolderAccessibleName=Up
FileChooser.homeFolderToolTip.textAndMnemonic=Home FileChooser.homeFolderToolTip.textAndMnemonic=Home
FileChooser.homeFolderAccessibleName=Home FileChooser.homeFolderAccessibleName=Home
FileChooser.newFolderToolTip.textAndMnemonic=Create New Folder FileChooser.newFolderToolTip.textAndMnemonic=Create New Folder
FileChooser.newFolderAccessibleName=New Folder FileChooser.newFolderAccessibleName=New Folder
FileChooser.newFolderActionLabel.textAndMnemonic=New Folder FileChooser.newFolderActionLabel.textAndMnemonic=New Folder
FileChooser.listViewButtonToolTip.textAndMnemonic=List FileChooser.listViewButtonToolTip.textAndMnemonic=List
FileChooser.listViewButtonAccessibleName=List FileChooser.listViewButtonAccessibleName=List
FileChooser.listViewActionLabel.textAndMnemonic=List FileChooser.listViewActionLabel.textAndMnemonic=List
FileChooser.detailsViewButtonToolTip.textAndMnemonic=Details FileChooser.detailsViewButtonToolTip.textAndMnemonic=Details
FileChooser.detailsViewButtonAccessibleName=Details FileChooser.detailsViewButtonAccessibleName=Details
FileChooser.detailsViewActionLabel.textAndMnemonic=Details FileChooser.detailsViewActionLabel.textAndMnemonic=Details
FileChooser.refreshActionLabel.textAndMnemonic=Refresh FileChooser.refreshActionLabel.textAndMnemonic=Refresh
FileChooser.viewMenuLabel.textAndMnemonic=View FileChooser.viewMenuLabel.textAndMnemonic=View
FileChooser.fileNameHeader.textAndMnemonic=Name FileChooser.fileNameHeader.textAndMnemonic=Name
FileChooser.fileSizeHeader.textAndMnemonic=Size FileChooser.fileSizeHeader.textAndMnemonic=Size
FileChooser.fileTypeHeader.textAndMnemonic=Type FileChooser.fileTypeHeader.textAndMnemonic=Type
FileChooser.fileDateHeader.textAndMnemonic=Modified FileChooser.fileDateHeader.textAndMnemonic=Modified
FileChooser.fileAttrHeader.textAndMnemonic=Attributes FileChooser.fileAttrHeader.textAndMnemonic=Attributes
...@@ -332,7 +332,7 @@ function streamClose(stream) { ...@@ -332,7 +332,7 @@ function streamClose(stream) {
* @param str input from which script is loaded and evaluated * @param str input from which script is loaded and evaluated
*/ */
if (typeof(load) == 'undefined') { if (typeof(load) == 'undefined') {
var load = function(str) { this.load = function(str) {
var stream = inStream(str); var stream = inStream(str);
var bstream = new BufferedInputStream(stream); var bstream = new BufferedInputStream(stream);
var reader = new BufferedReader(new InputStreamReader(bstream)); var reader = new BufferedReader(new InputStreamReader(bstream));
...@@ -712,7 +712,7 @@ if (typeof(exit) == 'undefined') { ...@@ -712,7 +712,7 @@ if (typeof(exit) == 'undefined') {
* @param exitCode integer code returned to OS shell. * @param exitCode integer code returned to OS shell.
* optional, defaults to 0 * optional, defaults to 0
*/ */
var exit = function (code) { this.exit = function (code) {
if (code) { if (code) {
java.lang.System.exit(code + 0); java.lang.System.exit(code + 0);
} else { } else {
...@@ -725,7 +725,7 @@ if (typeof(quit) == 'undefined') { ...@@ -725,7 +725,7 @@ if (typeof(quit) == 'undefined') {
/** /**
* synonym for exit * synonym for exit
*/ */
var quit = function (code) { this.quit = function (code) {
exit(code); exit(code);
} }
} }
...@@ -881,7 +881,7 @@ if (typeof(printf) == 'undefined') { ...@@ -881,7 +881,7 @@ if (typeof(printf) == 'undefined') {
* @param format string to format the rest of the print items * @param format string to format the rest of the print items
* @param args variadic argument list * @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, var array = java.lang.reflect.Array.newInstance(java.lang.Object,
arguments.length - 1); arguments.length - 1);
for (var i = 0; i < array.length; i++) { for (var i = 0; i < array.length; i++) {
...@@ -921,25 +921,7 @@ function read(prompt, multiline) { ...@@ -921,25 +921,7 @@ function read(prompt, multiline) {
} }
if (typeof(println) == 'undefined') { if (typeof(println) == 'undefined') {
var print = function(str, newline) { // just synonym to print
if (typeof(str) == 'undefined') { this.println = print;
str = 'undefined';
} else if (str == null) {
str = 'null';
}
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);
};
} }
/* /*
* 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -26,7 +26,7 @@ package java.awt; ...@@ -26,7 +26,7 @@ package java.awt;
/** /**
* Signals that an Absract Window Toolkit exception has occurred. * Signals that an Abstract Window Toolkit exception has occurred.
* *
* @author Arthur van Hoff * @author Arthur van Hoff
*/ */
......
...@@ -48,132 +48,87 @@ package java.io; ...@@ -48,132 +48,87 @@ package java.io;
* may be thrown if the input stream has been * may be thrown if the input stream has been
* closed. * closed.
* *
* <h4><a name="modified-utf-8">Modified UTF-8</a></h4> * <h3><a name="modified-utf-8">Modified UTF-8</a></h3>
* <p> * <p>
* Implementations of the DataInput and DataOutput interfaces represent * Implementations of the DataInput and DataOutput interfaces represent
* Unicode strings in a format that is a slight modification of UTF-8. * Unicode strings in a format that is a slight modification of UTF-8.
* (For information regarding the standard UTF-8 format, see section * (For information regarding the standard UTF-8 format, see section
* <i>3.9 Unicode Encoding Forms</i> of <i>The Unicode Standard, Version * <i>3.9 Unicode Encoding Forms</i> of <i>The Unicode Standard, Version
* 4.0</i>). * 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. * far left-hand column.
* <p>
* All characters in the range {@code '\u005Cu0001'} to
* {@code '\u005Cu007F'} are represented by a single byte:
* *
* <blockquote> * <blockquote>
* <table border="1" cellspacing="0" cellpadding="8" width="50%" * <table border="1" cellspacing="0" cellpadding="8"
* summary="Bit values and bytes"> * summary="Bit values and bytes">
* <tr> * <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> * <td></td>
* <th id="bit_a">Bit Values</th> * <th colspan="8" id="bit_a">Bit Values</th>
* </tr> * </tr>
* <tr> * <tr>
* <th id="byte1_a">Byte 1</th> * <th id="byte1_a">Byte 1</th>
* <td> * <td><center>0</center>
* <table border="1" cellspacing="0" width="100%"> * <td colspan="7"><center>bits 6-0</center>
* <tr> * </tr>
* <td width="12%"><center>0</center> * <tr>
* <td colspan="7"><center>bits 6-0</center> * <th colspan="9"><span style="font-weight:normal">
* </tr> * The null character {@code '\u005Cu0000'} and characters
* </table> * in the range {@code '\u005Cu0080'} to {@code '\u005Cu07FF'} are
* </td> * represented by a pair of bytes:</span></th>
* </tr> * </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> * <tr>
* <td></td> * <td></td>
* <th id="bit_b">Bit Values</th> * <th colspan="8" id="bit_b">Bit Values</th>
* </tr> * </tr>
* <tr> * <tr>
* <th id="byte1_b">Byte 1</th> * <th id="byte1_b">Byte 1</th>
* <td> * <td><center>1</center>
* <table border="1" cellspacing="0" width="100%"> * <td><center>1</center>
* <tr> * <td><center>0</center>
* <td width="12%"><center>1</center> * <td colspan="5"><center>bits 10-6</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>
* <tr> * <tr>
* <th id="byte2_a">Byte 2</th> * <th id="byte2_a">Byte 2</th>
* <td> * <td><center>1</center>
* <table border="1" cellspacing="0" width="100%"> * <td><center>0</center>
* <tr> * <td colspan="6"><center>bits 5-0</center>
* <td width="12%"><center>1</center> * </tr>
* <td width="13%"><center>0</center> * <tr>
* <td colspan="6"><center>bits 5-0</center> * <th colspan="9"><span style="font-weight:normal">
* </tr> * {@code char} values in the range {@code '\u005Cu0800'}
* </table> * to {@code '\u005CuFFFF'} are represented by three bytes:</span></th>
* </td>
* </tr> * </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> * <tr>
* <td></td> * <td></td>
* <th id="bit_c">Bit Values</th> * <th colspan="8"id="bit_c">Bit Values</th>
* </tr> * </tr>
* <tr> * <tr>
* <th id="byte1_c">Byte 1</th> * <th id="byte1_c">Byte 1</th>
* <td> * <td><center>1</center>
* <table border="1" cellspacing="0" width="100%"> * <td><center>1</center>
* <tr> * <td><center>1</center>
* <td width="12%"><center>1</center> * <td><center>0</center>
* <td width="13%"><center>1</center> * <td colspan="4"><center>bits 15-12</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>
* <tr> * <tr>
* <th id="byte2_b">Byte 2</th> * <th id="byte2_b">Byte 2</th>
* <td> * <td><center>1</center>
* <table border="1" cellspacing="0" width="100%"> * <td><center>0</center>
* <tr> * <td colspan="6"><center>bits 11-6</center>
* <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>
* <tr> * <tr>
* <th id="byte3">Byte 3</th> * <th id="byte3">Byte 3</th>
* <td> * <td><center>1</center>
* <table border="1" cellspacing="0" width="100%"> * <td><center>0</center>
* <tr> * <td colspan="6"><center>bits 5-0</center>
* <td width="12%"><center>1</center>
* <td width="13%"><center>0</center>
* <td colspan="6"><center>bits 5-0</center>
* </tr>
* </table>
* </td>
* </tr> * </tr>
* </table> * </table>
* </blockquote> * </blockquote>
*
* <p> * <p>
* The differences between this format and the * The differences between this format and the
* standard UTF-8 format are the following: * standard UTF-8 format are the following:
......
...@@ -129,7 +129,7 @@ import sun.security.action.GetPropertyAction; ...@@ -129,7 +129,7 @@ import sun.security.action.GetPropertyAction;
* created, the abstract pathname represented by a <code>File</code> object * created, the abstract pathname represented by a <code>File</code> object
* will never change. * 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> * <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 * package defines interfaces and classes for the Java virtual machine to access
......
/* /*
* 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -313,6 +313,7 @@ public class ObjectInputStream ...@@ -313,6 +313,7 @@ public class ObjectInputStream
* @throws SecurityException if a security manager exists and its * @throws SecurityException if a security manager exists and its
* <code>checkPermission</code> method denies enabling * <code>checkPermission</code> method denies enabling
* subclassing. * subclassing.
* @throws IOException if an I/O error occurs while creating this stream
* @see SecurityManager#checkPermission * @see SecurityManager#checkPermission
* @see java.io.SerializablePermission * @see java.io.SerializablePermission
*/ */
......
/* /*
* 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -265,6 +265,7 @@ public class ObjectOutputStream ...@@ -265,6 +265,7 @@ public class ObjectOutputStream
* @throws SecurityException if a security manager exists and its * @throws SecurityException if a security manager exists and its
* <code>checkPermission</code> method denies enabling * <code>checkPermission</code> method denies enabling
* subclassing. * subclassing.
* @throws IOException if an I/O error occurs while creating this stream
* @see SecurityManager#checkPermission * @see SecurityManager#checkPermission
* @see java.io.SerializablePermission * @see java.io.SerializablePermission
*/ */
......
/* /*
* 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -240,6 +240,8 @@ public class ObjectStreamField ...@@ -240,6 +240,8 @@ public class ObjectStreamField
* Returns boolean value indicating whether or not the serializable field * Returns boolean value indicating whether or not the serializable field
* represented by this ObjectStreamField instance is unshared. * represented by this ObjectStreamField instance is unshared.
* *
* @return {@code true} if this field is unshared
*
* @since 1.4 * @since 1.4
*/ */
public boolean isUnshared() { public boolean isUnshared() {
......
...@@ -128,7 +128,7 @@ public class RandomAccessFile implements DataOutput, DataInput, Closeable { ...@@ -128,7 +128,7 @@ public class RandomAccessFile implements DataOutput, DataInput, Closeable {
* meanings are: * meanings are:
* *
* <table summary="Access mode permitted values and meanings"> * <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> * <tr><td valign="top"><tt>"r"</tt></td>
* <td> Open for reading only. Invoking any of the <tt>write</tt> * <td> Open for reading only. Invoking any of the <tt>write</tt>
* methods of the resulting object will cause an {@link * methods of the resulting object will cause an {@link
......
...@@ -157,10 +157,10 @@ public final class Class<T> implements java.io.Serializable, ...@@ -157,10 +157,10 @@ public final class Class<T> implements java.io.Serializable,
* *
* The string is formatted as a list of type modifiers, if any, * The string is formatted as a list of type modifiers, if any,
* followed by the kind of type (empty string for primitive types * followed by the kind of type (empty string for primitive types
* and {@code class}, {@code enum}, {@code interface}, or {@code * and {@code class}, {@code enum}, {@code interface}, or
* &#64;interface}, as appropriate), followed by the type's name, * <code>&#64;</code>{@code interface}, as appropriate), followed
* followed by an angle-bracketed comma-separated list of the * by the type's name, followed by an angle-bracketed
* type's type parameters, if any. * comma-separated list of the type's type parameters, if any.
* *
* A space is used to separate modifiers from one another and to * A space is used to separate modifiers from one another and to
* separate any modifiers from the kind of type. The modifiers * separate any modifiers from the kind of type. The modifiers
......
...@@ -29,6 +29,8 @@ package java.lang.invoke; ...@@ -29,6 +29,8 @@ package java.lang.invoke;
* LambdaConversionException * LambdaConversionException
*/ */
public class LambdaConversionException extends Exception { public class LambdaConversionException extends Exception {
private static final long serialVersionUID = 292L + 8L;
/** /**
* Constructs a {@code LambdaConversionException}. * Constructs a {@code LambdaConversionException}.
*/ */
......
/* /*
* 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -25,13 +25,12 @@ ...@@ -25,13 +25,12 @@
package java.lang.ref; package java.lang.ref;
/**
/* Final references, used to implement finalization */ * Final references, used to implement finalization
*/
class FinalReference<T> extends Reference<T> { class FinalReference<T> extends Reference<T> {
public FinalReference(T referent, ReferenceQueue<? super T> q) { public FinalReference(T referent, ReferenceQueue<? super T> q) {
super(referent, q); super(referent, q);
} }
} }
/* /*
* 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -29,16 +29,16 @@ import java.security.PrivilegedAction; ...@@ -29,16 +29,16 @@ import java.security.PrivilegedAction;
import java.security.AccessController; import java.security.AccessController;
final class Finalizer extends FinalReference { /* Package-private; must be in final class Finalizer extends FinalReference<Object> { /* Package-private; must be in
same package as the Reference same package as the Reference
class */ class */
/* A native method that invokes an arbitrary object's finalize method is /* A native method that invokes an arbitrary object's finalize method is
required since the finalize method is protected required since the finalize method is protected
*/ */
static native void invokeFinalizeMethod(Object o) throws Throwable; 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 Finalizer unfinalized = null;
private static final Object lock = new Object(); private static final Object lock = new Object();
......
...@@ -96,6 +96,7 @@ public abstract class Reference<T> { ...@@ -96,6 +96,7 @@ public abstract class Reference<T> {
* Enqueued: next reference in queue (or this if last) * Enqueued: next reference in queue (or this if last)
* Inactive: this * Inactive: this
*/ */
@SuppressWarnings("rawtypes")
Reference next; Reference next;
/* When active: next element in a discovered reference list maintained by GC (or this if last) /* When active: next element in a discovered reference list maintained by GC (or this if last)
...@@ -119,7 +120,7 @@ public abstract class Reference<T> { ...@@ -119,7 +120,7 @@ public abstract class Reference<T> {
* them. This list is protected by the above lock object. The * them. This list is protected by the above lock object. The
* list uses the discovered field to link its elements. * 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 /* High-priority thread to enqueue pending References
*/ */
...@@ -131,7 +132,7 @@ public abstract class Reference<T> { ...@@ -131,7 +132,7 @@ public abstract class Reference<T> {
public void run() { public void run() {
for (;;) { for (;;) {
Reference r; Reference<Object> r;
synchronized (lock) { synchronized (lock) {
if (pending != null) { if (pending != null) {
r = pending; r = pending;
...@@ -166,7 +167,7 @@ public abstract class Reference<T> { ...@@ -166,7 +167,7 @@ public abstract class Reference<T> {
continue; continue;
} }
ReferenceQueue q = r.queue; ReferenceQueue<Object> q = r.queue;
if (q != ReferenceQueue.NULL) q.enqueue(r); if (q != ReferenceQueue.NULL) q.enqueue(r);
} }
} }
......
/* /*
* 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -40,14 +40,14 @@ public class ReferenceQueue<T> { ...@@ -40,14 +40,14 @@ public class ReferenceQueue<T> {
*/ */
public ReferenceQueue() { } public ReferenceQueue() { }
private static class Null extends ReferenceQueue { private static class Null<S> extends ReferenceQueue<S> {
boolean enqueue(Reference r) { boolean enqueue(Reference<? extends S> r) {
return false; return false;
} }
} }
static ReferenceQueue NULL = new Null(); static ReferenceQueue<Object> NULL = new Null<>();
static ReferenceQueue ENQUEUED = new Null(); static ReferenceQueue<Object> ENQUEUED = new Null<>();
static private class Lock { }; static private class Lock { };
private Lock lock = new Lock(); private Lock lock = new Lock();
...@@ -58,7 +58,7 @@ public class ReferenceQueue<T> { ...@@ -58,7 +58,7 @@ public class ReferenceQueue<T> {
synchronized (lock) { synchronized (lock) {
// Check that since getting the lock this reference hasn't already been // Check that since getting the lock this reference hasn't already been
// enqueued (and even then removed) // enqueued (and even then removed)
ReferenceQueue queue = r.queue; ReferenceQueue<?> queue = r.queue;
if ((queue == NULL) || (queue == ENQUEUED)) { if ((queue == NULL) || (queue == ENQUEUED)) {
return false; return false;
} }
...@@ -75,10 +75,13 @@ public class ReferenceQueue<T> { ...@@ -75,10 +75,13 @@ public class ReferenceQueue<T> {
} }
} }
@SuppressWarnings("unchecked")
private Reference<? extends T> reallyPoll() { /* Must hold lock */ private Reference<? extends T> reallyPoll() { /* Must hold lock */
Reference<? extends T> r = head; Reference<? extends T> r = head;
if (r != null) { 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.queue = NULL;
r.next = r; r.next = r;
queueLength--; queueLength--;
......
...@@ -162,7 +162,7 @@ public final class Parameter implements AnnotatedElement { ...@@ -162,7 +162,7 @@ public final class Parameter implements AnnotatedElement {
/** /**
* Returns the name of the parameter. If the parameter's name is * 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 * the name provided by the class file. Otherwise, this method
* synthesizes a name of the form argN, where N is the index of * synthesizes a name of the form argN, where N is the index of
* the parameter in the descriptor of the method which declares * the parameter in the descriptor of the method which declares
......
/* /*
* 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -103,17 +103,17 @@ class Authenticator { ...@@ -103,17 +103,17 @@ class Authenticator {
* Sets the authenticator that will be used by the networking code * Sets the authenticator that will be used by the networking code
* when a proxy or an HTTP server asks for authentication. * when a proxy or an HTTP server asks for authentication.
* <p> * <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 * method is called with a
* <code>NetPermission("setDefaultAuthenticator")</code> permission. * {@code NetPermission("setDefaultAuthenticator")} permission.
* This may result in a java.lang.SecurityException. * 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. * any previously set authenticator is removed.
* *
* @throws SecurityException * @throws SecurityException
* if a security manager exists and its * if a security manager exists and its
* <code>checkPermission</code> method doesn't allow * {@code checkPermission} method doesn't allow
* setting the default authenticator. * setting the default authenticator.
* *
* @see SecurityManager#checkPermission * @see SecurityManager#checkPermission
...@@ -134,9 +134,9 @@ class Authenticator { ...@@ -134,9 +134,9 @@ class Authenticator {
* Ask the authenticator that has been registered with the system * Ask the authenticator that has been registered with the system
* for a password. * for a password.
* <p> * <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 * method is called with a
* <code>NetPermission("requestPasswordAuthentication")</code> permission. * {@code NetPermission("requestPasswordAuthentication")} permission.
* This may result in a java.lang.SecurityException. * This may result in a java.lang.SecurityException.
* *
* @param addr The InetAddress of the site requesting authorization, * @param addr The InetAddress of the site requesting authorization,
...@@ -151,7 +151,7 @@ class Authenticator { ...@@ -151,7 +151,7 @@ class Authenticator {
* *
* @throws SecurityException * @throws SecurityException
* if a security manager exists and its * if a security manager exists and its
* <code>checkPermission</code> method doesn't allow * {@code checkPermission} method doesn't allow
* the password authentication request. * the password authentication request.
* *
* @see SecurityManager#checkPermission * @see SecurityManager#checkPermission
...@@ -193,9 +193,9 @@ class Authenticator { ...@@ -193,9 +193,9 @@ class Authenticator {
* because the hostname can be provided in cases where the InetAddress * because the hostname can be provided in cases where the InetAddress
* is not available. * is not available.
* <p> * <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 * method is called with a
* <code>NetPermission("requestPasswordAuthentication")</code> permission. * {@code NetPermission("requestPasswordAuthentication")} permission.
* This may result in a java.lang.SecurityException. * This may result in a java.lang.SecurityException.
* *
* @param host The hostname of the site requesting authentication. * @param host The hostname of the site requesting authentication.
...@@ -211,7 +211,7 @@ class Authenticator { ...@@ -211,7 +211,7 @@ class Authenticator {
* *
* @throws SecurityException * @throws SecurityException
* if a security manager exists and its * if a security manager exists and its
* <code>checkPermission</code> method doesn't allow * {@code checkPermission} method doesn't allow
* the password authentication request. * the password authentication request.
* *
* @see SecurityManager#checkPermission * @see SecurityManager#checkPermission
...@@ -254,9 +254,9 @@ class Authenticator { ...@@ -254,9 +254,9 @@ class Authenticator {
* Ask the authenticator that has been registered with the system * Ask the authenticator that has been registered with the system
* for a password. * for a password.
* <p> * <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 * method is called with a
* <code>NetPermission("requestPasswordAuthentication")</code> permission. * {@code NetPermission("requestPasswordAuthentication")} permission.
* This may result in a java.lang.SecurityException. * This may result in a java.lang.SecurityException.
* *
* @param host The hostname of the site requesting authentication. * @param host The hostname of the site requesting authentication.
...@@ -275,7 +275,7 @@ class Authenticator { ...@@ -275,7 +275,7 @@ class Authenticator {
* *
* @throws SecurityException * @throws SecurityException
* if a security manager exists and its * if a security manager exists and its
* <code>checkPermission</code> method doesn't allow * {@code checkPermission} method doesn't allow
* the password authentication request. * the password authentication request.
* *
* @see SecurityManager#checkPermission * @see SecurityManager#checkPermission
...@@ -320,8 +320,8 @@ class Authenticator { ...@@ -320,8 +320,8 @@ class Authenticator {
} }
/** /**
* Gets the <code>hostname</code> of the * Gets the {@code hostname} of the
* site or proxy requesting authentication, or <code>null</code> * site or proxy requesting authentication, or {@code null}
* if not available. * if not available.
* *
* @return the hostname of the connection requiring authentication, or null * @return the hostname of the connection requiring authentication, or null
...@@ -333,8 +333,8 @@ class Authenticator { ...@@ -333,8 +333,8 @@ class Authenticator {
} }
/** /**
* Gets the <code>InetAddress</code> of the * Gets the {@code InetAddress} of the
* site requesting authorization, or <code>null</code> * site requesting authorization, or {@code null}
* if not available. * if not available.
* *
* @return the InetAddress of the site requesting authorization, or null * @return the InetAddress of the site requesting authorization, or null
...@@ -346,7 +346,7 @@ class Authenticator { ...@@ -346,7 +346,7 @@ class Authenticator {
/** /**
* Gets the port number for the requested connection. * 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. * port for the requested connection.
*/ */
protected final int getRequestingPort() { protected final int getRequestingPort() {
......
/* /*
* 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -28,21 +28,21 @@ package java.net; ...@@ -28,21 +28,21 @@ package java.net;
import java.io.IOException; import java.io.IOException;
/** /**
* The abstract class <code>ContentHandler</code> is the superclass * The abstract class {@code ContentHandler} is the superclass
* of all classes that read an <code>Object</code> from a * of all classes that read an {@code Object} from a
* <code>URLConnection</code>. * {@code URLConnection}.
* <p> * <p>
* An application does not generally call the * An application does not generally call the
* <code>getContent</code> method in this class directly. Instead, an * {@code getContent} method in this class directly. Instead, an
* application calls the <code>getContent</code> method in class * application calls the {@code getContent} method in class
* <code>URL</code> or in <code>URLConnection</code>. * {@code URL} or in {@code URLConnection}.
* The application's content handler factory (an instance of a class that * The application's content handler factory (an instance of a class that
* implements the interface <code>ContentHandlerFactory</code> set * implements the interface {@code ContentHandlerFactory} set
* up by a call to <code>setContentHandler</code>) is * up by a call to {@code setContentHandler}) is
* called with a <code>String</code> giving the MIME type of the * called with a {@code String} giving the MIME type of the
* object being received on the socket. The factory returns an * object being received on the socket. The factory returns an
* instance of a subclass of <code>ContentHandler</code>, and its * instance of a subclass of {@code ContentHandler}, and its
* <code>getContent</code> method is called to create the object. * {@code getContent} method is called to create the object.
* <p> * <p>
* If no content handler could be found, URLConnection will * If no content handler could be found, URLConnection will
* look for a content handler in a user-defineable set of places. * look for a content handler in a user-defineable set of places.
...@@ -75,7 +75,7 @@ abstract public class ContentHandler { ...@@ -75,7 +75,7 @@ abstract public class ContentHandler {
* creates an object from it. * creates an object from it.
* *
* @param urlc a URL connection. * @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. * @exception IOException if an I/O error occurs while reading the object.
*/ */
abstract public Object getContent(URLConnection urlc) throws IOException; abstract public Object getContent(URLConnection urlc) throws IOException;
...@@ -90,7 +90,7 @@ abstract public class ContentHandler { ...@@ -90,7 +90,7 @@ abstract public class ContentHandler {
* *
* @param urlc a URL connection. * @param urlc a URL connection.
* @param classes an array of types requested * @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. * the first match of the suggested types.
* null if none of the requested are supported. * null if none of the requested are supported.
* @exception IOException if an I/O error occurs while reading the object. * @exception IOException if an I/O error occurs while reading the object.
......
/* /*
* 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -28,10 +28,10 @@ package java.net; ...@@ -28,10 +28,10 @@ package java.net;
/** /**
* This interface defines a factory for content handlers. An * This interface defines a factory for content handlers. An
* implementation of this interface should map a MIME type into an * implementation of this interface should map a MIME type into an
* instance of <code>ContentHandler</code>. * instance of {@code ContentHandler}.
* <p> * <p>
* This interface is used by the <code>URLStreamHandler</code> class * This interface is used by the {@code URLStreamHandler} class
* to create a <code>ContentHandler</code> for a MIME type. * to create a {@code ContentHandler} for a MIME type.
* *
* @author James Gosling * @author James Gosling
* @see java.net.ContentHandler * @see java.net.ContentHandler
...@@ -40,13 +40,13 @@ package java.net; ...@@ -40,13 +40,13 @@ package java.net;
*/ */
public interface ContentHandlerFactory { public interface ContentHandlerFactory {
/** /**
* Creates a new <code>ContentHandler</code> to read an object from * Creates a new {@code ContentHandler} to read an object from
* a <code>URLStreamHandler</code>. * a {@code URLStreamHandler}.
* *
* @param mimetype the MIME type for which a content handler is desired. * @param mimetype the MIME type for which a content handler is desired.
* @return a new <code>ContentHandler</code> to read an object from a * @return a new {@code ContentHandler} to read an object from a
* <code>URLStreamHandler</code>. * {@code URLStreamHandler}.
* @see java.net.ContentHandler * @see java.net.ContentHandler
* @see java.net.URLStreamHandler * @see java.net.URLStreamHandler
*/ */
......
/* /*
* 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -66,7 +66,7 @@ public abstract class CookieHandler { ...@@ -66,7 +66,7 @@ public abstract class CookieHandler {
* there is no system-wide cookie handler currently set. * there is no system-wide cookie handler currently set.
* @throws SecurityException * @throws SecurityException
* If a security manager has been installed and it denies * If a security manager has been installed and it denies
* {@link NetPermission}<tt>("getCookieHandler")</tt> * {@link NetPermission}{@code ("getCookieHandler")}
* @see #setDefault(CookieHandler) * @see #setDefault(CookieHandler)
*/ */
public synchronized static CookieHandler getDefault() { public synchronized static CookieHandler getDefault() {
...@@ -83,10 +83,10 @@ public abstract class CookieHandler { ...@@ -83,10 +83,10 @@ public abstract class CookieHandler {
* Note: non-standard http protocol handlers may ignore this setting. * Note: non-standard http protocol handlers may ignore this setting.
* *
* @param cHandler The HTTP cookie handler, or * @param cHandler The HTTP cookie handler, or
* <code>null</code> to unset. * {@code null} to unset.
* @throws SecurityException * @throws SecurityException
* If a security manager has been installed and it denies * If a security manager has been installed and it denies
* {@link NetPermission}<tt>("setCookieHandler")</tt> * {@link NetPermission}{@code ("setCookieHandler")}
* @see #getDefault() * @see #getDefault()
*/ */
public synchronized static void setDefault(CookieHandler cHandler) { public synchronized static void setDefault(CookieHandler cHandler) {
...@@ -114,7 +114,7 @@ public abstract class CookieHandler { ...@@ -114,7 +114,7 @@ public abstract class CookieHandler {
* called after all request headers related to choosing cookies * called after all request headers related to choosing cookies
* are added, and before the request is sent.</P> * 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 * cookies
* @param requestHeaders - a Map from request header * @param requestHeaders - a Map from request header
* field names to lists of field values representing * field names to lists of field values representing
...@@ -136,7 +136,7 @@ public abstract class CookieHandler { ...@@ -136,7 +136,7 @@ public abstract class CookieHandler {
* fields that are named Set-Cookie2, present in the response * fields that are named Set-Cookie2, present in the response
* headers into a cookie cache. * 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 * @param responseHeaders an immutable map from field names to
* lists of field values representing the response * lists of field values representing the response
* header fields returned * header fields returned
......
/* /*
* 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -131,7 +131,7 @@ public class CookieManager extends CookieHandler ...@@ -131,7 +131,7 @@ public class CookieManager extends CookieHandler
* *
* <p>This constructor will create new cookie manager with default * <p>This constructor will create new cookie manager with default
* cookie store and accept policy. The effect is same as * cookie store and accept policy. The effect is same as
* <tt>CookieManager(null, null)</tt>. * {@code CookieManager(null, null)}.
*/ */
public CookieManager() { public CookieManager() {
this(null, null); this(null, null);
...@@ -141,12 +141,12 @@ public class CookieManager extends CookieHandler ...@@ -141,12 +141,12 @@ public class CookieManager extends CookieHandler
/** /**
* Create a new cookie manager with specified cookie store and cookie policy. * Create a new cookie manager with specified cookie store and cookie policy.
* *
* @param store a <tt>CookieStore</tt> to be used by cookie manager. * @param store a {@code CookieStore} to be used by cookie manager.
* if <tt>null</tt>, cookie manager will use a default one, * if {@code null}, cookie manager will use a default one,
* which is an in-memory CookieStore implmentation. * 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. * 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. * be used.
*/ */
public CookieManager(CookieStore store, public CookieManager(CookieStore store,
...@@ -170,11 +170,11 @@ public class CookieManager extends CookieHandler ...@@ -170,11 +170,11 @@ public class CookieManager extends CookieHandler
/** /**
* To set the cookie policy of this cookie manager. * 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 * cookie policy ACCEPT_ORIGINAL_SERVER by default. Users always
* can call this method to set another cookie policy. * 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. * has no effects on current cookie policy.
*/ */
public void setCookiePolicy(CookiePolicy cookiePolicy) { public void setCookiePolicy(CookiePolicy cookiePolicy) {
......
/* /*
* 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -71,8 +71,8 @@ public interface CookiePolicy { ...@@ -71,8 +71,8 @@ public interface CookiePolicy {
* *
* @param uri the URI to consult accept policy with * @param uri the URI to consult accept policy with
* @param cookie the HttpCookie object in question * @param cookie the HttpCookie object in question
* @return <tt>true</tt> if this cookie should be accepted; * @return {@code true} if this cookie should be accepted;
* otherwise, <tt>false</tt> * otherwise, {@code false}
*/ */
public boolean shouldAccept(URI uri, HttpCookie cookie); public boolean shouldAccept(URI uri, HttpCookie cookie);
} }
...@@ -32,8 +32,8 @@ import java.util.Map; ...@@ -32,8 +32,8 @@ import java.util.Map;
* A CookieStore object represents a storage for cookie. Can store and retrieve * A CookieStore object represents a storage for cookie. Can store and retrieve
* cookies. * cookies.
* *
* <p>{@link CookieManager} will call <tt>CookieStore.add</tt> to save cookies * <p>{@link CookieManager} will call {@code CookieStore.add} to save cookies
* for every incoming HTTP response, and call <tt>CookieStore.get</tt> to * for every incoming HTTP response, and call {@code CookieStore.get} to
* retrieve cookie for every outgoing HTTP request. A CookieStore * retrieve cookie for every outgoing HTTP request. A CookieStore
* is responsible for removing HttpCookie instances which have expired. * is responsible for removing HttpCookie instances which have expired.
* *
...@@ -55,11 +55,11 @@ public interface CookieStore { ...@@ -55,11 +55,11 @@ public interface CookieStore {
* then it is replaced with the new one. * then it is replaced with the new one.
* *
* @param uri the uri this cookie associated with. * @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 * with an URI
* @param cookie the cookie to store * @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 * @see #get
* *
...@@ -77,7 +77,7 @@ public interface CookieStore { ...@@ -77,7 +77,7 @@ public interface CookieStore {
* *
* @param uri the uri associated with the cookies to be returned * @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 * @see #add
* *
...@@ -108,14 +108,14 @@ public interface CookieStore { ...@@ -108,14 +108,14 @@ public interface CookieStore {
* Remove a cookie from store. * Remove a cookie from store.
* *
* @param uri the uri this cookie associated with. * @param uri the uri this cookie associated with.
* if <tt>null</tt>, the cookie to be removed is not associated * if {@code null}, the cookie to be removed is not associated
* with an URI when added; if not <tt>null</tt>, the cookie * with an URI when added; if not {@code null}, the cookie
* to be removed is associated with the given URI when added. * to be removed is associated with the given URI when added.
* @param cookie the cookie to remove * @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); public boolean remove(URI uri, HttpCookie cookie);
...@@ -123,7 +123,7 @@ public interface CookieStore { ...@@ -123,7 +123,7 @@ public interface CookieStore {
/** /**
* Remove all cookies in this cookie store. * 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(); public boolean removeAll();
} }
/* /*
* 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -68,11 +68,11 @@ class DatagramPacket { ...@@ -68,11 +68,11 @@ class DatagramPacket {
int port; int port;
/** /**
* Constructs a <code>DatagramPacket</code> for receiving packets of * Constructs a {@code DatagramPacket} for receiving packets of
* length <code>length</code>, specifying an offset into the buffer. * length {@code length}, specifying an offset into the buffer.
* <p> * <p>
* The <code>length</code> argument must be less than or equal to * The {@code length} argument must be less than or equal to
* <code>buf.length</code>. * {@code buf.length}.
* *
* @param buf buffer for holding the incoming datagram. * @param buf buffer for holding the incoming datagram.
* @param offset the offset for the buffer * @param offset the offset for the buffer
...@@ -87,11 +87,11 @@ class DatagramPacket { ...@@ -87,11 +87,11 @@ class DatagramPacket {
} }
/** /**
* Constructs a <code>DatagramPacket</code> for receiving packets of * Constructs a {@code DatagramPacket} for receiving packets of
* length <code>length</code>. * length {@code length}.
* <p> * <p>
* The <code>length</code> argument must be less than or equal to * The {@code length} argument must be less than or equal to
* <code>buf.length</code>. * {@code buf.length}.
* *
* @param buf buffer for holding the incoming datagram. * @param buf buffer for holding the incoming datagram.
* @param length the number of bytes to read. * @param length the number of bytes to read.
...@@ -102,10 +102,10 @@ class DatagramPacket { ...@@ -102,10 +102,10 @@ class DatagramPacket {
/** /**
* Constructs a datagram packet for sending packets of length * 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 * specified port number on the specified host. The
* <code>length</code> argument must be less than or equal to * {@code length} argument must be less than or equal to
* <code>buf.length</code>. * {@code buf.length}.
* *
* @param buf the packet data. * @param buf the packet data.
* @param offset the packet data offset. * @param offset the packet data offset.
...@@ -125,10 +125,10 @@ class DatagramPacket { ...@@ -125,10 +125,10 @@ class DatagramPacket {
/** /**
* Constructs a datagram packet for sending packets of length * 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 * specified port number on the specified host. The
* <code>length</code> argument must be less than or equal to * {@code length} argument must be less than or equal to
* <code>buf.length</code>. * {@code buf.length}.
* *
* @param buf the packet data. * @param buf the packet data.
* @param offset the packet data offset. * @param offset the packet data offset.
...@@ -147,9 +147,9 @@ class DatagramPacket { ...@@ -147,9 +147,9 @@ class DatagramPacket {
/** /**
* Constructs a datagram packet for sending packets of length * Constructs a datagram packet for sending packets of length
* <code>length</code> to the specified port number on the specified * {@code length} to the specified port number on the specified
* host. The <code>length</code> argument must be less than or equal * host. The {@code length} argument must be less than or equal
* to <code>buf.length</code>. * to {@code buf.length}.
* *
* @param buf the packet data. * @param buf the packet data.
* @param length the packet length. * @param length the packet length.
...@@ -164,9 +164,9 @@ class DatagramPacket { ...@@ -164,9 +164,9 @@ class DatagramPacket {
/** /**
* Constructs a datagram packet for sending packets of length * Constructs a datagram packet for sending packets of length
* <code>length</code> to the specified port number on the specified * {@code length} to the specified port number on the specified
* host. The <code>length</code> argument must be less than or equal * host. The {@code length} argument must be less than or equal
* to <code>buf.length</code>. * to {@code buf.length}.
* *
* @param buf the packet data. * @param buf the packet data.
* @param length the packet length. * @param length the packet length.
...@@ -207,8 +207,8 @@ class DatagramPacket { ...@@ -207,8 +207,8 @@ class DatagramPacket {
/** /**
* Returns the data buffer. The data received or the data to be sent * Returns the data buffer. The data received or the data to be sent
* starts from the <code>offset</code> in the buffer, * starts from the {@code offset} in the buffer,
* and runs for <code>length</code> long. * and runs for {@code length} long.
* *
* @return the buffer used to receive or send data * @return the buffer used to receive or send data
* @see #setData(byte[], int, int) * @see #setData(byte[], int, int)
...@@ -277,7 +277,7 @@ class DatagramPacket { ...@@ -277,7 +277,7 @@ class DatagramPacket {
/** /**
* Sets the IP address of the machine to which this datagram * Sets the IP address of the machine to which this datagram
* is being sent. * is being sent.
* @param iaddr the <code>InetAddress</code> * @param iaddr the {@code InetAddress}
* @since JDK1.1 * @since JDK1.1
* @see #getAddress() * @see #getAddress()
*/ */
...@@ -303,7 +303,7 @@ class DatagramPacket { ...@@ -303,7 +303,7 @@ class DatagramPacket {
* Sets the SocketAddress (usually IP address + port number) of the remote * Sets the SocketAddress (usually IP address + port number) of the remote
* host to which this datagram is being sent. * 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 * @throws IllegalArgumentException if address is null or is a
* SocketAddress subclass not supported by this socket * SocketAddress subclass not supported by this socket
* *
...@@ -324,7 +324,7 @@ class DatagramPacket { ...@@ -324,7 +324,7 @@ class DatagramPacket {
* Gets the SocketAddress (usually IP address + port number) of the remote * Gets the SocketAddress (usually IP address + port number) of the remote
* host that this packet is being sent to or is coming from. * host that this packet is being sent to or is coming from.
* *
* @return the <code>SocketAddress</code> * @return the {@code SocketAddress}
* @since 1.4 * @since 1.4
* @see #setSocketAddress * @see #setSocketAddress
*/ */
...@@ -335,7 +335,7 @@ class DatagramPacket { ...@@ -335,7 +335,7 @@ class DatagramPacket {
/** /**
* Set the data buffer for this packet. With the offset of * Set the data buffer for this packet. With the offset of
* this DatagramPacket set to 0, and the length set to * 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. * @param buf the buffer to set for this packet.
* *
......
/* /*
* 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -101,7 +101,7 @@ public abstract class DatagramSocketImpl implements SocketOptions { ...@@ -101,7 +101,7 @@ public abstract class DatagramSocketImpl implements SocketOptions {
protected void disconnect() {} 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. * to the address which the packet came from.
* @param i an InetAddress object * @param i an InetAddress object
* @return the port number which the packet came from. * @return the port number which the packet came from.
...@@ -114,7 +114,7 @@ public abstract class DatagramSocketImpl implements SocketOptions { ...@@ -114,7 +114,7 @@ public abstract class DatagramSocketImpl implements SocketOptions {
/** /**
* Peek at the packet to see who it is from. The data is copied into the specified * 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 * but not consumed, so that a subsequent peekData/receive operation
* will see the same data. * will see the same data.
* @param p the Packet Received. * @param p the Packet Received.
...@@ -163,7 +163,7 @@ public abstract class DatagramSocketImpl implements SocketOptions { ...@@ -163,7 +163,7 @@ public abstract class DatagramSocketImpl implements SocketOptions {
/** /**
* Set the TTL (time-to-live) option. * 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 * @exception IOException if an I/O exception occurs
* while setting the time-to-live option. * while setting the time-to-live option.
* @see #getTimeToLive() * @see #getTimeToLive()
...@@ -174,7 +174,7 @@ public abstract class DatagramSocketImpl implements SocketOptions { ...@@ -174,7 +174,7 @@ public abstract class DatagramSocketImpl implements SocketOptions {
* Retrieve the TTL (time-to-live) option. * Retrieve the TTL (time-to-live) option.
* @exception IOException if an I/O exception occurs * @exception IOException if an I/O exception occurs
* while retrieving the time-to-live option * 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) * @see #setTimeToLive(int)
*/ */
protected abstract int getTimeToLive() throws IOException; protected abstract int getTimeToLive() throws IOException;
...@@ -227,7 +227,7 @@ public abstract class DatagramSocketImpl implements SocketOptions { ...@@ -227,7 +227,7 @@ public abstract class DatagramSocketImpl implements SocketOptions {
/** /**
* Gets the local port. * 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() { protected int getLocalPort() {
return localPort; return localPort;
...@@ -235,7 +235,7 @@ public abstract class DatagramSocketImpl implements SocketOptions { ...@@ -235,7 +235,7 @@ public abstract class DatagramSocketImpl implements SocketOptions {
/** /**
* Gets the datagram socket file descriptor. * 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 * file descriptor
*/ */
protected FileDescriptor getFileDescriptor() { protected FileDescriptor getFileDescriptor() {
......
/* /*
* 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -27,7 +27,7 @@ package java.net; ...@@ -27,7 +27,7 @@ package java.net;
/** /**
* This interface defines a factory for datagram socket implementations. It * 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. * implementations.
* *
* @author Yingxian Wang * @author Yingxian Wang
...@@ -37,9 +37,9 @@ package java.net; ...@@ -37,9 +37,9 @@ package java.net;
public public
interface DatagramSocketImplFactory { 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 * @see java.net.DatagramSocketImpl
*/ */
DatagramSocketImpl createDatagramSocketImpl(); DatagramSocketImpl createDatagramSocketImpl();
......
/* /*
* 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -37,7 +37,7 @@ public interface FileNameMap { ...@@ -37,7 +37,7 @@ public interface FileNameMap {
/** /**
* Gets the MIME type for the specified file name. * Gets the MIME type for the specified file name.
* @param fileName 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. * type for the specified file name.
*/ */
public String getContentTypeFor(String fileName); public String getContentTypeFor(String fileName);
......
/* /*
* 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -470,7 +470,7 @@ public final class HttpCookie implements Cloneable { ...@@ -470,7 +470,7 @@ public final class HttpCookie implements Cloneable {
* protocol. * protocol.
* *
* @return {@code false} if the cookie can be sent over any standard * @return {@code false} if the cookie can be sent over any standard
* protocol; otherwise, <code>true</code> * protocol; otherwise, {@code true}
* *
* @see #setSecure * @see #setSecure
*/ */
......
/* /*
* 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -43,7 +43,7 @@ class HttpRetryException extends IOException { ...@@ -43,7 +43,7 @@ class HttpRetryException extends IOException {
private String location; 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 * specified response code and exception detail message
* *
* @param detail the detail message. * @param detail the detail message.
...@@ -55,7 +55,7 @@ class HttpRetryException extends IOException { ...@@ -55,7 +55,7 @@ class HttpRetryException extends IOException {
} }
/** /**
* 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. * responseCode and the contents of the Location response header field.
* *
* @param detail the detail message. * @param detail the detail message.
......
/* /*
* 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -76,14 +76,14 @@ abstract public class HttpURLConnection extends URLConnection { ...@@ -76,14 +76,14 @@ abstract public class HttpURLConnection extends URLConnection {
/** /**
* The chunk-length when using chunked encoding streaming mode for output. * 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 * @since 1.5
*/ */
protected int chunkLength = -1; protected int chunkLength = -1;
/** /**
* The fixed content-length when using fixed-length streaming mode. * 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. * for output.
* *
* <P> <B>NOTE:</B> {@link #fixedContentLengthLong} is recommended instead * <P> <B>NOTE:</B> {@link #fixedContentLengthLong} is recommended instead
...@@ -103,15 +103,15 @@ abstract public class HttpURLConnection extends URLConnection { ...@@ -103,15 +103,15 @@ abstract public class HttpURLConnection extends URLConnection {
protected long fixedContentLengthLong = -1; protected long fixedContentLengthLong = -1;
/** /**
* Returns the key for the <code>n</code><sup>th</sup> header field. * Returns the key for the {@code n}<sup>th</sup> header field.
* Some implementations may treat the <code>0</code><sup>th</sup> * Some implementations may treat the {@code 0}<sup>th</sup>
* header field as special, i.e. as the status line returned by the HTTP * 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 * 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}. * @param n an index, where {@code n >=0}.
* @return the key for the <code>n</code><sup>th</sup> header field, * @return the key for the {@code n}<sup>th</sup> header field,
* or <code>null</code> if the key does not exist. * or {@code null} if the key does not exist.
*/ */
public String getHeaderFieldKey (int n) { public String getHeaderFieldKey (int n) {
return null; return null;
...@@ -251,8 +251,8 @@ abstract public class HttpURLConnection extends URLConnection { ...@@ -251,8 +251,8 @@ abstract public class HttpURLConnection extends URLConnection {
} }
/** /**
* Returns the value for the <code>n</code><sup>th</sup> header field. * Returns the value for the {@code n}<sup>th</sup> header field.
* Some implementations may treat the <code>0</code><sup>th</sup> * Some implementations may treat the {@code 0}<sup>th</sup>
* header field as special, i.e. as the status line returned by the HTTP * header field as special, i.e. as the status line returned by the HTTP
* server. * server.
* <p> * <p>
...@@ -261,8 +261,8 @@ abstract public class HttpURLConnection extends URLConnection { ...@@ -261,8 +261,8 @@ abstract public class HttpURLConnection extends URLConnection {
* the headers in the message. * the headers in the message.
* *
* @param n an index, where {@code n>=0}. * @param n an index, where {@code n>=0}.
* @return the value of the <code>n</code><sup>th</sup> header field, * @return the value of the {@code n}<sup>th</sup> header field,
* or <code>null</code> if the value does not exist. * or {@code null} if the value does not exist.
* @see java.net.HttpURLConnection#getHeaderFieldKey(int) * @see java.net.HttpURLConnection#getHeaderFieldKey(int)
*/ */
public String getHeaderField(int n) { public String getHeaderField(int n) {
...@@ -270,7 +270,7 @@ abstract public class HttpURLConnection extends URLConnection { ...@@ -270,7 +270,7 @@ abstract public class HttpURLConnection extends URLConnection {
} }
/** /**
* An <code>int</code> representing the three digit HTTP Status-Code. * An {@code int} representing the three digit HTTP Status-Code.
* <ul> * <ul>
* <li> 1xx: Informational * <li> 1xx: Informational
* <li> 2xx: Success * <li> 2xx: Success
...@@ -292,12 +292,12 @@ abstract public class HttpURLConnection extends URLConnection { ...@@ -292,12 +292,12 @@ abstract public class HttpURLConnection extends URLConnection {
private static boolean followRedirects = true; private static boolean followRedirects = true;
/** /**
* If <code>true</code>, the protocol will automatically follow redirects. * If {@code true}, the protocol will automatically follow redirects.
* If <code>false</code>, the protocol will not automatically follow * If {@code false}, the protocol will not automatically follow
* redirects. * redirects.
* <p> * <p>
* This field is set by the <code>setInstanceFollowRedirects</code> * This field is set by the {@code setInstanceFollowRedirects}
* method. Its value is returned by the <code>getInstanceFollowRedirects</code> * method. Its value is returned by the {@code getInstanceFollowRedirects}
* method. * method.
* <p> * <p>
* Its default value is based on the value of the static followRedirects * Its default value is based on the value of the static followRedirects
...@@ -328,14 +328,14 @@ abstract public class HttpURLConnection extends URLConnection { ...@@ -328,14 +328,14 @@ abstract public class HttpURLConnection extends URLConnection {
* cannot change this variable. * cannot change this variable.
* <p> * <p>
* If there is a security manager, this method first calls * 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. * to ensure the operation is allowed.
* This could result in a SecurityException. * 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. * to follow HTTP redirects.
* @exception SecurityException if a security manager exists and its * @exception SecurityException if a security manager exists and its
* <code>checkSetFactory</code> method doesn't * {@code checkSetFactory} method doesn't
* allow the operation. * allow the operation.
* @see SecurityManager#checkSetFactory * @see SecurityManager#checkSetFactory
* @see #getFollowRedirects() * @see #getFollowRedirects()
...@@ -350,12 +350,12 @@ abstract public class HttpURLConnection extends URLConnection { ...@@ -350,12 +350,12 @@ abstract public class HttpURLConnection extends URLConnection {
} }
/** /**
* Returns a <code>boolean</code> indicating * Returns a {@code boolean} indicating
* whether or not HTTP redirects (3xx) should * whether or not HTTP redirects (3xx) should
* be automatically followed. * be automatically followed.
* *
* @return <code>true</code> if HTTP redirects should * @return {@code true} if HTTP redirects should
* be automatically followed, <tt>false</tt> if not. * be automatically followed, {@code false} if not.
* @see #setFollowRedirects(boolean) * @see #setFollowRedirects(boolean)
*/ */
public static boolean getFollowRedirects() { public static boolean getFollowRedirects() {
...@@ -364,13 +364,13 @@ abstract public class HttpURLConnection extends URLConnection { ...@@ -364,13 +364,13 @@ abstract public class HttpURLConnection extends URLConnection {
/** /**
* Sets whether HTTP redirects (requests with response code 3xx) should * 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. * instance.
* <p> * <p>
* The default value comes from followRedirects, which defaults to * The default value comes from followRedirects, which defaults to
* true. * true.
* *
* @param followRedirects a <code>boolean</code> indicating * @param followRedirects a {@code boolean} indicating
* whether or not to follow HTTP redirects. * whether or not to follow HTTP redirects.
* *
* @see java.net.HttpURLConnection#instanceFollowRedirects * @see java.net.HttpURLConnection#instanceFollowRedirects
...@@ -382,11 +382,11 @@ abstract public class HttpURLConnection extends URLConnection { ...@@ -382,11 +382,11 @@ abstract public class HttpURLConnection extends URLConnection {
} }
/** /**
* Returns the value of this <code>HttpURLConnection</code>'s * Returns the value of this {@code HttpURLConnection}'s
* <code>instanceFollowRedirects</code> field. * {@code instanceFollowRedirects} field.
* *
* @return the value of this <code>HttpURLConnection</code>'s * @return the value of this {@code HttpURLConnection}'s
* <code>instanceFollowRedirects</code> field. * {@code instanceFollowRedirects} field.
* @see java.net.HttpURLConnection#instanceFollowRedirects * @see java.net.HttpURLConnection#instanceFollowRedirects
* @see #setInstanceFollowRedirects(boolean) * @see #setInstanceFollowRedirects(boolean)
* @since 1.3 * @since 1.3
...@@ -540,7 +540,7 @@ abstract public class HttpURLConnection extends URLConnection { ...@@ -540,7 +540,7 @@ abstract public class HttpURLConnection extends URLConnection {
* Returns null if none could be discerned from the responses * Returns null if none could be discerned from the responses
* (the result was not valid HTTP). * (the result was not valid HTTP).
* @throws IOException if an error occurred connecting to the server. * @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 { public String getResponseMessage() throws IOException {
getResponseCode(); getResponseCode();
...@@ -583,7 +583,7 @@ abstract public class HttpURLConnection extends URLConnection { ...@@ -583,7 +583,7 @@ abstract public class HttpURLConnection extends URLConnection {
* @exception IOException if an error occurs while computing * @exception IOException if an error occurs while computing
* the permission. * the permission.
* *
* @return a <code>SocketPermission</code> object representing the * @return a {@code SocketPermission} object representing the
* permission necessary to connect to the destination * permission necessary to connect to the destination
* host and port. * host and port.
*/ */
......
/* /*
* 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -104,7 +104,7 @@ public final class IDN { ...@@ -104,7 +104,7 @@ public final class IDN {
* @param input the string to be processed * @param input the string to be processed
* @param flag process flag; can be 0 or any logical OR of possible flags * @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 * @throws IllegalArgumentException if the input string doesn't conform to RFC 3490 specification
*/ */
...@@ -130,13 +130,13 @@ public final class IDN { ...@@ -130,13 +130,13 @@ public final class IDN {
* *
* <p> This convenience method works as if by invoking the * <p> This convenience method works as if by invoking the
* two-argument counterpart as follows: * two-argument counterpart as follows:
* <blockquote><tt> * <blockquote>
* {@link #toASCII(String, int) toASCII}(input,&nbsp;0); * {@link #toASCII(String, int) toASCII}(input,&nbsp;0);
* </tt></blockquote> * </blockquote>
* *
* @param input the string to be processed * @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 * @throws IllegalArgumentException if the input string doesn't conform to RFC 3490 specification
*/ */
...@@ -161,7 +161,7 @@ public final class IDN { ...@@ -161,7 +161,7 @@ public final class IDN {
* @param input the string to be processed * @param input the string to be processed
* @param flag process flag; can be 0 or any logical OR of possible flags * @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) { public static String toUnicode(String input, int flag) {
int p = 0, q = 0; int p = 0, q = 0;
...@@ -184,13 +184,13 @@ public final class IDN { ...@@ -184,13 +184,13 @@ public final class IDN {
* *
* <p> This convenience method works as if by invoking the * <p> This convenience method works as if by invoking the
* two-argument counterpart as follows: * two-argument counterpart as follows:
* <blockquote><tt> * <blockquote>
* {@link #toUnicode(String, int) toUnicode}(input,&nbsp;0); * {@link #toUnicode(String, int) toUnicode}(input,&nbsp;0);
* </tt></blockquote> * </blockquote>
* *
* @param input the string to be processed * @param input the string to be processed
* *
* @return the translated <tt>String</tt> * @return the translated {@code String}
*/ */
public static String toUnicode(String input) { public static String toUnicode(String input) {
return toUnicode(input, 0); return toUnicode(input, 0);
......
...@@ -42,10 +42,10 @@ import java.io.ObjectStreamException; ...@@ -42,10 +42,10 @@ import java.io.ObjectStreamException;
* takes one of the following forms: * takes one of the following forms:
* *
* <blockquote><table cellpadding=0 cellspacing=0 summary="layout"> * <blockquote><table cellpadding=0 cellspacing=0 summary="layout">
* <tr><td><tt>d.d.d.d</tt></td></tr> * <tr><td>{@code d.d.d.d}</td></tr>
* <tr><td><tt>d.d.d</tt></td></tr> * <tr><td>{@code d.d.d}</td></tr>
* <tr><td><tt>d.d</tt></td></tr> * <tr><td>{@code d.d}</td></tr>
* <tr><td><tt>d</tt></td></tr> * <tr><td>{@code d}</td></tr>
* </table></blockquote> * </table></blockquote>
* *
* <p> When four parts are specified, each is interpreted as a byte of * <p> When four parts are specified, each is interpreted as a byte of
...@@ -153,7 +153,7 @@ class Inet4Address extends InetAddress { ...@@ -153,7 +153,7 @@ class Inet4Address extends InetAddress {
* Utility routine to check if the InetAddress is an * Utility routine to check if the InetAddress is an
* IP multicast address. IP multicast address is a Class D * IP multicast address. IP multicast address is a Class D
* address i.e first four bits of the address are 1110. * 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 * an IP multicast address
* @since JDK1.1 * @since JDK1.1
*/ */
...@@ -163,7 +163,7 @@ class Inet4Address extends InetAddress { ...@@ -163,7 +163,7 @@ class Inet4Address extends InetAddress {
/** /**
* Utility routine to check if the InetAddress in a wildcard address. * 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. * a wildcard address.
* @since 1.4 * @since 1.4
*/ */
...@@ -174,7 +174,7 @@ class Inet4Address extends InetAddress { ...@@ -174,7 +174,7 @@ class Inet4Address extends InetAddress {
/** /**
* Utility routine to check if the InetAddress is a loopback address. * 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. * a loopback address; or false otherwise.
* @since 1.4 * @since 1.4
*/ */
...@@ -187,7 +187,7 @@ class Inet4Address extends InetAddress { ...@@ -187,7 +187,7 @@ class Inet4Address extends InetAddress {
/** /**
* Utility routine to check if the InetAddress is an link local address. * 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. * a link local address; or false if address is not a link local unicast address.
* @since 1.4 * @since 1.4
*/ */
...@@ -204,7 +204,7 @@ class Inet4Address extends InetAddress { ...@@ -204,7 +204,7 @@ class Inet4Address extends InetAddress {
/** /**
* Utility routine to check if the InetAddress is a site local address. * 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. * a site local address; or false if address is not a site local unicast address.
* @since 1.4 * @since 1.4
*/ */
...@@ -224,7 +224,7 @@ class Inet4Address extends InetAddress { ...@@ -224,7 +224,7 @@ class Inet4Address extends InetAddress {
/** /**
* Utility routine to check if the multicast address has global scope. * 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 * is a multicast address of global scope, false if it is not
* of global scope or it is not a multicast address * of global scope or it is not a multicast address
* @since 1.4 * @since 1.4
...@@ -240,7 +240,7 @@ class Inet4Address extends InetAddress { ...@@ -240,7 +240,7 @@ class Inet4Address extends InetAddress {
/** /**
* Utility routine to check if the multicast address has node scope. * 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 * is a multicast address of node-local scope, false if it is not
* of node-local scope or it is not a multicast address * of node-local scope or it is not a multicast address
* @since 1.4 * @since 1.4
...@@ -253,7 +253,7 @@ class Inet4Address extends InetAddress { ...@@ -253,7 +253,7 @@ class Inet4Address extends InetAddress {
/** /**
* Utility routine to check if the multicast address has link scope. * 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 * is a multicast address of link-local scope, false if it is not
* of link-local scope or it is not a multicast address * of link-local scope or it is not a multicast address
* @since 1.4 * @since 1.4
...@@ -269,7 +269,7 @@ class Inet4Address extends InetAddress { ...@@ -269,7 +269,7 @@ class Inet4Address extends InetAddress {
/** /**
* Utility routine to check if the multicast address has site scope. * 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 * is a multicast address of site-local scope, false if it is not
* of site-local scope or it is not a multicast address * of site-local scope or it is not a multicast address
* @since 1.4 * @since 1.4
...@@ -284,7 +284,7 @@ class Inet4Address extends InetAddress { ...@@ -284,7 +284,7 @@ class Inet4Address extends InetAddress {
/** /**
* Utility routine to check if the multicast address has organization scope. * 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, * is a multicast address of organization-local scope,
* false if it is not of organization-local scope * false if it is not of organization-local scope
* or it is not a multicast address * or it is not a multicast address
...@@ -299,9 +299,9 @@ class Inet4Address extends InetAddress { ...@@ -299,9 +299,9 @@ class Inet4Address extends InetAddress {
} }
/** /**
* 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 * 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. * @return the raw IP address of this object.
*/ */
...@@ -337,18 +337,18 @@ class Inet4Address extends InetAddress { ...@@ -337,18 +337,18 @@ class Inet4Address extends InetAddress {
/** /**
* Compares this object against the specified object. * Compares this object against the specified object.
* The result is <code>true</code> if and only if the argument is * The result is {@code true} if and only if the argument is
* not <code>null</code> and it represents the same IP address as * not {@code null} and it represents the same IP address as
* this object. * this object.
* <p> * <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 * 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. * array components is the same for the byte arrays.
* *
* @param obj the object to compare against. * @param obj the object to compare against.
* @return <code>true</code> if the objects are the same; * @return {@code true} if the objects are the same;
* <code>false</code> otherwise. * {@code false} otherwise.
* @see java.net.InetAddress#getAddress() * @see java.net.InetAddress#getAddress()
*/ */
public boolean equals(Object obj) { public boolean equals(Object obj) {
......
...@@ -47,7 +47,7 @@ import java.util.Enumeration; ...@@ -47,7 +47,7 @@ import java.util.Enumeration;
* address. This is the full form. For example, * address. This is the full form. For example,
* *
* <blockquote><table cellpadding=0 cellspacing=0 summary="layout"> * <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> * </table></blockquote>
* *
* <p> Note that it is not necessary to write the leading zeros in * <p> Note that it is not necessary to write the leading zeros in
...@@ -64,7 +64,7 @@ import java.util.Enumeration; ...@@ -64,7 +64,7 @@ import java.util.Enumeration;
* zeros in an address. For example, * zeros in an address. For example,
* *
* <blockquote><table cellpadding=0 cellspacing=0 summary="layout"> * <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> * </table></blockquote>
* *
* <li><p> An alternative form that is sometimes more convenient * <li><p> An alternative form that is sometimes more convenient
...@@ -75,8 +75,8 @@ import java.util.Enumeration; ...@@ -75,8 +75,8 @@ import java.util.Enumeration;
* standard IPv4 representation address, for example, * standard IPv4 representation address, for example,
* *
* <blockquote><table cellpadding=0 cellspacing=0 summary="layout"> * <blockquote><table cellpadding=0 cellspacing=0 summary="layout">
* <tr><td><tt>::FFFF:129.144.52.38</tt><td></tr> * <tr><td>{@code ::FFFF:129.144.52.38}<td></tr>
* <tr><td><tt>::129.144.52.38</tt><td></tr> * <tr><td>{@code ::129.144.52.38}<td></tr>
* </table></blockquote> * </table></blockquote>
* *
* <p> where "::FFFF:d.d.d.d" and "::d.d.d.d" are, respectively, the * <p> where "::FFFF:d.d.d.d" and "::d.d.d.d" are, respectively, the
...@@ -85,23 +85,23 @@ import java.util.Enumeration; ...@@ -85,23 +85,23 @@ import java.util.Enumeration;
* in the "d.d.d.d" form. The following forms are invalid: * in the "d.d.d.d" form. The following forms are invalid:
* *
* <blockquote><table cellpadding=0 cellspacing=0 summary="layout"> * <blockquote><table cellpadding=0 cellspacing=0 summary="layout">
* <tr><td><tt>::FFFF:d.d.d</tt><td></tr> * <tr><td>{@code ::FFFF:d.d.d}<td></tr>
* <tr><td><tt>::FFFF:d.d</tt><td></tr> * <tr><td>{@code ::FFFF:d.d}<td></tr>
* <tr><td><tt>::d.d.d</tt><td></tr> * <tr><td>{@code ::d.d.d}<td></tr>
* <tr><td><tt>::d.d</tt><td></tr> * <tr><td>{@code ::d.d}<td></tr>
* </table></blockquote> * </table></blockquote>
* *
* <p> The following form: * <p> The following form:
* *
* <blockquote><table cellpadding=0 cellspacing=0 summary="layout"> * <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> * </table></blockquote>
* *
* <p> is valid, however it is an unconventional representation of * <p> is valid, however it is an unconventional representation of
* the IPv4-compatible IPv6 address, * the IPv4-compatible IPv6 address,
* *
* <blockquote><table cellpadding=0 cellspacing=0 summary="layout"> * <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> * </table></blockquote>
* *
* <p> while "::d" corresponds to the general IPv6 address * <p> while "::d" corresponds to the general IPv6 address
...@@ -258,7 +258,7 @@ class Inet6Address extends InetAddress { ...@@ -258,7 +258,7 @@ class Inet6Address extends InetAddress {
* Create an Inet6Address in the exact manner of {@link * Create an Inet6Address in the exact manner of {@link
* InetAddress#getByAddress(String,byte[])} except that the IPv6 scope_id is * InetAddress#getByAddress(String,byte[])} except that the IPv6 scope_id is
* set to the value corresponding to the given interface for the address * 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 * UnknownHostException if the given interface does not have a numeric
* scope_id assigned for the given address type (eg. link-local or site-local). * 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 * See <a href="Inet6Address.html#scoped">here</a> for a description of IPv6
......
...@@ -296,7 +296,7 @@ class InetAddress implements java.io.Serializable { ...@@ -296,7 +296,7 @@ class InetAddress implements java.io.Serializable {
/** /**
* Utility routine to check if the InetAddress is an * Utility routine to check if the InetAddress is an
* IP multicast address. * 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 * an IP multicast address
* @since JDK1.1 * @since JDK1.1
*/ */
...@@ -306,7 +306,7 @@ class InetAddress implements java.io.Serializable { ...@@ -306,7 +306,7 @@ class InetAddress implements java.io.Serializable {
/** /**
* Utility routine to check if the InetAddress in a wildcard address. * 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. * a wildcard address.
* @since 1.4 * @since 1.4
*/ */
...@@ -317,7 +317,7 @@ class InetAddress implements java.io.Serializable { ...@@ -317,7 +317,7 @@ class InetAddress implements java.io.Serializable {
/** /**
* Utility routine to check if the InetAddress is a loopback address. * 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. * a loopback address; or false otherwise.
* @since 1.4 * @since 1.4
*/ */
...@@ -328,7 +328,7 @@ class InetAddress implements java.io.Serializable { ...@@ -328,7 +328,7 @@ class InetAddress implements java.io.Serializable {
/** /**
* Utility routine to check if the InetAddress is an link local address. * 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. * a link local address; or false if address is not a link local unicast address.
* @since 1.4 * @since 1.4
*/ */
...@@ -339,7 +339,7 @@ class InetAddress implements java.io.Serializable { ...@@ -339,7 +339,7 @@ class InetAddress implements java.io.Serializable {
/** /**
* Utility routine to check if the InetAddress is a site local address. * 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. * a site local address; or false if address is not a site local unicast address.
* @since 1.4 * @since 1.4
*/ */
...@@ -350,7 +350,7 @@ class InetAddress implements java.io.Serializable { ...@@ -350,7 +350,7 @@ class InetAddress implements java.io.Serializable {
/** /**
* Utility routine to check if the multicast address has global scope. * 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 * is a multicast address of global scope, false if it is not
* of global scope or it is not a multicast address * of global scope or it is not a multicast address
* @since 1.4 * @since 1.4
...@@ -362,7 +362,7 @@ class InetAddress implements java.io.Serializable { ...@@ -362,7 +362,7 @@ class InetAddress implements java.io.Serializable {
/** /**
* Utility routine to check if the multicast address has node scope. * 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 * is a multicast address of node-local scope, false if it is not
* of node-local scope or it is not a multicast address * of node-local scope or it is not a multicast address
* @since 1.4 * @since 1.4
...@@ -374,7 +374,7 @@ class InetAddress implements java.io.Serializable { ...@@ -374,7 +374,7 @@ class InetAddress implements java.io.Serializable {
/** /**
* Utility routine to check if the multicast address has link scope. * 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 * is a multicast address of link-local scope, false if it is not
* of link-local scope or it is not a multicast address * of link-local scope or it is not a multicast address
* @since 1.4 * @since 1.4
...@@ -386,7 +386,7 @@ class InetAddress implements java.io.Serializable { ...@@ -386,7 +386,7 @@ class InetAddress implements java.io.Serializable {
/** /**
* Utility routine to check if the multicast address has site scope. * 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 * is a multicast address of site-local scope, false if it is not
* of site-local scope or it is not a multicast address * of site-local scope or it is not a multicast address
* @since 1.4 * @since 1.4
...@@ -398,7 +398,7 @@ class InetAddress implements java.io.Serializable { ...@@ -398,7 +398,7 @@ class InetAddress implements java.io.Serializable {
/** /**
* Utility routine to check if the multicast address has organization scope. * 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, * is a multicast address of organization-local scope,
* false if it is not of organization-local scope * false if it is not of organization-local scope
* or it is not a multicast address * or it is not a multicast address
...@@ -424,9 +424,9 @@ class InetAddress implements java.io.Serializable { ...@@ -424,9 +424,9 @@ class InetAddress implements java.io.Serializable {
* in an IllegalArgumentException being thrown. * in an IllegalArgumentException being thrown.
* *
* @param timeout the time, in milliseconds, before the call aborts * @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 IOException if a network error occurs
* @throws IllegalArgumentException if <code>timeout</code> is negative. * @throws IllegalArgumentException if {@code timeout} is negative.
* @since 1.5 * @since 1.5
*/ */
public boolean isReachable(int timeout) throws IOException { public boolean isReachable(int timeout) throws IOException {
...@@ -442,10 +442,10 @@ class InetAddress implements java.io.Serializable { ...@@ -442,10 +442,10 @@ class InetAddress implements java.io.Serializable {
* privilege can be obtained, otherwise it will try to establish * privilege can be obtained, otherwise it will try to establish
* a TCP connection on port 7 (Echo) of the destination host. * a TCP connection on port 7 (Echo) of the destination host.
* <p> * <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 * let the caller specify which network interface the test will go through
* and the maximum number of hops the packets should 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. * IllegalArgumentException being thrown.
* <p> * <p>
* The timeout value, in milliseconds, indicates the maximum amount of time * The timeout value, in milliseconds, indicates the maximum amount of time
...@@ -458,9 +458,9 @@ class InetAddress implements java.io.Serializable { ...@@ -458,9 +458,9 @@ class InetAddress implements java.io.Serializable {
* @param ttl the maximum numbers of hops to try or 0 for the * @param ttl the maximum numbers of hops to try or 0 for the
* default * default
* @param timeout the time, in milliseconds, before the call aborts * @param timeout the time, in milliseconds, before the call aborts
* @throws IllegalArgumentException if either <code>timeout</code> * @throws IllegalArgumentException if either {@code timeout}
* or <code>ttl</code> are negative. * or {@code ttl} are negative.
* @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 IOException if a network error occurs
* @since 1.5 * @since 1.5
*/ */
...@@ -486,8 +486,8 @@ class InetAddress implements java.io.Serializable { ...@@ -486,8 +486,8 @@ class InetAddress implements java.io.Serializable {
* {@link #getCanonicalHostName() getCanonicalHostName}. * {@link #getCanonicalHostName() getCanonicalHostName}.
* *
* <p>If there is a security manager, its * <p>If there is a security manager, its
* <code>checkConnect</code> method is first called * {@code checkConnect} method is first called
* with the hostname and <code>-1</code> * with the hostname and {@code -1}
* as its arguments to see if the operation is allowed. * as its arguments to see if the operation is allowed.
* If the operation is not allowed, it will return * If the operation is not allowed, it will return
* the textual representation of the IP address. * the textual representation of the IP address.
...@@ -511,8 +511,8 @@ class InetAddress implements java.io.Serializable { ...@@ -511,8 +511,8 @@ class InetAddress implements java.io.Serializable {
* here without a security check. * here without a security check.
* *
* <p>If there is a security manager, this method first * <p>If there is a security manager, this method first
* calls its <code>checkConnect</code> method * calls its {@code checkConnect} method
* with the hostname and <code>-1</code> * with the hostname and {@code -1}
* as its arguments to see if the calling code is allowed to know * 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. * the hostname for this IP address, i.e., to connect to the host.
* If the operation is not allowed, it will return * If the operation is not allowed, it will return
...@@ -539,8 +539,8 @@ class InetAddress implements java.io.Serializable { ...@@ -539,8 +539,8 @@ class InetAddress implements java.io.Serializable {
* the FQDN depending on the underlying system configuration. * the FQDN depending on the underlying system configuration.
* *
* <p>If there is a security manager, this method first * <p>If there is a security manager, this method first
* calls its <code>checkConnect</code> method * calls its {@code checkConnect} method
* with the hostname and <code>-1</code> * with the hostname and {@code -1}
* as its arguments to see if the calling code is allowed to know * 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. * the hostname for this IP address, i.e., to connect to the host.
* If the operation is not allowed, it will return * If the operation is not allowed, it will return
...@@ -566,8 +566,8 @@ class InetAddress implements java.io.Serializable { ...@@ -566,8 +566,8 @@ class InetAddress implements java.io.Serializable {
* Returns the hostname for this address. * Returns the hostname for this address.
* *
* <p>If there is a security manager, this method first * <p>If there is a security manager, this method first
* calls its <code>checkConnect</code> method * calls its {@code checkConnect} method
* with the hostname and <code>-1</code> * with the hostname and {@code -1}
* as its arguments to see if the calling code is allowed to know * 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. * the hostname for this IP address, i.e., to connect to the host.
* If the operation is not allowed, it will return * If the operation is not allowed, it will return
...@@ -633,9 +633,9 @@ class InetAddress implements java.io.Serializable { ...@@ -633,9 +633,9 @@ class InetAddress implements java.io.Serializable {
} }
/** /**
* 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 * 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. * @return the raw IP address of this object.
*/ */
...@@ -664,18 +664,18 @@ class InetAddress implements java.io.Serializable { ...@@ -664,18 +664,18 @@ class InetAddress implements java.io.Serializable {
/** /**
* Compares this object against the specified object. * Compares this object against the specified object.
* The result is <code>true</code> if and only if the argument is * The result is {@code true} if and only if the argument is
* not <code>null</code> and it represents the same IP address as * not {@code null} and it represents the same IP address as
* this object. * this object.
* <p> * <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 * 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. * array components is the same for the byte arrays.
* *
* @param obj the object to compare against. * @param obj the object to compare against.
* @return <code>true</code> if the objects are the same; * @return {@code true} if the objects are the same;
* <code>false</code> otherwise. * {@code false} otherwise.
* @see java.net.InetAddress#getAddress() * @see java.net.InetAddress#getAddress()
*/ */
public boolean equals(Object obj) { public boolean equals(Object obj) {
...@@ -683,7 +683,7 @@ class InetAddress implements java.io.Serializable { ...@@ -683,7 +683,7 @@ class InetAddress implements java.io.Serializable {
} }
/** /**
* 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 * string returned is of the form: hostname / literal IP
* address. * address.
* *
...@@ -974,7 +974,7 @@ class InetAddress implements java.io.Serializable { ...@@ -974,7 +974,7 @@ class InetAddress implements java.io.Serializable {
* No name service is checked for the validity of the address. * No name service is checked for the validity of the address.
* *
* <p> The host name can either be a machine name, such as * <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. * address.
* <p> No validity checking is done on the host name either. * <p> No validity checking is done on the host name either.
* *
...@@ -1019,26 +1019,26 @@ class InetAddress implements java.io.Serializable { ...@@ -1019,26 +1019,26 @@ class InetAddress implements java.io.Serializable {
* Determines the IP address of a host, given the host's name. * Determines the IP address of a host, given the host's name.
* *
* <p> The host name can either be a machine name, such as * <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 * IP address. If a literal IP address is supplied, only the
* validity of the address format is checked. * 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 * either the form defined in RFC 2732 or the literal IPv6 address
* format defined in RFC 2373 is accepted. IPv6 scoped addresses are also * 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 * supported. See <a href="Inet6Address.html#scoped">here</a> for a description of IPv6
* scoped addresses. * 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. * representing an address of the loopback interface is returned.
* See <a href="http://www.ietf.org/rfc/rfc3330.txt">RFC&nbsp;3330</a> * 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 and <a href="http://www.ietf.org/rfc/rfc2373.txt">RFC&nbsp;2373</a>
* section&nbsp;2.5.3. </p> * 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. * @return an IP address for the given host name.
* @exception UnknownHostException if no IP address for the * @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. * for a global IPv6 address.
* @exception SecurityException if a security manager exists * @exception SecurityException if a security manager exists
* and its checkConnect method doesn't allow the operation * and its checkConnect method doesn't allow the operation
...@@ -1059,37 +1059,37 @@ class InetAddress implements java.io.Serializable { ...@@ -1059,37 +1059,37 @@ class InetAddress implements java.io.Serializable {
* based on the configured name service on the system. * based on the configured name service on the system.
* *
* <p> The host name can either be a machine name, such as * <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 * address. If a literal IP address is supplied, only the
* validity of the address format is checked. * 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 * either the form defined in RFC 2732 or the literal IPv6 address
* format defined in RFC 2373 is accepted. A literal IPv6 address may * format defined in RFC 2373 is accepted. A literal IPv6 address may
* also be qualified by appending a scoped zone identifier or scope_id. * also be qualified by appending a scoped zone identifier or scope_id.
* The syntax and usage of scope_ids is described * The syntax and usage of scope_ids is described
* <a href="Inet6Address.html#scoped">here</a>. * <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. * representing an address of the loopback interface is returned.
* See <a href="http://www.ietf.org/rfc/rfc3330.txt">RFC&nbsp;3330</a> * 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 and <a href="http://www.ietf.org/rfc/rfc2373.txt">RFC&nbsp;2373</a>
* section&nbsp;2.5.3. </p> * section&nbsp;2.5.3. </p>
* *
* <p> If there is a security manager and <code>host</code> is not * <p> If there is a security manager and {@code host} is not
* null and <code>host.length() </code> is not equal to zero, the * null and {@code host.length() } is not equal to zero, the
* security manager's * security manager's
* <code>checkConnect</code> method is called * {@code checkConnect} method is called
* with the hostname and <code>-1</code> * with the hostname and {@code -1}
* as its arguments to see if the operation is allowed. * 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. * @return an array of all the IP addresses for a given host name.
* *
* @exception UnknownHostException if no IP address for the * @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. * for a global IPv6 address.
* @exception SecurityException if a security manager exists and its * @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 * @see SecurityManager#checkConnect
*/ */
...@@ -1389,9 +1389,9 @@ class InetAddress implements java.io.Serializable { ...@@ -1389,9 +1389,9 @@ class InetAddress implements java.io.Serializable {
} }
/** /**
* 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 * 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 * <p> This method doesn't block, i.e. no reverse name service lookup
* is performed. * is performed.
...@@ -1417,14 +1417,14 @@ class InetAddress implements java.io.Serializable { ...@@ -1417,14 +1417,14 @@ class InetAddress implements java.io.Serializable {
/** /**
* Returns the address of the local host. This is achieved by retrieving * 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 * 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>Note: The resolved address may be cached for a short period of time.
* </P> * </P>
* *
* <p>If there is a security manager, its * <p>If there is a security manager, its
* <code>checkConnect</code> method is called * {@code checkConnect} method is called
* with the local host name and <code>-1</code> * with the local host name and {@code -1}
* as its arguments to see if the operation is allowed. * as its arguments to see if the operation is allowed.
* If the operation is not allowed, an InetAddress representing * If the operation is not allowed, an InetAddress representing
* the loopback address is returned. * the loopback address is returned.
......
/* /*
* 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -43,7 +43,7 @@ import java.io.ObjectStreamField; ...@@ -43,7 +43,7 @@ import java.io.ObjectStreamField;
* as returned values. * as returned values.
* <p> * <p>
* The <i>wildcard</i> is a special local IP address. It usually means "any" * 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.Socket
* @see java.net.ServerSocket * @see java.net.ServerSocket
...@@ -155,8 +155,8 @@ public class InetSocketAddress ...@@ -155,8 +155,8 @@ public class InetSocketAddress
* and the port number a specified value. * and the port number a specified value.
* <p> * <p>
* A valid port value is between 0 and 65535. * A valid port value is between 0 and 65535.
* A port number of <code>zero</code> will let the system pick up an * A port number of {@code zero} will let the system pick up an
* ephemeral port in a <code>bind</code> operation. * ephemeral port in a {@code bind} operation.
* <p> * <p>
* @param port The port number * @param port The port number
* @throws IllegalArgumentException if the port parameter is outside the specified * @throws IllegalArgumentException if the port parameter is outside the specified
...@@ -171,10 +171,10 @@ public class InetSocketAddress ...@@ -171,10 +171,10 @@ public class InetSocketAddress
* Creates a socket address from an IP address and a port number. * Creates a socket address from an IP address and a port number.
* <p> * <p>
* A valid port value is between 0 and 65535. * A valid port value is between 0 and 65535.
* A port number of <code>zero</code> will let the system pick up an * A port number of {@code zero} will let the system pick up an
* ephemeral port in a <code>bind</code> operation. * ephemeral port in a {@code bind} operation.
* <P> * <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> * <p>
* @param addr The IP address * @param addr The IP address
* @param port The port number * @param port The port number
...@@ -195,13 +195,13 @@ public class InetSocketAddress ...@@ -195,13 +195,13 @@ public class InetSocketAddress
* An attempt will be made to resolve the hostname into an InetAddress. * 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>. * If that attempt fails, the address will be flagged as <I>unresolved</I>.
* <p> * <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 * is called with the host name as its argument to check the permissiom
* to resolve it. This could result in a SecurityException. * to resolve it. This could result in a SecurityException.
* <P> * <P>
* A valid port value is between 0 and 65535. * A valid port value is between 0 and 65535.
* A port number of <code>zero</code> will let the system pick up an * A port number of {@code zero} will let the system pick up an
* ephemeral port in a <code>bind</code> operation. * ephemeral port in a {@code bind} operation.
* <P> * <P>
* @param hostname the Host name * @param hostname the Host name
* @param port The port number * @param port The port number
...@@ -237,8 +237,8 @@ public class InetSocketAddress ...@@ -237,8 +237,8 @@ public class InetSocketAddress
* The address will be flagged as <I>unresolved</I>. * The address will be flagged as <I>unresolved</I>.
* <p> * <p>
* A valid port value is between 0 and 65535. * A valid port value is between 0 and 65535.
* A port number of <code>zero</code> will let the system pick up an * A port number of {@code zero} will let the system pick up an
* ephemeral port in a <code>bind</code> operation. * ephemeral port in a {@code bind} operation.
* <P> * <P>
* @param host the Host name * @param host the Host name
* @param port The port number * @param port The port number
...@@ -246,7 +246,7 @@ public class InetSocketAddress ...@@ -246,7 +246,7 @@ public class InetSocketAddress
* the range of valid port values, or if the hostname * the range of valid port values, or if the hostname
* parameter is <TT>null</TT>. * parameter is <TT>null</TT>.
* @see #isUnresolved() * @see #isUnresolved()
* @return a <code>InetSocketAddress</code> representing the unresolved * @return a {@code InetSocketAddress} representing the unresolved
* socket address * socket address
* @since 1.5 * @since 1.5
*/ */
...@@ -326,16 +326,16 @@ public class InetSocketAddress ...@@ -326,16 +326,16 @@ public class InetSocketAddress
/** /**
* *
* 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() { public final InetAddress getAddress() {
return holder.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 * Note: This method may trigger a name service reverse lookup if the
* address was created with a literal IP address. * address was created with a literal IP address.
* *
...@@ -360,8 +360,8 @@ public class InetSocketAddress ...@@ -360,8 +360,8 @@ public class InetSocketAddress
/** /**
* Checks whether the address has been resolved or not. * Checks whether the address has been resolved or not.
* *
* @return <code>true</code> if the hostname couldn't be resolved into * @return {@code true} if the hostname couldn't be resolved into
* an <code>InetAddress</code>. * an {@code InetAddress}.
*/ */
public final boolean isUnresolved() { public final boolean isUnresolved() {
return holder.isUnresolved(); return holder.isUnresolved();
...@@ -382,11 +382,11 @@ public class InetSocketAddress ...@@ -382,11 +382,11 @@ public class InetSocketAddress
/** /**
* Compares this object against the specified object. * Compares this object against the specified object.
* The result is <code>true</code> if and only if the argument is * The result is {@code true} if and only if the argument is
* not <code>null</code> and it represents the same address as * not {@code null} and it represents the same address as
* this object. * this object.
* <p> * <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 * address if both the InetAddresses (or hostnames if it is unresolved) and port
* numbers are equal. * numbers are equal.
* If both addresses are unresolved, then the hostname and the port number * If both addresses are unresolved, then the hostname and the port number
...@@ -396,8 +396,8 @@ public class InetSocketAddress ...@@ -396,8 +396,8 @@ public class InetSocketAddress
* considered equal. * considered equal.
* *
* @param obj the object to compare against. * @param obj the object to compare against.
* @return <code>true</code> if the objects are the same; * @return {@code true} if the objects are the same;
* <code>false</code> otherwise. * {@code false} otherwise.
* @see java.net.InetAddress#equals(java.lang.Object) * @see java.net.InetAddress#equals(java.lang.Object)
*/ */
@Override @Override
......
/* /*
* 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -39,13 +39,13 @@ public class MalformedURLException extends IOException { ...@@ -39,13 +39,13 @@ public class MalformedURLException extends IOException {
private static final long serialVersionUID = -182787522200415866L; 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() { public MalformedURLException() {
} }
/** /**
* Constructs a <code>MalformedURLException</code> with the * Constructs a {@code MalformedURLException} with the
* specified detail message. * specified detail message.
* *
* @param msg the detail message. * @param msg the detail message.
......
/* /*
* 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -43,11 +43,11 @@ public final class PasswordAuthentication { ...@@ -43,11 +43,11 @@ public final class PasswordAuthentication {
private char[] password; 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. * user name and password.
* *
* <p> Note that the given user password is cloned before it is stored in * <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 userName the user name
* @param password the user's password * @param password the user's password
......
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册