提交 41010f78 编写于 作者: L lana

Merge

......@@ -222,3 +222,4 @@ a2a2a91075ad85becbe10a39d7fd04ef9bea8df5 jdk8-b92
c4908732fef5235f1b98cafe0ce507771ef7892c jdk8-b98
6a099a36589bd933957272ba63e5263bede29971 jdk8-b99
5be9c5bfcfe9b2a40412b4fb364377d49de014eb jdk8-b100
6901612328239fbd471d20823113c1cf3fdaebee jdk8-b101
/*
* Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -31,7 +31,7 @@ import java.util.*;
import sun.awt.SunHints;
public class CStrike extends FontStrike {
public final class CStrike extends FontStrike {
// Creates the native strike
private static native long createNativeStrikePtr(long nativeFontPtr,
......@@ -68,10 +68,10 @@ public class CStrike extends FontStrike {
Rectangle2D.Float result,
double x, double y);
private CFont nativeFont;
private final CFont nativeFont;
private AffineTransform invDevTx;
private GlyphInfoCache glyphInfoCache;
private GlyphAdvanceCache glyphAdvanceCache;
private final GlyphInfoCache glyphInfoCache;
private final GlyphAdvanceCache glyphAdvanceCache;
private long nativeStrikePtr;
CStrike(final CFont font, final FontStrikeDesc inDesc) {
......@@ -84,11 +84,11 @@ public class CStrike extends FontStrike {
// Normally the device transform should be the identity transform
// for screen operations. The device transform only becomes
// interesting when we are outputting between different dpi surfaces,
// like when we are printing to postscript.
// like when we are printing to postscript or use retina.
if (inDesc.devTx != null && !inDesc.devTx.isIdentity()) {
try {
invDevTx = inDesc.devTx.createInverse();
} catch (NoninvertibleTransformException e) {
} catch (NoninvertibleTransformException ignored) {
// ignored, since device transforms should not be that
// complicated, and if they are - there is nothing we can do,
// so we won't worry about it.
......@@ -134,15 +134,13 @@ public class CStrike extends FontStrike {
nativeStrikePtr = 0;
}
// the fractional metrics default on our platform is OFF
private boolean useFractionalMetrics() {
return desc.fmHint == SunHints.INTVAL_FRACTIONALMETRICS_ON;
}
@Override
public int getNumGlyphs() {
return nativeFont.getNumGlyphs();
}
@Override
StrikeMetrics getFontMetrics() {
if (strikeMetrics == null) {
StrikeMetrics metrics = getFontMetrics(getNativeStrikePtr());
......@@ -155,74 +153,24 @@ public class CStrike extends FontStrike {
return strikeMetrics;
}
float getGlyphAdvance(int glyphCode) {
return getScaledAdvanceForAdvance(getCachedNativeGlyphAdvance(glyphCode));
}
float getCodePointAdvance(int cp) {
float advance = getCachedNativeGlyphAdvance(nativeFont.getMapper().charToGlyph(cp));
double glyphScaleX = desc.glyphTx.getScaleX();
double devScaleX = desc.devTx.getScaleX();
if (devScaleX == 0) {
glyphScaleX = Math.sqrt(desc.glyphTx.getDeterminant());
devScaleX = Math.sqrt(desc.devTx.getDeterminant());
}
if (devScaleX == 0) {
devScaleX = Double.NaN; // this an undefined graphics state
}
advance = (float) (advance * glyphScaleX / devScaleX);
return useFractionalMetrics() ? advance : Math.round(advance);
}
// calculate an advance, and round if not using fractional metrics
private float getScaledAdvanceForAdvance(float advance) {
if (invDevTx != null) {
advance *= invDevTx.getScaleX();
}
advance *= desc.glyphTx.getScaleX();
return useFractionalMetrics() ? advance : Math.round(advance);
}
Point2D.Float getCharMetrics(char ch) {
return getScaledPointForAdvance(getCachedNativeGlyphAdvance(nativeFont.getMapper().charToGlyph(ch)));
@Override
float getGlyphAdvance(final int glyphCode) {
return getCachedNativeGlyphAdvance(glyphCode);
}
Point2D.Float getGlyphMetrics(int glyphCode) {
return getScaledPointForAdvance(getCachedNativeGlyphAdvance(glyphCode));
@Override
float getCodePointAdvance(final int cp) {
return getGlyphAdvance(nativeFont.getMapper().charToGlyph(cp));
}
// calculate an advance point, and round if not using fractional metrics
private Point2D.Float getScaledPointForAdvance(float advance) {
Point2D.Float pt = new Point2D.Float(advance, 0);
if (!desc.glyphTx.isIdentity()) {
return scalePoint(pt);
}
if (!useFractionalMetrics()) {
pt.x = Math.round(pt.x);
}
return pt;
@Override
Point2D.Float getCharMetrics(final char ch) {
return getGlyphMetrics(nativeFont.getMapper().charToGlyph(ch));
}
private Point2D.Float scalePoint(Point2D.Float pt) {
if (invDevTx != null) {
// transform the point out of the device space first
invDevTx.transform(pt, pt);
}
desc.glyphTx.transform(pt, pt);
pt.x -= desc.glyphTx.getTranslateX();
pt.y -= desc.glyphTx.getTranslateY();
if (!useFractionalMetrics()) {
pt.x = Math.round(pt.x);
pt.y = Math.round(pt.y);
}
return pt;
@Override
Point2D.Float getGlyphMetrics(final int glyphCode) {
return new Point2D.Float(getGlyphAdvance(glyphCode), 0.0f);
}
Rectangle2D.Float getGlyphOutlineBounds(int glyphCode) {
......@@ -414,9 +362,7 @@ public class CStrike extends FontStrike {
private SparseBitShiftingTwoLayerArray secondLayerCache;
private HashMap<Integer, Long> generalCache;
public GlyphInfoCache(final Font2D nativeFont,
final FontStrikeDesc desc)
{
GlyphInfoCache(final Font2D nativeFont, final FontStrikeDesc desc) {
super(nativeFont, desc);
firstLayerCache = new long[FIRST_LAYER_SIZE];
}
......@@ -527,7 +473,7 @@ public class CStrike extends FontStrike {
final int shift;
final int secondLayerLength;
public SparseBitShiftingTwoLayerArray(final int size, final int shift) {
SparseBitShiftingTwoLayerArray(final int size, final int shift) {
this.shift = shift;
this.cache = new long[1 << shift][];
this.secondLayerLength = size >> shift;
......@@ -559,6 +505,12 @@ public class CStrike extends FontStrike {
private SparseBitShiftingTwoLayerArray secondLayerCache;
private HashMap<Integer, Float> generalCache;
// Empty non private constructor was added because access to this
// class shouldn't be emulated by a synthetic accessor method.
GlyphAdvanceCache() {
super();
}
public synchronized float get(final int index) {
if (index < 0) {
if (-index < SECOND_LAYER_SIZE) {
......@@ -609,9 +561,7 @@ public class CStrike extends FontStrike {
final int shift;
final int secondLayerLength;
public SparseBitShiftingTwoLayerArray(final int size,
final int shift)
{
SparseBitShiftingTwoLayerArray(final int size, final int shift) {
this.shift = shift;
this.cache = new float[1 << shift][];
this.secondLayerLength = size >> shift;
......
/*
* Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -31,11 +31,12 @@
@interface AWTStrike : NSObject {
@public
AWTFont * fAWTFont;
CGFloat fSize;
CGFloat fSize;
JRSFontRenderingStyle fStyle;
jint fAAStyle;
jint fAAStyle;
CGAffineTransform fTx;
CGAffineTransform fDevTx;
CGAffineTransform fAltTx; // alternate strike tx used for Sun2D
CGAffineTransform fFontTx;
}
......
/*
* Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -65,6 +65,7 @@ static CGAffineTransform sInverseTX = { 1, 0, 0, -1, 0, 0 };
invDevTx.b *= -1;
invDevTx.c *= -1;
fFontTx = CGAffineTransformConcat(CGAffineTransformConcat(tx, invDevTx), sInverseTX);
fDevTx = CGAffineTransformInvert(invDevTx);
// the "font size" is the square root of the determinant of the matrix
fSize = sqrt(abs(fFontTx.a * fFontTx.d - fFontTx.b * fFontTx.c));
......@@ -148,7 +149,8 @@ Java_sun_font_CStrike_getNativeGlyphAdvance
{
CGSize advance;
JNF_COCOA_ENTER(env);
AWTFont *awtFont = ((AWTStrike *)jlong_to_ptr(awtStrikePtr))->fAWTFont;
AWTStrike *awtStrike = (AWTStrike *)jlong_to_ptr(awtStrikePtr);
AWTFont *awtFont = awtStrike->fAWTFont;
// negative glyph codes are really unicodes, which were placed there by the mapper
// to indicate we should use CoreText to substitute the character
......@@ -156,6 +158,10 @@ JNF_COCOA_ENTER(env);
const CTFontRef fallback = CTS_CopyCTFallbackFontAndGlyphForJavaGlyphCode(awtFont, glyphCode, &glyph);
CTFontGetAdvancesForGlyphs(fallback, kCTFontDefaultOrientation, &glyph, &advance, 1);
CFRelease(fallback);
advance = CGSizeApplyAffineTransform(advance, awtStrike->fFontTx);
if (!JRSFontStyleUsesFractionalMetrics(awtStrike->fStyle)) {
advance.width = round(advance.width);
}
JNF_COCOA_EXIT(env);
return advance.width;
......
/*
* Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -455,6 +455,7 @@ CGGI_ClearCanvas(CGGI_GlyphCanvas *canvas, GlyphInfo *info)
#define CGGI_GLYPH_BBOX_PADDING 2.0f
static inline GlyphInfo *
CGGI_CreateNewGlyphInfoFrom(CGSize advance, CGRect bbox,
const AWTStrike *strike,
const CGGI_RenderingMode *mode)
{
size_t pixelSize = mode->glyphDescriptor->pixelSize;
......@@ -477,6 +478,12 @@ CGGI_CreateNewGlyphInfoFrom(CGSize advance, CGRect bbox,
width = 1;
height = 1;
}
advance = CGSizeApplyAffineTransform(advance, strike->fFontTx);
if (!JRSFontStyleUsesFractionalMetrics(strike->fStyle)) {
advance.width = round(advance.width);
advance.height = round(advance.height);
}
advance = CGSizeApplyAffineTransform(advance, strike->fDevTx);
#ifdef USE_IMAGE_ALIGNED_MEMORY
// create separate memory
......@@ -564,10 +571,10 @@ CGGI_CreateImageForUnicode
JRSFontGetBoundingBoxesForGlyphsAndStyle(fallback, &tx, style, &glyph, 1, &bbox);
CGSize advance;
JRSFontGetAdvancesForGlyphsAndStyle(fallback, &tx, strike->fStyle, &glyph, 1, &advance);
CTFontGetAdvancesForGlyphs(fallback, kCTFontDefaultOrientation, &glyph, &advance, 1);
// create the Sun2D GlyphInfo we are going to strike into
GlyphInfo *info = CGGI_CreateNewGlyphInfoFrom(advance, bbox, mode);
GlyphInfo *info = CGGI_CreateNewGlyphInfoFrom(advance, bbox, strike, mode);
// fix the context size, just in case the substituted character is unexpectedly large
CGGI_SizeCanvas(canvas, info->width, info->height, mode->cgFontMode);
......@@ -715,7 +722,7 @@ CGGI_CreateGlyphInfos(jlong *glyphInfos, const AWTStrike *strike,
JRSFontRenderingStyle bboxCGMode = JRSFontAlignStyleForFractionalMeasurement(strike->fStyle);
JRSFontGetBoundingBoxesForGlyphsAndStyle((CTFontRef)font->fFont, &tx, bboxCGMode, glyphs, len, bboxes);
JRSFontGetAdvancesForGlyphsAndStyle((CTFontRef)font->fFont, &tx, strike->fStyle, glyphs, len, advances);
CTFontGetAdvancesForGlyphs((CTFontRef)font->fFont, kCTFontDefaultOrientation, glyphs, advances, len);
size_t maxWidth = 1;
size_t maxHeight = 1;
......@@ -732,7 +739,7 @@ CGGI_CreateGlyphInfos(jlong *glyphInfos, const AWTStrike *strike,
CGSize advance = advances[i];
CGRect bbox = bboxes[i];
GlyphInfo *glyphInfo = CGGI_CreateNewGlyphInfoFrom(advance, bbox, mode);
GlyphInfo *glyphInfo = CGGI_CreateNewGlyphInfoFrom(advance, bbox, strike, mode);
if (maxWidth < glyphInfo->width) maxWidth = glyphInfo->width;
if (maxHeight < glyphInfo->height) maxHeight = glyphInfo->height;
......
......@@ -332,7 +332,7 @@ function streamClose(stream) {
* @param str input from which script is loaded and evaluated
*/
if (typeof(load) == 'undefined') {
var load = function(str) {
this.load = function(str) {
var stream = inStream(str);
var bstream = new BufferedInputStream(stream);
var reader = new BufferedReader(new InputStreamReader(bstream));
......@@ -712,7 +712,7 @@ if (typeof(exit) == 'undefined') {
* @param exitCode integer code returned to OS shell.
* optional, defaults to 0
*/
var exit = function (code) {
this.exit = function (code) {
if (code) {
java.lang.System.exit(code + 0);
} else {
......@@ -725,7 +725,7 @@ if (typeof(quit) == 'undefined') {
/**
* synonym for exit
*/
var quit = function (code) {
this.quit = function (code) {
exit(code);
}
}
......@@ -881,7 +881,7 @@ if (typeof(printf) == 'undefined') {
* @param format string to format the rest of the print items
* @param args variadic argument list
*/
var printf = function (format, args/*, more args*/) {
this.printf = function (format, args/*, more args*/) {
var array = java.lang.reflect.Array.newInstance(java.lang.Object,
arguments.length - 1);
for (var i = 0; i < array.length; i++) {
......@@ -921,25 +921,7 @@ function read(prompt, multiline) {
}
if (typeof(println) == 'undefined') {
var print = function(str, newline) {
if (typeof(str) == 'undefined') {
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);
};
// just synonym to print
this.println = print;
}
......@@ -48,132 +48,87 @@ package java.io;
* may be thrown if the input stream has been
* closed.
*
* <h4><a name="modified-utf-8">Modified UTF-8</a></h4>
* <h3><a name="modified-utf-8">Modified UTF-8</a></h3>
* <p>
* Implementations of the DataInput and DataOutput interfaces represent
* Unicode strings in a format that is a slight modification of UTF-8.
* (For information regarding the standard UTF-8 format, see section
* <i>3.9 Unicode Encoding Forms</i> of <i>The Unicode Standard, Version
* 4.0</i>).
* Note that in the following tables, the most significant bit appears in the
* Note that in the following table, the most significant bit appears in the
* far left-hand column.
* <p>
* All characters in the range {@code '\u005Cu0001'} to
* {@code '\u005Cu007F'} are represented by a single byte:
*
* <blockquote>
* <table border="1" cellspacing="0" cellpadding="8" width="50%"
* <table border="1" cellspacing="0" cellpadding="8"
* summary="Bit values and bytes">
* <tr>
* <th colspan="9"><span style="font-weight:normal">
* All characters in the range {@code '\u005Cu0001'} to
* {@code '\u005Cu007F'} are represented by a single byte:</span></th>
* </tr>
* <tr>
* <td></td>
* <th id="bit_a">Bit Values</th>
* <th colspan="8" id="bit_a">Bit Values</th>
* </tr>
* <tr>
* <th id="byte1_a">Byte 1</th>
* <td>
* <table border="1" cellspacing="0" width="100%">
* <tr>
* <td width="12%"><center>0</center>
* <td colspan="7"><center>bits 6-0</center>
* </tr>
* </table>
* </td>
* <td><center>0</center>
* <td colspan="7"><center>bits 6-0</center>
* </tr>
* <tr>
* <th colspan="9"><span style="font-weight:normal">
* The null character {@code '\u005Cu0000'} and characters
* in the range {@code '\u005Cu0080'} to {@code '\u005Cu07FF'} are
* represented by a pair of bytes:</span></th>
* </tr>
* </table>
* </blockquote>
*
* <p>
* The null character {@code '\u005Cu0000'} and characters in the
* range {@code '\u005Cu0080'} to {@code '\u005Cu07FF'} are
* represented by a pair of bytes:
*
* <blockquote>
* <table border="1" cellspacing="0" cellpadding="8" width="50%"
* summary="Bit values and bytes">
* <tr>
* <td></td>
* <th id="bit_b">Bit Values</th>
* <th colspan="8" id="bit_b">Bit Values</th>
* </tr>
* <tr>
* <th id="byte1_b">Byte 1</th>
* <td>
* <table border="1" cellspacing="0" width="100%">
* <tr>
* <td width="12%"><center>1</center>
* <td width="13%"><center>1</center>
* <td width="12%"><center>0</center>
* <td colspan="5"><center>bits 10-6</center>
* </tr>
* </table>
* </td>
* <td><center>1</center>
* <td><center>1</center>
* <td><center>0</center>
* <td colspan="5"><center>bits 10-6</center>
* </tr>
* <tr>
* <th id="byte2_a">Byte 2</th>
* <td>
* <table border="1" cellspacing="0" width="100%">
* <tr>
* <td width="12%"><center>1</center>
* <td width="13%"><center>0</center>
* <td colspan="6"><center>bits 5-0</center>
* </tr>
* </table>
* </td>
* <td><center>1</center>
* <td><center>0</center>
* <td colspan="6"><center>bits 5-0</center>
* </tr>
* <tr>
* <th colspan="9"><span style="font-weight:normal">
* {@code char} values in the range {@code '\u005Cu0800'}
* to {@code '\u005CuFFFF'} are represented by three bytes:</span></th>
* </tr>
* </table>
* </blockquote>
*
* <br>
* {@code char} values in the range {@code '\u005Cu0800'} to
* {@code '\u005CuFFFF'} are represented by three bytes:
*
* <blockquote>
* <table border="1" cellspacing="0" cellpadding="8" width="50%"
* summary="Bit values and bytes">
* <tr>
* <td></td>
* <th id="bit_c">Bit Values</th>
* <th colspan="8"id="bit_c">Bit Values</th>
* </tr>
* <tr>
* <th id="byte1_c">Byte 1</th>
* <td>
* <table border="1" cellspacing="0" width="100%">
* <tr>
* <td width="12%"><center>1</center>
* <td width="13%"><center>1</center>
* <td width="12%"><center>1</center>
* <td width="13%"><center>0</center>
* <td colspan="4"><center>bits 15-12</center>
* </tr>
* </table>
* </td>
* <td><center>1</center>
* <td><center>1</center>
* <td><center>1</center>
* <td><center>0</center>
* <td colspan="4"><center>bits 15-12</center>
* </tr>
* <tr>
* <th id="byte2_b">Byte 2</th>
* <td>
* <table border="1" cellspacing="0" width="100%">
* <tr>
* <td width="12%"><center>1</center>
* <td width="13%"><center>0</center>
* <td colspan="6"><center>bits 11-6</center>
* </tr>
* </table>
* </td>
* <td><center>1</center>
* <td><center>0</center>
* <td colspan="6"><center>bits 11-6</center>
* </tr>
* <tr>
* <th id="byte3">Byte 3</th>
* <td>
* <table border="1" cellspacing="0" width="100%">
* <tr>
* <td width="12%"><center>1</center>
* <td width="13%"><center>0</center>
* <td colspan="6"><center>bits 5-0</center>
* </tr>
* </table>
* </td>
* <td><center>1</center>
* <td><center>0</center>
* <td colspan="6"><center>bits 5-0</center>
* </tr>
* </table>
* </blockquote>
*
* </blockquote>
* <p>
* The differences between this format and the
* standard UTF-8 format are the following:
......
......@@ -129,7 +129,7 @@ import sun.security.action.GetPropertyAction;
* created, the abstract pathname represented by a <code>File</code> object
* will never change.
*
* <h4>Interoperability with {@code java.nio.file} package</h4>
* <h3>Interoperability with {@code java.nio.file} package</h3>
*
* <p> The <a href="../../java/nio/file/package-summary.html">{@code java.nio.file}</a>
* package defines interfaces and classes for the Java virtual machine to access
......
/*
* Copyright (c) 1996, 2011, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -313,6 +313,7 @@ public class ObjectInputStream
* @throws SecurityException if a security manager exists and its
* <code>checkPermission</code> method denies enabling
* subclassing.
* @throws IOException if an I/O error occurs while creating this stream
* @see SecurityManager#checkPermission
* @see java.io.SerializablePermission
*/
......
/*
* Copyright (c) 1996, 2012, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -265,6 +265,7 @@ public class ObjectOutputStream
* @throws SecurityException if a security manager exists and its
* <code>checkPermission</code> method denies enabling
* subclassing.
* @throws IOException if an I/O error occurs while creating this stream
* @see SecurityManager#checkPermission
* @see java.io.SerializablePermission
*/
......
/*
* Copyright (c) 1996, 2006, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -240,6 +240,8 @@ public class ObjectStreamField
* Returns boolean value indicating whether or not the serializable field
* represented by this ObjectStreamField instance is unshared.
*
* @return {@code true} if this field is unshared
*
* @since 1.4
*/
public boolean isUnshared() {
......
......@@ -128,7 +128,7 @@ public class RandomAccessFile implements DataOutput, DataInput, Closeable {
* meanings are:
*
* <table summary="Access mode permitted values and meanings">
* <tr><th><p align="left">Value</p></th><th><p align="left">Meaning</p></th></tr>
* <tr><th align="left">Value</th><th align="left">Meaning</th></tr>
* <tr><td valign="top"><tt>"r"</tt></td>
* <td> Open for reading only. Invoking any of the <tt>write</tt>
* methods of the resulting object will cause an {@link
......
......@@ -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,
* followed by the kind of type (empty string for primitive types
* and {@code class}, {@code enum}, {@code interface}, or {@code
* &#64;interface}, as appropriate), followed by the type's name,
* followed by an angle-bracketed comma-separated list of the
* type's type parameters, if any.
* and {@code class}, {@code enum}, {@code interface}, or
* <code>&#64;</code>{@code interface}, as appropriate), followed
* by the type's name, followed by an angle-bracketed
* comma-separated list of the type's type parameters, if any.
*
* A space is used to separate modifiers from one another and to
* separate any modifiers from the kind of type. The modifiers
......
......@@ -29,6 +29,8 @@ package java.lang.invoke;
* LambdaConversionException
*/
public class LambdaConversionException extends Exception {
private static final long serialVersionUID = 292L + 8L;
/**
* 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.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -25,13 +25,12 @@
package java.lang.ref;
/* Final references, used to implement finalization */
/**
* Final references, used to implement finalization
*/
class FinalReference<T> extends Reference<T> {
public FinalReference(T referent, ReferenceQueue<? super T> q) {
super(referent, q);
}
}
/*
* Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -29,16 +29,16 @@ import java.security.PrivilegedAction;
import java.security.AccessController;
final class Finalizer extends FinalReference { /* Package-private; must be in
same package as the Reference
class */
final class Finalizer extends FinalReference<Object> { /* Package-private; must be in
same package as the Reference
class */
/* A native method that invokes an arbitrary object's finalize method is
required since the finalize method is protected
*/
static native void invokeFinalizeMethod(Object o) throws Throwable;
private static ReferenceQueue queue = new ReferenceQueue();
private static ReferenceQueue<Object> queue = new ReferenceQueue<>();
private static Finalizer unfinalized = null;
private static final Object lock = new Object();
......
......@@ -96,6 +96,7 @@ public abstract class Reference<T> {
* Enqueued: next reference in queue (or this if last)
* Inactive: this
*/
@SuppressWarnings("rawtypes")
Reference next;
/* When active: next element in a discovered reference list maintained by GC (or this if last)
......@@ -119,7 +120,7 @@ public abstract class Reference<T> {
* them. This list is protected by the above lock object. The
* list uses the discovered field to link its elements.
*/
private static Reference pending = null;
private static Reference<Object> pending = null;
/* High-priority thread to enqueue pending References
*/
......@@ -131,7 +132,7 @@ public abstract class Reference<T> {
public void run() {
for (;;) {
Reference r;
Reference<Object> r;
synchronized (lock) {
if (pending != null) {
r = pending;
......@@ -166,7 +167,7 @@ public abstract class Reference<T> {
continue;
}
ReferenceQueue q = r.queue;
ReferenceQueue<Object> q = r.queue;
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.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -40,14 +40,14 @@ public class ReferenceQueue<T> {
*/
public ReferenceQueue() { }
private static class Null extends ReferenceQueue {
boolean enqueue(Reference r) {
private static class Null<S> extends ReferenceQueue<S> {
boolean enqueue(Reference<? extends S> r) {
return false;
}
}
static ReferenceQueue NULL = new Null();
static ReferenceQueue ENQUEUED = new Null();
static ReferenceQueue<Object> NULL = new Null<>();
static ReferenceQueue<Object> ENQUEUED = new Null<>();
static private class Lock { };
private Lock lock = new Lock();
......@@ -58,7 +58,7 @@ public class ReferenceQueue<T> {
synchronized (lock) {
// Check that since getting the lock this reference hasn't already been
// enqueued (and even then removed)
ReferenceQueue queue = r.queue;
ReferenceQueue<?> queue = r.queue;
if ((queue == NULL) || (queue == ENQUEUED)) {
return false;
}
......@@ -75,10 +75,13 @@ public class ReferenceQueue<T> {
}
}
@SuppressWarnings("unchecked")
private Reference<? extends T> reallyPoll() { /* Must hold lock */
Reference<? extends T> r = head;
if (r != null) {
head = (r.next == r) ? null : r.next;
head = (r.next == r) ?
null :
r.next; // Unchecked due to the next field having a raw type in Reference
r.queue = NULL;
r.next = r;
queueLength--;
......
......@@ -162,7 +162,7 @@ public final class Parameter implements AnnotatedElement {
/**
* Returns the name of the parameter. If the parameter's name is
* {@linkplain isNamePresent() present}, then this method returns
* {@linkplain #isNamePresent() present}, then this method returns
* the name provided by the class file. Otherwise, this method
* synthesizes a name of the form argN, where N is the index of
* the parameter in the descriptor of the method which declares
......
/*
* Copyright (c) 1997, 2004, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -103,17 +103,17 @@ class Authenticator {
* Sets the authenticator that will be used by the networking code
* when a proxy or an HTTP server asks for authentication.
* <p>
* First, if there is a security manager, its <code>checkPermission</code>
* First, if there is a security manager, its {@code checkPermission}
* method is called with a
* <code>NetPermission("setDefaultAuthenticator")</code> permission.
* {@code NetPermission("setDefaultAuthenticator")} permission.
* This may result in a java.lang.SecurityException.
*
* @param a The authenticator to be set. If a is <code>null</code> then
* @param a The authenticator to be set. If a is {@code null} then
* any previously set authenticator is removed.
*
* @throws SecurityException
* if a security manager exists and its
* <code>checkPermission</code> method doesn't allow
* {@code checkPermission} method doesn't allow
* setting the default authenticator.
*
* @see SecurityManager#checkPermission
......@@ -134,9 +134,9 @@ class Authenticator {
* Ask the authenticator that has been registered with the system
* for a password.
* <p>
* First, if there is a security manager, its <code>checkPermission</code>
* First, if there is a security manager, its {@code checkPermission}
* method is called with a
* <code>NetPermission("requestPasswordAuthentication")</code> permission.
* {@code NetPermission("requestPasswordAuthentication")} permission.
* This may result in a java.lang.SecurityException.
*
* @param addr The InetAddress of the site requesting authorization,
......@@ -151,7 +151,7 @@ class Authenticator {
*
* @throws SecurityException
* if a security manager exists and its
* <code>checkPermission</code> method doesn't allow
* {@code checkPermission} method doesn't allow
* the password authentication request.
*
* @see SecurityManager#checkPermission
......@@ -193,9 +193,9 @@ class Authenticator {
* because the hostname can be provided in cases where the InetAddress
* is not available.
* <p>
* First, if there is a security manager, its <code>checkPermission</code>
* First, if there is a security manager, its {@code checkPermission}
* method is called with a
* <code>NetPermission("requestPasswordAuthentication")</code> permission.
* {@code NetPermission("requestPasswordAuthentication")} permission.
* This may result in a java.lang.SecurityException.
*
* @param host The hostname of the site requesting authentication.
......@@ -211,7 +211,7 @@ class Authenticator {
*
* @throws SecurityException
* if a security manager exists and its
* <code>checkPermission</code> method doesn't allow
* {@code checkPermission} method doesn't allow
* the password authentication request.
*
* @see SecurityManager#checkPermission
......@@ -254,9 +254,9 @@ class Authenticator {
* Ask the authenticator that has been registered with the system
* for a password.
* <p>
* First, if there is a security manager, its <code>checkPermission</code>
* First, if there is a security manager, its {@code checkPermission}
* method is called with a
* <code>NetPermission("requestPasswordAuthentication")</code> permission.
* {@code NetPermission("requestPasswordAuthentication")} permission.
* This may result in a java.lang.SecurityException.
*
* @param host The hostname of the site requesting authentication.
......@@ -275,7 +275,7 @@ class Authenticator {
*
* @throws SecurityException
* if a security manager exists and its
* <code>checkPermission</code> method doesn't allow
* {@code checkPermission} method doesn't allow
* the password authentication request.
*
* @see SecurityManager#checkPermission
......@@ -320,8 +320,8 @@ class Authenticator {
}
/**
* Gets the <code>hostname</code> of the
* site or proxy requesting authentication, or <code>null</code>
* Gets the {@code hostname} of the
* site or proxy requesting authentication, or {@code null}
* if not available.
*
* @return the hostname of the connection requiring authentication, or null
......@@ -333,8 +333,8 @@ class Authenticator {
}
/**
* Gets the <code>InetAddress</code> of the
* site requesting authorization, or <code>null</code>
* Gets the {@code InetAddress} of the
* site requesting authorization, or {@code null}
* if not available.
*
* @return the InetAddress of the site requesting authorization, or null
......@@ -346,7 +346,7 @@ class Authenticator {
/**
* Gets the port number for the requested connection.
* @return an <code>int</code> indicating the
* @return an {@code int} indicating the
* port for the requested connection.
*/
protected final int getRequestingPort() {
......
/*
* Copyright (c) 1995, 2012, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -28,21 +28,21 @@ package java.net;
import java.io.IOException;
/**
* The abstract class <code>ContentHandler</code> is the superclass
* of all classes that read an <code>Object</code> from a
* <code>URLConnection</code>.
* The abstract class {@code ContentHandler} is the superclass
* of all classes that read an {@code Object} from a
* {@code URLConnection}.
* <p>
* An application does not generally call the
* <code>getContent</code> method in this class directly. Instead, an
* application calls the <code>getContent</code> method in class
* <code>URL</code> or in <code>URLConnection</code>.
* {@code getContent} method in this class directly. Instead, an
* application calls the {@code getContent} method in class
* {@code URL} or in {@code URLConnection}.
* The application's content handler factory (an instance of a class that
* implements the interface <code>ContentHandlerFactory</code> set
* up by a call to <code>setContentHandler</code>) is
* called with a <code>String</code> giving the MIME type of the
* implements the interface {@code ContentHandlerFactory} set
* up by a call to {@code setContentHandler}) is
* called with a {@code String} giving the MIME type of the
* object being received on the socket. The factory returns an
* instance of a subclass of <code>ContentHandler</code>, and its
* <code>getContent</code> method is called to create the object.
* instance of a subclass of {@code ContentHandler}, and its
* {@code getContent} method is called to create the object.
* <p>
* If no content handler could be found, URLConnection will
* look for a content handler in a user-defineable set of places.
......@@ -75,7 +75,7 @@ abstract public class ContentHandler {
* creates an object from it.
*
* @param urlc a URL connection.
* @return the object read by the <code>ContentHandler</code>.
* @return the object read by the {@code ContentHandler}.
* @exception IOException if an I/O error occurs while reading the object.
*/
abstract public Object getContent(URLConnection urlc) throws IOException;
......@@ -90,7 +90,7 @@ abstract public class ContentHandler {
*
* @param urlc a URL connection.
* @param classes an array of types requested
* @return the object read by the <code>ContentHandler</code> that is
* @return the object read by the {@code ContentHandler} that is
* the first match of the suggested types.
* null if none of the requested are supported.
* @exception IOException if an I/O error occurs while reading the object.
......
/*
* Copyright (c) 1995, 1997, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -28,10 +28,10 @@ package java.net;
/**
* This interface defines a factory for content handlers. An
* implementation of this interface should map a MIME type into an
* instance of <code>ContentHandler</code>.
* instance of {@code ContentHandler}.
* <p>
* This interface is used by the <code>URLStreamHandler</code> class
* to create a <code>ContentHandler</code> for a MIME type.
* This interface is used by the {@code URLStreamHandler} class
* to create a {@code ContentHandler} for a MIME type.
*
* @author James Gosling
* @see java.net.ContentHandler
......@@ -40,13 +40,13 @@ package java.net;
*/
public interface ContentHandlerFactory {
/**
* Creates a new <code>ContentHandler</code> to read an object from
* a <code>URLStreamHandler</code>.
* Creates a new {@code ContentHandler} to read an object from
* a {@code URLStreamHandler}.
*
* @param mimetype the MIME type for which a content handler is desired.
* @return a new <code>ContentHandler</code> to read an object from a
* <code>URLStreamHandler</code>.
* @return a new {@code ContentHandler} to read an object from a
* {@code URLStreamHandler}.
* @see java.net.ContentHandler
* @see java.net.URLStreamHandler
*/
......
/*
* Copyright (c) 2003, 2008, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -66,7 +66,7 @@ public abstract class CookieHandler {
* there is no system-wide cookie handler currently set.
* @throws SecurityException
* If a security manager has been installed and it denies
* {@link NetPermission}<tt>("getCookieHandler")</tt>
* {@link NetPermission}{@code ("getCookieHandler")}
* @see #setDefault(CookieHandler)
*/
public synchronized static CookieHandler getDefault() {
......@@ -83,10 +83,10 @@ public abstract class CookieHandler {
* Note: non-standard http protocol handlers may ignore this setting.
*
* @param cHandler The HTTP cookie handler, or
* <code>null</code> to unset.
* {@code null} to unset.
* @throws SecurityException
* If a security manager has been installed and it denies
* {@link NetPermission}<tt>("setCookieHandler")</tt>
* {@link NetPermission}{@code ("setCookieHandler")}
* @see #getDefault()
*/
public synchronized static void setDefault(CookieHandler cHandler) {
......@@ -114,7 +114,7 @@ public abstract class CookieHandler {
* called after all request headers related to choosing cookies
* are added, and before the request is sent.</P>
*
* @param uri a <code>URI</code> representing the intended use for the
* @param uri a {@code URI} representing the intended use for the
* cookies
* @param requestHeaders - a Map from request header
* field names to lists of field values representing
......@@ -136,7 +136,7 @@ public abstract class CookieHandler {
* fields that are named Set-Cookie2, present in the response
* headers into a cookie cache.
*
* @param uri a <code>URI</code> where the cookies come from
* @param uri a {@code URI} where the cookies come from
* @param responseHeaders an immutable map from field names to
* lists of field values representing the response
* header fields returned
......
/*
* Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -131,7 +131,7 @@ public class CookieManager extends CookieHandler
*
* <p>This constructor will create new cookie manager with default
* cookie store and accept policy. The effect is same as
* <tt>CookieManager(null, null)</tt>.
* {@code CookieManager(null, null)}.
*/
public CookieManager() {
this(null, null);
......@@ -141,12 +141,12 @@ public class CookieManager extends CookieHandler
/**
* Create a new cookie manager with specified cookie store and cookie policy.
*
* @param store a <tt>CookieStore</tt> to be used by cookie manager.
* if <tt>null</tt>, cookie manager will use a default one,
* @param store a {@code CookieStore} to be used by cookie manager.
* if {@code null}, cookie manager will use a default one,
* which is an in-memory CookieStore implmentation.
* @param cookiePolicy a <tt>CookiePolicy</tt> instance
* @param cookiePolicy a {@code CookiePolicy} instance
* to be used by cookie manager as policy callback.
* if <tt>null</tt>, ACCEPT_ORIGINAL_SERVER will
* if {@code null}, ACCEPT_ORIGINAL_SERVER will
* be used.
*/
public CookieManager(CookieStore store,
......@@ -170,11 +170,11 @@ public class CookieManager extends CookieHandler
/**
* To set the cookie policy of this cookie manager.
*
* <p> A instance of <tt>CookieManager</tt> will have
* <p> A instance of {@code CookieManager} will have
* cookie policy ACCEPT_ORIGINAL_SERVER by default. Users always
* can call this method to set another cookie policy.
*
* @param cookiePolicy the cookie policy. Can be <tt>null</tt>, which
* @param cookiePolicy the cookie policy. Can be {@code null}, which
* has no effects on current cookie policy.
*/
public void setCookiePolicy(CookiePolicy cookiePolicy) {
......
/*
* Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -71,8 +71,8 @@ public interface CookiePolicy {
*
* @param uri the URI to consult accept policy with
* @param cookie the HttpCookie object in question
* @return <tt>true</tt> if this cookie should be accepted;
* otherwise, <tt>false</tt>
* @return {@code true} if this cookie should be accepted;
* otherwise, {@code false}
*/
public boolean shouldAccept(URI uri, HttpCookie cookie);
}
......@@ -32,8 +32,8 @@ import java.util.Map;
* A CookieStore object represents a storage for cookie. Can store and retrieve
* cookies.
*
* <p>{@link CookieManager} will call <tt>CookieStore.add</tt> to save cookies
* for every incoming HTTP response, and call <tt>CookieStore.get</tt> to
* <p>{@link CookieManager} will call {@code CookieStore.add} to save cookies
* for every incoming HTTP response, and call {@code CookieStore.get} to
* retrieve cookie for every outgoing HTTP request. A CookieStore
* is responsible for removing HttpCookie instances which have expired.
*
......@@ -55,11 +55,11 @@ public interface CookieStore {
* then it is replaced with the new one.
*
* @param uri the uri this cookie associated with.
* if <tt>null</tt>, this cookie will not be associated
* if {@code null}, this cookie will not be associated
* with an URI
* @param cookie the cookie to store
*
* @throws NullPointerException if <tt>cookie</tt> is <tt>null</tt>
* @throws NullPointerException if {@code cookie} is {@code null}
*
* @see #get
*
......@@ -77,7 +77,7 @@ public interface CookieStore {
*
* @param uri the uri associated with the cookies to be returned
*
* @throws NullPointerException if <tt>uri</tt> is <tt>null</tt>
* @throws NullPointerException if {@code uri} is {@code null}
*
* @see #add
*
......@@ -108,14 +108,14 @@ public interface CookieStore {
* Remove a cookie from store.
*
* @param uri the uri this cookie associated with.
* if <tt>null</tt>, the cookie to be removed is not associated
* with an URI when added; if not <tt>null</tt>, the cookie
* if {@code null}, the cookie to be removed is not associated
* with an URI when added; if not {@code null}, the cookie
* to be removed is associated with the given URI when added.
* @param cookie the cookie to remove
*
* @return <tt>true</tt> if this store contained the specified cookie
* @return {@code true} if this store contained the specified cookie
*
* @throws NullPointerException if <tt>cookie</tt> is <tt>null</tt>
* @throws NullPointerException if {@code cookie} is {@code null}
*/
public boolean remove(URI uri, HttpCookie cookie);
......@@ -123,7 +123,7 @@ public interface CookieStore {
/**
* 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();
}
/*
* Copyright (c) 1995, 2012, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -68,11 +68,11 @@ class DatagramPacket {
int port;
/**
* Constructs a <code>DatagramPacket</code> for receiving packets of
* length <code>length</code>, specifying an offset into the buffer.
* Constructs a {@code DatagramPacket} for receiving packets of
* length {@code length}, specifying an offset into the buffer.
* <p>
* The <code>length</code> argument must be less than or equal to
* <code>buf.length</code>.
* The {@code length} argument must be less than or equal to
* {@code buf.length}.
*
* @param buf buffer for holding the incoming datagram.
* @param offset the offset for the buffer
......@@ -87,11 +87,11 @@ class DatagramPacket {
}
/**
* Constructs a <code>DatagramPacket</code> for receiving packets of
* length <code>length</code>.
* Constructs a {@code DatagramPacket} for receiving packets of
* length {@code length}.
* <p>
* The <code>length</code> argument must be less than or equal to
* <code>buf.length</code>.
* The {@code length} argument must be less than or equal to
* {@code buf.length}.
*
* @param buf buffer for holding the incoming datagram.
* @param length the number of bytes to read.
......@@ -102,10 +102,10 @@ class DatagramPacket {
/**
* Constructs a datagram packet for sending packets of length
* <code>length</code> with offset <code>ioffset</code>to the
* {@code length} with offset {@code ioffset}to the
* specified port number on the specified host. The
* <code>length</code> argument must be less than or equal to
* <code>buf.length</code>.
* {@code length} argument must be less than or equal to
* {@code buf.length}.
*
* @param buf the packet data.
* @param offset the packet data offset.
......@@ -125,10 +125,10 @@ class DatagramPacket {
/**
* Constructs a datagram packet for sending packets of length
* <code>length</code> with offset <code>ioffset</code>to the
* {@code length} with offset {@code ioffset}to the
* specified port number on the specified host. The
* <code>length</code> argument must be less than or equal to
* <code>buf.length</code>.
* {@code length} argument must be less than or equal to
* {@code buf.length}.
*
* @param buf the packet data.
* @param offset the packet data offset.
......@@ -147,9 +147,9 @@ class DatagramPacket {
/**
* Constructs a datagram packet for sending packets of length
* <code>length</code> to the specified port number on the specified
* host. The <code>length</code> argument must be less than or equal
* to <code>buf.length</code>.
* {@code length} to the specified port number on the specified
* host. The {@code length} argument must be less than or equal
* to {@code buf.length}.
*
* @param buf the packet data.
* @param length the packet length.
......@@ -164,9 +164,9 @@ class DatagramPacket {
/**
* Constructs a datagram packet for sending packets of length
* <code>length</code> to the specified port number on the specified
* host. The <code>length</code> argument must be less than or equal
* to <code>buf.length</code>.
* {@code length} to the specified port number on the specified
* host. The {@code length} argument must be less than or equal
* to {@code buf.length}.
*
* @param buf the packet data.
* @param length the packet length.
......@@ -207,8 +207,8 @@ class DatagramPacket {
/**
* Returns the data buffer. The data received or the data to be sent
* starts from the <code>offset</code> in the buffer,
* and runs for <code>length</code> long.
* starts from the {@code offset} in the buffer,
* and runs for {@code length} long.
*
* @return the buffer used to receive or send data
* @see #setData(byte[], int, int)
......@@ -277,7 +277,7 @@ class DatagramPacket {
/**
* Sets the IP address of the machine to which this datagram
* is being sent.
* @param iaddr the <code>InetAddress</code>
* @param iaddr the {@code InetAddress}
* @since JDK1.1
* @see #getAddress()
*/
......@@ -303,7 +303,7 @@ class DatagramPacket {
* Sets the SocketAddress (usually IP address + port number) of the remote
* host to which this datagram is being sent.
*
* @param address the <code>SocketAddress</code>
* @param address the {@code SocketAddress}
* @throws IllegalArgumentException if address is null or is a
* SocketAddress subclass not supported by this socket
*
......@@ -324,7 +324,7 @@ class DatagramPacket {
* Gets the SocketAddress (usually IP address + port number) of the remote
* host that this packet is being sent to or is coming from.
*
* @return the <code>SocketAddress</code>
* @return the {@code SocketAddress}
* @since 1.4
* @see #setSocketAddress
*/
......@@ -335,7 +335,7 @@ class DatagramPacket {
/**
* Set the data buffer for this packet. With the offset of
* this DatagramPacket set to 0, and the length set to
* the length of <code>buf</code>.
* the length of {@code buf}.
*
* @param buf the buffer to set for this packet.
*
......
/*
* Copyright (c) 1996, 2006, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -101,7 +101,7 @@ public abstract class DatagramSocketImpl implements SocketOptions {
protected void disconnect() {}
/**
* Peek at the packet to see who it is from. Updates the specified <code>InetAddress</code>
* Peek at the packet to see who it is from. Updates the specified {@code InetAddress}
* to the address which the packet came from.
* @param i an InetAddress object
* @return the port number which the packet came from.
......@@ -114,7 +114,7 @@ public abstract class DatagramSocketImpl implements SocketOptions {
/**
* Peek at the packet to see who it is from. The data is copied into the specified
* <code>DatagramPacket</code>. The data is returned,
* {@code DatagramPacket}. The data is returned,
* but not consumed, so that a subsequent peekData/receive operation
* will see the same data.
* @param p the Packet Received.
......@@ -163,7 +163,7 @@ public abstract class DatagramSocketImpl implements SocketOptions {
/**
* Set the TTL (time-to-live) option.
* @param ttl an <tt>int</tt> specifying the time-to-live value
* @param ttl an {@code int} specifying the time-to-live value
* @exception IOException if an I/O exception occurs
* while setting the time-to-live option.
* @see #getTimeToLive()
......@@ -174,7 +174,7 @@ public abstract class DatagramSocketImpl implements SocketOptions {
* Retrieve the TTL (time-to-live) option.
* @exception IOException if an I/O exception occurs
* while retrieving the time-to-live option
* @return an <tt>int</tt> representing the time-to-live value
* @return an {@code int} representing the time-to-live value
* @see #setTimeToLive(int)
*/
protected abstract int getTimeToLive() throws IOException;
......@@ -227,7 +227,7 @@ public abstract class DatagramSocketImpl implements SocketOptions {
/**
* Gets the local port.
* @return an <tt>int</tt> representing the local port value
* @return an {@code int} representing the local port value
*/
protected int getLocalPort() {
return localPort;
......@@ -235,7 +235,7 @@ public abstract class DatagramSocketImpl implements SocketOptions {
/**
* Gets the datagram socket file descriptor.
* @return a <tt>FileDescriptor</tt> object representing the datagram socket
* @return a {@code FileDescriptor} object representing the datagram socket
* file descriptor
*/
protected FileDescriptor getFileDescriptor() {
......
/*
* Copyright (c) 1999, 2002, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -27,7 +27,7 @@ package java.net;
/**
* This interface defines a factory for datagram socket implementations. It
* is used by the classes <code>DatagramSocket</code> to create actual socket
* is used by the classes {@code DatagramSocket} to create actual socket
* implementations.
*
* @author Yingxian Wang
......@@ -37,9 +37,9 @@ package java.net;
public
interface DatagramSocketImplFactory {
/**
* Creates a new <code>DatagramSocketImpl</code> instance.
* Creates a new {@code DatagramSocketImpl} instance.
*
* @return a new instance of <code>DatagramSocketImpl</code>.
* @return a new instance of {@code DatagramSocketImpl}.
* @see java.net.DatagramSocketImpl
*/
DatagramSocketImpl createDatagramSocketImpl();
......
/*
* Copyright (c) 1996, 1999, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -37,7 +37,7 @@ public interface FileNameMap {
/**
* Gets the MIME type for the specified file name.
* @param fileName the specified file name
* @return a <code>String</code> indicating the MIME
* @return a {@code String} indicating the MIME
* type for the specified file name.
*/
public String getContentTypeFor(String fileName);
......
/*
* Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -470,7 +470,7 @@ public final class HttpCookie implements Cloneable {
* protocol.
*
* @return {@code false} if the cookie can be sent over any standard
* protocol; otherwise, <code>true</code>
* protocol; otherwise, {@code true}
*
* @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.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -43,7 +43,7 @@ class HttpRetryException extends IOException {
private String location;
/**
* Constructs a new <code>HttpRetryException</code> from the
* Constructs a new {@code HttpRetryException} from the
* specified response code and exception detail message
*
* @param detail the detail message.
......@@ -55,7 +55,7 @@ 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.
*
* @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.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -76,14 +76,14 @@ abstract public class HttpURLConnection extends URLConnection {
/**
* The chunk-length when using chunked encoding streaming mode for output.
* A value of <code>-1</code> means chunked encoding is disabled for output.
* A value of {@code -1} means chunked encoding is disabled for output.
* @since 1.5
*/
protected int chunkLength = -1;
/**
* The fixed content-length when using fixed-length streaming mode.
* A value of <code>-1</code> means fixed-length streaming mode is disabled
* A value of {@code -1} means fixed-length streaming mode is disabled
* for output.
*
* <P> <B>NOTE:</B> {@link #fixedContentLengthLong} is recommended instead
......@@ -103,15 +103,15 @@ abstract public class HttpURLConnection extends URLConnection {
protected long fixedContentLengthLong = -1;
/**
* Returns the key for the <code>n</code><sup>th</sup> header field.
* Some implementations may treat the <code>0</code><sup>th</sup>
* Returns the key for the {@code n}<sup>th</sup> header field.
* Some implementations may treat the {@code 0}<sup>th</sup>
* header field as special, i.e. as the status line returned by the HTTP
* server. In this case, {@link #getHeaderField(int) getHeaderField(0)} returns the status
* line, but <code>getHeaderFieldKey(0)</code> returns null.
* line, but {@code getHeaderFieldKey(0)} returns null.
*
* @param n an index, where {@code n >=0}.
* @return the key for the <code>n</code><sup>th</sup> header field,
* or <code>null</code> if the key does not exist.
* @return the key for the {@code n}<sup>th</sup> header field,
* or {@code null} if the key does not exist.
*/
public String getHeaderFieldKey (int n) {
return null;
......@@ -251,8 +251,8 @@ abstract public class HttpURLConnection extends URLConnection {
}
/**
* Returns the value for the <code>n</code><sup>th</sup> header field.
* Some implementations may treat the <code>0</code><sup>th</sup>
* Returns the value for the {@code n}<sup>th</sup> header field.
* Some implementations may treat the {@code 0}<sup>th</sup>
* header field as special, i.e. as the status line returned by the HTTP
* server.
* <p>
......@@ -261,8 +261,8 @@ abstract public class HttpURLConnection extends URLConnection {
* the headers in the message.
*
* @param n an index, where {@code n>=0}.
* @return the value of the <code>n</code><sup>th</sup> header field,
* or <code>null</code> if the value does not exist.
* @return the value of the {@code n}<sup>th</sup> header field,
* or {@code null} if the value does not exist.
* @see java.net.HttpURLConnection#getHeaderFieldKey(int)
*/
public String getHeaderField(int n) {
......@@ -270,7 +270,7 @@ 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>
* <li> 1xx: Informational
* <li> 2xx: Success
......@@ -292,12 +292,12 @@ abstract public class HttpURLConnection extends URLConnection {
private static boolean followRedirects = true;
/**
* If <code>true</code>, the protocol will automatically follow redirects.
* If <code>false</code>, the protocol will not automatically follow
* If {@code true}, the protocol will automatically follow redirects.
* If {@code false}, the protocol will not automatically follow
* redirects.
* <p>
* This field is set by the <code>setInstanceFollowRedirects</code>
* method. Its value is returned by the <code>getInstanceFollowRedirects</code>
* This field is set by the {@code setInstanceFollowRedirects}
* method. Its value is returned by the {@code getInstanceFollowRedirects}
* method.
* <p>
* Its default value is based on the value of the static followRedirects
......@@ -328,14 +328,14 @@ abstract public class HttpURLConnection extends URLConnection {
* cannot change this variable.
* <p>
* If there is a security manager, this method first calls
* the security manager's <code>checkSetFactory</code> method
* the security manager's {@code checkSetFactory} method
* to ensure the operation is allowed.
* This could result in a SecurityException.
*
* @param set a <code>boolean</code> indicating whether or not
* @param set a {@code boolean} indicating whether or not
* to follow HTTP redirects.
* @exception SecurityException if a security manager exists and its
* <code>checkSetFactory</code> method doesn't
* {@code checkSetFactory} method doesn't
* allow the operation.
* @see SecurityManager#checkSetFactory
* @see #getFollowRedirects()
......@@ -350,12 +350,12 @@ abstract public class HttpURLConnection extends URLConnection {
}
/**
* Returns a <code>boolean</code> indicating
* Returns a {@code boolean} indicating
* whether or not HTTP redirects (3xx) should
* be automatically followed.
*
* @return <code>true</code> if HTTP redirects should
* be automatically followed, <tt>false</tt> if not.
* @return {@code true} if HTTP redirects should
* be automatically followed, {@code false} if not.
* @see #setFollowRedirects(boolean)
*/
public static boolean getFollowRedirects() {
......@@ -364,13 +364,13 @@ abstract public class HttpURLConnection extends URLConnection {
/**
* Sets whether HTTP redirects (requests with response code 3xx) should
* be automatically followed by this <code>HttpURLConnection</code>
* be automatically followed by this {@code HttpURLConnection}
* instance.
* <p>
* The default value comes from followRedirects, which defaults to
* true.
*
* @param followRedirects a <code>boolean</code> indicating
* @param followRedirects a {@code boolean} indicating
* whether or not to follow HTTP redirects.
*
* @see java.net.HttpURLConnection#instanceFollowRedirects
......@@ -382,11 +382,11 @@ abstract public class HttpURLConnection extends URLConnection {
}
/**
* Returns the value of this <code>HttpURLConnection</code>'s
* <code>instanceFollowRedirects</code> field.
* Returns the value of this {@code HttpURLConnection}'s
* {@code instanceFollowRedirects} field.
*
* @return the value of this <code>HttpURLConnection</code>'s
* <code>instanceFollowRedirects</code> field.
* @return the value of this {@code HttpURLConnection}'s
* {@code instanceFollowRedirects} field.
* @see java.net.HttpURLConnection#instanceFollowRedirects
* @see #setInstanceFollowRedirects(boolean)
* @since 1.3
......@@ -540,7 +540,7 @@ abstract public class HttpURLConnection extends URLConnection {
* Returns null if none could be discerned from the responses
* (the result was not valid HTTP).
* @throws IOException if an error occurred connecting to the server.
* @return the HTTP response message, or <code>null</code>
* @return the HTTP response message, or {@code null}
*/
public String getResponseMessage() throws IOException {
getResponseCode();
......@@ -583,7 +583,7 @@ abstract public class HttpURLConnection extends URLConnection {
* @exception IOException if an error occurs while computing
* the permission.
*
* @return a <code>SocketPermission</code> object representing the
* @return a {@code SocketPermission} object representing the
* permission necessary to connect to the destination
* host and port.
*/
......
/*
* Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -104,7 +104,7 @@ public final class IDN {
* @param input the string to be processed
* @param flag process flag; can be 0 or any logical OR of possible flags
*
* @return the translated <tt>String</tt>
* @return the translated {@code String}
*
* @throws IllegalArgumentException if the input string doesn't conform to RFC 3490 specification
*/
......@@ -130,13 +130,13 @@ public final class IDN {
*
* <p> This convenience method works as if by invoking the
* two-argument counterpart as follows:
* <blockquote><tt>
* <blockquote>
* {@link #toASCII(String, int) toASCII}(input,&nbsp;0);
* </tt></blockquote>
* </blockquote>
*
* @param input the string to be processed
*
* @return the translated <tt>String</tt>
* @return the translated {@code String}
*
* @throws IllegalArgumentException if the input string doesn't conform to RFC 3490 specification
*/
......@@ -161,7 +161,7 @@ public final class IDN {
* @param input the string to be processed
* @param flag process flag; can be 0 or any logical OR of possible flags
*
* @return the translated <tt>String</tt>
* @return the translated {@code String}
*/
public static String toUnicode(String input, int flag) {
int p = 0, q = 0;
......@@ -184,13 +184,13 @@ public final class IDN {
*
* <p> This convenience method works as if by invoking the
* two-argument counterpart as follows:
* <blockquote><tt>
* <blockquote>
* {@link #toUnicode(String, int) toUnicode}(input,&nbsp;0);
* </tt></blockquote>
* </blockquote>
*
* @param input the string to be processed
*
* @return the translated <tt>String</tt>
* @return the translated {@code String}
*/
public static String toUnicode(String input) {
return toUnicode(input, 0);
......
......@@ -42,10 +42,10 @@ import java.io.ObjectStreamException;
* takes one of the following forms:
*
* <blockquote><table cellpadding=0 cellspacing=0 summary="layout">
* <tr><td><tt>d.d.d.d</tt></td></tr>
* <tr><td><tt>d.d.d</tt></td></tr>
* <tr><td><tt>d.d</tt></td></tr>
* <tr><td><tt>d</tt></td></tr>
* <tr><td>{@code d.d.d.d}</td></tr>
* <tr><td>{@code d.d.d}</td></tr>
* <tr><td>{@code d.d}</td></tr>
* <tr><td>{@code d}</td></tr>
* </table></blockquote>
*
* <p> When four parts are specified, each is interpreted as a byte of
......@@ -153,7 +153,7 @@ class Inet4Address extends InetAddress {
* Utility routine to check if the InetAddress is an
* IP multicast address. IP multicast address is a Class D
* address i.e first four bits of the address are 1110.
* @return a <code>boolean</code> indicating if the InetAddress is
* @return a {@code boolean} indicating if the InetAddress is
* an IP multicast address
* @since JDK1.1
*/
......@@ -163,7 +163,7 @@ class Inet4Address extends InetAddress {
/**
* Utility routine to check if the InetAddress in a wildcard address.
* @return a <code>boolean</code> indicating if the Inetaddress is
* @return a {@code boolean} indicating if the Inetaddress is
* a wildcard address.
* @since 1.4
*/
......@@ -174,7 +174,7 @@ class Inet4Address extends InetAddress {
/**
* Utility routine to check if the InetAddress is a loopback address.
*
* @return a <code>boolean</code> indicating if the InetAddress is
* @return a {@code boolean} indicating if the InetAddress is
* a loopback address; or false otherwise.
* @since 1.4
*/
......@@ -187,7 +187,7 @@ class Inet4Address extends InetAddress {
/**
* Utility routine to check if the InetAddress is an link local address.
*
* @return a <code>boolean</code> indicating if the InetAddress is
* @return a {@code boolean} indicating if the InetAddress is
* a link local address; or false if address is not a link local unicast address.
* @since 1.4
*/
......@@ -204,7 +204,7 @@ class Inet4Address extends InetAddress {
/**
* Utility routine to check if the InetAddress is a site local address.
*
* @return a <code>boolean</code> indicating if the InetAddress is
* @return a {@code boolean} indicating if the InetAddress is
* a site local address; or false if address is not a site local unicast address.
* @since 1.4
*/
......@@ -224,7 +224,7 @@ class Inet4Address extends InetAddress {
/**
* Utility routine to check if the multicast address has global scope.
*
* @return a <code>boolean</code> indicating if the address has
* @return a {@code boolean} indicating if the address has
* is a multicast address of global scope, false if it is not
* of global scope or it is not a multicast address
* @since 1.4
......@@ -240,7 +240,7 @@ class Inet4Address extends InetAddress {
/**
* Utility routine to check if the multicast address has node scope.
*
* @return a <code>boolean</code> indicating if the address has
* @return a {@code boolean} indicating if the address has
* is a multicast address of node-local scope, false if it is not
* of node-local scope or it is not a multicast address
* @since 1.4
......@@ -253,7 +253,7 @@ class Inet4Address extends InetAddress {
/**
* Utility routine to check if the multicast address has link scope.
*
* @return a <code>boolean</code> indicating if the address has
* @return a {@code boolean} indicating if the address has
* is a multicast address of link-local scope, false if it is not
* of link-local scope or it is not a multicast address
* @since 1.4
......@@ -269,7 +269,7 @@ class Inet4Address extends InetAddress {
/**
* Utility routine to check if the multicast address has site scope.
*
* @return a <code>boolean</code> indicating if the address has
* @return a {@code boolean} indicating if the address has
* is a multicast address of site-local scope, false if it is not
* of site-local scope or it is not a multicast address
* @since 1.4
......@@ -284,7 +284,7 @@ class Inet4Address extends InetAddress {
/**
* Utility routine to check if the multicast address has organization scope.
*
* @return a <code>boolean</code> indicating if the address has
* @return a {@code boolean} indicating if the address has
* is a multicast address of organization-local scope,
* false if it is not of organization-local scope
* or it is not a multicast address
......@@ -299,9 +299,9 @@ 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
* byte of the address is in <code>getAddress()[0]</code>.
* byte of the address is in {@code getAddress()[0]}.
*
* @return the raw IP address of this object.
*/
......@@ -337,18 +337,18 @@ class Inet4Address extends InetAddress {
/**
* Compares this object against the specified object.
* The result is <code>true</code> if and only if the argument is
* not <code>null</code> and it represents the same IP address as
* The result is {@code true} if and only if the argument is
* not {@code null} and it represents the same IP address as
* this object.
* <p>
* Two instances of <code>InetAddress</code> represent the same IP
* Two instances of {@code InetAddress} represent the same IP
* address if the length of the byte arrays returned by
* <code>getAddress</code> is the same for both, and each of the
* {@code getAddress} is the same for both, and each of the
* array components is the same for the byte arrays.
*
* @param obj the object to compare against.
* @return <code>true</code> if the objects are the same;
* <code>false</code> otherwise.
* @return {@code true} if the objects are the same;
* {@code false} otherwise.
* @see java.net.InetAddress#getAddress()
*/
public boolean equals(Object obj) {
......
......@@ -47,7 +47,7 @@ import java.util.Enumeration;
* address. This is the full form. For example,
*
* <blockquote><table cellpadding=0 cellspacing=0 summary="layout">
* <tr><td><tt>1080:0:0:0:8:800:200C:417A</tt><td></tr>
* <tr><td>{@code 1080:0:0:0:8:800:200C:417A}<td></tr>
* </table></blockquote>
*
* <p> Note that it is not necessary to write the leading zeros in
......@@ -64,7 +64,7 @@ import java.util.Enumeration;
* zeros in an address. For example,
*
* <blockquote><table cellpadding=0 cellspacing=0 summary="layout">
* <tr><td><tt>1080::8:800:200C:417A</tt><td></tr>
* <tr><td>{@code 1080::8:800:200C:417A}<td></tr>
* </table></blockquote>
*
* <li><p> An alternative form that is sometimes more convenient
......@@ -75,8 +75,8 @@ import java.util.Enumeration;
* standard IPv4 representation address, for example,
*
* <blockquote><table cellpadding=0 cellspacing=0 summary="layout">
* <tr><td><tt>::FFFF:129.144.52.38</tt><td></tr>
* <tr><td><tt>::129.144.52.38</tt><td></tr>
* <tr><td>{@code ::FFFF:129.144.52.38}<td></tr>
* <tr><td>{@code ::129.144.52.38}<td></tr>
* </table></blockquote>
*
* <p> where "::FFFF:d.d.d.d" and "::d.d.d.d" are, respectively, the
......@@ -85,23 +85,23 @@ import java.util.Enumeration;
* in the "d.d.d.d" form. The following forms are invalid:
*
* <blockquote><table cellpadding=0 cellspacing=0 summary="layout">
* <tr><td><tt>::FFFF:d.d.d</tt><td></tr>
* <tr><td><tt>::FFFF:d.d</tt><td></tr>
* <tr><td><tt>::d.d.d</tt><td></tr>
* <tr><td><tt>::d.d</tt><td></tr>
* <tr><td>{@code ::FFFF:d.d.d}<td></tr>
* <tr><td>{@code ::FFFF:d.d}<td></tr>
* <tr><td>{@code ::d.d.d}<td></tr>
* <tr><td>{@code ::d.d}<td></tr>
* </table></blockquote>
*
* <p> The following form:
*
* <blockquote><table cellpadding=0 cellspacing=0 summary="layout">
* <tr><td><tt>::FFFF:d</tt><td></tr>
* <tr><td>{@code ::FFFF:d}<td></tr>
* </table></blockquote>
*
* <p> is valid, however it is an unconventional representation of
* the IPv4-compatible IPv6 address,
*
* <blockquote><table cellpadding=0 cellspacing=0 summary="layout">
* <tr><td><tt>::255.255.0.d</tt><td></tr>
* <tr><td>{@code ::255.255.0.d}<td></tr>
* </table></blockquote>
*
* <p> while "::d" corresponds to the general IPv6 address
......@@ -258,7 +258,7 @@ class Inet6Address extends InetAddress {
* Create an Inet6Address in the exact manner of {@link
* InetAddress#getByAddress(String,byte[])} except that the IPv6 scope_id is
* set to the value corresponding to the given interface for the address
* type specified in <code>addr</code>. The call will fail with an
* type specified in {@code addr}. The call will fail with an
* UnknownHostException if the given interface does not have a numeric
* scope_id assigned for the given address type (eg. link-local or site-local).
* See <a href="Inet6Address.html#scoped">here</a> for a description of IPv6
......
......@@ -296,7 +296,7 @@ class InetAddress implements java.io.Serializable {
/**
* Utility routine to check if the InetAddress is an
* IP multicast address.
* @return a <code>boolean</code> indicating if the InetAddress is
* @return a {@code boolean} indicating if the InetAddress is
* an IP multicast address
* @since JDK1.1
*/
......@@ -306,7 +306,7 @@ class InetAddress implements java.io.Serializable {
/**
* Utility routine to check if the InetAddress in a wildcard address.
* @return a <code>boolean</code> indicating if the Inetaddress is
* @return a {@code boolean} indicating if the Inetaddress is
* a wildcard address.
* @since 1.4
*/
......@@ -317,7 +317,7 @@ class InetAddress implements java.io.Serializable {
/**
* Utility routine to check if the InetAddress is a loopback address.
*
* @return a <code>boolean</code> indicating if the InetAddress is
* @return a {@code boolean} indicating if the InetAddress is
* a loopback address; or false otherwise.
* @since 1.4
*/
......@@ -328,7 +328,7 @@ class InetAddress implements java.io.Serializable {
/**
* Utility routine to check if the InetAddress is an link local address.
*
* @return a <code>boolean</code> indicating if the InetAddress is
* @return a {@code boolean} indicating if the InetAddress is
* a link local address; or false if address is not a link local unicast address.
* @since 1.4
*/
......@@ -339,7 +339,7 @@ class InetAddress implements java.io.Serializable {
/**
* Utility routine to check if the InetAddress is a site local address.
*
* @return a <code>boolean</code> indicating if the InetAddress is
* @return a {@code boolean} indicating if the InetAddress is
* a site local address; or false if address is not a site local unicast address.
* @since 1.4
*/
......@@ -350,7 +350,7 @@ class InetAddress implements java.io.Serializable {
/**
* Utility routine to check if the multicast address has global scope.
*
* @return a <code>boolean</code> indicating if the address has
* @return a {@code boolean} indicating if the address has
* is a multicast address of global scope, false if it is not
* of global scope or it is not a multicast address
* @since 1.4
......@@ -362,7 +362,7 @@ class InetAddress implements java.io.Serializable {
/**
* Utility routine to check if the multicast address has node scope.
*
* @return a <code>boolean</code> indicating if the address has
* @return a {@code boolean} indicating if the address has
* is a multicast address of node-local scope, false if it is not
* of node-local scope or it is not a multicast address
* @since 1.4
......@@ -374,7 +374,7 @@ class InetAddress implements java.io.Serializable {
/**
* Utility routine to check if the multicast address has link scope.
*
* @return a <code>boolean</code> indicating if the address has
* @return a {@code boolean} indicating if the address has
* is a multicast address of link-local scope, false if it is not
* of link-local scope or it is not a multicast address
* @since 1.4
......@@ -386,7 +386,7 @@ class InetAddress implements java.io.Serializable {
/**
* Utility routine to check if the multicast address has site scope.
*
* @return a <code>boolean</code> indicating if the address has
* @return a {@code boolean} indicating if the address has
* is a multicast address of site-local scope, false if it is not
* of site-local scope or it is not a multicast address
* @since 1.4
......@@ -398,7 +398,7 @@ class InetAddress implements java.io.Serializable {
/**
* Utility routine to check if the multicast address has organization scope.
*
* @return a <code>boolean</code> indicating if the address has
* @return a {@code boolean} indicating if the address has
* is a multicast address of organization-local scope,
* false if it is not of organization-local scope
* or it is not a multicast address
......@@ -424,9 +424,9 @@ class InetAddress implements java.io.Serializable {
* in an IllegalArgumentException being thrown.
*
* @param timeout the time, in milliseconds, before the call aborts
* @return a <code>boolean</code> indicating if the address is reachable.
* @return a {@code boolean} indicating if the address is reachable.
* @throws IOException if a network error occurs
* @throws IllegalArgumentException if <code>timeout</code> is negative.
* @throws IllegalArgumentException if {@code timeout} is negative.
* @since 1.5
*/
public boolean isReachable(int timeout) throws IOException {
......@@ -442,10 +442,10 @@ class InetAddress implements java.io.Serializable {
* privilege can be obtained, otherwise it will try to establish
* a TCP connection on port 7 (Echo) of the destination host.
* <p>
* The <code>network interface</code> and <code>ttl</code> parameters
* The {@code network interface} and {@code ttl} parameters
* let the caller specify which network interface the test will go through
* and the maximum number of hops the packets should go through.
* A negative value for the <code>ttl</code> will result in an
* A negative value for the {@code ttl} will result in an
* IllegalArgumentException being thrown.
* <p>
* The timeout value, in milliseconds, indicates the maximum amount of time
......@@ -458,9 +458,9 @@ class InetAddress implements java.io.Serializable {
* @param ttl the maximum numbers of hops to try or 0 for the
* default
* @param timeout the time, in milliseconds, before the call aborts
* @throws IllegalArgumentException if either <code>timeout</code>
* or <code>ttl</code> are negative.
* @return a <code>boolean</code>indicating if the address is reachable.
* @throws IllegalArgumentException if either {@code timeout}
* or {@code ttl} are negative.
* @return a {@code boolean}indicating if the address is reachable.
* @throws IOException if a network error occurs
* @since 1.5
*/
......@@ -486,8 +486,8 @@ class InetAddress implements java.io.Serializable {
* {@link #getCanonicalHostName() getCanonicalHostName}.
*
* <p>If there is a security manager, its
* <code>checkConnect</code> method is first called
* with the hostname and <code>-1</code>
* {@code checkConnect} method is first called
* with the hostname and {@code -1}
* as its arguments to see if the operation is allowed.
* If the operation is not allowed, it will return
* the textual representation of the IP address.
......@@ -511,8 +511,8 @@ class InetAddress implements java.io.Serializable {
* here without a security check.
*
* <p>If there is a security manager, this method first
* calls its <code>checkConnect</code> method
* with the hostname and <code>-1</code>
* calls its {@code checkConnect} method
* with the hostname and {@code -1}
* as its arguments to see if the calling code is allowed to know
* the hostname for this IP address, i.e., to connect to the host.
* If the operation is not allowed, it will return
......@@ -539,8 +539,8 @@ class InetAddress implements java.io.Serializable {
* the FQDN depending on the underlying system configuration.
*
* <p>If there is a security manager, this method first
* calls its <code>checkConnect</code> method
* with the hostname and <code>-1</code>
* calls its {@code checkConnect} method
* with the hostname and {@code -1}
* as its arguments to see if the calling code is allowed to know
* the hostname for this IP address, i.e., to connect to the host.
* If the operation is not allowed, it will return
......@@ -566,8 +566,8 @@ class InetAddress implements java.io.Serializable {
* Returns the hostname for this address.
*
* <p>If there is a security manager, this method first
* calls its <code>checkConnect</code> method
* with the hostname and <code>-1</code>
* calls its {@code checkConnect} method
* with the hostname and {@code -1}
* as its arguments to see if the calling code is allowed to know
* the hostname for this IP address, i.e., to connect to the host.
* If the operation is not allowed, it will return
......@@ -633,9 +633,9 @@ 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
* byte of the address is in <code>getAddress()[0]</code>.
* byte of the address is in {@code getAddress()[0]}.
*
* @return the raw IP address of this object.
*/
......@@ -664,18 +664,18 @@ class InetAddress implements java.io.Serializable {
/**
* Compares this object against the specified object.
* The result is <code>true</code> if and only if the argument is
* not <code>null</code> and it represents the same IP address as
* The result is {@code true} if and only if the argument is
* not {@code null} and it represents the same IP address as
* this object.
* <p>
* Two instances of <code>InetAddress</code> represent the same IP
* Two instances of {@code InetAddress} represent the same IP
* address if the length of the byte arrays returned by
* <code>getAddress</code> is the same for both, and each of the
* {@code getAddress} is the same for both, and each of the
* array components is the same for the byte arrays.
*
* @param obj the object to compare against.
* @return <code>true</code> if the objects are the same;
* <code>false</code> otherwise.
* @return {@code true} if the objects are the same;
* {@code false} otherwise.
* @see java.net.InetAddress#getAddress()
*/
public boolean equals(Object obj) {
......@@ -683,7 +683,7 @@ 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
* address.
*
......@@ -974,7 +974,7 @@ class InetAddress implements java.io.Serializable {
* No name service is checked for the validity of the address.
*
* <p> The host name can either be a machine name, such as
* "<code>java.sun.com</code>", or a textual representation of its IP
* "{@code java.sun.com}", or a textual representation of its IP
* address.
* <p> No validity checking is done on the host name either.
*
......@@ -1019,26 +1019,26 @@ class InetAddress implements java.io.Serializable {
* Determines the IP address of a host, given the host's name.
*
* <p> The host name can either be a machine name, such as
* "<code>java.sun.com</code>", or a textual representation of its
* "{@code java.sun.com}", or a textual representation of its
* IP address. If a literal IP address is supplied, only the
* validity of the address format is checked.
*
* <p> For <code>host</code> specified in literal IPv6 address,
* <p> For {@code host} specified in literal IPv6 address,
* either the form defined in RFC 2732 or the literal IPv6 address
* format defined in RFC 2373 is accepted. IPv6 scoped addresses are also
* supported. See <a href="Inet6Address.html#scoped">here</a> for a description of IPv6
* scoped addresses.
*
* <p> If the host is <tt>null</tt> then an <tt>InetAddress</tt>
* <p> If the host is {@code null} then an {@code InetAddress}
* representing an address of the loopback interface is returned.
* See <a href="http://www.ietf.org/rfc/rfc3330.txt">RFC&nbsp;3330</a>
* section&nbsp;2 and <a href="http://www.ietf.org/rfc/rfc2373.txt">RFC&nbsp;2373</a>
* section&nbsp;2.5.3. </p>
*
* @param host the specified host, or <code>null</code>.
* @param host the specified host, or {@code null}.
* @return an IP address for the given host name.
* @exception UnknownHostException if no IP address for the
* <code>host</code> could be found, or if a scope_id was specified
* {@code host} could be found, or if a scope_id was specified
* for a global IPv6 address.
* @exception SecurityException if a security manager exists
* and its checkConnect method doesn't allow the operation
......@@ -1059,37 +1059,37 @@ class InetAddress implements java.io.Serializable {
* based on the configured name service on the system.
*
* <p> The host name can either be a machine name, such as
* "<code>java.sun.com</code>", or a textual representation of its IP
* "{@code java.sun.com}", or a textual representation of its IP
* address. If a literal IP address is supplied, only the
* validity of the address format is checked.
*
* <p> For <code>host</code> specified in <i>literal IPv6 address</i>,
* <p> For {@code host} specified in <i>literal IPv6 address</i>,
* either the form defined in RFC 2732 or the literal IPv6 address
* format defined in RFC 2373 is accepted. A literal IPv6 address may
* also be qualified by appending a scoped zone identifier or scope_id.
* The syntax and usage of scope_ids is described
* <a href="Inet6Address.html#scoped">here</a>.
* <p> If the host is <tt>null</tt> then an <tt>InetAddress</tt>
* <p> If the host is {@code null} then an {@code InetAddress}
* representing an address of the loopback interface is returned.
* See <a href="http://www.ietf.org/rfc/rfc3330.txt">RFC&nbsp;3330</a>
* section&nbsp;2 and <a href="http://www.ietf.org/rfc/rfc2373.txt">RFC&nbsp;2373</a>
* section&nbsp;2.5.3. </p>
*
* <p> If there is a security manager and <code>host</code> is not
* null and <code>host.length() </code> is not equal to zero, the
* <p> If there is a security manager and {@code host} is not
* null and {@code host.length() } is not equal to zero, the
* security manager's
* <code>checkConnect</code> method is called
* with the hostname and <code>-1</code>
* {@code checkConnect} method is called
* with the hostname and {@code -1}
* as its arguments to see if the operation is allowed.
*
* @param host the name of the host, or <code>null</code>.
* @param host the name of the host, or {@code null}.
* @return an array of all the IP addresses for a given host name.
*
* @exception UnknownHostException if no IP address for the
* <code>host</code> could be found, or if a scope_id was specified
* {@code host} could be found, or if a scope_id was specified
* for a global IPv6 address.
* @exception SecurityException if a security manager exists and its
* <code>checkConnect</code> method doesn't allow the operation.
* {@code checkConnect} method doesn't allow the operation.
*
* @see SecurityManager#checkConnect
*/
......@@ -1389,9 +1389,9 @@ 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
* byte of the address is in <code>getAddress()[0]</code>.
* byte of the address is in {@code getAddress()[0]}.
*
* <p> This method doesn't block, i.e. no reverse name service lookup
* is performed.
......@@ -1417,14 +1417,14 @@ class InetAddress implements java.io.Serializable {
/**
* Returns the address of the local host. This is achieved by retrieving
* the name of the host from the system, then resolving that name into
* an <code>InetAddress</code>.
* an {@code InetAddress}.
*
* <P>Note: The resolved address may be cached for a short period of time.
* </P>
*
* <p>If there is a security manager, its
* <code>checkConnect</code> method is called
* with the local host name and <code>-1</code>
* {@code checkConnect} method is called
* with the local host name and {@code -1}
* as its arguments to see if the operation is allowed.
* If the operation is not allowed, an InetAddress representing
* the loopback address is returned.
......
/*
* Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -43,7 +43,7 @@ import java.io.ObjectStreamField;
* as returned values.
* <p>
* The <i>wildcard</i> is a special local IP address. It usually means "any"
* and can only be used for <code>bind</code> operations.
* and can only be used for {@code bind} operations.
*
* @see java.net.Socket
* @see java.net.ServerSocket
......@@ -155,8 +155,8 @@ public class InetSocketAddress
* and the port number a specified value.
* <p>
* A valid port value is between 0 and 65535.
* A port number of <code>zero</code> will let the system pick up an
* ephemeral port in a <code>bind</code> operation.
* A port number of {@code zero} will let the system pick up an
* ephemeral port in a {@code bind} operation.
* <p>
* @param port The port number
* @throws IllegalArgumentException if the port parameter is outside the specified
......@@ -171,10 +171,10 @@ public class InetSocketAddress
* Creates a socket address from an IP address and a port number.
* <p>
* A valid port value is between 0 and 65535.
* A port number of <code>zero</code> will let the system pick up an
* ephemeral port in a <code>bind</code> operation.
* A port number of {@code zero} will let the system pick up an
* ephemeral port in a {@code bind} operation.
* <P>
* A <code>null</code> address will assign the <i>wildcard</i> address.
* A {@code null} address will assign the <i>wildcard</i> address.
* <p>
* @param addr The IP address
* @param port The port number
......@@ -195,13 +195,13 @@ public class InetSocketAddress
* An attempt will be made to resolve the hostname into an InetAddress.
* If that attempt fails, the address will be flagged as <I>unresolved</I>.
* <p>
* If there is a security manager, its <code>checkConnect</code> method
* If there is a security manager, its {@code checkConnect} method
* is called with the host name as its argument to check the permissiom
* to resolve it. This could result in a SecurityException.
* <P>
* A valid port value is between 0 and 65535.
* A port number of <code>zero</code> will let the system pick up an
* ephemeral port in a <code>bind</code> operation.
* A port number of {@code zero} will let the system pick up an
* ephemeral port in a {@code bind} operation.
* <P>
* @param hostname the Host name
* @param port The port number
......@@ -237,8 +237,8 @@ public class InetSocketAddress
* The address will be flagged as <I>unresolved</I>.
* <p>
* A valid port value is between 0 and 65535.
* A port number of <code>zero</code> will let the system pick up an
* ephemeral port in a <code>bind</code> operation.
* A port number of {@code zero} will let the system pick up an
* ephemeral port in a {@code bind} operation.
* <P>
* @param host the Host name
* @param port The port number
......@@ -246,7 +246,7 @@ public class InetSocketAddress
* the range of valid port values, or if the hostname
* parameter is <TT>null</TT>.
* @see #isUnresolved()
* @return a <code>InetSocketAddress</code> representing the unresolved
* @return a {@code InetSocketAddress} representing the unresolved
* socket address
* @since 1.5
*/
......@@ -326,16 +326,16 @@ 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() {
return holder.getAddress();
}
/**
* Gets the <code>hostname</code>.
* Gets the {@code hostname}.
* Note: This method may trigger a name service reverse lookup if the
* address was created with a literal IP address.
*
......@@ -360,8 +360,8 @@ public class InetSocketAddress
/**
* Checks whether the address has been resolved or not.
*
* @return <code>true</code> if the hostname couldn't be resolved into
* an <code>InetAddress</code>.
* @return {@code true} if the hostname couldn't be resolved into
* an {@code InetAddress}.
*/
public final boolean isUnresolved() {
return holder.isUnresolved();
......@@ -382,11 +382,11 @@ public class InetSocketAddress
/**
* Compares this object against the specified object.
* The result is <code>true</code> if and only if the argument is
* not <code>null</code> and it represents the same address as
* The result is {@code true} if and only if the argument is
* not {@code null} and it represents the same address as
* this object.
* <p>
* Two instances of <code>InetSocketAddress</code> represent the same
* Two instances of {@code InetSocketAddress} represent the same
* address if both the InetAddresses (or hostnames if it is unresolved) and port
* numbers are equal.
* If both addresses are unresolved, then the hostname and the port number
......@@ -396,8 +396,8 @@ public class InetSocketAddress
* considered equal.
*
* @param obj the object to compare against.
* @return <code>true</code> if the objects are the same;
* <code>false</code> otherwise.
* @return {@code true} if the objects are the same;
* {@code false} otherwise.
* @see java.net.InetAddress#equals(java.lang.Object)
*/
@Override
......
/*
* Copyright (c) 2005, 2008, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -47,23 +47,23 @@ public class InterfaceAddress {
}
/**
* Returns an <code>InetAddress</code> for this address.
* Returns an {@code InetAddress} for this address.
*
* @return the <code>InetAddress</code> for this address.
* @return the {@code InetAddress} for this address.
*/
public InetAddress getAddress() {
return address;
}
/**
* Returns an <code>InetAddress</code> for the brodcast address
* Returns an {@code InetAddress} for the brodcast address
* for this InterfaceAddress.
* <p>
* Only IPv4 networks have broadcast address therefore, in the case
* of an IPv6 network, <code>null</code> will be returned.
* of an IPv6 network, {@code null} will be returned.
*
* @return the <code>InetAddress</code> representing the broadcast
* address or <code>null</code> if there is no broadcast address.
* @return the {@code InetAddress} representing the broadcast
* address or {@code null} if there is no broadcast address.
*/
public InetAddress getBroadcast() {
return broadcast;
......@@ -76,7 +76,7 @@ public class InterfaceAddress {
* or 24 (255.255.255.0). <p>
* Typical IPv6 values would be 128 (::1/128) or 10 (fe80::203:baff:fe27:1243/10)
*
* @return a <code>short</code> representing the prefix length for the
* @return a {@code short} representing the prefix length for the
* subnet of that address.
*/
public short getNetworkPrefixLength() {
......@@ -85,17 +85,17 @@ public class InterfaceAddress {
/**
* Compares this object against the specified object.
* The result is <code>true</code> if and only if the argument is
* not <code>null</code> and it represents the same interface address as
* The result is {@code true} if and only if the argument is
* not {@code null} and it represents the same interface address as
* this object.
* <p>
* Two instances of <code>InterfaceAddress</code> represent the same
* Two instances of {@code InterfaceAddress} represent the same
* address if the InetAddress, the prefix length and the broadcast are
* the same for both.
*
* @param obj the object to compare against.
* @return <code>true</code> if the objects are the same;
* <code>false</code> otherwise.
* @return {@code true} if the objects are the same;
* {@code false} otherwise.
* @see java.net.InterfaceAddress#hashCode()
*/
public boolean equals(Object obj) {
......@@ -122,7 +122,7 @@ public class InterfaceAddress {
}
/**
* Converts this Interface address to a <code>String</code>. The
* Converts this Interface address to a {@code String}. The
* string returned is of the form: InetAddress / prefix length [ broadcast address ].
*
* @return a string representation of this Interface address.
......
/*
* Copyright (c) 1997, 2006, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -45,18 +45,14 @@ import sun.net.www.ParseUtil;
*
* <p>for example:
*
* <p><code>
* jar:http://www.foo.com/bar/baz.jar!/COM/foo/Quux.class<br>
* </code>
* <p>{@code jar:http://www.foo.com/bar/baz.jar!/COM/foo/Quux.class}
*
* <p>Jar URLs should be used to refer to a JAR file or entries in
* a JAR file. The example above is a JAR URL which refers to a JAR
* entry. If the entry name is omitted, the URL refers to the whole
* JAR file:
*
* <code>
* jar:http://www.foo.com/bar/baz.jar!/
* </code>
* {@code jar:http://www.foo.com/bar/baz.jar!/}
*
* <p>Users should cast the generic URLConnection to a
* JarURLConnection when they know that the URL they created is a JAR
......@@ -76,19 +72,19 @@ import sun.net.www.ParseUtil;
* <dl>
*
* <dt>A Jar entry
* <dd><code>jar:http://www.foo.com/bar/baz.jar!/COM/foo/Quux.class</code>
* <dd>{@code jar:http://www.foo.com/bar/baz.jar!/COM/foo/Quux.class}
*
* <dt>A Jar file
* <dd><code>jar:http://www.foo.com/bar/baz.jar!/</code>
* <dd>{@code jar:http://www.foo.com/bar/baz.jar!/}
*
* <dt>A Jar directory
* <dd><code>jar:http://www.foo.com/bar/baz.jar!/COM/foo/</code>
* <dd>{@code jar:http://www.foo.com/bar/baz.jar!/COM/foo/}
*
* </dl>
*
* <p><code>!/</code> is refered to as the <em>separator</em>.
* <p>{@code !/} is refered to as the <em>separator</em>.
*
* <p>When constructing a JAR url via <code>new URL(context, spec)</code>,
* <p>When constructing a JAR url via {@code new URL(context, spec)},
* the following rules apply:
*
* <ul>
......@@ -294,7 +290,7 @@ public abstract class JarURLConnection extends URLConnection {
* can only be called once
* the connection has been completely verified by reading
* from the input stream until the end of the stream has been
* reached. Otherwise, this method will return <code>null</code>
* reached. Otherwise, this method will return {@code null}
*
* @return the Certificate object for this connection if the URL
* for it points to a JAR file entry, null otherwise.
......
/*
* Copyright (c) 1995, 2008, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -39,13 +39,13 @@ public class MalformedURLException extends IOException {
private static final long serialVersionUID = -182787522200415866L;
/**
* Constructs a <code>MalformedURLException</code> with no detail message.
* Constructs a {@code MalformedURLException} with no detail message.
*/
public MalformedURLException() {
}
/**
* Constructs a <code>MalformedURLException</code> with the
* Constructs a {@code MalformedURLException} with the
* specified detail message.
*
* @param msg the detail message.
......
/*
* Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -177,8 +177,8 @@ public final class NetPermission extends BasicPermission {
*
* @param name the name of the NetPermission.
*
* @throws NullPointerException if <code>name</code> is <code>null</code>.
* @throws IllegalArgumentException if <code>name</code> is empty.
* @throws NullPointerException if {@code name} is {@code null}.
* @throws IllegalArgumentException if {@code name} is empty.
*/
public NetPermission(String name)
......@@ -194,8 +194,8 @@ public final class NetPermission extends BasicPermission {
* @param name the name of the NetPermission.
* @param actions should be null.
*
* @throws NullPointerException if <code>name</code> is <code>null</code>.
* @throws IllegalArgumentException if <code>name</code> is empty.
* @throws NullPointerException if {@code name} is {@code null}.
* @throws IllegalArgumentException if {@code name} is empty.
*/
public NetPermission(String name, String actions)
......
/*
* Copyright (c) 1997, 2001, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -43,11 +43,11 @@ public final class PasswordAuthentication {
private char[] password;
/**
* Creates a new <code>PasswordAuthentication</code> object from the given
* Creates a new {@code PasswordAuthentication} object from the given
* user name and password.
*
* <p> Note that the given user password is cloned before it is stored in
* the new <code>PasswordAuthentication</code> object.
* the new {@code PasswordAuthentication} object.
*
* @param userName the user name
* @param password the user's password
......
/*
* Copyright (c) 2001, 2008, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -36,7 +36,7 @@ public class PortUnreachableException extends SocketException {
private static final long serialVersionUID = 8462541992376507323L;
/**
* Constructs a new <code>PortUnreachableException</code> with a
* Constructs a new {@code PortUnreachableException} with a
* detail message.
* @param msg the detail message
*/
......@@ -45,7 +45,7 @@ public class PortUnreachableException extends SocketException {
}
/**
* Construct a new <code>PortUnreachableException</code> with no
* Construct a new {@code PortUnreachableException} with no
* detailed message.
*/
public PortUnreachableException() {}
......
/*
* Copyright (c) 1995, 2008, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -39,7 +39,7 @@ class ProtocolException extends IOException {
private static final long serialVersionUID = -6098449442062388080L;
/**
* Constructs a new <code>ProtocolException</code> with the
* Constructs a new {@code ProtocolException} with the
* specified detail message.
*
* @param host the detail message.
......@@ -49,7 +49,7 @@ class ProtocolException extends IOException {
}
/**
* Constructs a new <code>ProtocolException</code> with no detail message.
* Constructs a new {@code ProtocolException} with no detail message.
*/
public ProtocolException() {
}
......
/*
* Copyright (c) 1995, 2012, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -67,8 +67,8 @@ class SocketInputStream extends FileInputStream
* Returns the unique {@link java.nio.channels.FileChannel FileChannel}
* object associated with this file input stream.</p>
*
* The <code>getChannel</code> method of <code>SocketInputStream</code>
* returns <code>null</code> since it is a socket based stream.</p>
* The {@code getChannel} method of {@code SocketInputStream}
* returns {@code null} since it is a socket based stream.</p>
*
* @return the file channel associated with this file input stream
*
......
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册